WebKit Bugzilla
Attachment 361309 Details for
Bug 194325
: Forward Ad Click Attribution data from HTMLAnchorElement::handleClick() to WebKit::NavigationActionData
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-194325-20190206111959.patch (text/plain), 22.20 KB, created by
John Wilander
on 2019-02-06 11:20:00 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
John Wilander
Created:
2019-02-06 11:20:00 PST
Size:
22.20 KB
patch
obsolete
>Subversion Revision: 241008 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 3896620c7c3a8f2bc319f3726e2be1208929629e..95962e2807f431ebcb10a904704c5a57b52ed6b4 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,37 @@ >+2019-02-06 John Wilander <wilander@apple.com> >+ >+ Forward Ad Click Attribution data from HTMLAnchorElement::handleClick() to WebKit::NavigationActionData >+ https://bugs.webkit.org/show_bug.cgi?id=194325 >+ <rdar://problem/47840283> >+ >+ Reviewed by Chris Dumez. >+ >+ No new tests. This is just data forwarding. Once the data is stored, I will create >+ test infrastructure to query it. >+ >+ * html/HTMLAnchorElement.cpp: >+ (WebCore::HTMLAnchorElement::handleClick): >+ * loader/AdClickAttribution.h: >+ (WebCore::AdClickAttribution::encode const): >+ (WebCore::AdClickAttribution::decode): >+ (WebCore::AdClickAttribution::Conversion::encode const): >+ (WebCore::AdClickAttribution::Conversion::decode): >+ Infrastructure for IPC. >+ * loader/FrameLoader.cpp: >+ (WebCore::FrameLoader::urlSelected): >+ (WebCore::FrameLoader::loadURLIntoChildFrame): >+ (WebCore::FrameLoader::loadFrameRequest): >+ (WebCore::FrameLoader::loadURL): >+ These functions forward the optional WebCore::AdClickAttribution object >+ FrameLoader::loadURL() creates the NavigationAction object and sets the >+ WebCore::AdClickAttribution object on there. >+ * loader/FrameLoader.h: >+ (WebCore::FrameLoader::urlSelected): >+ (WebCore::FrameLoader::loadURL): >+ * loader/NavigationAction.h: >+ (WebCore::NavigationAction::adClickAttribution): >+ (WebCore::NavigationAction::setAdClickAttribution): >+ > 2019-02-05 Alex Christensen <achristensen@webkit.org> > > Stop using blobRegistry in NetworkProcess >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index c83fc5052ce92c26cdd6f4b4e1c810eac0b211e4..577bf989df74c494380c63c7c1f3f43f829f4a57 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,17 @@ >+2019-02-06 John Wilander <wilander@apple.com> >+ >+ Forward Ad Click Attribution data from HTMLAnchorElement::handleClick() to WebKit::NavigationActionData >+ https://bugs.webkit.org/show_bug.cgi?id=194325 >+ <rdar://problem/47840283> >+ >+ Reviewed by Chris Dumez. >+ >+ * Shared/NavigationActionData.cpp: >+ (WebKit::NavigationActionData::encode const): >+ (WebKit::NavigationActionData::decode): >+ * Shared/NavigationActionData.h: >+ Now holds an optional WebCore::AdClickAttribution object. >+ > 2019-02-05 Alex Christensen <achristensen@webkit.org> > > Stop using blobRegistry in NetworkProcess >diff --git a/Source/WebCore/html/HTMLAnchorElement.cpp b/Source/WebCore/html/HTMLAnchorElement.cpp >index 071870c472a08da10ef2b891fc389cd0f7c3ee33..37d98a33bc8bfdadebd1de3fa7b0a6d5107ebc0f 100644 >--- a/Source/WebCore/html/HTMLAnchorElement.cpp >+++ b/Source/WebCore/html/HTMLAnchorElement.cpp >@@ -488,13 +488,11 @@ void HTMLAnchorElement::handleClick(Event& event) > newFrameOpenerPolicy = NewFrameOpenerPolicy::Suppress; > > auto adClickAttribution = parseAdClickAttribution(); >- // FIXME: The adClickAttribution should be forwarded to the loader and handled down the pipe. See >- // rdar://problem/47650118 > // A matching conversion event needs to happen before the complete ad click attributionURL can be > // created. Thus, it should be empty for now. >- ASSERT_UNUSED(adClickAttribution, !adClickAttribution || adClickAttribution->url().isNull()); >+ ASSERT(!adClickAttribution || adClickAttribution->url().isNull()); > >- frame->loader().urlSelected(completedURL, effectiveTarget, &event, LockHistory::No, LockBackForwardList::No, shouldSendReferrer, document().shouldOpenExternalURLsPolicyToPropagate(), newFrameOpenerPolicy, downloadAttribute, systemPreviewInfo); >+ frame->loader().urlSelected(completedURL, effectiveTarget, &event, LockHistory::No, LockBackForwardList::No, shouldSendReferrer, document().shouldOpenExternalURLsPolicyToPropagate(), newFrameOpenerPolicy, downloadAttribute, systemPreviewInfo, WTFMove(adClickAttribution)); > > sendPings(completedURL); > } >diff --git a/Source/WebCore/loader/AdClickAttribution.h b/Source/WebCore/loader/AdClickAttribution.h >index fe06a1bf2faea81a0ab55ba266095ac348c61c9c..34af2f2da5577fc487a173d79f7ab4935b94aabb 100644 >--- a/Source/WebCore/loader/AdClickAttribution.h >+++ b/Source/WebCore/loader/AdClickAttribution.h >@@ -108,6 +108,9 @@ public: > > ConversionData data; > PriorityValue priority; >+ >+ template<class Encoder> void encode(Encoder&) const; >+ template<class Decoder> static Optional<Conversion> decode(Decoder&); > }; > > AdClickAttribution(Campaign campaign, const Source& source, const Destination& destination) >@@ -123,6 +126,9 @@ public: > WEBCORE_EXPORT URL referrer() const; > Optional<WallTime> earliestTimeToSend() const { return m_earliestTimeToSend; }; > >+ template<class Encoder> void encode(Encoder&) const; >+ template<class Decoder> static Optional<AdClickAttribution> decode(Decoder&); >+ > private: > bool isValid() const; > >@@ -134,5 +140,73 @@ private: > Optional<Conversion> m_conversion; > Optional<WallTime> m_earliestTimeToSend; > }; >+ >+template<class Encoder> >+void AdClickAttribution::encode(Encoder& encoder) const >+{ >+ encoder << m_campaign.id << m_source.registrableDomain << m_destination.registrableDomain << m_timeOfAdClick << m_conversion << m_earliestTimeToSend; >+} >+ >+template<class Decoder> >+Optional<AdClickAttribution> AdClickAttribution::decode(Decoder& decoder) >+{ >+ Optional<CampaignId> campaignId; >+ decoder >> campaignId; >+ if (!campaignId) >+ return WTF::nullopt; >+ >+ Optional<String> sourceRegistrableDomain; >+ decoder >> sourceRegistrableDomain; >+ if (!sourceRegistrableDomain) >+ return WTF::nullopt; >+ >+ Optional<String> destinationRegistrableDomain; >+ decoder >> destinationRegistrableDomain; >+ if (!destinationRegistrableDomain) >+ return WTF::nullopt; >+ >+ Optional<WallTime> timeOfAdClick; >+ decoder >> timeOfAdClick; >+ if (!timeOfAdClick) >+ return WTF::nullopt; >+ >+ Optional<Optional<Conversion>> conversion; >+ decoder >> conversion; >+ if (!conversion) >+ return WTF::nullopt; >+ >+ Optional<Optional<WallTime>> earliestTimeToSend; >+ decoder >> earliestTimeToSend; >+ if (!earliestTimeToSend) >+ return WTF::nullopt; > >+ AdClickAttribution attribution { Campaign { WTFMove(*campaignId) }, Source { WTFMove(*sourceRegistrableDomain) }, Destination { WTFMove(*destinationRegistrableDomain) } }; >+ attribution.m_conversion = WTFMove(*conversion); >+ attribution.m_earliestTimeToSend = WTFMove(*earliestTimeToSend); >+ >+ return attribution; >+} >+ >+template<class Encoder> >+void AdClickAttribution::Conversion::encode(Encoder& encoder) const >+{ >+ encoder << data << priority; >+} >+ >+template<class Decoder> >+Optional<AdClickAttribution::Conversion> AdClickAttribution::Conversion::decode(Decoder& decoder) >+{ >+ Optional<ConversionData> data; >+ decoder >> data; >+ if (!data) >+ return WTF::nullopt; >+ >+ Optional<PriorityValue> priority; >+ decoder >> priority; >+ if (!priority) >+ return WTF::nullopt; >+ >+ return Conversion { WTFMove(*data), Priority { WTFMove(*priority) } }; >+} >+ > } // namespace WebCore >diff --git a/Source/WebCore/loader/FrameLoader.cpp b/Source/WebCore/loader/FrameLoader.cpp >index 1f552bd8dcbf81de7e912fe3a52db06fba7e4412..e520e2b252a9dbf349ec2352626773a74f5a11d8 100644 >--- a/Source/WebCore/loader/FrameLoader.cpp >+++ b/Source/WebCore/loader/FrameLoader.cpp >@@ -380,16 +380,16 @@ void FrameLoader::changeLocation(FrameLoadRequest&& request) > urlSelected(WTFMove(request), nullptr); > } > >-void FrameLoader::urlSelected(const URL& url, const String& passedTarget, Event* triggeringEvent, LockHistory lockHistory, LockBackForwardList lockBackForwardList, ShouldSendReferrer shouldSendReferrer, ShouldOpenExternalURLsPolicy shouldOpenExternalURLsPolicy, Optional<NewFrameOpenerPolicy> openerPolicy, const AtomicString& downloadAttribute, const SystemPreviewInfo& systemPreviewInfo) >+void FrameLoader::urlSelected(const URL& url, const String& passedTarget, Event* triggeringEvent, LockHistory lockHistory, LockBackForwardList lockBackForwardList, ShouldSendReferrer shouldSendReferrer, ShouldOpenExternalURLsPolicy shouldOpenExternalURLsPolicy, Optional<NewFrameOpenerPolicy> openerPolicy, const AtomicString& downloadAttribute, const SystemPreviewInfo& systemPreviewInfo, Optional<AdClickAttribution>&& adClickAttribution) > { > auto* frame = lexicalFrameFromCommonVM(); > auto initiatedByMainFrame = frame && frame->isMainFrame() ? InitiatedByMainFrame::Yes : InitiatedByMainFrame::Unknown; > > NewFrameOpenerPolicy newFrameOpenerPolicy = openerPolicy.valueOr(shouldSendReferrer == NeverSendReferrer ? NewFrameOpenerPolicy::Suppress : NewFrameOpenerPolicy::Allow); >- urlSelected(FrameLoadRequest(*m_frame.document(), m_frame.document()->securityOrigin(), { url }, passedTarget, lockHistory, lockBackForwardList, shouldSendReferrer, AllowNavigationToInvalidURL::Yes, newFrameOpenerPolicy, shouldOpenExternalURLsPolicy, initiatedByMainFrame, DoNotReplaceDocumentIfJavaScriptURL, downloadAttribute, systemPreviewInfo), triggeringEvent); >+ urlSelected(FrameLoadRequest(*m_frame.document(), m_frame.document()->securityOrigin(), { url }, passedTarget, lockHistory, lockBackForwardList, shouldSendReferrer, AllowNavigationToInvalidURL::Yes, newFrameOpenerPolicy, shouldOpenExternalURLsPolicy, initiatedByMainFrame, DoNotReplaceDocumentIfJavaScriptURL, downloadAttribute, systemPreviewInfo), triggeringEvent, WTFMove(adClickAttribution)); > } > >-void FrameLoader::urlSelected(FrameLoadRequest&& frameRequest, Event* triggeringEvent) >+void FrameLoader::urlSelected(FrameLoadRequest&& frameRequest, Event* triggeringEvent, Optional<AdClickAttribution>&& adClickAttribution) > { > RELEASE_LOG_IF_ALLOWED("urlSelected: frame load started (frame = %p, main = %d)", &m_frame, m_frame.isMainFrame()); > >@@ -404,7 +404,7 @@ void FrameLoader::urlSelected(FrameLoadRequest&& frameRequest, Event* triggering > addHTTPOriginIfNeeded(frameRequest.resourceRequest(), outgoingOrigin()); > m_frame.document()->contentSecurityPolicy()->upgradeInsecureRequestIfNeeded(frameRequest.resourceRequest(), ContentSecurityPolicy::InsecureRequestType::Navigation); > >- loadFrameRequest(WTFMove(frameRequest), triggeringEvent, { }); >+ loadFrameRequest(WTFMove(frameRequest), triggeringEvent, { }, WTFMove(adClickAttribution)); > } > > void FrameLoader::submitForm(Ref<FormSubmission>&& submission) >@@ -984,7 +984,7 @@ void FrameLoader::loadURLIntoChildFrame(const URL& url, const String& referer, F > auto initiatedByMainFrame = lexicalFrame && lexicalFrame->isMainFrame() ? InitiatedByMainFrame::Yes : InitiatedByMainFrame::Unknown; > > FrameLoadRequest frameLoadRequest { *m_frame.document(), m_frame.document()->securityOrigin(), { url }, "_self"_s, LockHistory::No, LockBackForwardList::Yes, ShouldSendReferrer::MaybeSendReferrer, AllowNavigationToInvalidURL::Yes, NewFrameOpenerPolicy::Suppress, ShouldOpenExternalURLsPolicy::ShouldNotAllow, initiatedByMainFrame }; >- childFrame->loader().loadURL(WTFMove(frameLoadRequest), referer, FrameLoadType::RedirectWithLockedBackForwardList, nullptr, { }, [] { }); >+ childFrame->loader().loadURL(WTFMove(frameLoadRequest), referer, FrameLoadType::RedirectWithLockedBackForwardList, nullptr, { }, WTF::nullopt, [] { }); > } > > #if ENABLE(WEB_ARCHIVE) || ENABLE(MHTML) >@@ -1240,7 +1240,7 @@ void FrameLoader::setupForReplace() > detachChildren(); > } > >-void FrameLoader::loadFrameRequest(FrameLoadRequest&& request, Event* event, RefPtr<FormState>&& formState) >+void FrameLoader::loadFrameRequest(FrameLoadRequest&& request, Event* event, RefPtr<FormState>&& formState, Optional<AdClickAttribution>&& adClickAttribution) > { > RELEASE_LOG_IF_ALLOWED("loadFrameRequest: frame load started (frame = %p, main = %d)", &m_frame, m_frame.isMainFrame()); > >@@ -1287,7 +1287,7 @@ void FrameLoader::loadFrameRequest(FrameLoadRequest&& request, Event* event, Ref > if (request.resourceRequest().httpMethod() == "POST") > loadPostRequest(WTFMove(request), referrer, loadType, event, WTFMove(formState), WTFMove(completionHandler)); > else >- loadURL(WTFMove(request), referrer, loadType, event, WTFMove(formState), WTFMove(completionHandler)); >+ loadURL(WTFMove(request), referrer, loadType, event, WTFMove(formState), WTFMove(adClickAttribution), WTFMove(completionHandler)); > } > > static ShouldOpenExternalURLsPolicy shouldOpenExternalURLsPolicyToApply(Frame& currentFrame, InitiatedByMainFrame initiatedByMainFrame, ShouldOpenExternalURLsPolicy propagatedPolicy) >@@ -1329,7 +1329,7 @@ bool FrameLoader::isStopLoadingAllowed() const > return m_pageDismissalEventBeingDispatched == PageDismissalType::None; > } > >-void FrameLoader::loadURL(FrameLoadRequest&& frameLoadRequest, const String& referrer, FrameLoadType newLoadType, Event* event, RefPtr<FormState>&& formState, CompletionHandler<void()>&& completionHandler) >+void FrameLoader::loadURL(FrameLoadRequest&& frameLoadRequest, const String& referrer, FrameLoadType newLoadType, Event* event, RefPtr<FormState>&& formState, Optional<AdClickAttribution>&& adClickAttribution, CompletionHandler<void()>&& completionHandler) > { > RELEASE_LOG_IF_ALLOWED("loadURL: frame load started (frame = %p, main = %d)", &m_frame, m_frame.isMainFrame()); > >@@ -1366,7 +1366,7 @@ void FrameLoader::loadURL(FrameLoadRequest&& frameLoadRequest, const String& ref > Frame* targetFrame = isFormSubmission ? nullptr : findFrameForNavigation(effectiveFrameName); > if (targetFrame && targetFrame != &m_frame) { > frameLoadRequest.setFrameName("_self"); >- targetFrame->loader().loadURL(WTFMove(frameLoadRequest), referrer, newLoadType, event, WTFMove(formState), completionHandlerCaller.release()); >+ targetFrame->loader().loadURL(WTFMove(frameLoadRequest), referrer, newLoadType, event, WTFMove(formState), WTFMove(adClickAttribution), completionHandlerCaller.release()); > return; > } > >@@ -1376,6 +1376,8 @@ void FrameLoader::loadURL(FrameLoadRequest&& frameLoadRequest, const String& ref > NavigationAction action { frameLoadRequest.requester(), request, frameLoadRequest.initiatedByMainFrame(), newLoadType, isFormSubmission, event, frameLoadRequest.shouldOpenExternalURLsPolicy(), frameLoadRequest.downloadAttribute() }; > action.setLockHistory(lockHistory); > action.setLockBackForwardList(frameLoadRequest.lockBackForwardList()); >+ if (adClickAttribution && m_frame.isMainFrame()) >+ action.setAdClickAttribution(WTFMove(*adClickAttribution)); > > if (!targetFrame && !effectiveFrameName.isEmpty()) { > action = action.copyWithShouldOpenExternalURLsPolicy(shouldOpenExternalURLsPolicyToApply(m_frame, frameLoadRequest)); >diff --git a/Source/WebCore/loader/FrameLoader.h b/Source/WebCore/loader/FrameLoader.h >index adba50791e003e8a87b857ebd8cbf84a1f054a24..2b7e33b7c2d967a6fb48f1d81cdf4ec19446a346 100644 >--- a/Source/WebCore/loader/FrameLoader.h >+++ b/Source/WebCore/loader/FrameLoader.h >@@ -31,6 +31,7 @@ > > #pragma once > >+#include "AdClickAttribution.h" > #include "CachePolicy.h" > #include "FrameLoaderStateMachine.h" > #include "FrameLoaderTypes.h" >@@ -115,7 +116,7 @@ public: > > // FIXME: These are all functions which start loads. We have too many. > WEBCORE_EXPORT void loadURLIntoChildFrame(const URL&, const String& referer, Frame*); >- WEBCORE_EXPORT void loadFrameRequest(FrameLoadRequest&&, Event*, RefPtr<FormState>&&); // Called by submitForm, calls loadPostRequest and loadURL. >+ WEBCORE_EXPORT void loadFrameRequest(FrameLoadRequest&&, Event*, RefPtr<FormState>&&, Optional<AdClickAttribution>&& = WTF::nullopt); // Called by submitForm, calls loadPostRequest and loadURL. > > WEBCORE_EXPORT void load(FrameLoadRequest&&); > >@@ -125,7 +126,7 @@ public: > unsigned long loadResourceSynchronously(const ResourceRequest&, ClientCredentialPolicy, const FetchOptions&, const HTTPHeaderMap&, ResourceError&, ResourceResponse&, RefPtr<SharedBuffer>& data); > > void changeLocation(FrameLoadRequest&&); >- WEBCORE_EXPORT void urlSelected(const URL&, const String& target, Event*, LockHistory, LockBackForwardList, ShouldSendReferrer, ShouldOpenExternalURLsPolicy, Optional<NewFrameOpenerPolicy> = WTF::nullopt, const AtomicString& downloadAttribute = nullAtom(), const SystemPreviewInfo& = { }); >+ WEBCORE_EXPORT void urlSelected(const URL&, const String& target, Event*, LockHistory, LockBackForwardList, ShouldSendReferrer, ShouldOpenExternalURLsPolicy, Optional<NewFrameOpenerPolicy> = WTF::nullopt, const AtomicString& downloadAttribute = nullAtom(), const SystemPreviewInfo& = { }, Optional<AdClickAttribution>&& = WTF::nullopt); > void submitForm(Ref<FormSubmission>&&); > > WEBCORE_EXPORT void reload(OptionSet<ReloadOption> = { }); >@@ -371,7 +372,7 @@ private: > > void dispatchDidCommitLoad(Optional<HasInsecureContent> initialHasInsecureContent); > >- void urlSelected(FrameLoadRequest&&, Event*); >+ void urlSelected(FrameLoadRequest&&, Event*, Optional<AdClickAttribution>&& = WTF::nullopt); > > void loadWithDocumentLoader(DocumentLoader*, FrameLoadType, RefPtr<FormState>&&, AllowNavigationToInvalidURL, ShouldTreatAsContinuingLoad, CompletionHandler<void()>&& = [] { }); // Calls continueLoadAfterNavigationPolicy > void load(DocumentLoader&); // Calls loadWithDocumentLoader >@@ -379,7 +380,7 @@ private: > void loadWithNavigationAction(const ResourceRequest&, NavigationAction&&, LockHistory, FrameLoadType, RefPtr<FormState>&&, AllowNavigationToInvalidURL, CompletionHandler<void()>&& = [] { }); // Calls loadWithDocumentLoader > > void loadPostRequest(FrameLoadRequest&&, const String& referrer, FrameLoadType, Event*, RefPtr<FormState>&&, CompletionHandler<void()>&&); >- void loadURL(FrameLoadRequest&&, const String& referrer, FrameLoadType, Event*, RefPtr<FormState>&&, CompletionHandler<void()>&&); >+ void loadURL(FrameLoadRequest&&, const String& referrer, FrameLoadType, Event*, RefPtr<FormState>&&, Optional<AdClickAttribution>&&, CompletionHandler<void()>&&); > > bool shouldReload(const URL& currentURL, const URL& destinationURL); > >diff --git a/Source/WebCore/loader/NavigationAction.h b/Source/WebCore/loader/NavigationAction.h >index d3fbf7f4fdef9866b7924fedad4fc05dbac55cdb..9497e980f766ef46cfe44804a1e1b8867d30deca 100644 >--- a/Source/WebCore/loader/NavigationAction.h >+++ b/Source/WebCore/loader/NavigationAction.h >@@ -28,6 +28,7 @@ > > #pragma once > >+#include "AdClickAttribution.h" > #include "BackForwardItemIdentifier.h" > #include "FrameLoaderTypes.h" > #include "LayoutPoint.h" >@@ -35,6 +36,7 @@ > #include "SecurityOrigin.h" > #include "UserGestureIndicator.h" > #include <wtf/Forward.h> >+#include <wtf/Optional.h> > > namespace WebCore { > >@@ -133,6 +135,9 @@ public: > LockBackForwardList lockBackForwardList() const { return m_lockBackForwardList; } > void setLockBackForwardList(LockBackForwardList lockBackForwardList) { m_lockBackForwardList = lockBackForwardList; } > >+ const Optional<AdClickAttribution>& adClickAttribution() { return m_adClickAttribution; }; >+ void setAdClickAttribution(AdClickAttribution&& adClickAttribution) { m_adClickAttribution = adClickAttribution; }; >+ > private: > // Do not add a strong reference to the originating document or a subobject that holds the > // originating document. See comment above the class for more details. >@@ -151,6 +156,7 @@ private: > Optional<BackForwardItemIdentifier> m_targetBackForwardItemIdentifier; > LockHistory m_lockHistory { LockHistory::No }; > LockBackForwardList m_lockBackForwardList { LockBackForwardList::No }; >+ Optional<AdClickAttribution> m_adClickAttribution; > }; > > } // namespace WebCore >diff --git a/Source/WebKit/Shared/NavigationActionData.cpp b/Source/WebKit/Shared/NavigationActionData.cpp >index b9e6625901135378c3803f61e05e10fdecdcc891..969308abd7192eb96b2aea70ff416223506233a1 100644 >--- a/Source/WebKit/Shared/NavigationActionData.cpp >+++ b/Source/WebKit/Shared/NavigationActionData.cpp >@@ -53,6 +53,7 @@ void NavigationActionData::encode(IPC::Encoder& encoder) const > encoder.encodeEnum(lockHistory); > encoder.encodeEnum(lockBackForwardList); > encoder << clientRedirectSourceForHistory; >+ encoder << adClickAttribution; > } > > Optional<NavigationActionData> NavigationActionData::decode(IPC::Decoder& decoder) >@@ -139,10 +140,15 @@ Optional<NavigationActionData> NavigationActionData::decode(IPC::Decoder& decode > if (!clientRedirectSourceForHistory) > return WTF::nullopt; > >+ Optional<Optional<WebCore::AdClickAttribution>> adClickAttribution; >+ decoder >> adClickAttribution; >+ if (!adClickAttribution) >+ return WTF::nullopt; >+ > return {{ WTFMove(navigationType), modifiers, WTFMove(mouseButton), WTFMove(syntheticClickType), WTFMove(*userGestureTokenIdentifier), > WTFMove(*canHandleRequest), WTFMove(shouldOpenExternalURLsPolicy), WTFMove(*downloadAttribute), WTFMove(clickLocationInRootViewCoordinates), > WTFMove(*isRedirect), *treatAsSameOriginNavigation, *hasOpenedFrames, *openedByDOMWithOpener, WTFMove(*requesterOrigin), >- WTFMove(*targetBackForwardItemIdentifier), lockHistory, lockBackForwardList, WTFMove(*clientRedirectSourceForHistory) }}; >+ WTFMove(*targetBackForwardItemIdentifier), lockHistory, lockBackForwardList, WTFMove(*clientRedirectSourceForHistory), WTFMove(*adClickAttribution) }}; > } > > } // namespace WebKit >diff --git a/Source/WebKit/Shared/NavigationActionData.h b/Source/WebKit/Shared/NavigationActionData.h >index 693b9178e4dde4ebbd1242262d6e876ea364c096..0d97ef33154c8b8e25c1a44765e4ddeb0e40427a 100644 >--- a/Source/WebKit/Shared/NavigationActionData.h >+++ b/Source/WebKit/Shared/NavigationActionData.h >@@ -26,6 +26,7 @@ > #pragma once > > #include "WebEvent.h" >+#include <WebCore/AdClickAttribution.h> > #include <WebCore/BackForwardItemIdentifier.h> > #include <WebCore/FloatPoint.h> > #include <WebCore/FrameLoaderTypes.h> >@@ -60,6 +61,7 @@ struct NavigationActionData { > WebCore::LockHistory lockHistory; > WebCore::LockBackForwardList lockBackForwardList; > WTF::String clientRedirectSourceForHistory; >+ Optional<WebCore::AdClickAttribution> adClickAttribution; > }; > > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 194325
:
361268
| 361309