Add Ad Click Attribution as an internal/experimental feature
authorwilander@apple.com <wilander@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 24 Jan 2019 19:17:09 +0000 (19:17 +0000)
committerwilander@apple.com <wilander@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 24 Jan 2019 19:17:09 +0000 (19:17 +0000)
commit4b46b822910d3174ce5d10af296ae5bcb33024f0
tree7bac28b0605f4cd6dbaffd66dbe62907d863284e
parent2dd8e1e9d7efaaf1d9bc49f637176fc7bcf4426e
Add Ad Click Attribution as an internal/experimental feature
https://bugs.webkit.org/show_bug.cgi?id=193685
<rdar://problem/47450399>

Reviewed by Brent Fulgham.

Source/WebCore:

Test: http/tests/adClickAttribution/anchor-tag-attributes-reflect.html

* html/HTMLAnchorElement.h:
* html/HTMLAnchorElement.idl:
* html/HTMLAttributeNames.in:
    Addeed two new experimental attributes:
    - adcampaignid: Ad campaign ID.
    - addestination: Ad link destination site.
* page/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::adClickAttributionEnabled const):
(WebCore::RuntimeEnabledFeatures::setAdClickAttributionEnabled):
* page/Settings.yaml:

Source/WebKit:

* Shared/WebPreferences.yaml:
    Added AdClickAttributionEnabled as a runtime enabled feature, off by default.

Source/WebKitLegacy/mac:

* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
(-[WebPreferences adClickAttributionEnabled]):
(-[WebPreferences setAdClickAttributionEnabled:]):
    Added support for experimental ad click attribution.
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):

Tools:

Added test option adClickAttributionEnabled.

* DumpRenderTree/TestOptions.cpp:
(TestOptions::TestOptions):
* DumpRenderTree/TestOptions.h:
* DumpRenderTree/mac/DumpRenderTree.mm:
(setWebPreferencesForTestOptions):

LayoutTests:

* http/tests/adClickAttribution/anchor-tag-attributes-reflect-expected.txt: Added.
* http/tests/adClickAttribution/anchor-tag-attributes-reflect.html: Added.
* platform/win/TestExpectations:
    Skipped on Windows for now.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240444 268f45cc-cd09-0410-ab3c-d52691b4dbfc
20 files changed:
LayoutTests/ChangeLog
LayoutTests/http/tests/adClickAttribution/anchor-tag-attributes-reflect-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/adClickAttribution/anchor-tag-attributes-reflect.html [new file with mode: 0644]
LayoutTests/platform/win/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/html/HTMLAnchorElement.idl
Source/WebCore/html/HTMLAttributeNames.in
Source/WebCore/page/RuntimeEnabledFeatures.h
Source/WebCore/page/Settings.yaml
Source/WebKit/ChangeLog
Source/WebKit/Shared/WebPreferences.yaml
Source/WebKitLegacy/mac/ChangeLog
Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h
Source/WebKitLegacy/mac/WebView/WebPreferences.mm
Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h
Source/WebKitLegacy/mac/WebView/WebView.mm
Tools/ChangeLog
Tools/DumpRenderTree/TestOptions.cpp
Tools/DumpRenderTree/TestOptions.h
Tools/DumpRenderTree/mac/DumpRenderTree.mm