Changeset 220507 in webkit


Ignore:
Timestamp:
Aug 9, 2017 9:19:34 PM (7 years ago)
Author:
Chris Dumez
Message:

Disable Beacon API on WK1 DRT and WK2 when not using NETWORK_SESSION
https://bugs.webkit.org/show_bug.cgi?id=175401

Reviewed by Brady Eidson.

Source/WebKit:

  • UIProcess/API/C/WKPreferences.cpp:

(WKPreferencesSetBeaconAPIEnabled):
(WKPreferencesGetBeaconAPIEnabled):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updatePreferences):

  • config.h:

Source/WebKitLegacy/mac:

  • WebView/WebPreferenceKeysPrivate.h:
  • WebView/WebPreferences.mm:

(+[WebPreferences initialize]):
(-[WebPreferences beaconAPIEnabled]): Deleted.
(-[WebPreferences setBeaconAPIEnabled:]): Deleted.

  • WebView/WebPreferencesPrivate.h:
  • WebView/WebView.mm:

(-[WebView _preferencesChanged:]):

Tools:

  • DumpRenderTree/mac/DumpRenderTree.mm:

(enableExperimentalFeatures):

LayoutTests:

  • platform/mac-elcapitan-wk2/fast/dom/navigator-detached-no-crash-expected.txt: Copied from LayoutTests/platform/mac-wk1/fast/dom/navigator-detached-no-crash-expected.txt.
  • platform/mac-elcapitan-wk2/imported/w3c/web-platform-tests/url/failure-expected.txt: Added.
  • platform/mac-wk1/TestExpectations:
  • platform/mac-wk1/fast/dom/navigator-detached-no-crash-expected.txt:
  • platform/mac-wk1/imported/w3c/web-platform-tests/url/failure-expected.txt: Added.
  • platform/mac-wk2/TestExpectations:
  • platform/win/TestExpectations:
  • platform/win/fast/dom/navigator-detached-no-crash-expected.txt: Copied from LayoutTests/platform/mac-wk1/fast/dom/navigator-detached-no-crash-expected.txt.
  • platform/win/imported/w3c/web-platform-tests/url/failure-expected.txt: Added.
