Title: [282686] trunk
Revision
282686
Author
[email protected]
Date
2021-09-17 13:07:23 -0700 (Fri, 17 Sep 2021)

Log Message

Convert usesMockScrollAnimator from a DeprecatedGlobalSettings to a WebPreference
https://bugs.webkit.org/show_bug.cgi?id=230371

Reviewed by Tim Horton.
Source/WebCore:

There were ordering problems that resulted from timing of a test calling
internals.setUsesMockScrollAnimator(true) and the first access of the scrollAnimator(),
which resulted in fast/scrolling/scroll-animator-select-list-events.html failing
when run twice in a row.

Fix by making usesMockScrollAnimator a WebPreference, which means that tests
can use <!-- webkit-test-runner --> options to enable it, which avoids the
ordering dependency.

* page/DeprecatedGlobalSettings.cpp:
(WebCore::DeprecatedGlobalSettings::setUsesMockScrollAnimator): Deleted.
(WebCore::DeprecatedGlobalSettings::usesMockScrollAnimator): Deleted.
* page/DeprecatedGlobalSettings.h:
* page/FrameView.cpp:
(WebCore::FrameView::mockScrollAnimatorEnabled const):
(WebCore::FrameView::usesMockScrollAnimator const): Deleted.
* page/FrameView.h:
* platform/ScrollableArea.cpp:
(WebCore::ScrollableArea::scrollAnimator const):
* platform/ScrollableArea.h:
(WebCore::ScrollableArea::mockScrollAnimatorEnabled const):
(WebCore::ScrollableArea::usesMockScrollAnimator const): Deleted.
* rendering/RenderLayerScrollableArea.cpp:
(WebCore::RenderLayerScrollableArea::mockScrollAnimatorEnabled const):
(WebCore::RenderLayerScrollableArea::usesMockScrollAnimator const): Deleted.
* rendering/RenderLayerScrollableArea.h:
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::mockScrollAnimatorEnabled const):
(WebCore::RenderListBox::usesMockScrollAnimator const): Deleted.
* rendering/RenderListBox.h:
* testing/Internals.cpp:
(WebCore::Internals::resetToConsistentState):
(WebCore::Internals::setUsesMockScrollAnimator): Deleted.
* testing/Internals.h:
* testing/Internals.idl:

Source/WebKitLegacy/win:

Add Windows preferences.

* WebPreferences.cpp:
(WebPreferences::mockScrollAnimatorEnabled):
* WebPreferences.h:
* WebView.cpp:
(WebView::notifyPreferencesChanged):

Source/WTF:

Add a MockScrollAnimatorEnabled setting.

* Scripts/Preferences/WebPreferences.yaml:

LayoutTests:

Convert to use the  <!-- webkit-test-runner --> format for specifying MockScrollAnimatorEnabled.

* fast/scrolling/scroll-animator-basic-events.html:
* fast/scrolling/scroll-animator-overlay-scrollbars-clicked.html:
* fast/scrolling/scroll-animator-overlay-scrollbars-hovered.html:
* fast/scrolling/scroll-animator-select-list-events.html:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (282685 => 282686)


--- trunk/LayoutTests/ChangeLog	2021-09-17 20:03:50 UTC (rev 282685)
+++ trunk/LayoutTests/ChangeLog	2021-09-17 20:07:23 UTC (rev 282686)
@@ -1,3 +1,17 @@
+2021-09-17  Simon Fraser  <[email protected]>
+
+        Convert usesMockScrollAnimator from a DeprecatedGlobalSettings to a WebPreference
+        https://bugs.webkit.org/show_bug.cgi?id=230371
+
+        Reviewed by Tim Horton.
+        
+        Convert to use the  <!-- webkit-test-runner --> format for specifying MockScrollAnimatorEnabled.
+
+        * fast/scrolling/scroll-animator-basic-events.html:
+        * fast/scrolling/scroll-animator-overlay-scrollbars-clicked.html:
+        * fast/scrolling/scroll-animator-overlay-scrollbars-hovered.html:
+        * fast/scrolling/scroll-animator-select-list-events.html:
+
 2021-09-17  Ayumi Kojima  <[email protected]>
 
         [ iOS ] http/wpt/webaudio/the-audio-api/the-audioworklet-interface/context-already-rendering.html is flaky.

