Title: [251149] trunk
Revision
251149
Author
wenson_hs...@apple.com
Date
2019-10-15 11:38:00 -0700 (Tue, 15 Oct 2019)

Log Message

REGRESSION: editing/async-clipboard/clipboard-interfaces.html is failing in WebKit1
https://bugs.webkit.org/show_bug.cgi?id=202940
<rdar://problem/56262298>

Reviewed by Ryosuke Niwa.

Source/WebKitLegacy/win:

Add support for the asyncClipboardAPIEnabled feature flag in legacy WebKit on Windows.

* Interfaces/IWebPreferencesPrivate.idl:
* WebPreferenceKeysPrivate.h:
* WebPreferences.cpp:
(WebPreferences::initializeDefaultSettings):
(WebPreferences::asyncClipboardAPIEnabled):
(WebPreferences::setAsyncClipboardAPIEnabled):
* WebPreferences.h:
* WebView.cpp:
(WebView::notifyPreferencesChanged):

Tools:

Add some plumbing to support the async clipboard API experimental test option in Windows.

* DumpRenderTree/win/DumpRenderTree.cpp:
(setWebPreferencesForTestOptions):

LayoutTests:

* editing/async-clipboard/clipboard-interfaces.html:
* editing/async-clipboard/clipboard-item-basic.html:
* editing/async-clipboard/clipboard-wrapper-stays-alive.html:

Tweak a few layout tests to actually turn the experimental feature on (this previously worked because
experimental feature flags are already on by default in WebKit2).

* platform/ios-wk1/TestExpectations:
* platform/mac-wk1/TestExpectations:
* platform/win/TestExpectations:

Unskip and unmark these layout tests as failing in WebKit1 on iOS, macOS, and Windows.

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (251148 => 251149)


--- trunk/LayoutTests/ChangeLog	2019-10-15 18:21:52 UTC (rev 251148)
+++ trunk/LayoutTests/ChangeLog	2019-10-15 18:38:00 UTC (rev 251149)
@@ -1,3 +1,24 @@
+2019-10-15  Wenson Hsieh  <wenson_hs...@apple.com>
+
+        REGRESSION: editing/async-clipboard/clipboard-interfaces.html is failing in WebKit1
+        https://bugs.webkit.org/show_bug.cgi?id=202940
+        <rdar://problem/56262298>
+
+        Reviewed by Ryosuke Niwa.
+
+        * editing/async-clipboard/clipboard-interfaces.html:
+        * editing/async-clipboard/clipboard-item-basic.html:
+        * editing/async-clipboard/clipboard-wrapper-stays-alive.html:
+
+        Tweak a few layout tests to actually turn the experimental feature on (this previously worked because
+        experimental feature flags are already on by default in WebKit2).
+
+        * platform/ios-wk1/TestExpectations:
+        * platform/mac-wk1/TestExpectations:
+        * platform/win/TestExpectations:
+
+        Unskip and unmark these layout tests as failing in WebKit1 on iOS, macOS, and Windows.
+
 2019-10-15  Dean Jackson  <d...@apple.com>
 
         Reset maxCanvasPixelMemory between tests

Modified: trunk/LayoutTests/editing/async-clipboard/clipboard-interfaces.html (251148 => 251149)


--- trunk/LayoutTests/editing/async-clipboard/clipboard-interfaces.html	2019-10-15 18:21:52 UTC (rev 251148)
+++ trunk/LayoutTests/editing/async-clipboard/clipboard-interfaces.html	2019-10-15 18:38:00 UTC (rev 251149)
@@ -1,4 +1,4 @@
-<!DOCTYPE html> <!-- webkit-test-runner [ experimental:asyncClipboardAPIEnabled=true ] -->
+<!DOCTYPE html> <!-- webkit-test-runner [ experimental:AsyncClipboardAPIEnabled=true ] -->
 <html>
     <head>
         <script src=""

Modified: trunk/LayoutTests/editing/async-clipboard/clipboard-item-basic.html (251148 => 251149)


