Title: [254839] trunk
Revision
254839
Author
[email protected]
Date
2020-01-20 17:35:42 -0800 (Mon, 20 Jan 2020)

Log Message

Unreviewed, rolling out r254807.

Breaks Apple internal builds.

Reverted changeset:

"Add support for scroll behavior relies on ScrollAnimation of
the Web process"
https://bugs.webkit.org/show_bug.cgi?id=204882
https://trac.webkit.org/changeset/254807

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (254838 => 254839)


--- trunk/LayoutTests/ChangeLog	2020-01-20 23:55:48 UTC (rev 254838)
+++ trunk/LayoutTests/ChangeLog	2020-01-21 01:35:42 UTC (rev 254839)
@@ -1,3 +1,16 @@
+2020-01-20  Fujii Hironori  <[email protected]>
+
+        Unreviewed, rolling out r254807.
+
+        Breaks Apple internal builds.
+
+        Reverted changeset:
+
+        "Add support for scroll behavior relies on ScrollAnimation of
+        the Web process"
+        https://bugs.webkit.org/show_bug.cgi?id=204882
+        https://trac.webkit.org/changeset/254807
+
 2020-01-20  Devin Rousso  <[email protected]>
 
         inspector/heap/getRemoteObject.html is a flaky failure

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (254838 => 254839)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2020-01-20 23:55:48 UTC (rev 254838)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2020-01-21 01:35:42 UTC (rev 254839)
@@ -1,3 +1,16 @@
+2020-01-20  Fujii Hironori  <[email protected]>
+
+        Unreviewed, rolling out r254807.
+
+        Breaks Apple internal builds.
+
+        Reverted changeset:
+
+        "Add support for scroll behavior relies on ScrollAnimation of
+        the Web process"
+        https://bugs.webkit.org/show_bug.cgi?id=204882
+        https://trac.webkit.org/changeset/254807
+
 2020-01-20  Rob Buis  <[email protected]>
 
         Implement "create a potential-CORS request"

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-default-css-expected.txt (254838 => 254839)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-default-css-expected.txt	2020-01-20 23:55:48 UTC (rev 254838)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-default-css-expected.txt	2020-01-21 01:35:42 UTC (rev 254839)
@@ -1,4 +1,4 @@
 
 PASS Instant scrolling of an element with default scroll-behavior 
-PASS Smooth scrolling of an element with default scroll-behavior 
+FAIL Smooth scrolling of an element with default scroll-behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-default-css.html (254838 => 254839)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-default-css.html	2020-01-20 23:55:48 UTC (rev 254838)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-default-css.html	2020-01-21 01:35:42 UTC (rev 254839)
@@ -1,4 +1,4 @@
-<!DOCTYPE html><!-- webkit-test-runner [ experimental:CSSOMViewSmoothScrollingEnabled=true ] -->
+<!DOCTYPE html>
 <title>Testing default value of scroll-behavior</title>
 <meta name="timeout" content="long"/>
 <link rel="author" title="Frédéric Wang" href=""

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-element-expected.txt (254838 => 254839)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-element-expected.txt	2020-01-20 23:55:48 UTC (rev 254838)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-element-expected.txt	2020-01-21 01:35:42 UTC (rev 254839)
@@ -2,39 +2,39 @@
 PASS Element with auto scroll-behavior ; scroll() with default behavior 
 PASS Element with auto scroll-behavior ; scroll() with auto behavior 
 PASS Element with auto scroll-behavior ; scroll() with instant behavior 
-PASS Element with auto scroll-behavior ; scroll() with smooth behavior 
-PASS Element with smooth scroll-behavior ; scroll() with default behavior 
-PASS Element with smooth scroll-behavior ; scroll() with auto behavior 
+FAIL Element with auto scroll-behavior ; scroll() with smooth behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
+FAIL Element with smooth scroll-behavior ; scroll() with default behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
+FAIL Element with smooth scroll-behavior ; scroll() with auto behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
 PASS Element with smooth scroll-behavior ; scroll() with instant behavior 
-PASS Element with smooth scroll-behavior ; scroll() with smooth behavior 
+FAIL Element with smooth scroll-behavior ; scroll() with smooth behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
 PASS Element with auto scroll-behavior ; scrollTo() with default behavior 
 PASS Element with auto scroll-behavior ; scrollTo() with auto behavior 
 PASS Element with auto scroll-behavior ; scrollTo() with instant behavior 
-PASS Element with auto scroll-behavior ; scrollTo() with smooth behavior 
-PASS Element with smooth scroll-behavior ; scrollTo() with default behavior 
-PASS Element with smooth scroll-behavior ; scrollTo() with auto behavior 
+FAIL Element with auto scroll-behavior ; scrollTo() with smooth behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
+FAIL Element with smooth scroll-behavior ; scrollTo() with default behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
+FAIL Element with smooth scroll-behavior ; scrollTo() with auto behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
 PASS Element with smooth scroll-behavior ; scrollTo() with instant behavior 
-PASS Element with smooth scroll-behavior ; scrollTo() with smooth behavior 
+FAIL Element with smooth scroll-behavior ; scrollTo() with smooth behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
 PASS Element with auto scroll-behavior ; scrollBy() with default behavior 
 PASS Element with auto scroll-behavior ; scrollBy() with auto behavior 
 PASS Element with auto scroll-behavior ; scrollBy() with instant behavior 
-PASS Element with auto scroll-behavior ; scrollBy() with smooth behavior 
-PASS Element with smooth scroll-behavior ; scrollBy() with default behavior 
-PASS Element with smooth scroll-behavior ; scrollBy() with auto behavior 
+FAIL Element with auto scroll-behavior ; scrollBy() with smooth behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
+FAIL Element with smooth scroll-behavior ; scrollBy() with default behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
+FAIL Element with smooth scroll-behavior ; scrollBy() with auto behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
 PASS Element with smooth scroll-behavior ; scrollBy() with instant behavior 
-PASS Element with smooth scroll-behavior ; scrollBy() with smooth behavior 
+FAIL Element with smooth scroll-behavior ; scrollBy() with smooth behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
 PASS Element with auto scroll-behavior ; scrollIntoView() with default behavior 
 PASS Element with auto scroll-behavior ; scrollIntoView() with auto behavior 
 PASS Element with auto scroll-behavior ; scrollIntoView() with instant behavior 
-PASS Element with auto scroll-behavior ; scrollIntoView() with smooth behavior 
-PASS Element with smooth scroll-behavior ; scrollIntoView() with default behavior 
-PASS Element with smooth scroll-behavior ; scrollIntoView() with auto behavior 
+FAIL Element with auto scroll-behavior ; scrollIntoView() with smooth behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
+FAIL Element with smooth scroll-behavior ; scrollIntoView() with default behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
+FAIL Element with smooth scroll-behavior ; scrollIntoView() with auto behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
 PASS Element with smooth scroll-behavior ; scrollIntoView() with instant behavior 
-PASS Element with smooth scroll-behavior ; scrollIntoView() with smooth behavior 
+FAIL Element with smooth scroll-behavior ; scrollIntoView() with smooth behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
 PASS Set scrollLeft to element with auto scroll-behavior 
-PASS Set scrollLeft to element with smooth scroll-behavior 
+FAIL Set scrollLeft to element with smooth scroll-behavior assert_less_than: Shouldn't set scroll attribute immediately expected a number less than 500 but got 500
 PASS Set scrollTop to element with auto scroll-behavior 
-PASS Set scrollTop to element with smooth scroll-behavior 
+FAIL Set scrollTop to element with smooth scroll-behavior assert_less_than: Shouldn't set scroll attribute immediately expected a number less than 250 but got 250
 PASS Aborting an ongoing smooth scrolling on an element with another smooth scrolling 
 PASS Aborting an ongoing smooth scrolling on an element with an instant scrolling 
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-element.html (254838 => 254839)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-element.html	2020-01-20 23:55:48 UTC (rev 254838)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-element.html	2020-01-21 01:35:42 UTC (rev 254839)
@@ -1,4 +1,4 @@
-<!DOCTYPE html><!-- webkit-test-runner [ experimental:CSSOMViewSmoothScrollingEnabled=true ] -->
+<!DOCTYPE html>
 <title>Testing scrollOptions' behavior for Element.scroll* and scroll-behavior on an element</title>
 <meta name="timeout" content="long"/>
 <link rel="author" title="Frédéric Wang" href=""

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-main-frame-root-expected.txt (254838 => 254839)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-main-frame-root-expected.txt	2020-01-20 23:55:48 UTC (rev 254838)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-main-frame-root-expected.txt	2020-01-21 01:35:42 UTC (rev 254839)
@@ -3,39 +3,39 @@
 PASS Main frame with auto scroll-behavior ; scroll() with default behavior 
 PASS Main frame with auto scroll-behavior ; scroll() with auto behavior 
 PASS Main frame with auto scroll-behavior ; scroll() with instant behavior 
-PASS Main frame with auto scroll-behavior ; scroll() with smooth behavior 
-PASS Main frame with smooth scroll-behavior ; scroll() with default behavior 
-PASS Main frame with smooth scroll-behavior ; scroll() with auto behavior 
+FAIL Main frame with auto scroll-behavior ; scroll() with smooth behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 2430 but got 2430
+FAIL Main frame with smooth scroll-behavior ; scroll() with default behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 2430 but got 2430
+FAIL Main frame with smooth scroll-behavior ; scroll() with auto behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 2430 but got 2430
 PASS Main frame with smooth scroll-behavior ; scroll() with instant behavior 
-PASS Main frame with smooth scroll-behavior ; scroll() with smooth behavior 
+FAIL Main frame with smooth scroll-behavior ; scroll() with smooth behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 2430 but got 2430
 PASS Main frame with auto scroll-behavior ; scrollTo() with default behavior 
 PASS Main frame with auto scroll-behavior ; scrollTo() with auto behavior 
 PASS Main frame with auto scroll-behavior ; scrollTo() with instant behavior 
-PASS Main frame with auto scroll-behavior ; scrollTo() with smooth behavior 
-PASS Main frame with smooth scroll-behavior ; scrollTo() with default behavior 
-PASS Main frame with smooth scroll-behavior ; scrollTo() with auto behavior 
+FAIL Main frame with auto scroll-behavior ; scrollTo() with smooth behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 2430 but got 2430
+FAIL Main frame with smooth scroll-behavior ; scrollTo() with default behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 2430 but got 2430
+FAIL Main frame with smooth scroll-behavior ; scrollTo() with auto behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 2430 but got 2430
 PASS Main frame with smooth scroll-behavior ; scrollTo() with instant behavior 
-PASS Main frame with smooth scroll-behavior ; scrollTo() with smooth behavior 
+FAIL Main frame with smooth scroll-behavior ; scrollTo() with smooth behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 2430 but got 2430
 PASS Main frame with auto scroll-behavior ; scrollBy() with default behavior 
 PASS Main frame with auto scroll-behavior ; scrollBy() with auto behavior 
 PASS Main frame with auto scroll-behavior ; scrollBy() with instant behavior 
