Changeset 282686 in webkit
- Timestamp:
- Sep 17, 2021, 1:07:23 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 26 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/scrolling/scroll-animator-basic-events.html (modified) (2 diffs)
-
LayoutTests/fast/scrolling/scroll-animator-overlay-scrollbars-clicked.html (modified) (1 diff)
-
LayoutTests/fast/scrolling/scroll-animator-overlay-scrollbars-hovered.html (modified) (1 diff)
-
LayoutTests/fast/scrolling/scroll-animator-select-list-events.html (modified) (1 diff)
-
Source/WTF/ChangeLog (modified) (1 diff)
-
Source/WTF/Scripts/Preferences/WebPreferences.yaml (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/page/DeprecatedGlobalSettings.cpp (modified) (2 diffs)
-
Source/WebCore/page/DeprecatedGlobalSettings.h (modified) (2 diffs)
-
Source/WebCore/page/FrameView.cpp (modified) (1 diff)
-
Source/WebCore/page/FrameView.h (modified) (1 diff)
-
Source/WebCore/platform/ScrollableArea.cpp (modified) (1 diff)
-
Source/WebCore/platform/ScrollableArea.h (modified) (1 diff)
-
Source/WebCore/rendering/RenderLayerScrollableArea.cpp (modified) (1 diff)
-
Source/WebCore/rendering/RenderLayerScrollableArea.h (modified) (1 diff)
-
Source/WebCore/rendering/RenderListBox.cpp (modified) (1 diff)
-
Source/WebCore/rendering/RenderListBox.h (modified) (1 diff)
-
Source/WebCore/testing/Internals.cpp (modified) (2 diffs)
-
Source/WebCore/testing/Internals.h (modified) (1 diff)
-
Source/WebCore/testing/Internals.idl (modified) (1 diff)
-
Source/WebKitLegacy/win/ChangeLog (modified) (1 diff)
-
Source/WebKitLegacy/win/WebPreferences.cpp (modified) (1 diff)
-
Source/WebKitLegacy/win/WebPreferences.h (modified) (1 diff)
-
Source/WebKitLegacy/win/WebView.cpp (modified) (1 diff)
-
Tools/DumpRenderTree/TestOptions.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r282682 r282686 1 2021-09-17 Simon Fraser <simon.fraser@apple.com> 2 3 Convert usesMockScrollAnimator from a DeprecatedGlobalSettings to a WebPreference 4 https://bugs.webkit.org/show_bug.cgi?id=230371 5 6 Reviewed by Tim Horton. 7 8 Convert to use the <!-- webkit-test-runner --> format for specifying MockScrollAnimatorEnabled. 9 10 * fast/scrolling/scroll-animator-basic-events.html: 11 * fast/scrolling/scroll-animator-overlay-scrollbars-clicked.html: 12 * fast/scrolling/scroll-animator-overlay-scrollbars-hovered.html: 13 * fast/scrolling/scroll-animator-select-list-events.html: 14 1 15 2021-09-17 Ayumi Kojima <ayumi_kojima@apple.com> 2 16 -
trunk/LayoutTests/fast/scrolling/scroll-animator-basic-events.html
r261211 r282686 1 <html> 1 <html> <!-- webkit-test-runner [ MockScrollAnimatorEnabled=true ] --> 2 2 <style> 3 3 #scrollme { … … 13 13 <script> 14 14 jsTestIsAsync = true; 15 if (window.internals)16 window.internals.setUsesMockScrollAnimator(true);17 15 18 16 window.onload = function() { -
trunk/LayoutTests/fast/scrolling/scroll-animator-overlay-scrollbars-clicked.html
r261211 r282686 1 <html> 1 <html> <!-- webkit-test-runner [ MockScrollAnimatorEnabled=true ] --> 2 2 <script src="../../resources/js-test-pre.js"></script> 3 3 <script> 4 4 jsTestIsAsync = true; 5 5 if (window.internals) { 6 window.internals.setUsesMockScrollAnimator(true);7 6 window.internals.setUsesOverlayScrollbars(true); 8 7 } -
trunk/LayoutTests/fast/scrolling/scroll-animator-overlay-scrollbars-hovered.html
r261211 r282686 1 <html> 1 <html> <!-- webkit-test-runner [ MockScrollAnimatorEnabled=true ] --> 2 2 <script src="../../resources/js-test-pre.js"></script> 3 3 <script> 4 4 jsTestIsAsync = true; 5 5 if (window.internals) { 6 window.internals.setUsesMockScrollAnimator(true);7 6 window.internals.setUsesOverlayScrollbars(true); 8 7 } -
trunk/LayoutTests/fast/scrolling/scroll-animator-select-list-events.html
r261211 r282686 1 <html> 1 <html> <!-- webkit-test-runner [ MockScrollAnimatorEnabled=true ] --> 2 2 <script src="../../resources/js-test-pre.js"></script> 3 3 <script> 4 4 jsTestIsAsync = true; 5 if (window.internals)6 window.internals.setUsesMockScrollAnimator(true);7 5 8 6 window.onload = function() { -
trunk/Source/WTF/ChangeLog
r282643 r282686 1 2021-09-17 Simon Fraser <simon.fraser@apple.com> 2 3 Convert usesMockScrollAnimator from a DeprecatedGlobalSettings to a WebPreference 4 https://bugs.webkit.org/show_bug.cgi?id=230371 5 6 Reviewed by Tim Horton. 7 8 Add a MockScrollAnimatorEnabled setting. 9 10 * Scripts/Preferences/WebPreferences.yaml: 11 1 12 2021-09-17 Carlos Garcia Campos <cgarcia@igalia.com> 2 13 -
trunk/Source/WTF/Scripts/Preferences/WebPreferences.yaml
r282643 r282686 1522 1522 default: true 1523 1523 1524 MockScrollAnimatorEnabled: 1525 type: bool 1526 defaultValue: 1527 WebKitLegacy: 1528 default: false 1529 WebKit: 1530 default: false 1531 WebCore: 1532 default: false 1533 1524 1534 MockScrollbarsEnabled: 1525 1535 type: bool -
trunk/Source/WebCore/ChangeLog
r282684 r282686 1 2021-09-17 Simon Fraser <simon.fraser@apple.com> 2 3 Convert usesMockScrollAnimator from a DeprecatedGlobalSettings to a WebPreference 4 https://bugs.webkit.org/show_bug.cgi?id=230371 5 6 Reviewed by Tim Horton. 7 8 There were ordering problems that resulted from timing of a test calling 9 internals.setUsesMockScrollAnimator(true) and the first access of the scrollAnimator(), 10 which resulted in fast/scrolling/scroll-animator-select-list-events.html failing 11 when run twice in a row. 12 13 Fix by making usesMockScrollAnimator a WebPreference, which means that tests 14 can use <!-- webkit-test-runner --> options to enable it, which avoids the 15 ordering dependency. 16 17 * page/DeprecatedGlobalSettings.cpp: 18 (WebCore::DeprecatedGlobalSettings::setUsesMockScrollAnimator): Deleted. 19 (WebCore::DeprecatedGlobalSettings::usesMockScrollAnimator): Deleted. 20 * page/DeprecatedGlobalSettings.h: 21 * page/FrameView.cpp: 22 (WebCore::FrameView::mockScrollAnimatorEnabled const): 23 (WebCore::FrameView::usesMockScrollAnimator const): Deleted. 24 * page/FrameView.h: 25 * platform/ScrollableArea.cpp: 26 (WebCore::ScrollableArea::scrollAnimator const): 27 * platform/ScrollableArea.h: 28 (WebCore::ScrollableArea::mockScrollAnimatorEnabled const): 29 (WebCore::ScrollableArea::usesMockScrollAnimator const): Deleted. 30 * rendering/RenderLayerScrollableArea.cpp: 31 (WebCore::RenderLayerScrollableArea::mockScrollAnimatorEnabled const): 32 (WebCore::RenderLayerScrollableArea::usesMockScrollAnimator const): Deleted. 33 * rendering/RenderLayerScrollableArea.h: 34 * rendering/RenderListBox.cpp: 35 (WebCore::RenderListBox::mockScrollAnimatorEnabled const): 36 (WebCore::RenderListBox::usesMockScrollAnimator const): Deleted. 37 * rendering/RenderListBox.h: 38 * testing/Internals.cpp: 39 (WebCore::Internals::resetToConsistentState): 40 (WebCore::Internals::setUsesMockScrollAnimator): Deleted. 41 * testing/Internals.h: 42 * testing/Internals.idl: 43 1 44 2021-09-17 Alan Bujtas <zalan@apple.com> 2 45 -
trunk/Source/WebCore/page/DeprecatedGlobalSettings.cpp
r280462 r282686 44 44 bool DeprecatedGlobalSettings::gMockScrollbarsEnabled = false; 45 45 bool DeprecatedGlobalSettings::gUsesOverlayScrollbars = false; 46 bool DeprecatedGlobalSettings::gMockScrollAnimatorEnabled = false;47 46 48 47 #if PLATFORM(WIN) … … 126 125 } 127 126 128 void DeprecatedGlobalSettings::setUsesMockScrollAnimator(bool flag)129 {130 gMockScrollAnimatorEnabled = flag;131 }132 133 bool DeprecatedGlobalSettings::usesMockScrollAnimator()134 {135 return gMockScrollAnimatorEnabled;136 }137 138 127 void DeprecatedGlobalSettings::setLowPowerVideoAudioBufferSizeEnabled(bool flag) 139 128 { -
trunk/Source/WebCore/page/DeprecatedGlobalSettings.h
r280462 r282686 58 58 static bool usesOverlayScrollbars(); 59 59 60 WEBCORE_EXPORT static void setUsesMockScrollAnimator(bool);61 static bool usesMockScrollAnimator();62 63 60 static bool lowPowerVideoAudioBufferSizeEnabled() { return gLowPowerVideoAudioBufferSizeEnabled; } 64 61 WEBCORE_EXPORT static void setLowPowerVideoAudioBufferSizeEnabled(bool); … … 104 101 static bool gMockScrollbarsEnabled; 105 102 static bool gUsesOverlayScrollbars; 106 static bool gMockScrollAnimatorEnabled;107 103 108 104 #if PLATFORM(WIN) -
trunk/Source/WebCore/page/FrameView.cpp
r282629 r282686 1446 1446 } 1447 1447 1448 bool FrameView:: usesMockScrollAnimator() const1449 { 1450 return DeprecatedGlobalSettings::usesMockScrollAnimator();1448 bool FrameView::mockScrollAnimatorEnabled() const 1449 { 1450 return frame().settings().mockScrollAnimatorEnabled(); 1451 1451 } 1452 1452 -
trunk/Source/WebCore/page/FrameView.h
r282629 r282686 775 775 776 776 bool usesCompositedScrolling() const final; 777 bool usesMockScrollAnimator() const final;777 bool mockScrollAnimatorEnabled() const final; 778 778 void logMockScrollAnimatorMessage(const String&) const final; 779 779 -
trunk/Source/WebCore/platform/ScrollableArea.cpp
r282629 r282686 76 76 { 77 77 if (!m_scrollAnimator) { 78 if ( usesMockScrollAnimator()) {78 if (mockScrollAnimatorEnabled()) { 79 79 m_scrollAnimator = makeUnique<ScrollAnimatorMock>(const_cast<ScrollableArea&>(*this), [this](const String& message) { 80 80 logMockScrollAnimatorMessage(message); -
trunk/Source/WebCore/platform/ScrollableArea.h
r279218 r282686 335 335 void horizontalScrollbarLayerDidChange(); 336 336 337 virtual bool usesMockScrollAnimator() const { return false; }337 virtual bool mockScrollAnimatorEnabled() const { return false; } 338 338 virtual void logMockScrollAnimatorMessage(const String&) const { }; 339 339 -
trunk/Source/WebCore/rendering/RenderLayerScrollableArea.cpp
r281991 r282686 1833 1833 } 1834 1834 1835 bool RenderLayerScrollableArea:: usesMockScrollAnimator() const1836 { 1837 return DeprecatedGlobalSettings::usesMockScrollAnimator();1835 bool RenderLayerScrollableArea::mockScrollAnimatorEnabled() const 1836 { 1837 return m_layer.renderer().settings().mockScrollAnimatorEnabled(); 1838 1838 } 1839 1839 -
trunk/Source/WebCore/rendering/RenderLayerScrollableArea.h
r279869 r282686 191 191 bool forceUpdateScrollbarsOnMainThreadForPerformanceTesting() const final; 192 192 bool isScrollSnapInProgress() const final; 193 bool usesMockScrollAnimator() const final;193 bool mockScrollAnimatorEnabled() const final; 194 194 void logMockScrollAnimatorMessage(const String&) const final; 195 195 -
trunk/Source/WebCore/rendering/RenderListBox.cpp
r278253 r282686 899 899 } 900 900 901 bool RenderListBox:: usesMockScrollAnimator() const902 { 903 return DeprecatedGlobalSettings::usesMockScrollAnimator();901 bool RenderListBox::mockScrollAnimatorEnabled() const 902 { 903 return settings().mockScrollAnimatorEnabled(); 904 904 } 905 905 -
trunk/Source/WebCore/rendering/RenderListBox.h
r278340 r282686 139 139 bool hasScrollableOrRubberbandableAncestor() final; 140 140 IntRect scrollableAreaBoundingBox(bool* = nullptr) const final; 141 bool usesMockScrollAnimator() const final;141 bool mockScrollAnimatorEnabled() const final; 142 142 void logMockScrollAnimatorMessage(const String&) const final; 143 143 String debugDescription() const final; -
trunk/Source/WebCore/testing/Internals.cpp
r282628 r282686 532 532 overrideUserPreferredLanguages(Vector<String>()); 533 533 WebCore::DeprecatedGlobalSettings::setUsesOverlayScrollbars(false); 534 WebCore::DeprecatedGlobalSettings::setUsesMockScrollAnimator(false);535 534 if (!page.mainFrame().editor().isContinuousSpellCheckingEnabled()) 536 535 page.mainFrame().editor().toggleContinuousSpellChecking(); … … 3821 3820 } 3822 3821 3823 void Internals::setUsesMockScrollAnimator(bool enabled)3824 {3825 WebCore::DeprecatedGlobalSettings::setUsesMockScrollAnimator(enabled);3826 }3827 3828 3822 void Internals::forceReload(bool endToEnd) 3829 3823 { -
trunk/Source/WebCore/testing/Internals.h
r282628 r282686 593 593 594 594 void setUsesOverlayScrollbars(bool); 595 void setUsesMockScrollAnimator(bool);596 595 597 596 ExceptionOr<String> getCurrentCursorInfo(); -
trunk/Source/WebCore/testing/Internals.idl
r282628 r282686 688 688 689 689 undefined setUsesOverlayScrollbars(boolean enabled); 690 undefined setUsesMockScrollAnimator(boolean enabled);691 690 692 691 undefined forceReload(boolean endToEnd); -
trunk/Source/WebKitLegacy/win/ChangeLog
r282393 r282686 1 2021-09-17 Simon Fraser <simon.fraser@apple.com> 2 3 Convert usesMockScrollAnimator from a DeprecatedGlobalSettings to a WebPreference 4 https://bugs.webkit.org/show_bug.cgi?id=230371 5 6 Reviewed by Tim Horton. 7 8 Add Windows preferences. 9 10 * WebPreferences.cpp: 11 (WebPreferences::mockScrollAnimatorEnabled): 12 * WebPreferences.h: 13 * WebView.cpp: 14 (WebView::notifyPreferencesChanged): 15 1 16 2021-09-14 Chris Dumez <cdumez@apple.com> 2 17 -
trunk/Source/WebKitLegacy/win/WebPreferences.cpp
r277569 r282686 2638 2638 } 2639 2639 2640 bool WebPreferences::mockScrollAnimatorEnabled() 2641 { 2642 return boolValueForKey("WebKitMockScrollAnimatorEnabled"); 2643 } 2644 -
trunk/Source/WebKitLegacy/win/WebPreferences.h
r277569 r282686 347 347 // needed for testing purposes and can be toggled via the set*PreferenceForTesting functions. 348 348 bool canvasColorSpaceEnabled(); 349 bool mockScrollAnimatorEnabled(); 349 350 350 351 private: -
trunk/Source/WebKitLegacy/win/WebView.cpp
r282606 r282686 5587 5587 5588 5588 settings.setCanvasColorSpaceEnabled(m_preferences->canvasColorSpaceEnabled()); 5589 settings.setMockScrollAnimatorEnabled(m_preferences->mockScrollAnimatorEnabled()); 5589 5590 5590 5591 return S_OK; -
trunk/Tools/DumpRenderTree/TestOptions.cpp
r277767 r282686 156 156 { "MainContentUserGestureOverrideEnabled", false }, 157 157 { "MenuItemElementEnabled", false }, 158 { "MockScrollAnimatorEnabled", false }, 158 159 { "ModernMediaControlsEnabled", true }, 159 160 { "NeedsStorageAccessFromFileURLsQuirk", false },
Note:
See TracChangeset
for help on using the changeset viewer.