--- trunk/LayoutTests/editing/async-clipboard/clipboard-item-basic.html	2019-10-15 18:21:52 UTC (rev 251148)
+++ trunk/LayoutTests/editing/async-clipboard/clipboard-item-basic.html	2019-10-15 18:38:00 UTC (rev 251149)
@@ -1,4 +1,4 @@
-<!DOCTYPE html> <!-- webkit-test-runner [ experimental:asyncClipboardAPIEnabled=true ] -->
+<!DOCTYPE html> <!-- webkit-test-runner [ experimental:AsyncClipboardAPIEnabled=true ] -->
 <html>
     <meta charset="utf8">
     <head>

Modified: trunk/LayoutTests/editing/async-clipboard/clipboard-wrapper-stays-alive.html (251148 => 251149)


--- trunk/LayoutTests/editing/async-clipboard/clipboard-wrapper-stays-alive.html	2019-10-15 18:21:52 UTC (rev 251148)
+++ trunk/LayoutTests/editing/async-clipboard/clipboard-wrapper-stays-alive.html	2019-10-15 18:38:00 UTC (rev 251149)
@@ -1,4 +1,4 @@
-<!DOCTYPE html> <!-- webkit-test-runner [ experimental:asyncClipboardAPIEnabled=true ] -->
+<!DOCTYPE html> <!-- webkit-test-runner [ experimental:AsyncClipboardAPIEnabled=true ] -->
 <html>
     <head>
         <script src=""

Modified: trunk/LayoutTests/platform/ios-wk1/TestExpectations (251148 => 251149)


--- trunk/LayoutTests/platform/ios-wk1/TestExpectations	2019-10-15 18:21:52 UTC (rev 251148)
+++ trunk/LayoutTests/platform/ios-wk1/TestExpectations	2019-10-15 18:38:00 UTC (rev 251149)
@@ -16,9 +16,6 @@
 imported/w3c/web-platform-tests/fetch/api/request/destination [ Skip ]
 imported/w3c/web-platform-tests/fetch/cross-origin-resource-policy [ Skip ]
 
-# Async Clipboard API is not supported in WebKit1 yet.
-webkit.org/b/202654 editing/async-clipboard [ Skip ]
-
 # Skip WebRTC for now in WK1
 imported/w3c/web-platform-tests/webrtc [ Skip ]
 webrtc [ Skip ]

Modified: trunk/LayoutTests/platform/mac-wk1/TestExpectations (251148 => 251149)


--- trunk/LayoutTests/platform/mac-wk1/TestExpectations	2019-10-15 18:21:52 UTC (rev 251148)
+++ trunk/LayoutTests/platform/mac-wk1/TestExpectations	2019-10-15 18:38:00 UTC (rev 251149)
@@ -44,9 +44,6 @@
 css-typedom [ Skip ]
 css-dark-mode [ Skip ]
 
-# Async Clipboard API is not supported in WebKit1 yet.
-webkit.org/b/202654 editing/async-clipboard [ Skip ]
-
 webgpu [ Skip ]
 inspector/canvas/create-context-webgpu.html [ Skip ]
 inspector/canvas/requestClientNodes-webgpu.html [ Skip ]

Modified: trunk/LayoutTests/platform/win/TestExpectations (251148 => 251149)


--- trunk/LayoutTests/platform/win/TestExpectations	2019-10-15 18:21:52 UTC (rev 251148)
+++ trunk/LayoutTests/platform/win/TestExpectations	2019-10-15 18:38:00 UTC (rev 251149)
@@ -4470,9 +4470,6 @@
 
 webkit.org/b/202939 fast/workers/worker-exception-during-navigation.html [ Failure Pass ]
 
-webkit.org/b/202940 editing/async-clipboard/clipboard-interfaces.html [ Failure ]
-webkit.org/b/202940 editing/async-clipboard/clipboard-item-basic.html [ Failure ]
-
 webkit.org/b/202945 fast/css/invalidation-errors-2.html [ Failure ]
 webkit.org/b/202945 fast/css/invalidation-errors.html [ Failure ]
 
