Title: [243927] trunk
Revision
243927
Author
simon.fra...@apple.com
Date
2019-04-04 23:42:05 -0700 (Thu, 04 Apr 2019)

Log Message

Simple iframe scrolling test fails to get a composited scrolling frame in WebKitTestRunnerApp
https://bugs.webkit.org/show_bug.cgi?id=196635

Reviewed by Antti Koivisto.
Source/WebKit:

Remove WKBundleSetAsyncFrameScrollingEnabled().

* WebProcess/InjectedBundle/API/c/WKBundle.cpp:
(WKBundleSetAsyncFrameScrollingEnabled): Deleted.
* WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:

Tools:

InjectedBundle::beginTesting() calling WKBundleSetAsyncFrameScrollingEnabled() makes it impossible
for a test to enable async frame scrolling via:
    <!-- webkit-test-runner [ internal:AsyncFrameScrollingEnabled=true ] -->
so remove it and have TestController::resetPreferencesToConsistentValues() set the default value.

Test: scrollingcoordinator/ios/programmatic-frame-scroll.html

* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::beginTesting):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetPreferencesToConsistentValues):

LayoutTests:

* scrollingcoordinator/ios/programmatic-frame-scroll-expected.html: Added.
* scrollingcoordinator/ios/programmatic-frame-scroll.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (243926 => 243927)


--- trunk/LayoutTests/ChangeLog	2019-04-05 05:18:17 UTC (rev 243926)
+++ trunk/LayoutTests/ChangeLog	2019-04-05 06:42:05 UTC (rev 243927)
@@ -1,5 +1,15 @@
 2019-04-04  Simon Fraser  <simon.fra...@apple.com>
 
+        Simple iframe scrolling test fails to get a composited scrolling frame in WebKitTestRunnerApp
+        https://bugs.webkit.org/show_bug.cgi?id=196635
+
+        Reviewed by Antti Koivisto.
+
+        * scrollingcoordinator/ios/programmatic-frame-scroll-expected.html: Added.
+        * scrollingcoordinator/ios/programmatic-frame-scroll.html: Added.
+
+2019-04-04  Simon Fraser  <simon.fra...@apple.com>
+
         [iOS WK2] REGRESSION (r242687): Programmatic scroll of overflow scroll results in bad rendering
         https://bugs.webkit.org/show_bug.cgi?id=195584
 

Added: trunk/LayoutTests/scrollingcoordinator/ios/programmatic-frame-scroll-expected.html (0 => 243927)


--- trunk/LayoutTests/scrollingcoordinator/ios/programmatic-frame-scroll-expected.html	                        (rev 0)
+++ trunk/LayoutTests/scrollingcoordinator/ios/programmatic-frame-scroll-expected.html	2019-04-05 06:42:05 UTC (rev 243927)
@@ -0,0 +1,32 @@
+<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true internal:AsyncFrameScrollingEnabled=true ] -->
+<html>
+<head>
+    <meta name="viewport" content="width=device-width">
+    <style>
+        iframe {
+            position: relative;
+            border: 1px solid black;
+            width: 300px;
+            height: 300px;
+        }
+    </style>
+</head>
+<body>
+    <iframe id="test-frame" srcdoc="
+        <style>
+            body {
+                height: 2000px;
+                margin: 0;
+            }
+            .box {
+                width: 300px;
+                height: 300px;
+                background-color: green;
+            }
+        </style>
+        <body>
+            <div class='box'></div>
+        </body>
+    ">
+</body>
+</html>

Added: trunk/LayoutTests/scrollingcoordinator/ios/programmatic-frame-scroll.html (0 => 243927)


