REGRESSION: [ iOS ] ( r251015 ) Layout Test fast/text/whitespace/pre-wrap-overflow...
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Nov 2019 04:05:01 +0000 (04:05 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Nov 2019 04:05:01 +0000 (04:05 +0000)
https://bugs.webkit.org/show_bug.cgi?id=203366
<rdar://problem/56580680>

Reviewed by Simon Fraser.

Source/WebKit:

WKBundlePageForceRepaint may fail to do synchronous layer flush if there is a pending layer flush in-flight and waiting
for completion message from UI process. Layer flush also flushes pending editor state so that doesn't get done either.
This may cause randomness in test results.

In this case the randomness is the switch between simple and complex line layout, triggered by editor state flush. The results
between line layout paths are observably identical but produce slightly different render tree dumps.

* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageFlushPendingEditorStateUpdate):
* WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:

Add a function for forcing editor state flush, called from the test runner dump() function.

Tools:

* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::dump):

LayoutTests:

* platform/ios/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@252172 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/platform/ios/TestExpectations
Source/WebKit/ChangeLog
Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp
Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h
Tools/ChangeLog
Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp

index 6e44e0b..f5f6aab 100644 (file)
@@ -1,3 +1,13 @@
+2019-11-06  Antti Koivisto  <antti@apple.com>
+
+        REGRESSION: [ iOS ] ( r251015 ) Layout Test fast/text/whitespace/pre-wrap-overflow-selection.html is flaky
+        https://bugs.webkit.org/show_bug.cgi?id=203366
+        <rdar://problem/56580680>
+
+        Reviewed by Simon Fraser.
+
+        * platform/ios/TestExpectations:
+
 2019-11-06  Nikita Vasilyev  <nvasilyev@apple.com>
 
         Web Inspector: Display color picker for p3 colors
index ed99413..4f67612 100644 (file)
@@ -3461,8 +3461,6 @@ webkit.org/b/202958 css3/filters/svg-blur-filter-clipped.html [ ImageOnlyFailure
 webkit.org/b/203291 imported/w3c/web-platform-tests/css/css-transitions/before-load-001.html [ Failure ]
 webkit.org/b/203291 imported/w3c/web-platform-tests/css/css-transitions/properties-value-auto-001.html [ Failure ]
 
-webkit.org/b/203366 fast/text/whitespace/pre-wrap-overflow-selection.html [ Pass Failure ]
-
 webkit.org/b/203305 imported/w3c/web-platform-tests/css/css-transitions/properties-value-001.html [ Pass Failure ]
 webkit.org/b/203305 [ Debug ] imported/w3c/web-platform-tests/css/css-transitions/properties-value-inherit-001.html [ Pass Failure ]
 webkit.org/b/203356 [ Debug ] imported/w3c/web-platform-tests/css/css-transitions/properties-value-003.html [ Pass Failure ]
index 7f1fb30..f97adff 100644 (file)
@@ -1,3 +1,24 @@
+2019-11-06  Antti Koivisto  <antti@apple.com>
+
+        REGRESSION: [ iOS ] ( r251015 ) Layout Test fast/text/whitespace/pre-wrap-overflow-selection.html is flaky
+        https://bugs.webkit.org/show_bug.cgi?id=203366
+        <rdar://problem/56580680>
+
+        Reviewed by Simon Fraser.
+
+        WKBundlePageForceRepaint may fail to do synchronous layer flush if there is a pending layer flush in-flight and waiting
+        for completion message from UI process. Layer flush also flushes pending editor state so that doesn't get done either.
+        This may cause randomness in test results.
+
+        In this case the randomness is the switch between simple and complex line layout, triggered by editor state flush. The results
+        between line layout paths are observably identical but produce slightly different render tree dumps.
+
+        * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
+        (WKBundlePageFlushPendingEditorStateUpdate):
+        * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
+
+        Add a function for forcing editor state flush, called from the test runner dump() function.
+
 2019-11-06  Chris Dumez  <cdumez@apple.com>
 
         Unreviewed, fix watchOS build after r252011.
index b8eaed9..2668374 100644 (file)
@@ -513,6 +513,11 @@ void WKBundlePageForceRepaint(WKBundlePageRef page)
     WebKit::toImpl(page)->forceRepaintWithoutCallback();
 }
 
+void WKBundlePageFlushPendingEditorStateUpdate(WKBundlePageRef page)
+{
+    WebKit::toImpl(page)->flushPendingEditorStateUpdate();
+}
+
 void WKBundlePageSimulateMouseDown(WKBundlePageRef page, int button, WKPoint position, int clickCount, WKEventModifiers modifiers, double time)
 {
     WebKit::toImpl(page)->simulateMouseDown(button, WebKit::toIntPoint(position), clickCount, modifiers, WallTime::fromRawSeconds(time));
index ac6cd96..3a5eb9e 100644 (file)
@@ -64,6 +64,7 @@ WK_EXPORT void WKBundlePageSetPageZoomFactor(WKBundlePageRef page, double zoomFa
 WK_EXPORT void WKBundlePageSetScaleAtOrigin(WKBundlePageRef page, double scale, WKPoint origin);
 
 WK_EXPORT void WKBundlePageForceRepaint(WKBundlePageRef page);
+WK_EXPORT void WKBundlePageFlushPendingEditorStateUpdate(WKBundlePageRef page);
 
 WK_EXPORT void WKBundlePageSimulateMouseDown(WKBundlePageRef page, int button, WKPoint position, int clickCount, WKEventModifiers modifiers, double time);
 WK_EXPORT void WKBundlePageSimulateMouseUp(WKBundlePageRef page, int button, WKPoint position, int clickCount, WKEventModifiers modifiers, double time);
index 2de82ab..6f1269b 100644 (file)
@@ -1,3 +1,14 @@
+2019-11-06  Antti Koivisto  <antti@apple.com>
+
+        REGRESSION: [ iOS ] ( r251015 ) Layout Test fast/text/whitespace/pre-wrap-overflow-selection.html is flaky
+        https://bugs.webkit.org/show_bug.cgi?id=203366
+        <rdar://problem/56580680>
+
+        Reviewed by Simon Fraser.
+
+        * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
+        (WTR::InjectedBundlePage::dump):
+
 2019-11-06  Fujii Hironori  <Hironori.Fujii@sony.com>
 
         WEBCORE_TESTSUPPORT_EXPORT should be used only for WebCoreTestSupport, not for WebCore
index 72a0d06..2df5d17 100644 (file)
@@ -890,6 +890,7 @@ void InjectedBundlePage::dump()
     // Force a paint before dumping. This matches DumpRenderTree on Windows. (DumpRenderTree on Mac
     // does this at a slightly different time.) See <http://webkit.org/b/55469> for details.
     WKBundlePageForceRepaint(m_page);
+    WKBundlePageFlushPendingEditorStateUpdate(m_page);
 
     WKBundleFrameRef frame = WKBundlePageGetMainFrame(m_page);
     WKRetainPtr<WKURLRef> urlRef = adoptWK(WKBundleFrameCopyURL(frame));