@@ -4488,8 +4485,6 @@
 
 webkit.org/b/202954 http/wpt/resource-timing/rt-resources-per-worker.html [ Failure ]
 
-webkit.org/b/202950 editing/async-clipboard/clipboard-wrapper-stays-alive.html [ Timeout ]
-
 webkit.org/b/202951 fast/canvas/drawImage-animated-gif-draws-first-frame-and-no-reset-image.html [ Timeout ]
 
 webkit.org/b/202952 http/tests/security/navigate-when-restoring-cached-page.html [ Timeout ]

Modified: trunk/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h (251148 => 251149)


--- trunk/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h	2019-10-15 18:21:52 UTC (rev 251148)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h	2019-10-15 18:38:00 UTC (rev 251149)
@@ -273,5 +273,6 @@
 #define WebKitResizeObserverEnabledPreferenceKey @"WebKitResizeObserverEnabled"
 #define WebKitCoreMathMLEnabledPreferenceKey @"WebKitCoreMathMLEnabled"
 #define WebKitRequestIdleCallbackEnabledPreferenceKey @"WebKitRequestIdleCallbackEnabled"
+#define WebKitAsyncClipboardAPIEnabledPreferenceKey @"WebKitAsyncClipboardAPIEnabled"
 #define WebKitLinkPreloadResponsiveImagesEnabledPreferenceKey @"WebKitLinkPreloadResponsiveImagesEnabled"
 

Modified: trunk/Source/WebKitLegacy/mac/WebView/WebPreferences.mm (251148 => 251149)


--- trunk/Source/WebKitLegacy/mac/WebView/WebPreferences.mm	2019-10-15 18:21:52 UTC (rev 251148)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebPreferences.mm	2019-10-15 18:38:00 UTC (rev 251149)
@@ -691,6 +691,7 @@
 #endif
         @NO, WebKitCoreMathMLEnabledPreferenceKey,
         @NO, WebKitRequestIdleCallbackEnabledPreferenceKey,
+        @NO, WebKitAsyncClipboardAPIEnabledPreferenceKey,
         @NO, WebKitLinkPreloadResponsiveImagesEnabledPreferenceKey,
         @YES, WebKitCSSShadowPartsEnabledPreferenceKey,
         nil];
@@ -3509,6 +3510,16 @@
     [self _setBoolValue:flag forKey:WebKitRequestIdleCallbackEnabledPreferenceKey];
 }
 
