Forward Ad Click Attribution data from HTMLAnchorElement::handleClick() to WebKit...
authorwilander@apple.com <wilander@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 6 Feb 2019 22:02:15 +0000 (22:02 +0000)
committerwilander@apple.com <wilander@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 6 Feb 2019 22:02:15 +0000 (22:02 +0000)
commite7e34e1513a576f680cad17fc6ccffbf69b1c705
tree099afcb9568cfc75b473c5b65d8920ab5a10ab1b
parent80c77a98332cbfe1dcb430982808058f0d20846d
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.

Source/WebCore:

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):

Source/WebKit:

* Shared/NavigationActionData.cpp:
(WebKit::NavigationActionData::encode const):
(WebKit::NavigationActionData::decode):
* Shared/NavigationActionData.h:
    Now holds an optional WebCore::AdClickAttribution object.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@241049 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/html/HTMLAnchorElement.cpp
Source/WebCore/loader/AdClickAttribution.h
Source/WebCore/loader/FrameLoader.cpp
Source/WebCore/loader/FrameLoader.h
Source/WebCore/loader/NavigationAction.h
Source/WebKit/ChangeLog
Source/WebKit/Shared/NavigationActionData.cpp
Source/WebKit/Shared/NavigationActionData.h