[iOS Sim] Layout Test scrollingcoordinator/ios/ui-scroll-fixed.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=196612
rdar://problem/49612867

Reviewed by Antti Koivisto.

This test hit a really obscure bug where a combination of an immediate scroll, and
an ancestor reposition left the layer position of a position:fixed layer unchanged.
The position of this layer in the UI process had been previously modified by
the scrolling tree for the scroll, but because the WebContent-side mutations left
the actual position unchanged, we'd never apply a new position via a commit, so left
the layer in the wrong location.

Removing the m_wasScrolledByDelegatedScrollingSincePreviousCommit check in ScrollingTree::applyLayerPositionsAfterCommit()
fixes this, but has perf implications. Alternative fixes require complex state tracking.
Since this is so hard to hit with noisy user scrolling, just change the test to avoid
the perfect storm of scrolls and offsets.

* platform/ios-simulator-wk2/TestExpectations:
* scrollingcoordinator/ios/ui-scroll-fixed-expected.html:
* scrollingcoordinator/ios/ui-scroll-fixed.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@251251 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index d9d7104..de22a57 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,27 @@
+2019-10-17  Simon Fraser  <simon.fraser@apple.com>
+
+        [iOS Sim] Layout Test scrollingcoordinator/ios/ui-scroll-fixed.html is a flaky failure
+        https://bugs.webkit.org/show_bug.cgi?id=196612
+        rdar://problem/49612867
+
+        Reviewed by Antti Koivisto.
+        
+        This test hit a really obscure bug where a combination of an immediate scroll, and
+        an ancestor reposition left the layer position of a position:fixed layer unchanged.
+        The position of this layer in the UI process had been previously modified by
+        the scrolling tree for the scroll, but because the WebContent-side mutations left
+        the actual position unchanged, we'd never apply a new position via a commit, so left
+        the layer in the wrong location.
+        
+        Removing the m_wasScrolledByDelegatedScrollingSincePreviousCommit check in ScrollingTree::applyLayerPositionsAfterCommit()
+        fixes this, but has perf implications. Alternative fixes require complex state tracking.
+        Since this is so hard to hit with noisy user scrolling, just change the test to avoid
+        the perfect storm of scrolls and offsets.
+
+        * platform/ios-simulator-wk2/TestExpectations:
+        * scrollingcoordinator/ios/ui-scroll-fixed-expected.html:
+        * scrollingcoordinator/ios/ui-scroll-fixed.html:
+
 2019-10-17  Truitt Savell  <tsavell@apple.com>
 
         Unreviewed, rolling out r251231.
diff --git a/LayoutTests/platform/ios-simulator-wk2/TestExpectations b/LayoutTests/platform/ios-simulator-wk2/TestExpectations
index 88a1f7f..b92724f 100644
--- a/LayoutTests/platform/ios-simulator-wk2/TestExpectations
+++ b/LayoutTests/platform/ios-simulator-wk2/TestExpectations
@@ -70,8 +70,6 @@
 
 webkit.org/b/195341 fast/viewport/ios/constant-width-viewport-after-changing-view-scale.html [ Pass Failure ]
 
-webkit.org/b/196612 scrollingcoordinator/ios/ui-scroll-fixed.html [ Pass ImageOnlyFailure ]
-
 webkit.org/b/186581 [ Debug ] fast/parser/xml-error-adopted.xml [ Pass Timeout ]
 
 webkit.org/b/196944 imported/w3c/web-platform-tests/hr-time/test_cross_frame_start.html [ Pass Failure ]
diff --git a/LayoutTests/scrollingcoordinator/ios/ui-scroll-fixed-expected.html b/LayoutTests/scrollingcoordinator/ios/ui-scroll-fixed-expected.html
index 6409625..318eb45 100644
--- a/LayoutTests/scrollingcoordinator/ios/ui-scroll-fixed-expected.html
+++ b/LayoutTests/scrollingcoordinator/ios/ui-scroll-fixed-expected.html
@@ -41,7 +41,7 @@
                 return
 
             await UIHelper.delayFor(0);
-            await UIHelper.immediateUnstableScrollTo(0, 50);
+            await UIHelper.immediateUnstableScrollTo(0, 55);
             await UIHelper.delayFor(120); // Wait for scrollbars to disappear.
             testRunner.notifyDone();
         }
diff --git a/LayoutTests/scrollingcoordinator/ios/ui-scroll-fixed.html b/LayoutTests/scrollingcoordinator/ios/ui-scroll-fixed.html
index 9e3cf91..f053214 100644
--- a/LayoutTests/scrollingcoordinator/ios/ui-scroll-fixed.html
+++ b/LayoutTests/scrollingcoordinator/ios/ui-scroll-fixed.html
@@ -45,7 +45,7 @@
                 return
 
             await UIHelper.delayFor(0);
-            await UIHelper.immediateUnstableScrollTo(0, 50);
+            await UIHelper.immediateUnstableScrollTo(0, 55);
             await UIHelper.delayFor((120)); // Wait for scrollbars to disappear.
             document.getElementById('container').classList.add('changed');
             testRunner.notifyDone();