+- (BOOL)asyncClipboardAPIEnabled
+{
+    return [self _boolValueForKey:WebKitAsyncClipboardAPIEnabledPreferenceKey];
+}
+
+- (void)setAsyncClipboardAPIEnabled:(BOOL)flag
+{
+    [self _setBoolValue:flag forKey:WebKitAsyncClipboardAPIEnabledPreferenceKey];
+}
+
 - (BOOL)linkPreloadResponsiveImagesEnabled
 {
     return [self _boolValueForKey:WebKitLinkPreloadResponsiveImagesEnabledPreferenceKey];

Modified: trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h (251148 => 251149)


--- trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h	2019-10-15 18:21:52 UTC (rev 251148)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h	2019-10-15 18:38:00 UTC (rev 251149)
@@ -615,6 +615,9 @@
 - (void)setRequestIdleCallbackEnabled:(BOOL)flag;
 - (BOOL)requestIdleCallbackEnabled;
 
+- (void)setAsyncClipboardAPIEnabled:(BOOL)flag;
+- (BOOL)asyncClipboardAPIEnabled;
+
 - (void)setLinkPreloadResponsiveImagesEnabled:(BOOL)flag;
 - (BOOL)linkPreloadResponsiveImagesEnabled;
 
@@ -656,6 +659,7 @@
 @property (nonatomic) BOOL resizeObserverEnabled;
 @property (nonatomic) BOOL coreMathMLEnabled;
 @property (nonatomic) BOOL requestIdleCallbackEnabled;
+@property (nonatomic) BOOL asyncClipboardAPIEnabled;
 @property (nonatomic) BOOL linkPreloadResponsiveImagesEnabled;
 
 #if TARGET_OS_IPHONE

Modified: trunk/Source/WebKitLegacy/mac/WebView/WebView.mm (251148 => 251149)


--- trunk/Source/WebKitLegacy/mac/WebView/WebView.mm	2019-10-15 18:21:52 UTC (rev 251148)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebView.mm	2019-10-15 18:38:00 UTC (rev 251149)
@@ -3236,6 +3236,7 @@
 
     settings.setCoreMathMLEnabled([preferences coreMathMLEnabled]);
     settings.setRequestIdleCallbackEnabled([preferences requestIdleCallbackEnabled]);
+    settings.setAsyncClipboardAPIEnabled(preferences.asyncClipboardAPIEnabled);
 
     RuntimeEnabledFeatures::sharedFeatures().setServerTimingEnabled([preferences serverTimingEnabled]);
 

Modified: trunk/Source/WebKitLegacy/win/ChangeLog (251148 => 251149)


--- trunk/Source/WebKitLegacy/win/ChangeLog	2019-10-15 18:21:52 UTC (rev 251148)
+++ trunk/Source/WebKitLegacy/win/ChangeLog	2019-10-15 18:38:00 UTC (rev 251149)
@@ -1,3 +1,23 @@
+2019-10-15  Wenson Hsieh  <wenson_hs...@apple.com>
+
+        REGRESSION: editing/async-clipboard/clipboard-interfaces.html is failing in WebKit1
+        https://bugs.webkit.org/show_bug.cgi?id=202940
+        <rdar://problem/56262298>
+
+        Reviewed by Ryosuke Niwa.
+
+        Add support for the asyncClipboardAPIEnabled feature flag in legacy WebKit on Windows.
+
+        * Interfaces/IWebPreferencesPrivate.idl:
+        * WebPreferenceKeysPrivate.h:
+        * WebPreferences.cpp:
+        (WebPreferences::initializeDefaultSettings):
+        (WebPreferences::asyncClipboardAPIEnabled):
+        (WebPreferences::setAsyncClipboardAPIEnabled):
+        * WebPreferences.h:
+        * WebView.cpp:
+        (WebView::notifyPreferencesChanged):
+
 2019-10-14  Chris Dumez  <cdu...@apple.com>
 
         [WK2] Have WebBackForwardCache class coordinate page caching in all WebProcesses

Modified: trunk/Source/WebKitLegacy/win/Interfaces/IWebPreferencesPrivate.idl (251148 => 251149)


--- trunk/Source/WebKitLegacy/win/Interfaces/IWebPreferencesPrivate.idl	2019-10-15 18:21:52 UTC (rev 251148)
+++ trunk/Source/WebKitLegacy/win/Interfaces/IWebPreferencesPrivate.idl	2019-10-15 18:38:00 UTC (rev 251149)
@@ -246,4 +246,6 @@
     HRESULT setCoreMathMLEnabled([in] BOOL enabled);
     HRESULT requestIdleCallbackEnabled([out, retval] BOOL* enabled);
     HRESULT setRequestIdleCallbackEnabled([in] BOOL enabled);
+    HRESULT asyncClipboardAPIEnabled([out, retval] BOOL* enabled);
+    HRESULT setAsyncClipboardAPIEnabled([in] BOOL enabled);
 }

Modified: trunk/Source/WebKitLegacy/win/WebPreferenceKeysPrivate.h (251148 => 251149)


--- trunk/Source/WebKitLegacy/win/WebPreferenceKeysPrivate.h	2019-10-15 18:21:52 UTC (rev 251148)
+++ trunk/Source/WebKitLegacy/win/WebPreferenceKeysPrivate.h	2019-10-15 18:38:00 UTC (rev 251149)
@@ -213,3 +213,5 @@
 #define WebKitCoreMathMLEnabledPreferenceKey "WebKitCoreMathMLEnabled"
 
 #define WebKitRequestIdleCallbackEnabledPreferenceKey "WebKitRequestIdleCallbackEnabled"