Modified: trunk/LayoutTests/fast/scrolling/scroll-animator-basic-events.html (282685 => 282686)


--- trunk/LayoutTests/fast/scrolling/scroll-animator-basic-events.html	2021-09-17 20:03:50 UTC (rev 282685)
+++ trunk/LayoutTests/fast/scrolling/scroll-animator-basic-events.html	2021-09-17 20:07:23 UTC (rev 282686)
@@ -1,4 +1,4 @@
-<html>
+<html> <!-- webkit-test-runner [ MockScrollAnimatorEnabled=true ] -->
 <style>
     #scrollme {
         width: 100px;
@@ -12,8 +12,6 @@
 <script src=""
 <script>
     jsTestIsAsync = true;
-    if (window.internals)
-        window.internals.setUsesMockScrollAnimator(true);
 
     window._onload_ = function() {
         if (window.internals)

Modified: trunk/LayoutTests/fast/scrolling/scroll-animator-overlay-scrollbars-clicked.html (282685 => 282686)


--- trunk/LayoutTests/fast/scrolling/scroll-animator-overlay-scrollbars-clicked.html	2021-09-17 20:03:50 UTC (rev 282685)
+++ trunk/LayoutTests/fast/scrolling/scroll-animator-overlay-scrollbars-clicked.html	2021-09-17 20:07:23 UTC (rev 282686)
@@ -1,9 +1,8 @@
-<html>
+<html> <!-- webkit-test-runner [ MockScrollAnimatorEnabled=true ] -->
 <script src=""
 <script>
     jsTestIsAsync = true;
     if (window.internals) {
-        window.internals.setUsesMockScrollAnimator(true);
         window.internals.setUsesOverlayScrollbars(true);
     }
 

Modified: trunk/LayoutTests/fast/scrolling/scroll-animator-overlay-scrollbars-hovered.html (282685 => 282686)


--- trunk/LayoutTests/fast/scrolling/scroll-animator-overlay-scrollbars-hovered.html	2021-09-17 20:03:50 UTC (rev 282685)
+++ trunk/LayoutTests/fast/scrolling/scroll-animator-overlay-scrollbars-hovered.html	2021-09-17 20:07:23 UTC (rev 282686)
@@ -1,9 +1,8 @@
-<html>
+<html> <!-- webkit-test-runner [ MockScrollAnimatorEnabled=true ] -->
 <script src=""
 <script>
     jsTestIsAsync = true;
     if (window.internals) {
-        window.internals.setUsesMockScrollAnimator(true);
         window.internals.setUsesOverlayScrollbars(true);
     }
 

Modified: trunk/LayoutTests/fast/scrolling/scroll-animator-select-list-events.html (282685 => 282686)


--- trunk/LayoutTests/fast/scrolling/scroll-animator-select-list-events.html	2021-09-17 20:03:50 UTC (rev 282685)
+++ trunk/LayoutTests/fast/scrolling/scroll-animator-select-list-events.html	2021-09-17 20:07:23 UTC (rev 282686)
@@ -1,9 +1,7 @@
-<html>
+<html> <!-- webkit-test-runner [ MockScrollAnimatorEnabled=true ] -->
 <script src=""
 <script>
     jsTestIsAsync = true;
-    if (window.internals)
-        window.internals.setUsesMockScrollAnimator(true);
 
     window._onload_ = function() {
         if (window.internals)

Modified: trunk/Source/WTF/ChangeLog (282685 => 282686)


--- trunk/Source/WTF/ChangeLog	2021-09-17 20:03:50 UTC (rev 282685)
+++ trunk/Source/WTF/ChangeLog	2021-09-17 20:07:23 UTC (rev 282686)
@@ -1,3 +1,14 @@
+2021-09-17  Simon Fraser  <[email protected]>
+
+        Convert usesMockScrollAnimator from a DeprecatedGlobalSettings to a WebPreference
+        https://bugs.webkit.org/show_bug.cgi?id=230371
+
+        Reviewed by Tim Horton.
+
+        Add a MockScrollAnimatorEnabled setting.
+
+        * Scripts/Preferences/WebPreferences.yaml:
+
 2021-09-17  Carlos Garcia Campos  <[email protected]>
 
         [GTK][a11y] Add a build option to enable ATSPI

Modified: trunk/Source/WTF/Scripts/Preferences/WebPreferences.yaml (282685 => 282686)


--- trunk/Source/WTF/Scripts/Preferences/WebPreferences.yaml	2021-09-17 20:03:50 UTC (rev 282685)
+++ trunk/Source/WTF/Scripts/Preferences/WebPreferences.yaml	2021-09-17 20:07:23 UTC (rev 282686)
@@ -1521,6 +1521,16 @@
     WebKit:
       default: true
 
+MockScrollAnimatorEnabled:
+  type: bool
+  defaultValue:
+    WebKitLegacy:
+      default: false
+    WebKit:
+      default: false
+    WebCore:
+      default: false
+
 MockScrollbarsEnabled:
   type: bool
   webcoreBinding: DeprecatedGlobalSettings

Modified: trunk/Source/WebCore/ChangeLog (282685 => 282686)


--- trunk/Source/WebCore/ChangeLog	2021-09-17 20:03:50 UTC (rev 282685)
+++ trunk/Source/WebCore/ChangeLog	2021-09-17 20:07:23 UTC (rev 282686)
@@ -1,3 +1,46 @@
+2021-09-17  Simon Fraser  <[email protected]>
+
+        Convert usesMockScrollAnimator from a DeprecatedGlobalSettings to a WebPreference
+        https://bugs.webkit.org/show_bug.cgi?id=230371
+
+        Reviewed by Tim Horton.
+
+        There were ordering problems that resulted from timing of a test calling
+        internals.setUsesMockScrollAnimator(true) and the first access of the scrollAnimator(),
+        which resulted in fast/scrolling/scroll-animator-select-list-events.html failing
+        when run twice in a row.
+
+        Fix by making usesMockScrollAnimator a WebPreference, which means that tests
+        can use <!-- webkit-test-runner --> options to enable it, which avoids the
+        ordering dependency.
+
+        * page/DeprecatedGlobalSettings.cpp:
+        (WebCore::DeprecatedGlobalSettings::setUsesMockScrollAnimator): Deleted.
+        (WebCore::DeprecatedGlobalSettings::usesMockScrollAnimator): Deleted.
+        * page/DeprecatedGlobalSettings.h:
+        * page/FrameView.cpp:
+        (WebCore::FrameView::mockScrollAnimatorEnabled const):
+        (WebCore::FrameView::usesMockScrollAnimator const): Deleted.
+        * page/FrameView.h:
+        * platform/ScrollableArea.cpp:
+        (WebCore::ScrollableArea::scrollAnimator const):
+        * platform/ScrollableArea.h:
+        (WebCore::ScrollableArea::mockScrollAnimatorEnabled const):
+        (WebCore::ScrollableArea::usesMockScrollAnimator const): Deleted.
+        * rendering/RenderLayerScrollableArea.cpp:
+        (WebCore::RenderLayerScrollableArea::mockScrollAnimatorEnabled const):
+        (WebCore::RenderLayerScrollableArea::usesMockScrollAnimator const): Deleted.
+        * rendering/RenderLayerScrollableArea.h:
+        * rendering/RenderListBox.cpp:
+        (WebCore::RenderListBox::mockScrollAnimatorEnabled const):
+        (WebCore::RenderListBox::usesMockScrollAnimator const): Deleted.
+        * rendering/RenderListBox.h:
+        * testing/Internals.cpp:
+        (WebCore::Internals::resetToConsistentState):
+        (WebCore::Internals::setUsesMockScrollAnimator): Deleted.
+        * testing/Internals.h:
+        * testing/Internals.idl:
+
 2021-09-17  Alan Bujtas  <[email protected]>
 
         [LFC][IFC] Add InlineInvalidation::horizontalConstraintChanged

Modified: trunk/Source/WebCore/page/DeprecatedGlobalSettings.cpp (282685 => 282686)


--- trunk/Source/WebCore/page/DeprecatedGlobalSettings.cpp	2021-09-17 20:03:50 UTC (rev 282685)
+++ trunk/Source/WebCore/page/DeprecatedGlobalSettings.cpp	2021-09-17 20:07:23 UTC (rev 282686)
@@ -43,7 +43,6 @@
 
 bool DeprecatedGlobalSettings::gMockScrollbarsEnabled = false;
 bool DeprecatedGlobalSettings::gUsesOverlayScrollbars = false;
-bool DeprecatedGlobalSettings::gMockScrollAnimatorEnabled = false;
 
 #if PLATFORM(WIN)
 bool DeprecatedGlobalSettings::gShouldUseHighResolutionTimers = true;
@@ -125,16 +124,6 @@
     return gUsesOverlayScrollbars;
 }
 
-void DeprecatedGlobalSettings::setUsesMockScrollAnimator(bool flag)
-{
-    gMockScrollAnimatorEnabled = flag;
-}
-
-bool DeprecatedGlobalSettings::usesMockScrollAnimator()
-{
-    return gMockScrollAnimatorEnabled;
-}
-
 void DeprecatedGlobalSettings::setLowPowerVideoAudioBufferSizeEnabled(bool flag)
 {
     gLowPowerVideoAudioBufferSizeEnabled = flag;

Modified: trunk/Source/WebCore/page/DeprecatedGlobalSettings.h (282685 => 282686)


--- trunk/Source/WebCore/page/DeprecatedGlobalSettings.h	2021-09-17 20:03:50 UTC (rev 282685)
+++ trunk/Source/WebCore/page/DeprecatedGlobalSettings.h	2021-09-17 20:07:23 UTC (rev 282686)
@@ -57,9 +57,6 @@
     WEBCORE_EXPORT static void setUsesOverlayScrollbars(bool flag);
     static bool usesOverlayScrollbars();
 
-    WEBCORE_EXPORT static void setUsesMockScrollAnimator(bool);
-    static bool usesMockScrollAnimator();
-
     static bool lowPowerVideoAudioBufferSizeEnabled() { return gLowPowerVideoAudioBufferSizeEnabled; }
     WEBCORE_EXPORT static void setLowPowerVideoAudioBufferSizeEnabled(bool);
 
@@ -103,7 +100,6 @@
 
     static bool gMockScrollbarsEnabled;
     static bool gUsesOverlayScrollbars;
-    static bool gMockScrollAnimatorEnabled;
 
 #if PLATFORM(WIN)
     static bool gShouldUseHighResolutionTimers;

Modified: trunk/Source/WebCore/page/FrameView.cpp (282685 => 282686)


--- trunk/Source/WebCore/page/FrameView.cpp	2021-09-17 20:03:50 UTC (rev 282685)
+++ trunk/Source/WebCore/page/FrameView.cpp	2021-09-17 20:07:23 UTC (rev 282686)
@@ -1445,9 +1445,9 @@
     return false;
 }
 
-bool FrameView::usesMockScrollAnimator() const
+bool FrameView::mockScrollAnimatorEnabled() const
 {
-    return DeprecatedGlobalSettings::usesMockScrollAnimator();
+    return frame().settings().mockScrollAnimatorEnabled();
 }
 
 void FrameView::logMockScrollAnimatorMessage(const String& message) const

Modified: trunk/Source/WebCore/page/FrameView.h (282685 => 282686)


--- trunk/Source/WebCore/page/FrameView.h	2021-09-17 20:03:50 UTC (rev 282685)
+++ trunk/Source/WebCore/page/FrameView.h	2021-09-17 20:07:23 UTC (rev 282686)
@@ -774,7 +774,7 @@
 #endif
 
     bool usesCompositedScrolling() const final;
-    bool usesMockScrollAnimator() const final;
+    bool mockScrollAnimatorEnabled() const final;
     void logMockScrollAnimatorMessage(const String&) const final;
 
     bool styleHidesScrollbarWithOrientation(ScrollbarOrientation) const;

Modified: trunk/Source/WebCore/platform/ScrollableArea.cpp (282685 => 282686)


--- trunk/Source/WebCore/platform/ScrollableArea.cpp	2021-09-17 20:03:50 UTC (rev 282685)
+++ trunk/Source/WebCore/platform/ScrollableArea.cpp	2021-09-17 20:07:23 UTC (rev 282686)
@@ -75,7 +75,7 @@
 ScrollAnimator& ScrollableArea::scrollAnimator() const
 {
     if (!m_scrollAnimator) {
-        if (usesMockScrollAnimator()) {
+        if (mockScrollAnimatorEnabled()) {
             m_scrollAnimator = makeUnique<ScrollAnimatorMock>(const_cast<ScrollableArea&>(*this), [this](const String& message) {
                 logMockScrollAnimatorMessage(message);
             });

Modified: trunk/Source/WebCore/platform/ScrollableArea.h (282685 => 282686)


--- trunk/Source/WebCore/platform/ScrollableArea.h	2021-09-17 20:03:50 UTC (rev 282685)
+++ trunk/Source/WebCore/platform/ScrollableArea.h	2021-09-17 20:07:23 UTC (rev 282686)
@@ -334,7 +334,7 @@
     void verticalScrollbarLayerDidChange();
     void horizontalScrollbarLayerDidChange();
 
-    virtual bool usesMockScrollAnimator() const { return false; }
+    virtual bool mockScrollAnimatorEnabled() const { return false; }
     virtual void logMockScrollAnimatorMessage(const String&) const { };
 
     virtual bool shouldPlaceVerticalScrollbarOnLeft() const = 0;

Modified: trunk/Source/WebCore/rendering/RenderLayerScrollableArea.cpp (282685 => 282686)


--- trunk/Source/WebCore/rendering/RenderLayerScrollableArea.cpp	2021-09-17 20:03:50 UTC (rev 282685)
+++ trunk/Source/WebCore/rendering/RenderLayerScrollableArea.cpp	2021-09-17 20:07:23 UTC (rev 282686)
@@ -1832,9 +1832,9 @@
     m_layer.updateLayerPositionsAfterScroll(&geometryMap, RenderLayer::IsOverflowScroll);
 }
 
-bool RenderLayerScrollableArea::usesMockScrollAnimator() const
+bool RenderLayerScrollableArea::mockScrollAnimatorEnabled() const
 {
-    return DeprecatedGlobalSettings::usesMockScrollAnimator();
+    return m_layer.renderer().settings().mockScrollAnimatorEnabled();
 }
 
 void RenderLayerScrollableArea::logMockScrollAnimatorMessage(const String& message) const

Modified: trunk/Source/WebCore/rendering/RenderLayerScrollableArea.h (282685 => 282686)


--- trunk/Source/WebCore/rendering/RenderLayerScrollableArea.h	2021-09-17 20:03:50 UTC (rev 282685)
+++ trunk/Source/WebCore/rendering/RenderLayerScrollableArea.h	2021-09-17 20:07:23 UTC (rev 282686)
@@ -190,7 +190,7 @@
     bool isRubberBandInProgress() const final;
     bool forceUpdateScrollbarsOnMainThreadForPerformanceTesting() const final;
     bool isScrollSnapInProgress() const final;
-    bool usesMockScrollAnimator() const final;
+    bool mockScrollAnimatorEnabled() const final;
     void logMockScrollAnimatorMessage(const String&) const final;
 
     String debugDescription() const final;

Modified: trunk/Source/WebCore/rendering/RenderListBox.cpp (282685 => 282686)


--- trunk/Source/WebCore/rendering/RenderListBox.cpp	2021-09-17 20:03:50 UTC (rev 282685)
+++ trunk/Source/WebCore/rendering/RenderListBox.cpp	2021-09-17 20:07:23 UTC (rev 282686)
@@ -898,9 +898,9 @@
     return absoluteBoundingBoxRect();
 }
 
-bool RenderListBox::usesMockScrollAnimator() const
+bool RenderListBox::mockScrollAnimatorEnabled() const
 {
-    return DeprecatedGlobalSettings::usesMockScrollAnimator();
+    return settings().mockScrollAnimatorEnabled();
 }
 
 void RenderListBox::logMockScrollAnimatorMessage(const String& message) const

Modified: trunk/Source/WebCore/rendering/RenderListBox.h (282685 => 282686)


--- trunk/Source/WebCore/rendering/RenderListBox.h	2021-09-17 20:03:50 UTC (rev 282685)
+++ trunk/Source/WebCore/rendering/RenderListBox.h	2021-09-17 20:07:23 UTC (rev 282686)
@@ -138,7 +138,7 @@
     bool isScrollableOrRubberbandable() final;
     bool hasScrollableOrRubberbandableAncestor() final;
     IntRect scrollableAreaBoundingBox(bool* = nullptr) const final;
-    bool usesMockScrollAnimator() const final;
+    bool mockScrollAnimatorEnabled() const final;
     void logMockScrollAnimatorMessage(const String&) const final;
     String debugDescription() const final;
 

Modified: trunk/Source/WebCore/testing/Internals.cpp (282685 => 282686)


--- trunk/Source/WebCore/testing/Internals.cpp	2021-09-17 20:03:50 UTC (rev 282685)
+++ trunk/Source/WebCore/testing/Internals.cpp	2021-09-17 20:07:23 UTC (rev 282686)
@@ -531,7 +531,6 @@
     WTF::clearDefaultPortForProtocolMapForTesting();
     overrideUserPreferredLanguages(Vector<String>());
     WebCore::DeprecatedGlobalSettings::setUsesOverlayScrollbars(false);
-    WebCore::DeprecatedGlobalSettings::setUsesMockScrollAnimator(false);
     if (!page.mainFrame().editor().isContinuousSpellCheckingEnabled())
         page.mainFrame().editor().toggleContinuousSpellChecking();
     if (page.mainFrame().editor().isOverwriteModeEnabled())
@@ -3820,11 +3819,6 @@
 #endif
 }
 
-void Internals::setUsesMockScrollAnimator(bool enabled)
-{
-    WebCore::DeprecatedGlobalSettings::setUsesMockScrollAnimator(enabled);
-}
-
 void Internals::forceReload(bool endToEnd)
 {
     OptionSet<ReloadOption> reloadOptions;

Modified: trunk/Source/WebCore/testing/Internals.h (282685 => 282686)


--- trunk/Source/WebCore/testing/Internals.h	2021-09-17 20:03:50 UTC (rev 282685)
+++ trunk/Source/WebCore/testing/Internals.h	2021-09-17 20:07:23 UTC (rev 282686)
@@ -592,7 +592,6 @@
     JSC::JSValue evaluateInWorldIgnoringException(const String& name, const String& source);
 
     void setUsesOverlayScrollbars(bool);
-    void setUsesMockScrollAnimator(bool);
 
     ExceptionOr<String> getCurrentCursorInfo();
 

Modified: trunk/Source/WebCore/testing/Internals.idl (282685 => 282686)


--- trunk/Source/WebCore/testing/Internals.idl	2021-09-17 20:03:50 UTC (rev 282685)
+++ trunk/Source/WebCore/testing/Internals.idl	2021-09-17 20:07:23 UTC (rev 282686)
@@ -687,7 +687,6 @@
     any evaluateInWorldIgnoringException(DOMString name, DOMString source);
 
     undefined setUsesOverlayScrollbars(boolean enabled);
-    undefined setUsesMockScrollAnimator(boolean enabled);
 
     undefined forceReload(boolean endToEnd);
     undefined reloadExpiredOnly();

Modified: trunk/Source/WebKitLegacy/win/ChangeLog (282685 => 282686)


--- trunk/Source/WebKitLegacy/win/ChangeLog	2021-09-17 20:03:50 UTC (rev 282685)
+++ trunk/Source/WebKitLegacy/win/ChangeLog	2021-09-17 20:07:23 UTC (rev 282686)
@@ -1,3 +1,18 @@
+2021-09-17  Simon Fraser  <[email protected]>
+
+        Convert usesMockScrollAnimator from a DeprecatedGlobalSettings to a WebPreference
+        https://bugs.webkit.org/show_bug.cgi?id=230371
+
+        Reviewed by Tim Horton.
+
+        Add Windows preferences.
+
+        * WebPreferences.cpp:
+        (WebPreferences::mockScrollAnimatorEnabled):
+        * WebPreferences.h:
+        * WebView.cpp:
+        (WebView::notifyPreferencesChanged):
+
 2021-09-14  Chris Dumez  <[email protected]>
 
         [Hardening] Validate IDBValue's blob paths in WebIDBServer::putOrAdd()

Modified: trunk/Source/WebKitLegacy/win/WebPreferences.cpp (282685 => 282686)


--- trunk/Source/WebKitLegacy/win/WebPreferences.cpp	2021-09-17 20:03:50 UTC (rev 282685)
+++ trunk/Source/WebKitLegacy/win/WebPreferences.cpp	2021-09-17 20:07:23 UTC (rev 282686)
@@ -2637,3 +2637,8 @@
     return boolValueForKey("WebKitCanvasColorSpaceEnabled");
 }
 
+bool WebPreferences::mockScrollAnimatorEnabled()
+{
+    return boolValueForKey("WebKitMockScrollAnimatorEnabled");
+}
+

Modified: trunk/Source/WebKitLegacy/win/WebPreferences.h (282685 => 282686)


--- trunk/Source/WebKitLegacy/win/WebPreferences.h	2021-09-17 20:03:50 UTC (rev 282685)
+++ trunk/Source/WebKitLegacy/win/WebPreferences.h	2021-09-17 20:07:23 UTC (rev 282686)
@@ -346,6 +346,7 @@
     // The following preference accessors are not exposed via IWebPreferences* as they are only
     // needed for testing purposes and can be toggled via the set*PreferenceForTesting functions.
     bool canvasColorSpaceEnabled();
+    bool mockScrollAnimatorEnabled();
 
 private:
     WebPreferences();

Modified: trunk/Source/WebKitLegacy/win/WebView.cpp (282685 => 282686)


--- trunk/Source/WebKitLegacy/win/WebView.cpp	2021-09-17 20:03:50 UTC (rev 282685)
+++ trunk/Source/WebKitLegacy/win/WebView.cpp	2021-09-17 20:07:23 UTC (rev 282686)
@@ -5586,6 +5586,7 @@
     settings.setOverscrollBehaviorEnabled(!!enabled);
 
     settings.setCanvasColorSpaceEnabled(m_preferences->canvasColorSpaceEnabled());
+    settings.setMockScrollAnimatorEnabled(m_preferences->mockScrollAnimatorEnabled());
 
     return S_OK;
 }

Modified: trunk/Tools/DumpRenderTree/TestOptions.cpp (282685 => 282686)


--- trunk/Tools/DumpRenderTree/TestOptions.cpp	2021-09-17 20:03:50 UTC (rev 282685)
+++ trunk/Tools/DumpRenderTree/TestOptions.cpp	2021-09-17 20:07:23 UTC (rev 282686)
@@ -155,6 +155,7 @@
             { "LoadsImagesAutomatically", true },
             { "MainContentUserGestureOverrideEnabled", false },
             { "MenuItemElementEnabled", false },
+            { "MockScrollAnimatorEnabled", false },
             { "ModernMediaControlsEnabled", true },
             { "NeedsStorageAccessFromFileURLsQuirk", false },
             { "OverscrollBehaviorEnabled", true },
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to