-PASS Main frame with auto scroll-behavior ; scrollBy() with smooth behavior 
-PASS Main frame with smooth scroll-behavior ; scrollBy() with default behavior 
-PASS Main frame with smooth scroll-behavior ; scrollBy() with auto behavior 
+FAIL Main frame with auto scroll-behavior ; scrollBy() with smooth behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 2430 but got 2430
+FAIL Main frame with smooth scroll-behavior ; scrollBy() with default behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 2430 but got 2430
+FAIL Main frame with smooth scroll-behavior ; scrollBy() with auto behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 2430 but got 2430
 PASS Main frame with smooth scroll-behavior ; scrollBy() with instant behavior 
-PASS Main frame with smooth scroll-behavior ; scrollBy() with smooth behavior 
+FAIL Main frame with smooth scroll-behavior ; scrollBy() with smooth behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 2430 but got 2430
 PASS Main frame with auto scroll-behavior ; scrollIntoView() with default behavior 
 PASS Main frame with auto scroll-behavior ; scrollIntoView() with auto behavior 
 PASS Main frame with auto scroll-behavior ; scrollIntoView() with instant behavior 
-PASS Main frame with auto scroll-behavior ; scrollIntoView() with smooth behavior 
-PASS Main frame with smooth scroll-behavior ; scrollIntoView() with default behavior 
-PASS Main frame with smooth scroll-behavior ; scrollIntoView() with auto behavior 
+FAIL Main frame with auto scroll-behavior ; scrollIntoView() with smooth behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 2430 but got 2430
+FAIL Main frame with smooth scroll-behavior ; scrollIntoView() with default behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 2430 but got 2430
+FAIL Main frame with smooth scroll-behavior ; scrollIntoView() with auto behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 2430 but got 2430
 PASS Main frame with smooth scroll-behavior ; scrollIntoView() with instant behavior 
-PASS Main frame with smooth scroll-behavior ; scrollIntoView() with smooth behavior 
+FAIL Main frame with smooth scroll-behavior ; scrollIntoView() with smooth behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 2430 but got 2430
 PASS Set scrollLeft to frame with auto scroll-behavior 
-PASS Set scrollLeft to frame with smooth scroll-behavior 
+FAIL Set scrollLeft to frame with smooth scroll-behavior assert_less_than: Shouldn't set scroll attribute immediately expected a number less than 2430 but got 2430
 PASS Set scrollTop to frame with auto scroll-behavior 
-PASS Set scrollTop to frame with smooth scroll-behavior 
+FAIL Set scrollTop to frame with smooth scroll-behavior assert_less_than: Shouldn't set scroll attribute immediately expected a number less than 2480 but got 2480
 PASS Aborting an ongoing smooth scrolling on the main frame with another smooth scrolling 
 PASS Aborting an ongoing smooth scrolling on the main frame with an instant scrolling 
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-main-frame-root.html (254838 => 254839)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-main-frame-root.html	2020-01-20 23:55:48 UTC (rev 254838)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-main-frame-root.html	2020-01-21 01:35:42 UTC (rev 254839)
@@ -1,4 +1,4 @@
-<!DOCTYPE html><!-- webkit-test-runner [ experimental:CSSOMViewSmoothScrollingEnabled=true ] -->
+<!DOCTYPE html>
 <title>Testing scrollOptions' behavior for Element.scroll* and scroll-behavior on the root of the main frame</title>
 <meta name="timeout" content="long"/>
 <link rel="author" title="Frédéric Wang" href=""

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-main-frame-window-expected.txt (254838 => 254839)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-main-frame-window-expected.txt	2020-01-20 23:55:48 UTC (rev 254838)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-main-frame-window-expected.txt	2020-01-21 01:35:42 UTC (rev 254839)
@@ -3,27 +3,27 @@
 PASS Main frame with auto scroll-behavior ; scroll() with default behavior 
 PASS Main frame with auto scroll-behavior ; scroll() with auto behavior 
 PASS Main frame with auto scroll-behavior ; scroll() with instant behavior 
-PASS Main frame with auto scroll-behavior ; scroll() with smooth behavior 
-PASS Main frame with smooth scroll-behavior ; scroll() with default behavior 
-PASS Main frame with smooth scroll-behavior ; scroll() with auto behavior 
+FAIL Main frame with auto scroll-behavior ; scroll() with smooth behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 2430 but got 2430
+FAIL Main frame with smooth scroll-behavior ; scroll() with default behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 2430 but got 2430
+FAIL Main frame with smooth scroll-behavior ; scroll() with auto behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 2430 but got 2430
 PASS Main frame with smooth scroll-behavior ; scroll() with instant behavior 
-PASS Main frame with smooth scroll-behavior ; scroll() with smooth behavior 
+FAIL Main frame with smooth scroll-behavior ; scroll() with smooth behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 2430 but got 2430
 PASS Main frame with auto scroll-behavior ; scrollTo() with default behavior 
 PASS Main frame with auto scroll-behavior ; scrollTo() with auto behavior 
 PASS Main frame with auto scroll-behavior ; scrollTo() with instant behavior 
-PASS Main frame with auto scroll-behavior ; scrollTo() with smooth behavior 
-PASS Main frame with smooth scroll-behavior ; scrollTo() with default behavior 
-PASS Main frame with smooth scroll-behavior ; scrollTo() with auto behavior 
+FAIL Main frame with auto scroll-behavior ; scrollTo() with smooth behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 2430 but got 2430
+FAIL Main frame with smooth scroll-behavior ; scrollTo() with default behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 2430 but got 2430
+FAIL Main frame with smooth scroll-behavior ; scrollTo() with auto behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 2430 but got 2430
 PASS Main frame with smooth scroll-behavior ; scrollTo() with instant behavior 
-PASS Main frame with smooth scroll-behavior ; scrollTo() with smooth behavior 
+FAIL Main frame with smooth scroll-behavior ; scrollTo() with smooth behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 2430 but got 2430
 PASS Main frame with auto scroll-behavior ; scrollBy() with default behavior 
 PASS Main frame with auto scroll-behavior ; scrollBy() with auto behavior 
 PASS Main frame with auto scroll-behavior ; scrollBy() with instant behavior 
-PASS Main frame with auto scroll-behavior ; scrollBy() with smooth behavior 
-PASS Main frame with smooth scroll-behavior ; scrollBy() with default behavior 
-PASS Main frame with smooth scroll-behavior ; scrollBy() with auto behavior 
+FAIL Main frame with auto scroll-behavior ; scrollBy() with smooth behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 2430 but got 2430
+FAIL Main frame with smooth scroll-behavior ; scrollBy() with default behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 2430 but got 2430
+FAIL Main frame with smooth scroll-behavior ; scrollBy() with auto behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 2430 but got 2430
 PASS Main frame with smooth scroll-behavior ; scrollBy() with instant behavior 
-PASS Main frame with smooth scroll-behavior ; scrollBy() with smooth behavior 
+FAIL Main frame with smooth scroll-behavior ; scrollBy() with smooth behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 2430 but got 2430
 PASS Aborting an ongoing smooth scrolling on the main frame with another smooth scrolling 
 PASS Aborting an ongoing smooth scrolling on the main frame with an instant scrolling 
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-main-frame-window.html (254838 => 254839)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-main-frame-window.html	2020-01-20 23:55:48 UTC (rev 254838)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-main-frame-window.html	2020-01-21 01:35:42 UTC (rev 254839)
@@ -1,4 +1,4 @@
-<!DOCTYPE html><!-- webkit-test-runner [ experimental:CSSOMViewSmoothScrollingEnabled=true ] -->
+<!DOCTYPE html>
 <title>Testing scrollOptions' behavior for Element.scroll* on the window of the main frame</title>
 <meta name="timeout" content="long"/>
 <meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-scrollintoview-nested-expected.txt (254838 => 254839)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-scrollintoview-nested-expected.txt	2020-01-20 23:55:48 UTC (rev 254838)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-scrollintoview-nested-expected.txt	2020-01-21 01:35:42 UTC (rev 254839)
@@ -1,3 +1,3 @@
 
-PASS scrollIntoView with nested elements with different scroll-behavior 
+FAIL scrollIntoView with nested elements with different scroll-behavior assert_less_than: Element with smooth behavior should not scroll immediately expected a number less than 500 but got 500
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-scrollintoview-nested.html (254838 => 254839)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-scrollintoview-nested.html	2020-01-20 23:55:48 UTC (rev 254838)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-scrollintoview-nested.html	2020-01-21 01:35:42 UTC (rev 254839)
@@ -1,4 +1,4 @@
-<!DOCTYPE html><!-- webkit-test-runner [ experimental:CSSOMViewSmoothScrollingEnabled=true ] -->
+<!DOCTYPE html>
 <title>Testing scrollOptions' behavior with scrollIntoView for nested scrolling nodes</title>
 <meta name="timeout" content="long"/>
 <link rel="author" title="Frédéric Wang" href=""

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-smooth-positions.html (254838 => 254839)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-smooth-positions.html	2020-01-20 23:55:48 UTC (rev 254838)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-smooth-positions.html	2020-01-21 01:35:42 UTC (rev 254839)
@@ -1,4 +1,4 @@
-<!DOCTYPE html><!-- webkit-test-runner [ experimental:CSSOMViewSmoothScrollingEnabled=true ] -->
+<!DOCTYPE html>
 <title>Testing scroll positions when scrolling an element with smooth behavior</title>
 <meta name="timeout" content="long"/>
 <link rel="author" title="Frédéric Wang" href=""

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-subframe-root-expected.txt (254838 => 254839)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-subframe-root-expected.txt	2020-01-20 23:55:48 UTC (rev 254838)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-subframe-root-expected.txt	2020-01-21 01:35:42 UTC (rev 254839)
@@ -3,39 +3,39 @@
 PASS Subframe with auto scroll-behavior ; scroll() with default behavior 
 PASS Subframe with auto scroll-behavior ; scroll() with auto behavior 
 PASS Subframe with auto scroll-behavior ; scroll() with instant behavior 
-PASS Subframe with auto scroll-behavior ; scroll() with smooth behavior 
-PASS Subframe with smooth scroll-behavior ; scroll() with default behavior 
-PASS Subframe with smooth scroll-behavior ; scroll() with auto behavior 
+FAIL Subframe with auto scroll-behavior ; scroll() with smooth behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
+FAIL Subframe with smooth scroll-behavior ; scroll() with default behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
+FAIL Subframe with smooth scroll-behavior ; scroll() with auto behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
 PASS Subframe with smooth scroll-behavior ; scroll() with instant behavior 
-PASS Subframe with smooth scroll-behavior ; scroll() with smooth behavior 
+FAIL Subframe with smooth scroll-behavior ; scroll() with smooth behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
 PASS Subframe with auto scroll-behavior ; scrollTo() with default behavior 
 PASS Subframe with auto scroll-behavior ; scrollTo() with auto behavior 
 PASS Subframe with auto scroll-behavior ; scrollTo() with instant behavior 