+
+#define WebKitAsyncClipboardAPIEnabledPreferenceKey "WebKitAsyncClipboardAPIEnabled"

Modified: trunk/Source/WebKitLegacy/win/WebPreferences.cpp (251148 => 251149)


--- trunk/Source/WebKitLegacy/win/WebPreferences.cpp	2019-10-15 18:21:52 UTC (rev 251148)
+++ trunk/Source/WebKitLegacy/win/WebPreferences.cpp	2019-10-15 18:38:00 UTC (rev 251149)
@@ -341,6 +341,8 @@
 
     CFDictionaryAddValue(defaults, CFSTR(WebKitRequestIdleCallbackEnabledPreferenceKey), kCFBooleanFalse);
 
+    CFDictionaryAddValue(defaults, CFSTR(WebKitAsyncClipboardAPIEnabledPreferenceKey), kCFBooleanFalse);
+
     defaultSettings = defaults;
 #endif
 }
@@ -2293,6 +2295,20 @@
     return S_OK;
 }
 
+HRESULT WebPreferences::asyncClipboardAPIEnabled(_Out_ BOOL* enabled)
+{
+    if (!enabled)
+        return E_POINTER;
+    *enabled = boolValueForKey(WebKitAsyncClipboardAPIEnabledPreferenceKey);
+    return S_OK;
+}
+
+HRESULT WebPreferences::setAsyncClipboardAPIEnabled(BOOL enabled)
+{
+    setBoolValue(WebKitAsyncClipboardAPIEnabledPreferenceKey, enabled);
+    return S_OK;
+}
+
 HRESULT WebPreferences::setApplicationId(BSTR applicationId)
 {
 #if USE(CF)

Modified: trunk/Source/WebKitLegacy/win/WebPreferences.h (251148 => 251149)


--- trunk/Source/WebKitLegacy/win/WebPreferences.h	2019-10-15 18:21:52 UTC (rev 251148)
+++ trunk/Source/WebKitLegacy/win/WebPreferences.h	2019-10-15 18:38:00 UTC (rev 251149)
@@ -291,6 +291,8 @@
     virtual HRESULT STDMETHODCALLTYPE setCoreMathMLEnabled(BOOL);
     virtual HRESULT STDMETHODCALLTYPE requestIdleCallbackEnabled(_Out_ BOOL*);
     virtual HRESULT STDMETHODCALLTYPE setRequestIdleCallbackEnabled(BOOL);
+    virtual HRESULT STDMETHODCALLTYPE asyncClipboardAPIEnabled(_Out_ BOOL*);
+    virtual HRESULT STDMETHODCALLTYPE setAsyncClipboardAPIEnabled(BOOL);
 
     // WebPreferences
 

Modified: trunk/Source/WebKitLegacy/win/WebView.cpp (251148 => 251149)


--- trunk/Source/WebKitLegacy/win/WebView.cpp	2019-10-15 18:21:52 UTC (rev 251148)
+++ trunk/Source/WebKitLegacy/win/WebView.cpp	2019-10-15 18:38:00 UTC (rev 251149)
@@ -5614,6 +5614,11 @@
         return hr;
     settings.setRequestIdleCallbackEnabled(!!enabled);
 
+    hr = prefsPrivate->asyncClipboardAPIEnabled(&enabled);
+    if (FAILED(hr))
+        return hr;
+    settings.setAsyncClipboardAPIEnabled(!!enabled);
+
     return S_OK;
 }
 

Modified: trunk/Tools/ChangeLog (251148 => 251149)


