Changeset 240444 in webkit


Ignore:
Timestamp:
Jan 24, 2019 11:17:09 AM (5 years ago)
Author:
wilander@apple.com
Message:

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.

Location:
trunk
Files:
3 added
18 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r240362 r240444  
     12019-01-24  John Wilander  <wilander@apple.com>
     2
     3        Add Ad Click Attribution as an internal/experimental feature
     4        https://bugs.webkit.org/show_bug.cgi?id=193685
     5        <rdar://problem/47450399>
     6
     7        Reviewed by Brent Fulgham.
     8
     9        * http/tests/adClickAttribution/anchor-tag-attributes-reflect-expected.txt: Added.
     10        * http/tests/adClickAttribution/anchor-tag-attributes-reflect.html: Added.
     11        * platform/win/TestExpectations:
     12            Skipped on Windows for now.
     13
    1142019-01-23  Oriol Brufau  <obrufau@igalia.com>
    215
  • trunk/LayoutTests/platform/win/TestExpectations

    r240205 r240444  
    111111webkit.org/b/173281 editing/selection/selection-across-shadow-boundaries-readonly-3.html [ Skip ]
    112112webkit.org/b/173281 editing/selection/selection-across-shadow-boundaries-user-select-all-1.html [ Skip ]
     113webkit.org/b/193748 http/tests/adClickAttribution [ Skip ]
    113114
    114115# TODO HW filters not yet supported on Windows
  • trunk/Source/WebCore/ChangeLog

    r240441 r240444  
     12019-01-24  John Wilander  <wilander@apple.com>
     2
     3        Add Ad Click Attribution as an internal/experimental feature
     4        https://bugs.webkit.org/show_bug.cgi?id=193685
     5        <rdar://problem/47450399>
     6
     7        Reviewed by Brent Fulgham.
     8
     9        Test: http/tests/adClickAttribution/anchor-tag-attributes-reflect.html
     10
     11        * html/HTMLAnchorElement.h:
     12        * html/HTMLAnchorElement.idl:
     13        * html/HTMLAttributeNames.in:
     14            Addeed two new experimental attributes:
     15            - adcampaignid: Ad campaign ID.
     16            - addestination: Ad link destination site.
     17        * page/RuntimeEnabledFeatures.h:
     18        (WebCore::RuntimeEnabledFeatures::adClickAttributionEnabled const):
     19        (WebCore::RuntimeEnabledFeatures::setAdClickAttributionEnabled):
     20        * page/Settings.yaml:
     21
    1222019-01-24  Youenn Fablet  <youenn@apple.com>
    223
  • trunk/Source/WebCore/html/HTMLAnchorElement.idl

    r238748 r240444  
    2020
    2121interface HTMLAnchorElement : HTMLElement {
     22    [CEReactions=NotNeeded, EnabledAtRuntime=AdClickAttribution, Reflect] attribute DOMString adcampaignid;
     23    [CEReactions=NotNeeded, EnabledAtRuntime=AdClickAttribution, Reflect] attribute DOMString addestination;
    2224    [CEReactions=NotNeeded, Reflect] attribute DOMString charset;
    2325    [CEReactions=NotNeeded, Reflect] attribute DOMString coords;
  • trunk/Source/WebCore/html/HTMLAttributeNames.in

    r238108 r240444  
    6767as
    6868async
     69adcampaignid
     70addestination
    6971autocomplete
    7072autofocus
  • trunk/Source/WebCore/page/RuntimeEnabledFeatures.h

    r240251 r240444  
    341341    void setCSSLogicalEnabled(bool isEnabled) { m_CSSLogicalEnabled = isEnabled; }
    342342    bool cssLogicalEnabled() const { return m_CSSLogicalEnabled; }
     343
     344    bool adClickAttributionEnabled() const { return m_adClickAttributionEnabled; }
     345    void setAdClickAttributionEnabled(bool isEnabled) { m_adClickAttributionEnabled = isEnabled; }
    343346
    344347    WEBCORE_EXPORT static RuntimeEnabledFeatures& sharedFeatures();
     
    517520    bool m_CSSLogicalEnabled { false };
    518521
     522    bool m_adClickAttributionEnabled { false };
     523
    519524    friend class WTF::NeverDestroyed<RuntimeEnabledFeatures>;
    520525};
  • trunk/Source/WebCore/page/Settings.yaml

    r240129 r240444  
    789789editableImagesEnabled:
    790790  initial: false
     791
     792adClickAttributionEnabled:
     793  initial: false
  • trunk/Source/WebKit/ChangeLog

    r240443 r240444  
     12019-01-24  John Wilander  <wilander@apple.com>
     2
     3        Add Ad Click Attribution as an internal/experimental feature
     4        https://bugs.webkit.org/show_bug.cgi?id=193685
     5        <rdar://problem/47450399>
     6
     7        Reviewed by Brent Fulgham.
     8
     9        * Shared/WebPreferences.yaml:
     10            Added AdClickAttributionEnabled as a runtime enabled feature, off by default.
     11
    1122019-01-24  Antti Koivisto  <antti@apple.com>
    213
  • trunk/Source/WebKit/Shared/WebPreferences.yaml

    r240251 r240444  
    15441544  webcoreBinding: RuntimeEnabledFeatures
    15451545  category: internal
     1546
     1547AdClickAttributionEnabled:
     1548  type: bool
     1549  defaultValue: false
     1550  humanReadableName: "Ad Click Attribution"
     1551  humanReadableDescription: "Enable Ad Click Attribution for Cross-Site Link Navigations"
     1552  webcoreBinding: RuntimeEnabledFeatures
     1553  category: internal
  • trunk/Source/WebKitLegacy/mac/ChangeLog

    r240437 r240444  
     12019-01-24  John Wilander  <wilander@apple.com>
     2
     3        Add Ad Click Attribution as an internal/experimental feature
     4        https://bugs.webkit.org/show_bug.cgi?id=193685
     5        <rdar://problem/47450399>
     6
     7        Reviewed by Brent Fulgham.
     8
     9        * WebView/WebPreferenceKeysPrivate.h:
     10        * WebView/WebPreferences.mm:
     11        (+[WebPreferences initialize]):
     12        (-[WebPreferences adClickAttributionEnabled]):
     13        (-[WebPreferences setAdClickAttributionEnabled:]):
     14            Added support for experimental ad click attribution.
     15        * WebView/WebPreferencesPrivate.h:
     16        * WebView/WebView.mm:
     17        (-[WebView _preferencesChanged:]):
     18
    1192019-01-24  Ross Kirsling  <ross.kirsling@sony.com>
    220
  • trunk/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h

    r240251 r240444  
    265265#define WebKitSelectionAcrossShadowBoundariesEnabledPreferenceKey @"WebKitSelectionAcrossShadowBoundariesEnabled"
    266266#define WebKitCSSLogicalEnabledPreferenceKey @"WebKitCSSLogicalEnabled"
     267#define WebKitAdClickAttributionEnabledPreferenceKey @"WebKitAdClickAttributionEnabled"
  • trunk/Source/WebKitLegacy/mac/WebView/WebPreferences.mm

    r240292 r240444  
    671671        [NSNumber numberWithBool:YES], WebKitSelectionAcrossShadowBoundariesEnabledPreferenceKey,
    672672        [NSNumber numberWithBool:NO], WebKitCSSLogicalEnabledPreferenceKey,
     673        [NSNumber numberWithBool:NO], WebKitAdClickAttributionEnabledPreferenceKey,
    673674#if ENABLE(INTERSECTION_OBSERVER)
    674675        @NO, WebKitIntersectionObserverEnabledPreferenceKey,
     
    33913392}
    33923393
     3394- (BOOL)adClickAttributionEnabled
     3395{
     3396    return [self _boolValueForKey:WebKitAdClickAttributionEnabledPreferenceKey];
     3397}
     3398
     3399- (void)setAdClickAttributionEnabled:(BOOL)flag
     3400{
     3401    [self _setBoolValue:flag forKey:WebKitAdClickAttributionEnabledPreferenceKey];
     3402}
     3403
    33933404@end
    33943405
  • trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h

    r240251 r240444  
    585585- (void)setCSSLogicalEnabled:(BOOL)flag;
    586586- (BOOL)cssLogicalEnabled;
     587
     588- (BOOL)adClickAttributionEnabled;
     589- (void)setAdClickAttributionEnabled:(BOOL)flag;
    587590
    588591@property (nonatomic) BOOL visualViewportEnabled;
  • trunk/Source/WebKitLegacy/mac/WebView/WebView.mm

    r240437 r240444  
    30803080    RuntimeEnabledFeatures::sharedFeatures().setCSSLogicalEnabled([preferences cssLogicalEnabled]);
    30813081
     3082    RuntimeEnabledFeatures::sharedFeatures().setAdClickAttributionEnabled([preferences adClickAttributionEnabled]);
     3083
    30823084    settings.setHiddenPageDOMTimerThrottlingEnabled([preferences hiddenPageDOMTimerThrottlingEnabled]);
    30833085
  • trunk/Tools/ChangeLog

    r240443 r240444  
     12019-01-24  John Wilander  <wilander@apple.com>
     2
     3        Add Ad Click Attribution as an internal/experimental feature
     4        https://bugs.webkit.org/show_bug.cgi?id=193685
     5        <rdar://problem/47450399>
     6
     7        Reviewed by Brent Fulgham.
     8
     9        Added test option adClickAttributionEnabled.
     10
     11        * DumpRenderTree/TestOptions.cpp:
     12        (TestOptions::TestOptions):
     13        * DumpRenderTree/TestOptions.h:
     14        * DumpRenderTree/mac/DumpRenderTree.mm:
     15        (setWebPreferencesForTestOptions):
     16
    1172019-01-24  Antti Koivisto  <antti@apple.com>
    218
  • trunk/Tools/DumpRenderTree/TestOptions.cpp

    r240251 r240444  
    110110        else if (key == "internal:CSSLogicalEnabled")
    111111            enableCSSLogical = parseBooleanTestHeaderValue(value);
     112        else if (key == "internal:AdClickAttributionEnabled")
     113            adClickAttributionEnabled = parseBooleanTestHeaderValue(value);
    112114        pairStart = pairEnd + 1;
    113115    }
  • trunk/Tools/DumpRenderTree/TestOptions.h

    r240251 r240444  
    4646    bool enableWebGPU { false };
    4747    bool enableCSSLogical { false };
     48    bool adClickAttributionEnabled { false };
    4849    std::string jscOptions;
    4950
  • trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm

    r240358 r240444  
    10121012    preferences.webGPUEnabled = options.enableWebGPU;
    10131013    preferences.CSSLogicalEnabled = options.enableCSSLogical;
     1014    preferences.adClickAttributionEnabled = options.adClickAttributionEnabled;
    10141015}
    10151016
Note: See TracChangeset for help on using the changeset viewer.