-PASS Subframe with auto scroll-behavior ; scrollTo() with smooth behavior 
-PASS Subframe with smooth scroll-behavior ; scrollTo() with default behavior 
-PASS Subframe with smooth scroll-behavior ; scrollTo() with auto behavior 
+FAIL Subframe with auto scroll-behavior ; scrollTo() with smooth behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
+FAIL Subframe with smooth scroll-behavior ; scrollTo() with default behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
+FAIL Subframe with smooth scroll-behavior ; scrollTo() with auto behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
 PASS Subframe with smooth scroll-behavior ; scrollTo() with instant behavior 
-PASS Subframe with smooth scroll-behavior ; scrollTo() with smooth behavior 
+FAIL Subframe with smooth scroll-behavior ; scrollTo() with smooth behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
 PASS Subframe with auto scroll-behavior ; scrollBy() with default behavior 
 PASS Subframe with auto scroll-behavior ; scrollBy() with auto behavior 
 PASS Subframe with auto scroll-behavior ; scrollBy() with instant behavior 
-PASS Subframe with auto scroll-behavior ; scrollBy() with smooth behavior 
-PASS Subframe with smooth scroll-behavior ; scrollBy() with default behavior 
-PASS Subframe with smooth scroll-behavior ; scrollBy() with auto behavior 
+FAIL Subframe with auto scroll-behavior ; scrollBy() with smooth behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
+FAIL Subframe with smooth scroll-behavior ; scrollBy() with default behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
+FAIL Subframe with smooth scroll-behavior ; scrollBy() with auto behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
 PASS Subframe with smooth scroll-behavior ; scrollBy() with instant behavior 
-PASS Subframe with smooth scroll-behavior ; scrollBy() with smooth behavior 
+FAIL Subframe with smooth scroll-behavior ; scrollBy() with smooth behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
 PASS Subframe with auto scroll-behavior ; scrollIntoView() with default behavior 
 PASS Subframe with auto scroll-behavior ; scrollIntoView() with auto behavior 
 PASS Subframe with auto scroll-behavior ; scrollIntoView() with instant behavior 
-PASS Subframe with auto scroll-behavior ; scrollIntoView() with smooth behavior 
-PASS Subframe with smooth scroll-behavior ; scrollIntoView() with default behavior 
-PASS Subframe with smooth scroll-behavior ; scrollIntoView() with auto behavior 
+FAIL Subframe with auto scroll-behavior ; scrollIntoView() with smooth behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
+FAIL Subframe with smooth scroll-behavior ; scrollIntoView() with default behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
+FAIL Subframe with smooth scroll-behavior ; scrollIntoView() with auto behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
 PASS Subframe with smooth scroll-behavior ; scrollIntoView() with instant behavior 
-PASS Subframe with smooth scroll-behavior ; scrollIntoView() with smooth behavior 
+FAIL Subframe with smooth scroll-behavior ; scrollIntoView() with smooth behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
 PASS Subframe setting scrollLeft with auto scroll-behavior 
-PASS Subframe setting scrollLeft with smooth scroll-behavior 
+FAIL Subframe setting scrollLeft with smooth scroll-behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
 PASS Subframe setting scrollTop with auto scroll-behavior 
-PASS Subframe setting scrollTop with smooth scroll-behavior 
+FAIL Subframe setting scrollTop with smooth scroll-behavior assert_less_than: Should not set scrollTop immediately expected a number less than 250 but got 250
 PASS Aborting an ongoing smooth scrolling on a subframe with another smooth scrolling 
 PASS Aborting an ongoing smooth scrolling on a subframe with an instant scrolling 
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-subframe-root.html (254838 => 254839)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-subframe-root.html	2020-01-20 23:55:48 UTC (rev 254838)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-subframe-root.html	2020-01-21 01:35:42 UTC (rev 254839)
@@ -1,4 +1,4 @@
-<!DOCTYPE html><!-- webkit-test-runner [ experimental:CSSOMViewSmoothScrollingEnabled=true ] -->
+<!DOCTYPE html>
 <title>Testing scrollOptions' behavior for Element.scroll* and scroll-behavior on the root of a subframe</title>
 <meta name="timeout" content="long"/>
 <link rel="author" title="Frédéric Wang" href=""

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-subframe-window-expected.txt (254838 => 254839)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-subframe-window-expected.txt	2020-01-20 23:55:48 UTC (rev 254838)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-subframe-window-expected.txt	2020-01-21 01:35:42 UTC (rev 254839)
@@ -3,27 +3,27 @@
 PASS Main frame with auto scroll-behavior ; scroll() with default behavior 
 PASS Main frame with auto scroll-behavior ; scroll() with auto behavior 
 PASS Main frame with auto scroll-behavior ; scroll() with instant behavior 
-PASS Main frame with auto scroll-behavior ; scroll() with smooth behavior 
-PASS Main frame with smooth scroll-behavior ; scroll() with default behavior 
-PASS Main frame with smooth scroll-behavior ; scroll() with auto behavior 
+FAIL Main frame with auto scroll-behavior ; scroll() with smooth behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
+FAIL Main frame with smooth scroll-behavior ; scroll() with default behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
+FAIL Main frame with smooth scroll-behavior ; scroll() with auto behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
 PASS Main frame with smooth scroll-behavior ; scroll() with instant behavior 
-PASS Main frame with smooth scroll-behavior ; scroll() with smooth behavior 
+FAIL Main frame with smooth scroll-behavior ; scroll() with smooth behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
 PASS Main frame with auto scroll-behavior ; scrollTo() with default behavior 
 PASS Main frame with auto scroll-behavior ; scrollTo() with auto behavior 
 PASS Main frame with auto scroll-behavior ; scrollTo() with instant behavior 
-PASS Main frame with auto scroll-behavior ; scrollTo() with smooth behavior 
-PASS Main frame with smooth scroll-behavior ; scrollTo() with default behavior 
-PASS Main frame with smooth scroll-behavior ; scrollTo() with auto behavior 
+FAIL Main frame with auto scroll-behavior ; scrollTo() with smooth behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
+FAIL Main frame with smooth scroll-behavior ; scrollTo() with default behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
+FAIL Main frame with smooth scroll-behavior ; scrollTo() with auto behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
 PASS Main frame with smooth scroll-behavior ; scrollTo() with instant behavior 
-PASS Main frame with smooth scroll-behavior ; scrollTo() with smooth behavior 
+FAIL Main frame with smooth scroll-behavior ; scrollTo() with smooth behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
 PASS Main frame with auto scroll-behavior ; scrollBy() with default behavior 
 PASS Main frame with auto scroll-behavior ; scrollBy() with auto behavior 
 PASS Main frame with auto scroll-behavior ; scrollBy() with instant behavior 
-PASS Main frame with auto scroll-behavior ; scrollBy() with smooth behavior 
-PASS Main frame with smooth scroll-behavior ; scrollBy() with default behavior 
-PASS Main frame with smooth scroll-behavior ; scrollBy() with auto behavior 
+FAIL Main frame with auto scroll-behavior ; scrollBy() with smooth behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
+FAIL Main frame with smooth scroll-behavior ; scrollBy() with default behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
+FAIL Main frame with smooth scroll-behavior ; scrollBy() with auto behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
 PASS Main frame with smooth scroll-behavior ; scrollBy() with instant behavior 
-PASS Main frame with smooth scroll-behavior ; scrollBy() with smooth behavior 
+FAIL Main frame with smooth scroll-behavior ; scrollBy() with smooth behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
 PASS Aborting an ongoing smooth scrolling on the main frame with another smooth scrolling 
 PASS Aborting an ongoing smooth scrolling on the main frame with an instant scrolling 
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-subframe-window.html (254838 => 254839)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-subframe-window.html	2020-01-20 23:55:48 UTC (rev 254838)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-subframe-window.html	2020-01-21 01:35:42 UTC (rev 254839)
@@ -1,4 +1,4 @@
-<!DOCTYPE html><!-- webkit-test-runner [ experimental:CSSOMViewSmoothScrollingEnabled=true ] -->
+<!DOCTYPE html>
 <title>Testing scrollOptions' behavior for Element.scroll* and scroll-behavior on the root of a subframe</title>
 <meta name="timeout" content="long"/>
 <link rel="author" title="Frédéric Wang" href=""

Modified: trunk/LayoutTests/platform/mac-wk1/TestExpectations (254838 => 254839)


--- trunk/LayoutTests/platform/mac-wk1/TestExpectations	2020-01-20 23:55:48 UTC (rev 254838)
+++ trunk/LayoutTests/platform/mac-wk1/TestExpectations	2020-01-21 01:35:42 UTC (rev 254839)
@@ -749,12 +749,6 @@
 
 webkit.org/b/188070 imported/w3c/web-platform-tests/streams/piping/error-propagation-backward.html [ Pass Failure ]
 
-# Tests for smooth scroll behavior do not all work and they are slow, so let's just skip them.
-webkit.org/b/191357 imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-main-frame-root.html [ Skip ]
-webkit.org/b/191357 imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-main-frame-window.html [ Skip ]
-webkit.org/b/191357 imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-subframe-root.html [ Skip ]
-webkit.org/b/191357 imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-subframe-window.html [ Skip ]
-
 webkit.org/b/189908 imported/w3c/web-platform-tests/resource-timing/resource_timing.worker.html [ Failure ]
 
 webkit.org/b/189756 [ Mojave+ ] compositing/filters/opacity-change-on-filtered-paints-into-ancestor.html [ Pass ImageOnlyFailure ]

Modified: trunk/Source/WebCore/ChangeLog (254838 => 254839)


--- trunk/Source/WebCore/ChangeLog	2020-01-20 23:55:48 UTC (rev 254838)
+++ trunk/Source/WebCore/ChangeLog	2020-01-21 01:35:42 UTC (rev 254839)
@@ -1,3 +1,16 @@
+2020-01-20  Fujii Hironori  <[email protected]>
+
+        Unreviewed, rolling out r254807.
+
+        Breaks Apple internal builds.
+
+        Reverted changeset:
+
+        "Add support for scroll behavior relies on ScrollAnimation of
+        the Web process"
+        https://bugs.webkit.org/show_bug.cgi?id=204882
+        https://trac.webkit.org/changeset/254807
+
 2020-01-20  Zalan Bujtas  <[email protected]>
 
         [LFC][IFC] InlineFormattingContext::lineLayout should take a InlineItem range

Modified: trunk/Source/WebCore/Sources.txt (254838 => 254839)


--- trunk/Source/WebCore/Sources.txt	2020-01-20 23:55:48 UTC (rev 254838)
+++ trunk/Source/WebCore/Sources.txt	2020-01-21 01:35:42 UTC (rev 254839)
@@ -1763,7 +1763,6 @@
 platform/RuntimeApplicationChecks.cpp
 platform/SSLKeyGenerator.cpp
 platform/ScrollAnimator.cpp