Location:
trunk
Files:
8 added
16 edited
2 copied

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r220497 r220507  
     12017-08-09  Chris Dumez  <cdumez@apple.com>
     2
     3        Disable Beacon API on WK1 DRT and WK2 when not using NETWORK_SESSION
     4        https://bugs.webkit.org/show_bug.cgi?id=175401
     5
     6        Reviewed by Brady Eidson.
     7
     8        * platform/mac-elcapitan-wk2/fast/dom/navigator-detached-no-crash-expected.txt: Copied from LayoutTests/platform/mac-wk1/fast/dom/navigator-detached-no-crash-expected.txt.
     9        * platform/mac-elcapitan-wk2/imported/w3c/web-platform-tests/url/failure-expected.txt: Added.
     10        * platform/mac-wk1/TestExpectations:
     11        * platform/mac-wk1/fast/dom/navigator-detached-no-crash-expected.txt:
     12        * platform/mac-wk1/imported/w3c/web-platform-tests/url/failure-expected.txt: Added.
     13        * platform/mac-wk2/TestExpectations:
     14        * platform/win/TestExpectations:
     15        * platform/win/fast/dom/navigator-detached-no-crash-expected.txt: Copied from LayoutTests/platform/mac-wk1/fast/dom/navigator-detached-no-crash-expected.txt.
     16        * platform/win/imported/w3c/web-platform-tests/url/failure-expected.txt: Added.
     17
    1182017-08-09  Chris Dumez  <cdumez@apple.com>
    219
  • trunk/LayoutTests/platform/mac-elcapitan-wk2/fast/dom/navigator-detached-no-crash-expected.txt

    r220506 r220507  
    1515navigator.product is OK
    1616navigator.productSub is OK
    17 navigator.sendBeacon() threw err TypeError: Not enough arguments
     17navigator.serviceWorker is OK
    1818navigator.userAgent is OK
    1919navigator.vendor is OK
     
    3434navigator.product is OK
    3535navigator.productSub is OK
    36 navigator.sendBeacon() threw err TypeError: Not enough arguments
     36navigator.serviceWorker is OK
    3737navigator.userAgent is OK
    3838navigator.vendor is OK
  • trunk/LayoutTests/platform/mac-wk1/TestExpectations

    r220442 r220507  
    361361webkit.org/b/170877 [ Debug ] webgl/1.0.2/conformance/glsl/misc/shader-with-reserved-words.html [ Pass Timeout ]
    362362
    363 # CORS-preflighting for Beacon is not supported on WK1.
    364 webkit.org/b/175330 http/wpt/beacon/cors/ [ Skip ]
     363# Beacon is not supported on WK1.
     364http/tests/blink/sendbeacon/ [ Skip ]
     365http/wpt/beacon/ [ Skip ]
     366imported/blink/fast/beacon/ [ Skip ]
     367imported/w3c/web-platform-tests/beacon/ [ Skip ]
    365368
    366369# This was a WK2-only fix.
  • trunk/LayoutTests/platform/mac-wk1/fast/dom/navigator-detached-no-crash-expected.txt

    r220270 r220507  
    1515navigator.product is OK
    1616navigator.productSub is OK
    17 navigator.sendBeacon() threw err TypeError: Not enough arguments
    1817navigator.userAgent is OK
    1918navigator.vendor is OK
     
    3433navigator.product is OK
    3534navigator.productSub is OK
    36 navigator.sendBeacon() threw err TypeError: Not enough arguments
    3735navigator.userAgent is OK
    3836navigator.vendor is OK
  • trunk/LayoutTests/platform/mac-wk2/TestExpectations

    r220442 r220507  
    723723webkit.org/b/172834 [ ElCapitan ] imported/w3c/web-platform-tests/IndexedDB/idbobjectstore_getAllKeys.html [ Pass Failure ]
    724724
    725 
    726 # CORS-preflighting for Beacon is not supported on WK2 for non NETWORK_SESSION code path.
    727 webkit.org/b/175330 [ ElCapitan ] http/wpt/beacon/cors/ [ Skip ]
     725# Beacon is not supported on WK2 for the non NETWORK_SESSION code path.
     726[ ElCapitan ] http/tests/blink/sendbeacon/ [ Skip ]
     727[ ElCapitan ] http/wpt/beacon/ [ Skip ]
     728[ ElCapitan ] imported/blink/fast/beacon/ [ Skip ]
     729[ ElCapitan ] imported/w3c/web-platform-tests/beacon/ [ Skip ]
    728730
    729731webkit.org/b/172201 webaudio/silent-audio-interrupted-in-background.html [ Pass Timeout ]
  • trunk/LayoutTests/platform/win/TestExpectations

    r220442 r220507  
    40484048webkit.org/b/174079 fast/text/variations/skia-postscript-name.html [ ImageOnlyFailure ]
    40494049
    4050 # CORS-preflighting for Beacon is not supported on WK1.
    4051 webkit.org/b/175330 http/wpt/beacon/cors/ [ Skip ]
     4050# Beacon is not supported on WK1.
     4051http/tests/blink/sendbeacon/ [ Skip ]
     4052http/wpt/beacon/ [ Skip ]
     4053imported/blink/fast/beacon/ [ Skip ]
     4054imported/w3c/web-platform-tests/beacon/ [ Skip ]
    40524055
    40534056# Async image tests are currently failing on Windows.
  • trunk/LayoutTests/platform/win/fast/dom/navigator-detached-no-crash-expected.txt

    r220506 r220507  
    1515navigator.product is OK
    1616navigator.productSub is OK
    17 navigator.sendBeacon() threw err TypeError: Not enough arguments
    1817navigator.userAgent is OK
    1918navigator.vendor is OK
     
    3433navigator.product is OK
    3534navigator.productSub is OK
    36 navigator.sendBeacon() threw err TypeError: Not enough arguments
    3735navigator.userAgent is OK
    3836navigator.vendor is OK
  • trunk/Source/WebKit/ChangeLog

    r220506 r220507  
     12017-08-09  Chris Dumez  <cdumez@apple.com>
     2
     3        Disable Beacon API on WK1 DRT and WK2 when not using NETWORK_SESSION
     4        https://bugs.webkit.org/show_bug.cgi?id=175401
     5
     6        Reviewed by Brady Eidson.
     7
     8        * UIProcess/API/C/WKPreferences.cpp:
     9        (WKPreferencesSetBeaconAPIEnabled):
     10        (WKPreferencesGetBeaconAPIEnabled):
     11        * WebProcess/WebPage/WebPage.cpp:
     12        (WebKit::WebPage::updatePreferences):
     13        * config.h:
     14
    1152017-08-09  Yoshiaki Jitsukawa  <Yoshiaki.Jitsukawa@sony.com>
    216
  • trunk/Source/WebKit/UIProcess/API/C/WKPreferences.cpp

    r220370 r220507  
    827827void WKPreferencesSetBeaconAPIEnabled(WKPreferencesRef preferencesRef, bool flag)
    828828{
     829#if ENABLE(BEACON_API)
    829830    toImpl(preferencesRef)->setBeaconAPIEnabled(flag);
     831#endif
    830832}
    831833
    832834bool WKPreferencesGetBeaconAPIEnabled(WKPreferencesRef preferencesRef)
    833835{
     836#if ENABLE(BEACON_API)
    834837    return toImpl(preferencesRef)->beaconAPIEnabled();
     838#else
     839    return false;
     840#endif
    835841}
    836842
  • trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp

    r220506 r220507  
    33673367
    33683368    settings.setSubresourceIntegrityEnabled(store.getBoolValueForKey(WebPreferencesKey::subresourceIntegrityEnabledKey()));
     3369
     3370#if ENABLE(BEACON_API)
    33693371    settings.setBeaconAPIEnabled(store.getBoolValueForKey(WebPreferencesKey::beaconAPIEnabledKey()));
     3372#endif
    33703373
    33713374    platformPreferencesDidChange(store);
  • trunk/Source/WebKit/config.h

    r219055 r220507  
    7979#endif
    8080
     81#ifndef ENABLE_BEACON_API
     82#define ENABLE_BEACON_API 1
     83#endif
     84
    8185// FIXME: We should work towards not using CredentialStorage in WebKit2 to not have problems with digest authentication.
    8286#ifndef USE_CREDENTIAL_STORAGE_WITH_NETWORK_SESSION
  • trunk/Source/WebKitLegacy/mac/ChangeLog

    r220506 r220507  
     12017-08-09  Chris Dumez  <cdumez@apple.com>
     2
     3        Disable Beacon API on WK1 DRT and WK2 when not using NETWORK_SESSION
     4        https://bugs.webkit.org/show_bug.cgi?id=175401
     5
     6        Reviewed by Brady Eidson.
     7
     8        * WebView/WebPreferenceKeysPrivate.h:
     9        * WebView/WebPreferences.mm:
     10        (+[WebPreferences initialize]):
     11        (-[WebPreferences beaconAPIEnabled]): Deleted.
     12        (-[WebPreferences setBeaconAPIEnabled:]): Deleted.
     13        * WebView/WebPreferencesPrivate.h:
     14        * WebView/WebView.mm:
     15        (-[WebView _preferencesChanged:]):
     16
    1172017-08-09  Yoshiaki Jitsukawa  <Yoshiaki.Jitsukawa@sony.com>
    218
  • trunk/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h

    r220370 r220507  
    111111#define WebKitShowRepaintCounterPreferenceKey @"WebKitShowRepaintCounter"
    112112#define WebKitWebAudioEnabledPreferenceKey @"WebKitWebAudioEnabled"
    113 #define WebKitBeaconAPIEnabledPreferenceKey @"WebKitBeaconAPIEnabled"
    114113#define WebKitWebGLEnabledPreferenceKey @"WebKitWebGLEnabled"
    115114#define WebKitWebGL2EnabledPreferenceKey @"WebKitWebGL2Enabled"
  • trunk/Source/WebKitLegacy/mac/WebView/WebPreferences.mm

    r220370 r220507  
    626626        [NSNumber numberWithBool:YES], WebKitCustomElementsEnabledPreferenceKey,
    627627        [NSNumber numberWithBool:YES], WebKitModernMediaControlsEnabledPreferenceKey,
    628         [NSNumber numberWithBool:NO], WebKitBeaconAPIEnabledPreferenceKey,
    629628#if ENABLE(WEBGL2)
    630629        [NSNumber numberWithBool:NO], WebKitWebGL2EnabledPreferenceKey,
     
    20712070{
    20722071    [self _setBoolValue:enabled forKey:WebKitWebGL2EnabledPreferenceKey];
    2073 }
    2074 
    2075 - (BOOL)beaconAPIEnabled
    2076 {
    2077     return [self _boolValueForKey:WebKitBeaconAPIEnabledPreferenceKey];
    2078 }
    2079 
    2080 - (void)setBeaconAPIEnabled:(BOOL)enabled
    2081 {
    2082     [self _setBoolValue:enabled forKey:WebKitBeaconAPIEnabledPreferenceKey];
    20832072}
    20842073
  • trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h

    r220370 r220507  
    267267- (void)setWebGL2Enabled:(BOOL)enabled;
    268268
    269 - (BOOL)beaconAPIEnabled;
    270 - (void)setBeaconAPIEnabled:(BOOL)enabled;
    271 
    272269- (BOOL)forceSoftwareWebGLRendering;
    273270- (void)setForceSoftwareWebGLRendering:(BOOL)forced;
  • trunk/Source/WebKitLegacy/mac/WebView/WebView.mm

    r220506 r220507  
    29832983    settings.setConstantPropertiesEnabled([preferences constantPropertiesEnabled]);
    29842984
    2985     settings.setBeaconAPIEnabled([preferences beaconAPIEnabled]);
    2986 
    29872985#if ENABLE(GAMEPAD)
    29882986    RuntimeEnabledFeatures::sharedFeatures().setGamepadsEnabled([preferences gamepadsEnabled]);
  • trunk/Tools/ChangeLog

    r220506 r220507  
     12017-08-09  Chris Dumez  <cdumez@apple.com>
     2
     3        Disable Beacon API on WK1 DRT and WK2 when not using NETWORK_SESSION
     4        https://bugs.webkit.org/show_bug.cgi?id=175401
     5
     6        Reviewed by Brady Eidson.
     7
     8        * DumpRenderTree/mac/DumpRenderTree.mm:
     9        (enableExperimentalFeatures):
     10
    1112017-08-09  Yoshiaki Jitsukawa  <Yoshiaki.Jitsukawa@sony.com>
    212
  • trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm

    r220506 r220507  
    848848    // FIXME: InputEvents
    849849    [preferences setWebAnimationsEnabled:YES];
    850     [preferences setBeaconAPIEnabled:YES];
    851850    [preferences setWebGL2Enabled:YES];
    852851    [preferences setWebGPUEnabled:YES];
Note: See TracChangeset for help on using the changeset viewer.