Changeset 270557 in webkit
- Timestamp:
- Dec 8, 2020, 2:57:27 PM (5 years ago)
- Location:
- trunk/Source
- Files:
-
- 29 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/Source/WTF/ChangeLog ¶
r270542 r270557 1 2020-12-08 Simon Fraser <simon.fraser@apple.com> 2 3 Make ScrollingPerformanceLoggingEnabled an internal debug preference 4 https://bugs.webkit.org/show_bug.cgi?id=219647 5 6 Reviewed by Sam Weinig. 7 8 Rename ScrollingPerformanceLoggingEnabled to ScrollingPerformanceTestingEnabled and make 9 it an Internal Debug preference. 10 11 Remove ForceUpdateScrollbarsOnMainThreadForPerformanceTesting. 12 13 * Scripts/Preferences/WebPreferences.yaml: 14 * Scripts/Preferences/WebPreferencesInternal.yaml: 15 1 16 2020-12-08 Chris Dumez <cdumez@apple.com> 2 17 -
TabularUnified trunk/Source/WTF/Scripts/Preferences/WebPreferences.yaml ¶
r270446 r270557 803 803 default: false 804 804 805 ForceUpdateScrollbarsOnMainThreadForPerformanceTesting:806 type: bool807 defaultValue:808 WebKitLegacy:809 default: false810 WebKit:811 default: false812 WebCore:813 default: false814 815 805 ForceWebGLUsesLowPower: 816 806 type: bool … … 1847 1837 default: true 1848 1838 1849 # FIXME: Is this implemented for WebKitLegacy? If not, this should be excluded from WebKitLegacy entirely (though we should still set the default value to false when initializing settings).1850 ScrollingPerformanceLoggingEnabled:1851 type: bool1852 webcoreOnChange: scrollingPerformanceLoggingEnabledChanged1853 defaultValue:1854 WebKitLegacy:1855 default: false1856 WebKit:1857 default: false1858 WebCore:1859 default: false1860 1861 1839 # FIXME: This is handled via WebView SPI rather than WebPreferences for WebKitLegacy. We should change the SPI to lookup the WebPreferences value instead. 1862 1840 SelectTrailingWhitespaceEnabled: -
TabularUnified trunk/Source/WTF/Scripts/Preferences/WebPreferencesInternal.yaml ¶
r269985 r270557 611 611 default: true 612 612 613 ScrollingPerformanceTestingEnabled: 614 type: bool 615 humanReadableName: "Scroll Performance Testing Enabled" 616 humanReadableDescription: "Enable behaviors used by scrolling performance tests" 617 webcoreOnChange: scrollingPerformanceTestingEnabledChanged 618 exposed: [ WebKit ] 619 defaultValue: 620 WebKitLegacy: 621 default: false 622 WebKit: 623 default: false 624 WebCore: 625 default: false 626 613 627 SecureContextChecksEnabled: 614 628 type: bool -
TabularUnified trunk/Source/WebCore/ChangeLog ¶
r270556 r270557 1 2020-12-08 Simon Fraser <simon.fraser@apple.com> 2 3 Make ScrollingPerformanceLoggingEnabled an internal debug preference 4 https://bugs.webkit.org/show_bug.cgi?id=219647 5 6 Reviewed by Sam Weinig. 7 8 ScrollingPerformanceLoggingEnabled is used by a Safari performance test, so it needs to be 9 easily toggleable from a script. That's easier if it's an Internal Debug preference. 10 11 Testing also sets ForceUpdateScrollbarsOnMainThreadForPerformanceTesting but we can just use 12 the ScrollingPerformanceLoggingEnabled flag, but it makes more sense to rename 13 ScrollingPerformanceLoggingEnabled to ScrollingPerformanceTestingEnabled when we do that. 14 15 Also fix how we propagate ScrollingPerformanceTestingEnabled to the scrolling tree; 16 do so via ScrollingStateFrameScrollingNode as we do for the other tree-wide settings, 17 removing code in TiledCoreAnimationDrawingArea::updatePreferences() that did this. 18 19 * page/FrameView.cpp: 20 (WebCore::FrameView::forceUpdateScrollbarsOnMainThreadForPerformanceTesting const): 21 (WebCore::FrameView::setScrollingPerformanceTestingEnabled): 22 (WebCore::FrameView::setScrollingPerformanceLoggingEnabled): Deleted. 23 * page/FrameView.h: 24 * page/SettingsBase.cpp: 25 (WebCore::SettingsBase::scrollingPerformanceTestingEnabledChanged): 26 (WebCore::SettingsBase::scrollingPerformanceLoggingEnabledChanged): Deleted. 27 * page/SettingsBase.h: 28 * page/scrolling/AsyncScrollingCoordinator.cpp: 29 (WebCore::AsyncScrollingCoordinator::setFrameScrollingNodeState): 30 (WebCore::AsyncScrollingCoordinator::asyncFrameOrOverflowScrollingEnabled const): Deleted. 31 (WebCore::AsyncScrollingCoordinator::wheelEventGesturesBecomeNonBlocking const): Deleted. 32 * page/scrolling/AsyncScrollingCoordinator.h: 33 * page/scrolling/ScrollingStateFrameScrollingNode.cpp: 34 (WebCore::ScrollingStateFrameScrollingNode::ScrollingStateFrameScrollingNode): 35 (WebCore::ScrollingStateFrameScrollingNode::applicableProperties const): 36 (WebCore::ScrollingStateFrameScrollingNode::setScrollingPerformanceTestingEnabled): 37 * page/scrolling/ScrollingStateFrameScrollingNode.h: 38 * page/scrolling/ScrollingStateNode.h: 39 * page/scrolling/ScrollingTree.cpp: 40 (WebCore::ScrollingTree::commitTreeState): 41 (WebCore::ScrollingTree::setScrollingPerformanceLoggingEnabled): Deleted. 42 (WebCore::ScrollingTree::scrollingPerformanceLoggingEnabled): Deleted. 43 * page/scrolling/ScrollingTree.h: 44 (WebCore::ScrollingTree::scrollingPerformanceTestingEnabled const): 45 (WebCore::ScrollingTree::setScrollingPerformanceTestingEnabled): 46 * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm: 47 (WebCore::ScrollingTreeFrameScrollingNodeMac::commitStateBeforeChildren): 48 (WebCore::ScrollingTreeFrameScrollingNodeMac::currentScrollPositionChanged): 49 * platform/graphics/TiledBacking.h: 50 * platform/graphics/ca/TileController.h: 51 * platform/graphics/ca/TileGrid.cpp: 52 (WebCore::TileGrid::platformCALayerPaintContents): 53 * rendering/RenderLayer.cpp: 54 (WebCore::RenderLayer::forceUpdateScrollbarsOnMainThreadForPerformanceTesting const): 55 * rendering/RenderLayerBacking.cpp: 56 (WebCore::RenderLayerBacking::RenderLayerBacking): 57 * rendering/RenderListBox.cpp: 58 (WebCore::RenderListBox::forceUpdateScrollbarsOnMainThreadForPerformanceTesting const): 59 1 60 2020-12-08 Wenson Hsieh <wenson_hsieh@apple.com> 2 61 -
TabularUnified trunk/Source/WebCore/page/FrameView.cpp ¶
r270390 r270557 73 73 #include "Page.h" 74 74 #include "PageOverlayController.h" 75 #include "PerformanceLoggingClient.h" 75 76 #include "ProgressTracker.h" 76 77 #include "Quirks.h" … … 3747 3748 { 3748 3749 Page* page = frame().page(); 3749 return page && page->settings(). forceUpdateScrollbarsOnMainThreadForPerformanceTesting();3750 return page && page->settings().scrollingPerformanceTestingEnabled(); 3750 3751 } 3751 3752 … … 5213 5214 #endif // PLATFORM(IOS_FAMILY) 5214 5215 5215 void FrameView::setScrollingPerformanceLoggingEnabled(bool flag) 5216 { 5216 void FrameView::setScrollingPerformanceTestingEnabled(bool scrollingPerformanceTestingEnabled) 5217 { 5218 if (scrollingPerformanceTestingEnabled) { 5219 auto* page = frame().page(); 5220 if (page && page->performanceLoggingClient()) 5221 page->performanceLoggingClient()->logScrollingEvent(PerformanceLoggingClient::ScrollingEvent::LoggingEnabled, MonotonicTime::now(), 0); 5222 } 5223 5217 5224 if (TiledBacking* tiledBacking = this->tiledBacking()) 5218 tiledBacking->setScrollingPerformance LoggingEnabled(flag);5225 tiledBacking->setScrollingPerformanceTestingEnabled(scrollingPerformanceTestingEnabled); 5219 5226 } 5220 5227 -
TabularUnified trunk/Source/WebCore/page/FrameView.h ¶
r270389 r270557 568 568 bool handleWheelEventForScrolling(const PlatformWheelEvent&, Optional<WheelScrollGestureState>) final; 569 569 570 WEBCORE_EXPORT void setScrollingPerformance LoggingEnabled(bool);570 WEBCORE_EXPORT void setScrollingPerformanceTestingEnabled(bool); 571 571 572 572 // Page and FrameView both store a Pagination value. Page::pagination() is set only by API, -
TabularUnified trunk/Source/WebCore/page/PerformanceLoggingClient.h ¶
r257996 r270557 38 38 public: 39 39 enum class ScrollingEvent { 40 LoggingEnabled, 40 41 ExposedTilelessArea, 41 42 FilledTile, -
TabularUnified trunk/Source/WebCore/page/SettingsBase.cpp ¶
r269545 r270557 340 340 } 341 341 342 void SettingsBase::scrollingPerformance LoggingEnabledChanged()342 void SettingsBase::scrollingPerformanceTestingEnabledChanged() 343 343 { 344 344 if (m_page && m_page->mainFrame().view()) 345 m_page->mainFrame().view()->setScrollingPerformance LoggingEnabled(m_page->settings().scrollingPerformanceLoggingEnabled());345 m_page->mainFrame().view()->setScrollingPerformanceTestingEnabled(m_page->settings().scrollingPerformanceTestingEnabled()); 346 346 } 347 347 -
TabularUnified trunk/Source/WebCore/page/SettingsBase.h ¶
r269953 r270557 126 126 void storageBlockingPolicyChanged(); 127 127 void backgroundShouldExtendBeyondPageChanged(); 128 void scrollingPerformance LoggingEnabledChanged();128 void scrollingPerformanceTestingEnabledChanged(); 129 129 void hiddenPageDOMTimerThrottlingStateChanged(); 130 130 void hiddenPageCSSAnimationSuspensionEnabledChanged(); -
TabularUnified trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp ¶
r270338 r270557 646 646 return; 647 647 648 auto& settings = m_page->mainFrame().settings(); 648 649 auto& frameScrollingNode = downcast<ScrollingStateFrameScrollingNode>(*stateNode); 649 650 … … 653 654 frameScrollingNode.setTopContentInset(frameView.topContentInset()); 654 655 frameScrollingNode.setLayoutViewport(frameView.layoutViewportRect()); 655 frameScrollingNode.setAsyncFrameOrOverflowScrollingEnabled(asyncFrameOrOverflowScrollingEnabled()); 656 frameScrollingNode.setWheelEventGesturesBecomeNonBlocking(wheelEventGesturesBecomeNonBlocking()); 656 frameScrollingNode.setAsyncFrameOrOverflowScrollingEnabled(settings.asyncFrameScrollingEnabled() || settings.asyncOverflowScrollingEnabled()); 657 frameScrollingNode.setScrollingPerformanceTestingEnabled(settings.scrollingPerformanceTestingEnabled()); 658 frameScrollingNode.setWheelEventGesturesBecomeNonBlocking(settings.wheelEventGesturesBecomeNonBlocking()); 657 659 658 660 frameScrollingNode.setMinLayoutViewportOrigin(frameView.minStableLayoutViewportOrigin()); … … 832 834 } 833 835 834 bool AsyncScrollingCoordinator::asyncFrameOrOverflowScrollingEnabled() const835 {836 auto& settings = m_page->mainFrame().settings();837 return settings.asyncFrameScrollingEnabled() || settings.asyncOverflowScrollingEnabled();838 }839 840 bool AsyncScrollingCoordinator::wheelEventGesturesBecomeNonBlocking() const841 {842 auto& settings = m_page->mainFrame().settings();843 return settings.wheelEventGesturesBecomeNonBlocking();844 }845 846 836 ScrollingNodeID AsyncScrollingCoordinator::scrollableContainerNodeID(const RenderObject& renderer) const 847 837 { -
TabularUnified trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.h ¶
r270338 r270557 95 95 96 96 bool hasVisibleSlowRepaintViewportConstrainedObjects(const FrameView&) const override { return false; } 97 98 bool asyncFrameOrOverflowScrollingEnabled() const;99 bool wheelEventGesturesBecomeNonBlocking() const;100 97 101 98 WEBCORE_EXPORT ScrollingNodeID scrollableContainerNodeID(const RenderObject&) const override; -
TabularUnified trunk/Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.cpp ¶
r270156 r270557 61 61 , m_asyncFrameOrOverflowScrollingEnabled(stateNode.asyncFrameOrOverflowScrollingEnabled()) 62 62 , m_wheelEventGesturesBecomeNonBlocking(stateNode.wheelEventGesturesBecomeNonBlocking()) 63 , m_scrollingPerformanceTestingEnabled(stateNode.scrollingPerformanceTestingEnabled()) 63 64 { 64 65 if (hasChangedProperty(Property::RootContentsLayer)) … … 107 108 Property::AsyncFrameOrOverflowScrollingEnabled, 108 109 Property::WheelEventGesturesBecomeNonBlocking, 110 Property::ScrollingPerformanceTestingEnabled, 109 111 Property::LayoutViewport, 110 112 Property::MinLayoutViewportOrigin, … … 297 299 m_wheelEventGesturesBecomeNonBlocking = enabled; 298 300 setPropertyChanged(Property::WheelEventGesturesBecomeNonBlocking); 301 } 302 303 void ScrollingStateFrameScrollingNode::setScrollingPerformanceTestingEnabled(bool enabled) 304 { 305 if (enabled == m_scrollingPerformanceTestingEnabled) 306 return; 307 308 m_scrollingPerformanceTestingEnabled = enabled; 309 setPropertyChanged(Property::ScrollingPerformanceTestingEnabled); 299 310 } 300 311 -
TabularUnified trunk/Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.h ¶
r270156 r270557 112 112 void setAsyncFrameOrOverflowScrollingEnabled(bool); 113 113 114 bool scrollingPerformanceTestingEnabled() const { return m_scrollingPerformanceTestingEnabled; } 115 WEBCORE_EXPORT void setScrollingPerformanceTestingEnabled(bool); 116 114 117 bool wheelEventGesturesBecomeNonBlocking() const { return m_wheelEventGesturesBecomeNonBlocking; } 115 118 WEBCORE_EXPORT void setWheelEventGesturesBecomeNonBlocking(bool); … … 146 149 bool m_asyncFrameOrOverflowScrollingEnabled { false }; 147 150 bool m_wheelEventGesturesBecomeNonBlocking { false }; 151 bool m_scrollingPerformanceTestingEnabled { false }; 148 152 }; 149 153 -
TabularUnified trunk/Source/WebCore/page/scrolling/ScrollingStateNode.h ¶
r270156 r270557 260 260 AsyncFrameOrOverflowScrollingEnabled = 1LLU << 36, 261 261 WheelEventGesturesBecomeNonBlocking = 1LLU << 37, 262 LayoutViewport = 1LLU << 38, 263 MinLayoutViewportOrigin = 1LLU << 39, 264 MaxLayoutViewportOrigin = 1LLU << 40, 265 OverrideVisualViewportSize = 1LLU << 41, 262 ScrollingPerformanceTestingEnabled = 1LLU << 38, 263 LayoutViewport = 1LLU << 39, 264 MinLayoutViewportOrigin = 1LLU << 40, 265 MaxLayoutViewportOrigin = 1LLU << 41, 266 OverrideVisualViewportSize = 1LLU << 42, 266 267 // ScrollingStatePositionedNode 267 RelatedOverflowScrollingNodes = 1LLU << 4 2,268 LayoutConstraintData = 1LLU << 4 3,268 RelatedOverflowScrollingNodes = 1LLU << 43, 269 LayoutConstraintData = 1LLU << 44, 269 270 // ScrollingStateFixedNode, ScrollingStateStickyNode 270 ViewportConstraints = 1LLU << 4 4,271 ViewportConstraints = 1LLU << 45, 271 272 // ScrollingStateOverflowScrollProxyNode 272 OverflowScrollingNode = 1LLU << 4 5,273 OverflowScrollingNode = 1LLU << 46, 273 274 }; 274 275 -
TabularUnified trunk/Source/WebCore/page/scrolling/ScrollingTree.cpp ¶
r270425 r270557 273 273 || rootNode->hasChangedProperty(ScrollingStateNode::Property::AsyncFrameOrOverflowScrollingEnabled) 274 274 || rootNode->hasChangedProperty(ScrollingStateNode::Property::WheelEventGesturesBecomeNonBlocking) 275 || rootNode->hasChangedProperty(ScrollingStateNode::Property::ScrollingPerformanceTestingEnabled) 275 276 || rootNode->hasChangedProperty(ScrollingStateNode::Property::IsMonitoringWheelEvents))) { 276 277 LockHolder lock(m_treeStateMutex); … … 287 288 if (rootStateNodeChanged || rootNode->hasChangedProperty(ScrollingStateNode::Property::WheelEventGesturesBecomeNonBlocking)) 288 289 m_wheelEventGesturesBecomeNonBlocking = scrollingStateTree->rootStateNode()->wheelEventGesturesBecomeNonBlocking(); 290 291 if (rootStateNodeChanged || rootNode->hasChangedProperty(ScrollingStateNode::Property::ScrollingPerformanceTestingEnabled)) 292 m_scrollingPerformanceTestingEnabled = scrollingStateTree->rootStateNode()->scrollingPerformanceTestingEnabled(); 289 293 290 294 if (rootStateNodeChanged || rootNode->hasChangedProperty(ScrollingStateNode::Property::IsMonitoringWheelEvents)) … … 697 701 } 698 702 699 void ScrollingTree::setScrollingPerformanceLoggingEnabled(bool flag)700 {701 m_scrollingPerformanceLoggingEnabled = flag;702 }703 704 bool ScrollingTree::scrollingPerformanceLoggingEnabled()705 {706 return m_scrollingPerformanceLoggingEnabled;707 }708 709 703 String ScrollingTree::scrollingTreeAsText(ScrollingStateTreeAsTextBehavior behavior) 710 704 { -
TabularUnified trunk/Source/WebCore/page/scrolling/ScrollingTree.h ¶
r270491 r270557 96 96 void setWheelEventGesturesBecomeNonBlocking(bool value) { m_wheelEventGesturesBecomeNonBlocking = value; } 97 97 98 bool scrollingPerformanceTestingEnabled() const { return m_scrollingPerformanceTestingEnabled; } 99 void setScrollingPerformanceTestingEnabled(bool value) { m_scrollingPerformanceTestingEnabled = value; } 100 98 101 WEBCORE_EXPORT OptionSet<WheelEventProcessingSteps> determineWheelEventProcessing(const PlatformWheelEvent&); 99 102 WEBCORE_EXPORT virtual WheelEventHandlingResult handleWheelEvent(const PlatformWheelEvent&, OptionSet<WheelEventProcessingSteps> = { }); … … 178 181 179 182 WEBCORE_EXPORT bool willWheelEventStartSwipeGesture(const PlatformWheelEvent&); 180 181 WEBCORE_EXPORT void setScrollingPerformanceLoggingEnabled(bool flag);182 bool scrollingPerformanceLoggingEnabled();183 183 184 184 ScrollingTreeFrameScrollingNode* rootNode() const { return m_rootNode.get(); } … … 329 329 bool m_isHandlingProgrammaticScroll { false }; 330 330 bool m_isMonitoringWheelEvents { false }; 331 bool m_scrollingPerformance LoggingEnabled { false };331 bool m_scrollingPerformanceTestingEnabled { false }; 332 332 bool m_asyncFrameOrOverflowScrollingEnabled { false }; 333 333 bool m_wheelEventGesturesBecomeNonBlocking { false }; -
TabularUnified trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm ¶
r270130 r270557 91 91 logScrollingMode = true; 92 92 93 if (logScrollingMode && isRootNode() && scrollingTree().scrollingPerformance LoggingEnabled())93 if (logScrollingMode && isRootNode() && scrollingTree().scrollingPerformanceTestingEnabled()) 94 94 scrollingTree().reportSynchronousScrollingReasonsChanged(MonotonicTime::now(), synchronousScrollingReasons()); 95 95 … … 156 156 ScrollingTreeFrameScrollingNode::currentScrollPositionChanged(scrollType, hasSynchronousScrollingReasons() ? ScrollingLayerPositionAction::Set : action); 157 157 158 if (scrollingTree().scrollingPerformance LoggingEnabled()) {158 if (scrollingTree().scrollingPerformanceTestingEnabled()) { 159 159 unsigned unfilledArea = exposedUnfilledArea(); 160 160 if (unfilledArea || m_lastScrollHadUnfilledPixels) -
TabularUnified trunk/Source/WebCore/platform/graphics/TiledBacking.h ¶
r245837 r270557 107 107 virtual void forceRepaint() = 0; 108 108 109 virtual void setScrollingPerformance LoggingEnabled(bool) = 0;110 virtual bool scrollingPerformance LoggingEnabled() const = 0;109 virtual void setScrollingPerformanceTestingEnabled(bool) = 0; 110 virtual bool scrollingPerformanceTestingEnabled() const = 0; 111 111 112 112 virtual double retainedTileBackingStoreMemory() const = 0; -
TabularUnified trunk/Source/WebCore/platform/graphics/ca/TileController.h ¶
r250661 r270557 126 126 FloatRect adjustTileCoverageRectForScrolling(const FloatRect& coverageRect, const FloatSize& newSize, const FloatRect& previousVisibleRect, const FloatRect& currentVisibleRect, float contentsScale) final; 127 127 128 bool scrollingPerformance LoggingEnabled() const final { return m_scrollingPerformanceLoggingEnabled; }128 bool scrollingPerformanceTestingEnabled() const final { return m_scrollingPerformanceTestingEnabled; } 129 129 130 130 IntSize computeTileSize(); … … 170 170 void forceRepaint() final; 171 171 IntRect tileGridExtent() const final; 172 void setScrollingPerformance LoggingEnabled(bool flag) final { m_scrollingPerformanceLoggingEnabled = flag; }172 void setScrollingPerformanceTestingEnabled(bool flag) final { m_scrollingPerformanceTestingEnabled = flag; } 173 173 double retainedTileBackingStoreMemory() const final; 174 174 IntRect tileCoverageRect() const final; … … 237 237 238 238 bool m_isInWindow { false }; 239 bool m_scrollingPerformance LoggingEnabled { false };239 bool m_scrollingPerformanceTestingEnabled { false }; 240 240 bool m_acceleratesDrawing { false }; 241 241 bool m_wantsDeepColorBackingStore { false }; -
TabularUnified trunk/Source/WebCore/platform/graphics/ca/TileGrid.cpp ¶
r262028 r270557 738 738 PlatformCALayer::drawRepaintIndicator(context, platformCALayer, repaintCount, m_controller.tileDebugBorderColor()); 739 739 740 if (m_controller.scrollingPerformance LoggingEnabled()) {740 if (m_controller.scrollingPerformanceTestingEnabled()) { 741 741 FloatRect visiblePart(platformCALayer->position().x(), platformCALayer->position().y(), platformCALayer->bounds().size().width(), platformCALayer->bounds().size().height()); 742 742 visiblePart.intersect(m_controller.visibleRect()); -
TabularUnified trunk/Source/WebCore/rendering/RenderLayer.cpp ¶
r270390 r270557 1924 1924 bool RenderLayer::forceUpdateScrollbarsOnMainThreadForPerformanceTesting() const 1925 1925 { 1926 return renderer().settings(). forceUpdateScrollbarsOnMainThreadForPerformanceTesting();1926 return renderer().settings().scrollingPerformanceTestingEnabled(); 1927 1927 } 1928 1928 -
TabularUnified trunk/Source/WebCore/rendering/RenderLayerBacking.cpp ¶
r270416 r270557 228 228 229 229 if (m_isFrameLayerWithTiledBacking) { 230 tiledBacking->setScrollingPerformance LoggingEnabled(renderer().settings().scrollingPerformanceLoggingEnabled());230 tiledBacking->setScrollingPerformanceTestingEnabled(renderer().settings().scrollingPerformanceTestingEnabled()); 231 231 adjustTiledBackingCoverage(); 232 232 } -
TabularUnified trunk/Source/WebCore/rendering/RenderListBox.cpp ¶
r265338 r270557 874 874 bool RenderListBox::forceUpdateScrollbarsOnMainThreadForPerformanceTesting() const 875 875 { 876 return settings(). forceUpdateScrollbarsOnMainThreadForPerformanceTesting();876 return settings().scrollingPerformanceTestingEnabled(); 877 877 } 878 878 -
TabularUnified trunk/Source/WebKit/ChangeLog ¶
r270555 r270557 1 2020-12-08 Simon Fraser <simon.fraser@apple.com> 2 3 Make ScrollingPerformanceLoggingEnabled an internal debug preference 4 https://bugs.webkit.org/show_bug.cgi?id=219647 5 6 Reviewed by Sam Weinig. 7 8 ScrollingPerformanceLoggingEnabled is used by a Safari performance test, so it needs to be 9 easily toggleable from a script. That's easier if it's an Internal Debug preference. 10 11 Testing also sets ForceUpdateScrollbarsOnMainThreadForPerformanceTesting but we can just use 12 the ScrollingPerformanceLoggingEnabled flag, but it makes more sense to rename 13 ScrollingPerformanceLoggingEnabled to ScrollingPerformanceTestingEnabled when we do that. 14 15 Also fix how we propagate ScrollingPerformanceTestingEnabled to the scrolling tree; 16 do so via ScrollingStateFrameScrollingNode as we do for the other tree-wide settings, 17 removing code in TiledCoreAnimationDrawingArea::updatePreferences() that did this. 18 19 * Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp: 20 (ArgumentCoder<ScrollingStateFrameScrollingNode>::encode): 21 (ArgumentCoder<ScrollingStateFrameScrollingNode>::decode): 22 * UIProcess/API/C/WKPreferences.cpp: 23 (WKPreferencesSetScrollingPerformanceLoggingEnabled): 24 (WKPreferencesGetScrollingPerformanceLoggingEnabled): 25 * WebProcess/Plugins/PDF/PDFPlugin.mm: 26 (WebKit::PDFPlugin::forceUpdateScrollbarsOnMainThreadForPerformanceTesting const): 27 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: 28 (WebKit::TiledCoreAnimationDrawingArea::updatePreferences): 29 1 30 2020-12-08 Per Arne Vollan <pvollan@apple.com> 2 31 -
TabularUnified trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp ¶
r270156 r270557 144 144 WebCore::ScrollingStateNode::Property::AsyncFrameOrOverflowScrollingEnabled, 145 145 WebCore::ScrollingStateNode::Property::WheelEventGesturesBecomeNonBlocking, 146 WebCore::ScrollingStateNode::Property::ScrollingPerformanceTestingEnabled, 146 147 WebCore::ScrollingStateNode::Property::LayoutViewport, 147 148 WebCore::ScrollingStateNode::Property::MinLayoutViewportOrigin, … … 244 245 // AsyncFrameOrOverflowScrollingEnabled is not relevant for UI-side compositing. 245 246 SCROLLING_NODE_ENCODE(ScrollingStateNode::Property::WheelEventGesturesBecomeNonBlocking, wheelEventGesturesBecomeNonBlocking) 247 SCROLLING_NODE_ENCODE(ScrollingStateNode::Property::ScrollingPerformanceTestingEnabled, scrollingPerformanceTestingEnabled) 246 248 SCROLLING_NODE_ENCODE(ScrollingStateNode::Property::LayoutViewport, layoutViewport) 247 249 SCROLLING_NODE_ENCODE(ScrollingStateNode::Property::MinLayoutViewportOrigin, minLayoutViewportOrigin) … … 362 364 // AsyncFrameOrOverflowScrollingEnabled is not encoded. 363 365 SCROLLING_NODE_DECODE(ScrollingStateNode::Property::WheelEventGesturesBecomeNonBlocking, bool, setWheelEventGesturesBecomeNonBlocking) 366 SCROLLING_NODE_DECODE(ScrollingStateNode::Property::ScrollingPerformanceTestingEnabled, bool, setScrollingPerformanceTestingEnabled) 364 367 SCROLLING_NODE_DECODE(ScrollingStateNode::Property::LayoutViewport, FloatRect, setLayoutViewport) 365 368 SCROLLING_NODE_DECODE(ScrollingStateNode::Property::MinLayoutViewportOrigin, FloatPoint, setMinLayoutViewportOrigin) -
TabularUnified trunk/Source/WebKit/UIProcess/API/C/WKPreferences.cpp ¶
r269888 r270557 1059 1059 void WKPreferencesSetScrollingPerformanceLoggingEnabled(WKPreferencesRef preferencesRef, bool enabled) 1060 1060 { 1061 toImpl(preferencesRef)->setScrollingPerformance LoggingEnabled(enabled);1061 toImpl(preferencesRef)->setScrollingPerformanceTestingEnabled(enabled); 1062 1062 } 1063 1063 1064 1064 bool WKPreferencesGetScrollingPerformanceLoggingEnabled(WKPreferencesRef preferencesRef) 1065 1065 { 1066 return toImpl(preferencesRef)->scrollingPerformance LoggingEnabled();1066 return toImpl(preferencesRef)->scrollingPerformanceTestingEnabled(); 1067 1067 } 1068 1068 -
TabularUnified trunk/Source/WebKit/UIProcess/WebPageProxy.cpp ¶
r270545 r270557 7264 7264 7265 7265 switch (event) { 7266 case PerformanceLoggingClient::ScrollingEvent::LoggingEnabled: 7267 WTFLogAlways("SCROLLING: ScrollingPerformanceTestingEnabled\n"); 7268 break; 7266 7269 case PerformanceLoggingClient::ScrollingEvent::ExposedTilelessArea: 7267 7270 WTFLogAlways("SCROLLING: Exposed tileless area. Time: %f Unfilled Pixels: %llu\n", timestamp.secondsSinceEpoch().value(), (unsigned long long)data); -
TabularUnified trunk/Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm ¶
r270278 r270557 1458 1458 if (auto* coreFrame = m_frame ? m_frame->coreFrame() : nullptr) { 1459 1459 if (auto* page = coreFrame->page()) 1460 return page->settings(). forceUpdateScrollbarsOnMainThreadForPerformanceTesting();1460 return page->settings().scrollingPerformanceTestingEnabled(); 1461 1461 } 1462 1462 -
TabularUnified trunk/Source/WebKit/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm ¶
r269805 r270557 220 220 Settings& settings = m_webPage.corePage()->settings(); 221 221 222 #if ENABLE(ASYNC_SCROLLING)223 if (AsyncScrollingCoordinator* scrollingCoordinator = downcast<AsyncScrollingCoordinator>(m_webPage.corePage()->scrollingCoordinator())) {224 bool scrollingPerformanceLoggingEnabled = store.getBoolValueForKey(WebPreferencesKey::scrollingPerformanceLoggingEnabledKey());225 226 RefPtr<ScrollingTree> scrollingTree = scrollingCoordinator->scrollingTree();227 ScrollingThread::dispatch([scrollingTree, scrollingPerformanceLoggingEnabled] {228 scrollingTree->setScrollingPerformanceLoggingEnabled(scrollingPerformanceLoggingEnabled);229 });230 }231 #endif232 233 222 // Fixed position elements need to be composited and create stacking contexts 234 223 // in order to be scrolled by the ScrollingCoordinator.
Note:
See TracChangeset
for help on using the changeset viewer.