-platform/ScrollAnimationSmooth.cpp
 platform/ScrollView.cpp
 platform/ScrollableArea.cpp
 platform/Scrollbar.cpp

Modified: trunk/Source/WebCore/SourcesGTK.txt (254838 => 254839)


--- trunk/Source/WebCore/SourcesGTK.txt	2020-01-20 23:55:48 UTC (rev 254838)
+++ trunk/Source/WebCore/SourcesGTK.txt	2020-01-21 01:35:42 UTC (rev 254839)
@@ -63,6 +63,7 @@
 page/scrolling/generic/ScrollingThreadGeneric.cpp
 
 platform/ScrollAnimationKinetic.cpp
+platform/ScrollAnimationSmooth.cpp
 platform/UserAgentQuirks.cpp
 
 platform/generic/ScrollAnimatorGeneric.cpp

Modified: trunk/Source/WebCore/dom/Element.cpp (254838 => 254839)


--- trunk/Source/WebCore/dom/Element.cpp	2020-01-20 23:55:48 UTC (rev 254838)
+++ trunk/Source/WebCore/dom/Element.cpp	2020-01-21 01:35:42 UTC (rev 254839)
@@ -840,6 +840,7 @@
     bool insideFixed;
     LayoutRect absoluteBounds = renderer()->absoluteAnchorRect(&insideFixed);
 
+    // FIXME(webkit.org/b/188043): Support ScrollBehavior.
     ScrollIntoViewOptions options;
     if (arg) {
         auto value = arg.value();
@@ -858,8 +859,7 @@
         SelectionRevealMode::Reveal,
         isHorizontal ? alignX : alignY,
         isHorizontal ? alignY : alignX,
-        ShouldAllowCrossOriginScrolling::No,
-        options.behavior.valueOr(ScrollBehavior::Auto)
+        ShouldAllowCrossOriginScrolling::No
     };
     renderer()->scrollRectToVisible(absoluteBounds, insideFixed, visibleOptions);
 }
@@ -920,7 +920,7 @@
 
 void Element::scrollBy(double x, double y)
 {
-    scrollBy(ScrollToOptions(x, y));
+    scrollBy({ x, y });
 }
 
 void Element::scrollTo(const ScrollToOptions& options, ScrollClamping clamping)
@@ -956,17 +956,13 @@
         adjustForAbsoluteZoom(renderer->scrollLeft(), *renderer),
         adjustForAbsoluteZoom(renderer->scrollTop(), *renderer)
     );
-    IntPoint scrollPosition(
-        clampToInteger(scrollToOptions.left.value() * renderer->style().effectiveZoom()),
-        clampToInteger(scrollToOptions.top.value() * renderer->style().effectiveZoom())
-    );
-    bool animated = useSmoothScrolling(scrollToOptions.behavior.valueOr(ScrollBehavior::Auto), *this);
-    renderer->setScrollPosition(scrollPosition, ScrollType::Programmatic, animated, clamping);
+    renderer->setScrollLeft(clampToInteger(scrollToOptions.left.value() * renderer->style().effectiveZoom()), ScrollType::Programmatic, clamping);
+    renderer->setScrollTop(clampToInteger(scrollToOptions.top.value() * renderer->style().effectiveZoom()), ScrollType::Programmatic, clamping);
 }
 
 void Element::scrollTo(double x, double y)
 {
-    scrollTo(ScrollToOptions(x, y));
+    scrollTo({ x, y });
 }
 
 void Element::scrollByUnits(int units, ScrollGranularity granularity)
@@ -1300,19 +1296,13 @@
     document().updateLayoutIgnorePendingStylesheets();
 
     if (document().scrollingElement() == this) {
-        if (auto* frame = documentFrameWithNonNullView()) {
-            // FIXME: Should we use document()->scrollingElement()?
-            // See https://bugs.webkit.org/show_bug.cgi?id=205059
-            bool animated = document().documentElement() && useSmoothScrolling(ScrollBehavior::Auto, *document().documentElement());
-            frame->view()->setScrollPosition(IntPoint(static_cast<int>(newLeft * frame->pageZoomFactor() * frame->frameScaleFactor()), frame->view()->scrollY()), animated);
-        }
+        if (auto* frame = documentFrameWithNonNullView())
+            frame->view()->setScrollPosition(IntPoint(static_cast<int>(newLeft * frame->pageZoomFactor() * frame->frameScaleFactor()), frame->view()->scrollY()));
         return;
     }
 
     if (auto* renderer = renderBox()) {
-        int clampedLeft = clampToInteger(newLeft * renderer->style().effectiveZoom());
-        bool animated = useSmoothScrolling(ScrollBehavior::Auto, *this);
-        renderer->setScrollLeft(clampedLeft, ScrollType::Programmatic, animated);
+        renderer->setScrollLeft(static_cast<int>(newLeft * renderer->style().effectiveZoom()), ScrollType::Programmatic);
         if (auto* scrollableArea = renderer->layer())
             scrollableArea->setScrollShouldClearLatchedState(true);
     }
@@ -1323,19 +1313,13 @@
     document().updateLayoutIgnorePendingStylesheets();
 
     if (document().scrollingElement() == this) {
-        if (auto* frame = documentFrameWithNonNullView()) {
-            // FIXME: Should we use document()->scrollingElement()?
-            // See https://bugs.webkit.org/show_bug.cgi?id=205059
-            bool animated = document().documentElement() && useSmoothScrolling(ScrollBehavior::Auto, *document().documentElement());
-            frame->view()->setScrollPosition(IntPoint(frame->view()->scrollX(), static_cast<int>(newTop * frame->pageZoomFactor() * frame->frameScaleFactor())), animated);
-        }
+        if (auto* frame = documentFrameWithNonNullView())
+            frame->view()->setScrollPosition(IntPoint(frame->view()->scrollX(), static_cast<int>(newTop * frame->pageZoomFactor() * frame->frameScaleFactor())));
         return;
     }
 
     if (auto* renderer = renderBox()) {
-        int clampedTop = clampToInteger(newTop * renderer->style().effectiveZoom());
-        bool animated = useSmoothScrolling(ScrollBehavior::Auto, *this);
-        renderer->setScrollTop(clampedTop, ScrollType::Programmatic, animated);
+        renderer->setScrollTop(static_cast<int>(newTop * renderer->style().effectiveZoom()), ScrollType::Programmatic);
         if (auto* scrollableArea = renderer->layer())
             scrollableArea->setScrollShouldClearLatchedState(true);
     }

Modified: trunk/Source/WebCore/page/DOMWindow.cpp (254838 => 254839)


--- trunk/Source/WebCore/page/DOMWindow.cpp	2020-01-20 23:55:48 UTC (rev 254838)
+++ trunk/Source/WebCore/page/DOMWindow.cpp	2020-01-21 01:35:42 UTC (rev 254839)
@@ -1650,7 +1650,7 @@
 
 void DOMWindow::scrollBy(double x, double y) const
 {
-    scrollBy(ScrollToOptions(x, y));
+    scrollBy({ x, y });
 }
 
 void DOMWindow::scrollBy(const ScrollToOptions& options) const
@@ -1672,10 +1672,10 @@
 
 void DOMWindow::scrollTo(double x, double y, ScrollClamping clamping) const
 {
-    scrollTo(ScrollToOptions(x, y), clamping);
+    scrollTo({ x, y }, clamping);
 }
 
-void DOMWindow::scrollTo(const ScrollToOptions& options, ScrollClamping clamping) const
+void DOMWindow::scrollTo(const ScrollToOptions& options, ScrollClamping) const
 {
     if (!isCurrentlyDisplayedInFrame())
         return;
@@ -1688,22 +1688,12 @@
         view->contentsScrollPosition().x(), view->contentsScrollPosition().y()
     );
 
-    // This is an optimization for the common case of scrolling to (0, 0) when the scroller is already at the origin.
-    // If an animated scroll is in progress, this optimization is skipped to ensure that the animated scroll is really stopped.
-    if (view->currentScrollBehaviorStatus() == ScrollBehaviorStatus::NotInAnimation && !scrollToOptions.left.value() && !scrollToOptions.top.value() && view->contentsScrollPosition() == IntPoint(0, 0))
+    if (!scrollToOptions.left.value() && !scrollToOptions.top.value() && view->contentsScrollPosition() == IntPoint(0, 0))
         return;
 
     document()->updateLayoutIgnorePendingStylesheets();
 
     IntPoint layoutPos(view->mapFromCSSToLayoutUnits(scrollToOptions.left.value()), view->mapFromCSSToLayoutUnits(scrollToOptions.top.value()));
-
-    // FIXME: Should we use document()->scrollingElement()?
-    // See https://bugs.webkit.org/show_bug.cgi?id=205059
-    if (document()->documentElement() && useSmoothScrolling(scrollToOptions.behavior.valueOr(ScrollBehavior::Auto), *document()->documentElement())) {
-        view->scrollToOffsetWithAnimation(layoutPos, ScrollType::Programmatic, clamping);
-        return;
-    }
-
     view->setContentsScrollPosition(layoutPos);
 }
 

Modified: trunk/Source/WebCore/page/FrameView.cpp (254838 => 254839)


--- trunk/Source/WebCore/page/FrameView.cpp	2020-01-20 23:55:48 UTC (rev 254838)
+++ trunk/Source/WebCore/page/FrameView.cpp	2020-01-21 01:35:42 UTC (rev 254839)
@@ -2279,7 +2279,7 @@
     setScrollPosition(IntPoint(bounds.x() - centeringOffsetX - rect.x(), bounds.y() - centeringOffsetY - rect.y()));
 }
 
-void FrameView::setScrollPosition(const ScrollPosition& scrollPosition, bool animated)
+void FrameView::setScrollPosition(const ScrollPosition& scrollPosition)
 {
     LOG_WITH_STREAM(Scrolling, stream << "FrameView::setScrollPosition " << scrollPosition << " , clearing anchor");
 
@@ -2292,10 +2292,7 @@
     Page* page = frame().page();
     if (page && page->isMonitoringWheelEvents())
         scrollAnimator().setWheelEventTestMonitor(page->wheelEventTestMonitor());
-    if (animated)
-        scrollToOffsetWithAnimation(scrollOffsetFromPosition(scrollPosition), currentScrollType());
-    else
-        ScrollView::setScrollPosition(scrollPosition);
+    ScrollView::setScrollPosition(scrollPosition);
 
     setCurrentScrollType(oldScrollType);
 }
@@ -3661,18 +3658,6 @@
     didChangeScrollOffset();
 }
 