--- trunk/LayoutTests/scrollingcoordinator/ios/programmatic-frame-scroll.html	                        (rev 0)
+++ trunk/LayoutTests/scrollingcoordinator/ios/programmatic-frame-scroll.html	2019-04-05 06:42:05 UTC (rev 243927)
@@ -0,0 +1,42 @@
+<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true internal:AsyncFrameScrollingEnabled=true ] -->
+<html>
+<head>
+    <meta name="viewport" content="width=device-width">
+    <style>
+        iframe {
+            position: relative;
+            border: 1px solid black;
+            width: 300px;
+            height: 300px;
+        }
+    </style>
+    <script>
+        function doTest()
+        {
+            let iframe = document.getElementById('test-frame');
+            iframe.contentDocument.scrollingElement.scrollTop = 300;
+        }
+        
+        window.addEventListener('load', doTest, false);
+    </script>
+</head>
+<body>
+    <iframe id="test-frame" srcdoc="
+        <style>
+            body {
+                height: 2000px;
+                margin: 0;
+            }
+            .box {
+                margin-top: 300px;
+                width: 300px;
+                height: 300px;
+                background-color: green;
+            }
+        </style>
+        <body>
+            <div class='box'></div>
+        </body>
+    ">
+</body>
+</html>

Modified: trunk/Source/WebKit/ChangeLog (243926 => 243927)


--- trunk/Source/WebKit/ChangeLog	2019-04-05 05:18:17 UTC (rev 243926)
+++ trunk/Source/WebKit/ChangeLog	2019-04-05 06:42:05 UTC (rev 243927)
@@ -1,5 +1,18 @@
 2019-04-04  Simon Fraser  <simon.fra...@apple.com>
 
+        Simple iframe scrolling test fails to get a composited scrolling frame in WebKitTestRunnerApp
+        https://bugs.webkit.org/show_bug.cgi?id=196635
+
+        Reviewed by Antti Koivisto.
+
+        Remove WKBundleSetAsyncFrameScrollingEnabled().
+
+        * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
+        (WKBundleSetAsyncFrameScrollingEnabled): Deleted.
+        * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
+
+2019-04-04  Simon Fraser  <simon.fra...@apple.com>
+
         [iOS WK2] REGRESSION (r242687): Programmatic scroll of overflow scroll results in bad rendering
         https://bugs.webkit.org/show_bug.cgi?id=195584
 

Modified: trunk/Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundle.cpp (243926 => 243927)


--- trunk/Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundle.cpp	2019-04-05 05:18:17 UTC (rev 243926)
+++ trunk/Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundle.cpp	2019-04-05 06:42:05 UTC (rev 243927)
@@ -161,11 +161,6 @@
     WebKit::toImpl(bundleRef)->setFrameFlatteningEnabled(WebKit::toImpl(pageGroupRef), enabled);
 }
 
