Skip to content

Commit

Permalink
Fix build without ITP
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=262533

Reviewed by Michael Catanzaro.

* Source/WebCore/dom/Element.h:
Drive-by typo fix to rename isSyntheticClick variable as isSyntheticClick

* Source/WebCore/page/Quirks.cpp:
(WebCore::Quirks::triggerOptionalStorageAccessQuirk const):
Flag isSyntheticClick usage added in 238929@main (98bc131)

* Source/WebCore/platform/network/soup/NetworkStorageSessionSoup.cpp:
(WebCore::NetworkStorageSession::setCookiesFromDOM const):
(WebCore::NetworkStorageSession::getRawCookies const):
(WebCore::cookiesForSession):
Flag shouldRelaxThirdPartyCookieBlocking usage added in 225134@main (664f226)

* Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h:
Include HashCountedSet.h to fix build of MessageReceiver objects without ITP

* Source/WebKit/NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp:
(WebKit::WebSWServerToContextConnection::fireNotificationEvent):
Flag resourceLoadStatistics() usage added in 255816@main (9404eee)

* Source/WebKit/NetworkProcess/cache/NetworkCache.cpp:
Include WebsiteDataType.h for WebsiteDataType::DiskCache usage

* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:
Flag RequestStorageAccessResult struct moved in 259893@main (cbe22e4)

Canonical link: https://commits.webkit.org/268975@main
  • Loading branch information
blino committed Oct 6, 2023
1 parent 86924d7 commit a6bbf5e
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Source/WebCore/dom/Element.h
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ class Element : public ContainerNode {
IntPoint savedLayerScrollPosition() const;
void setSavedLayerScrollPosition(const IntPoint&);

bool dispatchMouseEvent(const PlatformMouseEvent&, const AtomString& eventType, int clickCount = 0, Element* relatedTarget = nullptr, IsSyntheticClick isSyntethicClick = IsSyntheticClick::No);
bool dispatchMouseEvent(const PlatformMouseEvent&, const AtomString& eventType, int clickCount = 0, Element* relatedTarget = nullptr, IsSyntheticClick isSyntheticClick = IsSyntheticClick::No);
bool dispatchWheelEvent(const PlatformWheelEvent&, OptionSet<EventHandling>&, EventIsCancelable = EventIsCancelable::Yes);
bool dispatchKeyEvent(const PlatformKeyboardEvent&);
bool dispatchSimulatedClick(Event* underlyingEvent, SimulatedClickMouseEventOptions = SendNoEvents, SimulatedClickVisualOptions = ShowPressedLook);
Expand Down
1 change: 1 addition & 0 deletions Source/WebCore/page/Quirks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1226,6 +1226,7 @@ Quirks::StorageAccessResult Quirks::triggerOptionalStorageAccessQuirk(Element& e
UNUSED_PARAM(eventType);
UNUSED_PARAM(detail);
UNUSED_PARAM(relatedTarget);
UNUSED_PARAM(isSyntheticClick);
#endif
return Quirks::StorageAccessResult::ShouldNotCancelEvent;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,7 @@ void NetworkStorageSession::setCookiesFromDOM(const URL& firstParty, const SameS
UNUSED_PARAM(frameID);
UNUSED_PARAM(pageID);
UNUSED_PARAM(applyTrackingPrevention);
UNUSED_PARAM(relaxThirdPartyCookieBlocking);
#endif

auto origin = urlToSoupURI(url);
Expand Down Expand Up @@ -573,6 +574,7 @@ bool NetworkStorageSession::getRawCookies(const URL& firstParty, const SameSiteI
UNUSED_PARAM(frameID);
UNUSED_PARAM(pageID);
UNUSED_PARAM(applyTrackingPrevention);
UNUSED_PARAM(relaxThirdPartyCookieBlocking);
#endif

auto uri = urlToSoupURI(url);
Expand Down Expand Up @@ -613,6 +615,7 @@ static std::pair<String, bool> cookiesForSession(const NetworkStorageSession& se
UNUSED_PARAM(frameID);
UNUSED_PARAM(pageID);
UNUSED_PARAM(applyTrackingPrevention);
UNUSED_PARAM(relaxThirdPartyCookieBlocking);
#endif

auto uri = urlToSoupURI(url);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
#include <WebCore/RegistrableDomain.h>
#include <WebCore/WebSocketIdentifier.h>
#include <optional>
#include <wtf/HashCountedSet.h>
#include <wtf/OptionSet.h>
#include <wtf/RefCounted.h>
#include <wtf/URLHash.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,12 +155,16 @@ void WebSWServerToContextConnection::fireNotificationEvent(ServiceWorkerIdentifi
if (!--weakThis->m_processingFunctionalEventCount)
weakThis->m_connection.networkProcess().parentProcessConnection()->send(Messages::NetworkProcessProxy::EndServiceWorkerBackgroundProcessing { weakThis->webProcessIdentifier() }, 0);

#if ENABLE(TRACKING_PREVENTION)
auto* session = weakThis->m_connection.networkSession();
if (auto* resourceLoadStatistics = session ? session->resourceLoadStatistics() : nullptr; resourceLoadStatistics && wasProcessed && eventType == NotificationEventType::Click) {
return resourceLoadStatistics->setMostRecentWebPushInteractionTime(RegistrableDomain(weakThis->registrableDomain()), [callback = WTFMove(callback), wasProcessed] () mutable {
callback(wasProcessed);
});
}
#else
UNUSED_PARAM(eventType);
#endif

callback(wasProcessed);
});
Expand Down
1 change: 1 addition & 0 deletions Source/WebKit/NetworkProcess/cache/NetworkCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include "NetworkCacheStorage.h"
#include "NetworkProcess.h"
#include "NetworkSession.h"
#include "WebsiteDataType.h"
#include <WebCore/CacheValidation.h>
#include <WebCore/HTTPHeaderNames.h>
#include <WebCore/LowPowerModeNotifier.h>
Expand Down
4 changes: 4 additions & 0 deletions Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in
Original file line number Diff line number Diff line change
Expand Up @@ -4664,6 +4664,8 @@ struct WebCore::MessageWithMessagePorts {
Vector<WebCore::TransferredMessagePort> transferredPorts;
};

#if ENABLE(TRACKING_PREVENTION)

enum class WebCore::StorageAccessWasGranted : bool

enum class WebCore::StorageAccessPromptWasShown : bool
Expand All @@ -4681,6 +4683,8 @@ header: <WebCore/DocumentStorageAccess.h>
WebCore::RegistrableDomain subFrameDomain;
};

#endif // ENABLE(TRACKING_PREVENTION)

class WebCore::Exception {
WebCore::ExceptionCode code();
String message();
Expand Down

0 comments on commit a6bbf5e

Please sign in to comment.