-void FrameView::scrollToOffsetWithAnimation(const ScrollOffset& offset, ScrollType scrollType, ScrollClamping)
-{
-    auto previousScrollType = currentScrollType();
-    setCurrentScrollType(scrollType);
-
-    if (currentScrollBehaviorStatus() == ScrollBehaviorStatus::InNonNativeAnimation)
-        scrollAnimator().cancelAnimations();
-    if (offset != this->scrollOffset())
-        ScrollableArea::scrollToOffsetWithAnimation(offset);
-    setCurrentScrollType(previousScrollType);
-}
-
 float FrameView::adjustScrollStepForFixedContent(float step, ScrollbarOrientation orientation, ScrollGranularity granularity)
 {
     if (granularity != ScrollByPage || orientation == HorizontalScrollbar)

Modified: trunk/Source/WebCore/page/FrameView.h (254838 => 254839)


--- trunk/Source/WebCore/page/FrameView.h	2020-01-20 23:55:48 UTC (rev 254838)
+++ trunk/Source/WebCore/page/FrameView.h	2020-01-21 01:35:42 UTC (rev 254839)
@@ -223,7 +223,7 @@
 #if USE(COORDINATED_GRAPHICS)
     WEBCORE_EXPORT void setFixedVisibleContentRect(const IntRect&) final;
 #endif
-    WEBCORE_EXPORT void setScrollPosition(const ScrollPosition&, bool animated = false) final;
+    WEBCORE_EXPORT void setScrollPosition(const ScrollPosition&) final;
     void restoreScrollbar();
     void scheduleScrollToFocusedElement(SelectionRevealMode);
     void scrollToFocusedElementImmediatelyIfNeeded();
@@ -659,8 +659,6 @@
 
     void renderLayerDidScroll(const RenderLayer&);
 
-    WEBCORE_EXPORT void scrollToOffsetWithAnimation(const ScrollOffset&, ScrollType = ScrollType::Programmatic, ScrollClamping = ScrollClamping::Clamped);
-
 protected:
     bool scrollContentsFastPath(const IntSize& scrollDelta, const IntRect& rectToScroll, const IntRect& clipRect) final;
     void scrollContentsSlowPath(const IntRect& updateRect) final;

Modified: trunk/Source/WebCore/platform/ScrollAnimation.h (254838 => 254839)


--- trunk/Source/WebCore/platform/ScrollAnimation.h	2020-01-20 23:55:48 UTC (rev 254838)
+++ trunk/Source/WebCore/platform/ScrollAnimation.h	2020-01-21 01:35:42 UTC (rev 254839)
@@ -32,7 +32,6 @@
 
 class FloatPoint;
 class ScrollableArea;
-enum class ScrollClamping : uint8_t;
 
 class ScrollAnimation {
     WTF_MAKE_FAST_ALLOCATED;
@@ -39,7 +38,6 @@
 public:
     virtual ~ScrollAnimation() { };
     virtual bool scroll(ScrollbarOrientation, ScrollGranularity, float /* step */, float /* multiplier */) { return true; };
-    virtual void scroll(const FloatPoint&) { };
     virtual void stop() = 0;
     virtual void updateVisibleLengths() { };
     virtual void setCurrentPosition(const FloatPoint&) { };

Modified: trunk/Source/WebCore/platform/ScrollAnimationSmooth.cpp (254838 => 254839)


--- trunk/Source/WebCore/platform/ScrollAnimationSmooth.cpp	2020-01-20 23:55:48 UTC (rev 254838)
+++ trunk/Source/WebCore/platform/ScrollAnimationSmooth.cpp	2020-01-21 01:35:42 UTC (rev 254839)
@@ -28,6 +28,8 @@
 #include "config.h"
 #include "ScrollAnimationSmooth.h"
 
+#if ENABLE(SMOOTH_SCROLLING)
+
 #include "FloatPoint.h"
 #include "ScrollableArea.h"
 
@@ -36,7 +38,6 @@
 static const double frameRate = 60;
 static const Seconds tickTime = 1_s / frameRate;
 static const Seconds minimumTimerInterval { 1_ms };
-static const double smoothFactorForProgrammaticScroll = 5;
 
 ScrollAnimationSmooth::ScrollAnimationSmooth(ScrollableArea& scrollableArea, const FloatPoint& position, WTF::Function<void (FloatPoint&&)>&& notifyPositionChangedFunction)
     : ScrollAnimation(scrollableArea)
@@ -66,22 +67,9 @@
     return needToScroll;
 }
 
-void ScrollAnimationSmooth::scroll(const FloatPoint& position)
-{
-    ScrollGranularity granularity = ScrollByPage;
-    bool needToScroll = updatePerAxisData(m_horizontalData, granularity, position.x() - m_horizontalData.currentPosition, m_scrollableArea.minimumScrollPosition().x(), m_scrollableArea.maximumScrollPosition().x(), smoothFactorForProgrammaticScroll);
-    needToScroll |=
-        updatePerAxisData(m_verticalData, granularity, position.y() - m_verticalData.currentPosition, m_scrollableArea.minimumScrollPosition().y(), m_scrollableArea.maximumScrollPosition().y(), smoothFactorForProgrammaticScroll);
-    if (needToScroll && !animationTimerActive()) {
-        m_startTime = m_horizontalData.startTime;
-        animationTimerFired();
-    }
-};
-
 void ScrollAnimationSmooth::stop()
 {
     m_animationTimer.stop();
-    m_scrollableArea.setScrollBehaviorStatus(ScrollBehaviorStatus::NotInAnimation);
 }
 
 void ScrollAnimationSmooth::updateVisibleLengths()
@@ -259,7 +247,7 @@
     }
 }
 
-bool ScrollAnimationSmooth::updatePerAxisData(PerAxisData& data, ScrollGranularity granularity, float delta, float minScrollPosition, float maxScrollPosition, double smoothFactor)
+bool ScrollAnimationSmooth::updatePerAxisData(PerAxisData& data, ScrollGranularity granularity, float delta, float minScrollPosition, float maxScrollPosition)
 {
     if (!data.startTime || !delta || (delta < 0) != (data.desiredPosition - data.currentPosition < 0)) {
         data.desiredPosition = data.currentPosition;
@@ -276,12 +264,6 @@
     Curve coastTimeCurve;
     getAnimationParametersForGranularity(granularity, animationTime, repeatMinimumSustainTime, attackTime, releaseTime, coastTimeCurve, maximumCoastTime);
 
-    animationTime *= smoothFactor;
-    repeatMinimumSustainTime *= smoothFactor;
-    attackTime *= smoothFactor;
-    releaseTime *= smoothFactor;
-    maximumCoastTime *= smoothFactor;
-
     data.desiredPosition = newPosition;
     if (!data.startTime)
         data.attackTime = attackTime;
@@ -410,8 +392,6 @@
 
     if (continueAnimation)
         startNextTimer(std::max(minimumTimerInterval, deltaToNextFrame));
-    else
-        m_scrollableArea.setScrollBehaviorStatus(ScrollBehaviorStatus::NotInAnimation);
 
     m_notifyPositionChangedFunction(FloatPoint(m_horizontalData.currentPosition, m_verticalData.currentPosition));
 }
@@ -427,3 +407,5 @@
 }
 
 } // namespace WebCore
+
+#endif // ENABLE(SMOOTH_SCROLLING)

Modified: trunk/Source/WebCore/platform/ScrollAnimationSmooth.h (254838 => 254839)


--- trunk/Source/WebCore/platform/ScrollAnimationSmooth.h	2020-01-20 23:55:48 UTC (rev 254838)
+++ trunk/Source/WebCore/platform/ScrollAnimationSmooth.h	2020-01-21 01:35:42 UTC (rev 254839)
@@ -27,6 +27,8 @@
 
 #include "ScrollAnimation.h"
 
+#if ENABLE(SMOOTH_SCROLLING)
+
 #include "Timer.h"
 
 namespace WebCore {
@@ -33,7 +35,6 @@
 
 class FloatPoint;
 class ScrollableArea;
-enum class ScrollClamping : uint8_t;
 
 class ScrollAnimationSmooth final: public ScrollAnimation {
 public:
@@ -50,7 +51,6 @@
 
 private:
     bool scroll(ScrollbarOrientation, ScrollGranularity, float step, float multiplier) override;
-    void scroll(const FloatPoint&) override;
     void stop() override;
     void updateVisibleLengths() override;
     void setCurrentPosition(const FloatPoint&) override;
@@ -89,7 +89,7 @@
         int visibleLength { 0 };
     };
 
-    bool updatePerAxisData(PerAxisData&, ScrollGranularity, float delta, float minScrollPosition, float maxScrollPosition, double smoothFactor = 1);
+    bool updatePerAxisData(PerAxisData&, ScrollGranularity, float delta, float minScrollPosition, float maxScrollPosition);
     bool animateScroll(PerAxisData&, MonotonicTime currentTime);
 
     void requestAnimationTimerFired();
@@ -108,3 +108,4 @@
 
 } // namespace WebCore
 
+#endif // ENABLE(SMOOTH_SCROLLING)

Modified: trunk/Source/WebCore/platform/ScrollAnimator.cpp (254838 => 254839)


--- trunk/Source/WebCore/platform/ScrollAnimator.cpp	2020-01-20 23:55:48 UTC (rev 254838)
+++ trunk/Source/WebCore/platform/ScrollAnimator.cpp	2020-01-21 01:35:42 UTC (rev 254839)
@@ -35,7 +35,6 @@
 #include "FloatPoint.h"
 #include "LayoutSize.h"
 #include "PlatformWheelEvent.h"
-#include "ScrollAnimationSmooth.h"
 #include "ScrollableArea.h"
 #include <algorithm>
 
@@ -53,18 +52,6 @@
 #if ENABLE(CSS_SCROLL_SNAP) || ENABLE(RUBBER_BANDING)
     , m_scrollController(*this)
 #endif
-    , m_animationProgrammaticScroll(makeUnique<ScrollAnimationSmooth>(scrollableArea, m_currentPosition, [this](FloatPoint&& position) {
-        auto previousScrollType = m_scrollableArea.currentScrollType();
-        m_scrollableArea.setCurrentScrollType(ScrollType::Programmatic);
-        bool updated = m_scrollableArea.requestScrollPositionUpdate(roundedIntPoint(position));
-        m_scrollableArea.setCurrentScrollType(previousScrollType);
-        if (updated)
-            return;
-
-        FloatSize delta = position - m_currentPosition;
-        m_currentPosition = WTFMove(position);
-        notifyPositionChanged(delta);
-    }))
 {
 }
 
@@ -88,14 +75,6 @@
     return true;
 }
 
-void ScrollAnimator::scrollToOffset(const FloatPoint& offset)
-{
-    m_animationProgrammaticScroll->setCurrentPosition(m_currentPosition);
-    auto newPosition = ScrollableArea::scrollPositionFromOffset(offset, toFloatSize(m_scrollableArea.scrollOrigin()));
-    m_animationProgrammaticScroll->scroll(newPosition);
-    m_scrollableArea.setScrollBehaviorStatus(ScrollBehaviorStatus::InNonNativeAnimation);
-}
-
 void ScrollAnimator::scrollToOffsetWithoutAnimation(const FloatPoint& offset, ScrollClamping)
 {
     FloatPoint newPositon = ScrollableArea::scrollPositionFromOffset(offset, toFloatSize(m_scrollableArea.scrollOrigin()));
@@ -266,33 +245,4 @@
 }
 #endif
 