-void WKBundleSetAsyncFrameScrollingEnabled(WKBundleRef bundleRef, WKBundlePageGroupRef pageGroupRef, bool enabled)
-{
-    WebKit::toImpl(bundleRef)->setAsyncFrameScrollingEnabled(WebKit::toImpl(pageGroupRef), enabled);
-}
-
 void WKBundleSetJavaScriptCanAccessClipboard(WKBundleRef bundleRef, WKBundlePageGroupRef pageGroupRef, bool enabled)
 {
     WebKit::toImpl(bundleRef)->setJavaScriptCanAccessClipboard(WebKit::toImpl(pageGroupRef), enabled);

Modified: trunk/Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h (243926 => 243927)


--- trunk/Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h	2019-04-05 05:18:17 UTC (rev 243926)
+++ trunk/Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h	2019-04-05 06:42:05 UTC (rev 243927)
@@ -48,7 +48,6 @@
 WK_EXPORT void WKBundleSetAllowStorageAccessFromFileURLS(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, bool needsQuirk);
 WK_EXPORT void WKBundleSetMinimumLogicalFontSize(WKBundleRef bundleRef, WKBundlePageGroupRef pageGroupRef, int size);
 WK_EXPORT void WKBundleSetFrameFlatteningEnabled(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, bool enabled);
-WK_EXPORT void WKBundleSetAsyncFrameScrollingEnabled(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, bool enabled);
 WK_EXPORT void WKBundleSetJavaScriptCanAccessClipboard(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, bool enabled);
 WK_EXPORT void WKBundleSetPrivateBrowsingEnabled(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, bool enabled);
 WK_EXPORT void WKBundleSetUseDashboardCompatibilityMode(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, bool enabled);

Modified: trunk/Tools/ChangeLog (243926 => 243927)


--- trunk/Tools/ChangeLog	2019-04-05 05:18:17 UTC (rev 243926)
+++ trunk/Tools/ChangeLog	2019-04-05 06:42:05 UTC (rev 243927)
@@ -1,3 +1,22 @@
+2019-04-04  Simon Fraser  <simon.fra...@apple.com>
+
+        Simple iframe scrolling test fails to get a composited scrolling frame in WebKitTestRunnerApp
+        https://bugs.webkit.org/show_bug.cgi?id=196635
+
+        Reviewed by Antti Koivisto.
+        
+        InjectedBundle::beginTesting() calling WKBundleSetAsyncFrameScrollingEnabled() makes it impossible
+        for a test to enable async frame scrolling via:
+            <!-- webkit-test-runner [ internal:AsyncFrameScrollingEnabled=true ] -->
+        so remove it and have TestController::resetPreferencesToConsistentValues() set the default value.
+        
+        Test: scrollingcoordinator/ios/programmatic-frame-scroll.html
+
+        * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
+        (WTR::InjectedBundle::beginTesting):
+        * WebKitTestRunner/TestController.cpp:
+        (WTR::TestController::resetPreferencesToConsistentValues):
+
 2019-04-04  Alexey Proskuryakov  <a...@apple.com>
 
         Use a correct LC_RPATH when building with ASan

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp (243926 => 243927)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp	2019-04-05 05:18:17 UTC (rev 243926)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp	2019-04-05 06:42:05 UTC (rev 243927)
@@ -477,6 +477,7 @@
     m_accessibilityController = AccessibilityController::create();
 #endif
 
+    // Don't change experimental or internal features here; those should be set in TestController::resetPreferencesToConsistentValues().
     WKBundleSetAllowUniversalAccessFromFileURLs(m_bundle, m_pageGroup, true);
     WKBundleSetJavaScriptCanAccessClipboard(m_bundle, m_pageGroup, true);
     WKBundleSetPrivateBrowsingEnabled(m_bundle, m_pageGroup, false);
@@ -483,7 +484,6 @@
     WKBundleSetUseDashboardCompatibilityMode(m_bundle, m_pageGroup, false);
     WKBundleSetAuthorAndUserStylesEnabled(m_bundle, m_pageGroup, true);
     WKBundleSetFrameFlatteningEnabled(m_bundle, m_pageGroup, false);
-    WKBundleSetAsyncFrameScrollingEnabled(m_bundle, m_pageGroup, false);
     WKBundleSetMinimumLogicalFontSize(m_bundle, m_pageGroup, 9);
     WKBundleSetSpatialNavigationEnabled(m_bundle, m_pageGroup, false);
     WKBundleSetAllowFileAccessFromFileURLs(m_bundle, m_pageGroup, true);

Modified: trunk/Tools/WebKitTestRunner/TestController.cpp (243926 => 243927)


--- trunk/Tools/WebKitTestRunner/TestController.cpp	2019-04-05 05:18:17 UTC (rev 243926)
+++ trunk/Tools/WebKitTestRunner/TestController.cpp	2019-04-05 06:42:05 UTC (rev 243927)
@@ -755,10 +755,14 @@
         WKPreferencesSetExperimentalFeatureForKey(preferences, experimentalFeature.value, toWK(experimentalFeature.key).get());
 
     WKPreferencesResetAllInternalDebugFeatures(preferences);
+
     // Set internal features that have different default values for testing.
     static WKStringRef asyncOverflowScrollingFeature = WKStringCreateWithUTF8CString("AsyncOverflowScrollingEnabled");
     WKPreferencesSetInternalDebugFeatureForKey(preferences, false, asyncOverflowScrollingFeature);
 
+    static WKStringRef asyncFrameScrollingFeature = WKStringCreateWithUTF8CString("AsyncFrameScrollingEnabled");
+    WKPreferencesSetInternalDebugFeatureForKey(preferences, false, asyncFrameScrollingFeature);
+
     for (const auto& internalDebugFeature : options.internalDebugFeatures)
         WKPreferencesSetInternalDebugFeatureForKey(preferences, internalDebugFeature.value, toWK(internalDebugFeature.key).get());
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to