--- trunk/Tools/ChangeLog	2019-10-15 18:21:52 UTC (rev 251148)
+++ trunk/Tools/ChangeLog	2019-10-15 18:38:00 UTC (rev 251149)
@@ -1,3 +1,16 @@
+2019-10-15  Wenson Hsieh  <wenson_hs...@apple.com>
+
+        REGRESSION: editing/async-clipboard/clipboard-interfaces.html is failing in WebKit1
+        https://bugs.webkit.org/show_bug.cgi?id=202940
+        <rdar://problem/56262298>
+
+        Reviewed by Ryosuke Niwa.
+
+        Add some plumbing to support the async clipboard API experimental test option in Windows.
+
+        * DumpRenderTree/win/DumpRenderTree.cpp:
+        (setWebPreferencesForTestOptions):
+
 2019-10-15  Jiewen Tan  <jiewen_...@apple.com>
 
         [WebAuthn] Write more tests for _WKWebAuthenticationPanel

Modified: trunk/Tools/DumpRenderTree/TestOptions.cpp (251148 => 251149)


--- trunk/Tools/DumpRenderTree/TestOptions.cpp	2019-10-15 18:21:52 UTC (rev 251148)
+++ trunk/Tools/DumpRenderTree/TestOptions.cpp	2019-10-15 18:38:00 UTC (rev 251149)
@@ -125,6 +125,8 @@
             enableCoreMathML = parseBooleanTestHeaderValue(value);
         else if (key == "experimental:RequestIdleCallbackEnabled")
             enableRequestIdleCallback = parseBooleanTestHeaderValue(value);
+        else if (key == "experimental:AsyncClipboardAPIEnabled")
+            enableAsyncClipboardAPI = parseBooleanTestHeaderValue(value);
         pairStart = pairEnd + 1;
     }
 }

Modified: trunk/Tools/DumpRenderTree/TestOptions.h (251148 => 251149)


--- trunk/Tools/DumpRenderTree/TestOptions.h	2019-10-15 18:21:52 UTC (rev 251148)
+++ trunk/Tools/DumpRenderTree/TestOptions.h	2019-10-15 18:38:00 UTC (rev 251149)
@@ -52,6 +52,7 @@
     bool enableResizeObserver { false };
     bool enableCoreMathML { false };
     bool enableRequestIdleCallback { false };
+    bool enableAsyncClipboardAPI { false };
     std::string jscOptions;
     std::string additionalSupportedImageTypes;
 

Modified: trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm (251148 => 251149)


--- trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm	2019-10-15 18:21:52 UTC (rev 251148)
+++ trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm	2019-10-15 18:38:00 UTC (rev 251149)
@@ -1029,6 +1029,7 @@
     preferences.resizeObserverEnabled = options.enableResizeObserver;
     preferences.coreMathMLEnabled = options.enableCoreMathML;
     preferences.requestIdleCallbackEnabled = options.enableRequestIdleCallback;
+    preferences.asyncClipboardAPIEnabled = options.enableAsyncClipboardAPI;
     preferences.privateBrowsingEnabled = options.useEphemeralSession;
     preferences.usesPageCache = options.enablePageCache;
 }

Modified: trunk/Tools/DumpRenderTree/win/DumpRenderTree.cpp (251148 => 251149)


--- trunk/Tools/DumpRenderTree/win/DumpRenderTree.cpp	2019-10-15 18:21:52 UTC (rev 251148)
+++ trunk/Tools/DumpRenderTree/win/DumpRenderTree.cpp	2019-10-15 18:38:00 UTC (rev 251149)
@@ -912,6 +912,7 @@
     prefsPrivate->setIsSecureContextAttributeEnabled(options.enableIsSecureContextAttribute);
     prefsPrivate->setInspectorAdditionsEnabled(options.enableInspectorAdditions);
     prefsPrivate->setRequestIdleCallbackEnabled(options.enableRequestIdleCallback);
+    prefsPrivate->setAsyncClipboardAPIEnabled(options.enableAsyncClipboardAPI);
     preferences->setPrivateBrowsingEnabled(options.useEphemeralSession);
     preferences->setUsesPageCache(options.enablePageCache);
 }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to