-void ScrollAnimator::cancelAnimations()
-{
-#if !USE(REQUEST_ANIMATION_FRAME_TIMER)
-    m_animationProgrammaticScroll->stop();
-#endif
-}
-
-void ScrollAnimator::serviceScrollAnimations()
-{
-#if !USE(REQUEST_ANIMATION_FRAME_TIMER)
-    m_animationProgrammaticScroll->serviceAnimation();
-#endif
-}
-
-void ScrollAnimator::willEndLiveResize()
-{
-    m_animationProgrammaticScroll->updateVisibleLengths();
-}
-
-void ScrollAnimator::didAddVerticalScrollbar(Scrollbar*)
-{
-    m_animationProgrammaticScroll->updateVisibleLengths();
-}
-
-void ScrollAnimator::didAddHorizontalScrollbar(Scrollbar*)
-{
-    m_animationProgrammaticScroll->updateVisibleLengths();
-}
-
 } // namespace WebCore

Modified: trunk/Source/WebCore/platform/ScrollAnimator.h (254838 => 254839)


--- trunk/Source/WebCore/platform/ScrollAnimator.h	2020-01-20 23:55:48 UTC (rev 254838)
+++ trunk/Source/WebCore/platform/ScrollAnimator.h	2020-01-21 01:35:42 UTC (rev 254839)
@@ -46,7 +46,6 @@
 
 class FloatPoint;
 class PlatformTouchEvent;
-class ScrollAnimation;
 class ScrollableArea;
 class Scrollbar;
 class WheelEventTestMonitor;
@@ -69,7 +68,6 @@
     // The base class implementation always scrolls immediately, never animates.
     virtual bool scroll(ScrollbarOrientation, ScrollGranularity, float step, float multiplier);
 
-    void scrollToOffset(const FloatPoint&);
     virtual void scrollToOffsetWithoutAnimation(const FloatPoint&, ScrollClamping = ScrollClamping::Clamped);
 
     ScrollableArea& scrollableArea() const { return m_scrollableArea; }
@@ -87,8 +85,8 @@
     void setCurrentPosition(const FloatPoint&);
     const FloatPoint& currentPosition() const { return m_currentPosition; }
 
-    virtual void cancelAnimations();
-    virtual void serviceScrollAnimations();
+    virtual void cancelAnimations() { }
+    virtual void serviceScrollAnimations() { }
 
     virtual void contentAreaWillPaint() const { }
     virtual void mouseEnteredContentArea() { }
@@ -99,7 +97,7 @@
     virtual void mouseIsDownInScrollbar(Scrollbar*, bool) const { }
     virtual void willStartLiveResize() { }
     virtual void contentsResized() const { }
-    virtual void willEndLiveResize();
+    virtual void willEndLiveResize() { }
     virtual void contentAreaDidShow() { }
     virtual void contentAreaDidHide() { }
 
@@ -106,9 +104,9 @@
     virtual void lockOverlayScrollbarStateToHidden(bool) { }
     virtual bool scrollbarsCanBeActive() const { return true; }
 
-    virtual void didAddVerticalScrollbar(Scrollbar*);
+    virtual void didAddVerticalScrollbar(Scrollbar*) { }
     virtual void willRemoveVerticalScrollbar(Scrollbar*) { }
-    virtual void didAddHorizontalScrollbar(Scrollbar*);
+    virtual void didAddHorizontalScrollbar(Scrollbar*) { }
     virtual void willRemoveHorizontalScrollbar(Scrollbar*) { }
 
     virtual void invalidateScrollbarPartLayers(Scrollbar*) { }
@@ -153,8 +151,6 @@
     ScrollController m_scrollController;
 #endif
     FloatPoint m_currentPosition;
-
-    std::unique_ptr<ScrollAnimation> m_animationProgrammaticScroll;
 };
 
 } // namespace WebCore

Modified: trunk/Source/WebCore/platform/ScrollTypes.h (254838 => 254839)


--- trunk/Source/WebCore/platform/ScrollTypes.h	2020-01-20 23:55:48 UTC (rev 254838)
+++ trunk/Source/WebCore/platform/ScrollTypes.h	2020-01-21 01:35:42 UTC (rev 254839)
@@ -54,13 +54,6 @@
     ToContentEdges,
 };
 
-// FIXME: Add another status InNativeAnimation to indicate native scrolling is in progress.
-// See: https://bugs.webkit.org/show_bug.cgi?id=204936
-enum class ScrollBehaviorStatus : uint8_t {
-    NotInAnimation,
-    InNonNativeAnimation,
-};
-
 inline ScrollDirection logicalToPhysical(ScrollLogicalDirection direction, bool isVertical, bool isFlipped)
 {
     switch (direction) {

Modified: trunk/Source/WebCore/platform/ScrollView.cpp (254838 => 254839)


--- trunk/Source/WebCore/platform/ScrollView.cpp	2020-01-20 23:55:48 UTC (rev 254838)
+++ trunk/Source/WebCore/platform/ScrollView.cpp	2020-01-21 01:35:42 UTC (rev 254839)
@@ -518,7 +518,7 @@
     updateCompositingLayersAfterScrolling();
 }
 
-void ScrollView::setScrollPosition(const ScrollPosition& scrollPosition, bool/* animated*/)
+void ScrollView::setScrollPosition(const ScrollPosition& scrollPosition)
 {
     LOG_WITH_STREAM(Scrolling, stream << "ScrollView::setScrollPosition " << scrollPosition);
 
@@ -532,19 +532,13 @@
 
     ScrollPosition newScrollPosition = !delegatesScrolling() ? adjustScrollPositionWithinRange(scrollPosition) : scrollPosition;
 
-    if ((!delegatesScrolling() || currentScrollType() == ScrollType::User) && currentScrollBehaviorStatus() == ScrollBehaviorStatus::NotInAnimation && newScrollPosition == this->scrollPosition())
+    if ((!delegatesScrolling() || currentScrollType() == ScrollType::User) && newScrollPosition == this->scrollPosition())
         return;
 
-    if (currentScrollBehaviorStatus() == ScrollBehaviorStatus::InNonNativeAnimation)
-        scrollAnimator().cancelAnimations();
-
-    if (requestScrollPositionUpdate(newScrollPosition)) {
-        setScrollBehaviorStatus(ScrollBehaviorStatus::NotInAnimation);
+    if (requestScrollPositionUpdate(newScrollPosition))
         return;
-    }
 
     updateScrollbars(newScrollPosition);
-    setScrollBehaviorStatus(ScrollBehaviorStatus::NotInAnimation);
 }
 
 bool ScrollView::scroll(ScrollDirection direction, ScrollGranularity granularity)
@@ -601,8 +595,7 @@
     
     if (!managesScrollbars()) {
         if (scrollOriginChanged()) {
-            if (!requestScrollPositionUpdate(desiredPosition))
-                ScrollableArea::scrollToOffsetWithoutAnimation(scrollOffsetFromPosition(desiredPosition));
+            ScrollableArea::scrollToOffsetWithoutAnimation(scrollOffsetFromPosition(desiredPosition));
             resetScrollOriginChanged();
         }
         return;

Modified: trunk/Source/WebCore/platform/ScrollView.h (254838 => 254839)


--- trunk/Source/WebCore/platform/ScrollView.h	2020-01-20 23:55:48 UTC (rev 254838)
+++ trunk/Source/WebCore/platform/ScrollView.h	2020-01-21 01:35:42 UTC (rev 254839)
@@ -264,7 +264,7 @@
     ScrollPosition cachedScrollPosition() const { return m_cachedScrollPosition; }
 
     // Functions for scrolling the view.
-    virtual void setScrollPosition(const ScrollPosition&, bool animated = false);
+    virtual void setScrollPosition(const ScrollPosition&);
     void scrollBy(const IntSize& s) { return setScrollPosition(scrollPosition() + s); }
 
     // This function scrolls by lines, pages or pixels.

Modified: trunk/Source/WebCore/platform/ScrollableArea.cpp (254838 => 254839)


--- trunk/Source/WebCore/platform/ScrollableArea.cpp	2020-01-20 23:55:48 UTC (rev 254838)
+++ trunk/Source/WebCore/platform/ScrollableArea.cpp	2020-01-21 01:35:42 UTC (rev 254839)
@@ -142,12 +142,6 @@
     return scrollAnimator().scroll(orientation, granularity, step, multiplier);
 }
 
-void ScrollableArea::scrollToOffsetWithAnimation(const FloatPoint& offset, ScrollClamping)
-{
-    LOG_WITH_STREAM(Scrolling, stream << "ScrollableArea " << this << " scrollToOffsetWithAnimation " << offset);
-    scrollAnimator().scrollToOffset(offset);
-}
-
 void ScrollableArea::scrollToOffsetWithoutAnimation(const FloatPoint& offset, ScrollClamping clamping)
 {
     LOG_WITH_STREAM(Scrolling, stream << "ScrollableArea " << this << " scrollToOffsetWithoutAnimation " << offset);
@@ -227,15 +221,16 @@
 // NOTE: Only called from Internals for testing.
 void ScrollableArea::setScrollOffsetFromInternals(const ScrollOffset& offset)
 {
-    if (requestScrollPositionUpdate(scrollPositionFromOffset(offset)))
-        return;
-
     setScrollOffsetFromAnimation(offset);
 }
 
 void ScrollableArea::setScrollOffsetFromAnimation(const ScrollOffset& offset)
 {
-    scrollPositionChanged(scrollPositionFromOffset(offset));
+    ScrollPosition position = scrollPositionFromOffset(offset);
+    if (requestScrollPositionUpdate(position))
+        return;
+
+    scrollPositionChanged(position);
 }
 
 void ScrollableArea::willStartLiveResize()

Modified: trunk/Source/WebCore/platform/ScrollableArea.h (254838 => 254839)


--- trunk/Source/WebCore/platform/ScrollableArea.h	2020-01-20 23:55:48 UTC (rev 254838)
+++ trunk/Source/WebCore/platform/ScrollableArea.h	2020-01-21 01:35:42 UTC (rev 254839)
@@ -62,11 +62,7 @@
 
 class ScrollableArea : public CanMakeWeakPtr<ScrollableArea> {
 public:
-    ScrollBehaviorStatus currentScrollBehaviorStatus() { return m_currentScrollBehaviorStatus; }
-    void setScrollBehaviorStatus(ScrollBehaviorStatus status) { m_currentScrollBehaviorStatus = status; }
-
     WEBCORE_EXPORT bool scroll(ScrollDirection, ScrollGranularity, float multiplier = 1);
-    WEBCORE_EXPORT void scrollToOffsetWithAnimation(const FloatPoint&, ScrollClamping = ScrollClamping::Clamped);
     WEBCORE_EXPORT void scrollToOffsetWithoutAnimation(const FloatPoint&, ScrollClamping = ScrollClamping::Clamped);
     void scrollToOffsetWithoutAnimation(ScrollbarOrientation, float offset);
 
@@ -383,8 +379,6 @@
     unsigned m_currentVerticalSnapPointIndex { 0 };
 #endif
 
-    ScrollBehaviorStatus m_currentScrollBehaviorStatus { ScrollBehaviorStatus::NotInAnimation };
-
     // There are 8 possible combinations of writing mode and direction. Scroll origin will be non-zero in the x or y axis
     // if there is any reversed direction or writing-mode. The combinations are:
     // writing-mode / direction     scrollOrigin.x() set    scrollOrigin.y() set

Modified: trunk/Source/WebCore/platform/generic/ScrollAnimatorGeneric.cpp (254838 => 254839)


--- trunk/Source/WebCore/platform/generic/ScrollAnimatorGeneric.cpp	2020-01-20 23:55:48 UTC (rev 254838)
+++ trunk/Source/WebCore/platform/generic/ScrollAnimatorGeneric.cpp	2020-01-21 01:35:42 UTC (rev 254839)
@@ -162,8 +162,6 @@
 
 void ScrollAnimatorGeneric::updatePosition(FloatPoint&& position)
 {
-    if (m_scrollableArea.requestScrollPositionUpdate(roundedIntPoint(position)))
-        return;
     FloatSize delta = position - m_currentPosition;
     m_currentPosition = WTFMove(position);
     notifyPositionChanged(delta);

Modified: trunk/Source/WebCore/platform/graphics/cg/PDFDocumentImage.cpp (254838 => 254839)


--- trunk/Source/WebCore/platform/graphics/cg/PDFDocumentImage.cpp	2020-01-20 23:55:48 UTC (rev 254838)
+++ trunk/Source/WebCore/platform/graphics/cg/PDFDocumentImage.cpp	2020-01-21 01:35:42 UTC (rev 254839)
@@ -49,9 +49,7 @@
 #include <wtf/StdLibExtras.h>
 #include <wtf/text/TextStream.h>
 
-#if PLATFORM(COCOA)
-#import <pal/spi/cg/CoreGraphicsSPI.h>
-#else
+#if !PLATFORM(COCOA)
 #include "ImageSourceCG.h"
 #endif
 

Modified: trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.mm (254838 => 254839)


--- trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.mm	2020-01-20 23:55:48 UTC (rev 254838)
+++ trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.mm	2020-01-21 01:35:42 UTC (rev 254839)
@@ -1156,7 +1156,6 @@
 
 void ScrollAnimatorMac::cancelAnimations()
 {
-    ScrollAnimator::cancelAnimations();
     m_haveScrolledSincePageLoad = false;
 
     if (scrollbarPaintTimerIsActive())

Modified: trunk/Source/WebCore/rendering/RenderBox.cpp (254838 => 254839)


--- trunk/Source/WebCore/rendering/RenderBox.cpp	2020-01-20 23:55:48 UTC (rev 254838)
+++ trunk/Source/WebCore/rendering/RenderBox.cpp	2020-01-21 01:35:42 UTC (rev 254839)
@@ -581,30 +581,22 @@
     layer.scrollAnimator().setWheelEventTestMonitor(page.wheelEventTestMonitor());
 }
 
-void RenderBox::setScrollLeft(int newLeft, ScrollType scrollType, bool animated, ScrollClamping clamping)
+void RenderBox::setScrollLeft(int newLeft, ScrollType scrollType, ScrollClamping clamping)
 {
     if (!hasOverflowClip() || !layer())
         return;
     setupWheelEventMonitor(*layer());
-    layer()->scrollToXPosition(newLeft, scrollType, animated, clamping);
+    layer()->scrollToXPosition(newLeft, scrollType, clamping);
 }
 
-void RenderBox::setScrollTop(int newTop, ScrollType scrollType, bool animated, ScrollClamping clamping)
+void RenderBox::setScrollTop(int newTop, ScrollType scrollType, ScrollClamping clamping)
 {
     if (!hasOverflowClip() || !layer())
         return;
     setupWheelEventMonitor(*layer());
-    layer()->scrollToYPosition(newTop, scrollType, animated, clamping);
+    layer()->scrollToYPosition(newTop, scrollType, clamping);
 }
 
-void RenderBox::setScrollPosition(const ScrollPosition& position, ScrollType scrollType, bool animated, ScrollClamping clamping)
-{
-    if (!hasOverflowClip() || !layer())
-        return;
-    setupWheelEventMonitor(*layer());
-    layer()->scrollToPosition(position, scrollType, animated, clamping);
-}
-
 void RenderBox::absoluteRects(Vector<IntRect>& rects, const LayoutPoint& accumulatedOffset) const
 {
     rects.append(snappedIntRect(accumulatedOffset, size()));

Modified: trunk/Source/WebCore/rendering/RenderBox.h (254838 => 254839)


--- trunk/Source/WebCore/rendering/RenderBox.h	2020-01-20 23:55:48 UTC (rev 254838)
+++ trunk/Source/WebCore/rendering/RenderBox.h	2020-01-21 01:35:42 UTC (rev 254839)
@@ -247,9 +247,8 @@
     virtual int scrollTop() const;
     virtual int scrollWidth() const;
     virtual int scrollHeight() const;
-    virtual void setScrollLeft(int, ScrollType, bool animated = false, ScrollClamping = ScrollClamping::Clamped);
-    virtual void setScrollTop(int, ScrollType, bool animated = false, ScrollClamping = ScrollClamping::Clamped);
-    void setScrollPosition(const ScrollPosition&, ScrollType, bool animated = false, ScrollClamping = ScrollClamping::Clamped);
+    virtual void setScrollLeft(int, ScrollType, ScrollClamping = ScrollClamping::Clamped);
+    virtual void setScrollTop(int, ScrollType, ScrollClamping = ScrollClamping::Clamped);
 
     LayoutUnit marginTop() const override { return m_marginBox.top(); }
     LayoutUnit marginBottom() const override { return m_marginBox.bottom(); }

Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (254838 => 254839)


--- trunk/Source/WebCore/rendering/RenderLayer.cpp	2020-01-20 23:55:48 UTC (rev 254838)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp	2020-01-21 01:35:42 UTC (rev 254839)
@@ -2579,26 +2579,18 @@
     m_postLayoutScrollPosition = WTF::nullopt;
 }
 
-void RenderLayer::scrollToXPosition(int x, ScrollType scrollType, bool animated, ScrollClamping clamping)
+void RenderLayer::scrollToXPosition(int x, ScrollType scrollType, ScrollClamping clamping)
 {
     ScrollPosition position(x, m_scrollPosition.y());
-    scrollToPosition(position, scrollType, animated, clamping);
+    scrollToOffset(scrollOffsetFromPosition(position), scrollType, clamping);
 }
 
-void RenderLayer::scrollToYPosition(int y, ScrollType scrollType, bool animated, ScrollClamping clamping)
+void RenderLayer::scrollToYPosition(int y, ScrollType scrollType, ScrollClamping clamping)
 {
     ScrollPosition position(m_scrollPosition.x(), y);
-    scrollToPosition(position, scrollType, animated, clamping);
+    scrollToOffset(scrollOffsetFromPosition(position), scrollType, clamping);
 }
 
-void RenderLayer::scrollToPosition(const ScrollPosition& position, ScrollType scrollType, bool animated, ScrollClamping clamping)
-{
-    if (animated)
-        scrollToOffsetWithAnimation(scrollOffsetFromPosition(position), scrollType, clamping);
-    else
-        scrollToOffset(scrollOffsetFromPosition(position), scrollType, clamping);
-}
-
 ScrollOffset RenderLayer::clampScrollOffset(const ScrollOffset& scrollOffset) const
 {
     return scrollOffset.constrainedBetween(IntPoint(), maximumScrollOffset());
@@ -2606,9 +2598,6 @@
 
 void RenderLayer::scrollToOffset(const ScrollOffset& scrollOffset, ScrollType scrollType, ScrollClamping clamping)
 {
-    if (currentScrollBehaviorStatus() == ScrollBehaviorStatus::InNonNativeAnimation)
-        scrollAnimator().cancelAnimations();
-
     ScrollOffset clampedScrollOffset = clamping == ScrollClamping::Clamped ? clampScrollOffset(scrollOffset) : scrollOffset;
     if (clampedScrollOffset == this->scrollOffset())
         return;
@@ -2618,38 +2607,16 @@
 
     bool handled = false;
 #if ENABLE(ASYNC_SCROLLING)
-    handled = requestScrollPositionUpdate(scrollPositionFromOffset(clampedScrollOffset));
+    if (ScrollingCoordinator* scrollingCoordinator = page().scrollingCoordinator())
+        handled = scrollingCoordinator->requestScrollPositionUpdate(*this, scrollPositionFromOffset(clampedScrollOffset));
 #endif
 
     if (!handled)
         scrollToOffsetWithoutAnimation(clampedScrollOffset, clamping);
-    setScrollBehaviorStatus(ScrollBehaviorStatus::NotInAnimation);
 
     setCurrentScrollType(previousScrollType);
 }
 
-bool RenderLayer::requestScrollPositionUpdate(const ScrollPosition& position)
-{
-#if ENABLE(ASYNC_SCROLLING)
-    if (ScrollingCoordinator* scrollingCoordinator = page().scrollingCoordinator())
-        return scrollingCoordinator->requestScrollPositionUpdate(*this, position);
-#endif
-    return false;
-}
-
-void RenderLayer::scrollToOffsetWithAnimation(const ScrollOffset& offset, ScrollType scrollType, ScrollClamping clamping)
-{
-    auto previousScrollType = currentScrollType();
-    setCurrentScrollType(scrollType);
-
-    ScrollOffset newScrollOffset = clamping == ScrollClamping::Clamped ? clampScrollOffset(offset) : offset;
-    if (currentScrollBehaviorStatus() == ScrollBehaviorStatus::InNonNativeAnimation)
-        scrollAnimator().cancelAnimations();
-    if (newScrollOffset != this->scrollOffset())
-        ScrollableArea::scrollToOffsetWithAnimation(newScrollOffset);
-    setCurrentScrollType(previousScrollType);
-}
-
 void RenderLayer::scrollTo(const ScrollPosition& position)
 {
     RenderBox* box = renderBox();
@@ -2682,7 +2649,7 @@
 #endif
     }
     
-    if (m_scrollPosition == newPosition && currentScrollBehaviorStatus() == ScrollBehaviorStatus::NotInAnimation) {
+    if (m_scrollPosition == newPosition) {
         // FIXME: Nothing guarantees we get a scrollTo() with an unchanged position at the end of a user gesture.
         // The ScrollingCoordinator probably needs to message the main thread when a gesture ends.
         if (requiresScrollPositionReconciliation()) {
@@ -2827,11 +2794,10 @@
         LayoutRect revealRect = getRectToExpose(layerBounds, localExposeRect, insideFixed, options.alignX, options.alignY);
 
         ScrollOffset clampedScrollOffset = clampScrollOffset(scrollOffset() + toIntSize(roundedIntRect(revealRect).location()));
-        if (currentScrollBehaviorStatus() != ScrollBehaviorStatus::NotInAnimation || clampedScrollOffset != scrollOffset()) {
+        if (clampedScrollOffset != scrollOffset()) {
             ScrollOffset oldScrollOffset = scrollOffset();
-            bool animated = (box->element() && useSmoothScrolling(options.behavior, *box->element()));
-            scrollToPosition(scrollPositionFromOffset(clampedScrollOffset), ScrollType::Programmatic, animated);
-            IntSize scrollOffsetDifference = clampedScrollOffset - oldScrollOffset;
+            scrollToOffset(clampedScrollOffset);
+            IntSize scrollOffsetDifference = scrollOffset() - oldScrollOffset;
             localExposeRect.move(-scrollOffsetDifference);
             newRect = LayoutRect(box->localToAbsoluteQuad(FloatQuad(FloatRect(localExposeRect)), UseTransforms).boundingBox());
         }
@@ -2851,13 +2817,10 @@
                 LayoutRect viewRect = frameView.visibleContentRect(LegacyIOSDocumentVisibleRect);
                 LayoutRect exposeRect = getRectToExpose(viewRect, absoluteRect, insideFixed, options.alignX, options.alignY);
 
-                IntPoint scrollPosition(roundedIntPoint(exposeRect.location()));
+                IntPoint scrollOffset(roundedIntPoint(exposeRect.location()));
                 // Adjust offsets if they're outside of the allowable range.
-                scrollPosition = scrollPosition.constrainedBetween(IntPoint(), IntPoint(frameView.contentsSize()));
-                // FIXME: Should we use contentDocument()->scrollingElement()?
-                // See https://bugs.webkit.org/show_bug.cgi?id=205059
-                bool animated = ownerElement->contentDocument() && ownerElement->contentDocument()->documentElement() && useSmoothScrolling(options.behavior, *ownerElement->contentDocument()->documentElement());
-                frameView.setScrollPosition(scrollPosition, animated);
+                scrollOffset = scrollOffset.constrainedBetween(IntPoint(), IntPoint(frameView.contentsSize()));
+                frameView.setScrollPosition(scrollOffset);
 
                 if (options.shouldAllowCrossOriginScrolling == ShouldAllowCrossOriginScrolling::Yes || frameView.safeToPropagateScrollToParent()) {
                     parentLayer = ownerElement->renderer()->enclosingLayer();
@@ -2896,10 +2859,7 @@
             // Avoid scrolling to the rounded value of revealRect.location() if we don't actually need to scroll
             if (revealRect != viewRect) {
                 ScrollOffset clampedScrollPosition = roundedIntPoint(revealRect.location()).constrainedBetween(minScrollPosition, maxScrollPosition);
-                // FIXME: Should we use document()->scrollingElement()?
-                // See https://bugs.webkit.org/show_bug.cgi?id=205059
-                bool animated = renderer().document().documentElement() && useSmoothScrolling(options.behavior, *renderer().document().documentElement());
-                frameView.setScrollPosition(clampedScrollPosition, animated);
+                frameView.setScrollPosition(clampedScrollPosition);
             }
 
             // This is the outermost view of a web page, so after scrolling this view we

Modified: trunk/Source/WebCore/rendering/RenderLayer.h (254838 => 254839)


--- trunk/Source/WebCore/rendering/RenderLayer.h	2020-01-20 23:55:48 UTC (rev 254838)
+++ trunk/Source/WebCore/rendering/RenderLayer.h	2020-01-21 01:35:42 UTC (rev 254839)
@@ -50,7 +50,6 @@
 #include "PaintInfo.h"
 #include "RenderBox.h"
 #include "RenderPtr.h"
-#include "ScrollBehavior.h"
 #include "ScrollableArea.h"
 #include <memory>
 #include <wtf/WeakPtr.h>
@@ -135,7 +134,6 @@
     const ScrollAlignment& alignX { ScrollAlignment::alignCenterIfNeeded };
     const ScrollAlignment& alignY { ScrollAlignment::alignCenterIfNeeded };
     ShouldAllowCrossOriginScrolling shouldAllowCrossOriginScrolling { ShouldAllowCrossOriginScrolling::No };
-    ScrollBehavior behavior { ScrollBehavior::Auto };
 };
 
 DECLARE_ALLOCATOR_WITH_HEAP_IDENTIFIER(RenderLayer);
@@ -442,14 +440,10 @@
     void scrollByRecursively(const IntSize& delta, ScrollableArea** scrolledArea = nullptr);
 
     WEBCORE_EXPORT void scrollToOffset(const ScrollOffset&, ScrollType = ScrollType::Programmatic, ScrollClamping = ScrollClamping::Clamped);
-    WEBCORE_EXPORT void scrollToOffsetWithAnimation(const ScrollOffset&, ScrollType = ScrollType::Programmatic, ScrollClamping = ScrollClamping::Clamped);
 
-    bool requestScrollPositionUpdate(const ScrollPosition&) override;
+    void scrollToXPosition(int x, ScrollType, ScrollClamping = ScrollClamping::Clamped);
+    void scrollToYPosition(int y, ScrollType, ScrollClamping = ScrollClamping::Clamped);
 
-    void scrollToXPosition(int x, ScrollType, bool animated, ScrollClamping = ScrollClamping::Clamped);
-    void scrollToYPosition(int y, ScrollType, bool animated, ScrollClamping = ScrollClamping::Clamped);
-    void scrollToPosition(const ScrollPosition&, ScrollType, bool animated, ScrollClamping = ScrollClamping::Clamped);
-
     // These are only used by marquee.
     void scrollToXOffset(int x) { scrollToOffset(ScrollOffset(x, scrollOffset().y()), ScrollType::Programmatic, ScrollClamping::Unclamped); }
     void scrollToYOffset(int y) { scrollToOffset(ScrollOffset(scrollOffset().x(), y), ScrollType::Programmatic, ScrollClamping::Unclamped); }

Modified: trunk/Source/WebCore/rendering/RenderListBox.cpp (254838 => 254839)


--- trunk/Source/WebCore/rendering/RenderListBox.cpp	2020-01-20 23:55:48 UTC (rev 254838)
+++ trunk/Source/WebCore/rendering/RenderListBox.cpp	2020-01-21 01:35:42 UTC (rev 254839)
@@ -743,7 +743,7 @@
     return 0;
 }
 
-void RenderListBox::setScrollLeft(int, ScrollType, bool, ScrollClamping)
+void RenderListBox::setScrollLeft(int, ScrollType, ScrollClamping)
 {
 }
 
@@ -760,7 +760,7 @@
     renderer.scrollAnimator().setWheelEventTestMonitor(renderer.page().wheelEventTestMonitor());
 }
 
-void RenderListBox::setScrollTop(int newTop, ScrollType, bool, ScrollClamping)
+void RenderListBox::setScrollTop(int newTop, ScrollType, ScrollClamping)
 {
     // Determine an index and scroll to it.    
     int index = newTop / itemHeight();

Modified: trunk/Source/WebCore/rendering/RenderListBox.h (254838 => 254839)


--- trunk/Source/WebCore/rendering/RenderListBox.h	2020-01-20 23:55:48 UTC (rev 254838)
+++ trunk/Source/WebCore/rendering/RenderListBox.h	2020-01-21 01:35:42 UTC (rev 254839)
@@ -106,8 +106,8 @@
     int scrollTop() const override;
     int scrollWidth() const override;
     int scrollHeight() const override;
-    void setScrollLeft(int, ScrollType, bool, ScrollClamping) override;
-    void setScrollTop(int, ScrollType, bool, ScrollClamping) override;
+    void setScrollLeft(int, ScrollType, ScrollClamping) override;
+    void setScrollTop(int, ScrollType, ScrollClamping) override;
 
     bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction) override;
 

Modified: trunk/Source/WebCore/rendering/RenderTextControlSingleLine.cpp (254838 => 254839)


--- trunk/Source/WebCore/rendering/RenderTextControlSingleLine.cpp	2020-01-20 23:55:48 UTC (rev 254838)
+++ trunk/Source/WebCore/rendering/RenderTextControlSingleLine.cpp	2020-01-21 01:35:42 UTC (rev 254839)
@@ -376,13 +376,13 @@
     return RenderBlockFlow::scrollTop();
 }
 
-void RenderTextControlSingleLine::setScrollLeft(int newLeft, ScrollType, bool, ScrollClamping)
+void RenderTextControlSingleLine::setScrollLeft(int newLeft, ScrollType, ScrollClamping)
 {
     if (innerTextElement())
         innerTextElement()->setScrollLeft(newLeft);
 }
 
-void RenderTextControlSingleLine::setScrollTop(int newTop, ScrollType, bool, ScrollClamping)
+void RenderTextControlSingleLine::setScrollTop(int newTop, ScrollType, ScrollClamping)
 {
     if (innerTextElement())
         innerTextElement()->setScrollTop(newTop);

Modified: trunk/Source/WebCore/rendering/RenderTextControlSingleLine.h (254838 => 254839)


--- trunk/Source/WebCore/rendering/RenderTextControlSingleLine.h	2020-01-20 23:55:48 UTC (rev 254838)
+++ trunk/Source/WebCore/rendering/RenderTextControlSingleLine.h	2020-01-21 01:35:42 UTC (rev 254839)
@@ -57,8 +57,8 @@
     int scrollTop() const override;
     int scrollWidth() const override;
     int scrollHeight() const override;
-    void setScrollLeft(int, ScrollType, bool, ScrollClamping) override;
-    void setScrollTop(int, ScrollType, bool, ScrollClamping) override;
+    void setScrollLeft(int, ScrollType, ScrollClamping) override;
+    void setScrollTop(int, ScrollType, ScrollClamping) override;
     bool scroll(ScrollDirection, ScrollGranularity, float multiplier = 1, Element** stopElement = nullptr, RenderBox* startBox = nullptr, const IntPoint& wheelEventAbsolutePoint = IntPoint()) final;
     bool logicalScroll(ScrollLogicalDirection, ScrollGranularity, float multiplier = 1, Element** stopElement = 0) final;
 

Modified: trunk/Source/WebCore/testing/Internals.cpp (254838 => 254839)


--- trunk/Source/WebCore/testing/Internals.cpp	2020-01-20 23:55:48 UTC (rev 254838)
+++ trunk/Source/WebCore/testing/Internals.cpp	2020-01-21 01:35:42 UTC (rev 254839)
@@ -1762,7 +1762,7 @@
     if (!document || !document->view())
         return Exception { InvalidAccessError };
 
-    element.scrollTo(ScrollToOptions(x, y), ScrollClamping::Unclamped);
+    element.scrollTo({ x, y }, ScrollClamping::Unclamped);
     return { };
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to