Changeset 200342 in webkit
- Timestamp:
- May 2, 2016, 3:19:29 PM (10 years ago)
- Location:
- trunk/Source
- Files:
-
- 13 edited
-
WebCore/ChangeLog (modified) (1 diff)
-
WebCore/page/FrameView.cpp (modified) (4 diffs)
-
WebCore/page/FrameView.h (modified) (1 diff)
-
WebCore/page/scrolling/ScrollingCoordinator.cpp (modified) (2 diffs)
-
WebCore/page/scrolling/ScrollingCoordinator.h (modified) (2 diffs)
-
WebCore/page/scrolling/mac/ScrollingCoordinatorMac.mm (modified) (1 diff)
-
WebCore/platform/ScrollableArea.h (modified) (1 diff)
-
WebCore/platform/win/PopupMenuWin.h (modified) (1 diff)
-
WebCore/rendering/RenderLayer.cpp (modified) (1 diff)
-
WebCore/rendering/RenderLayer.h (modified) (1 diff)
-
WebCore/rendering/RenderListBox.h (modified) (1 diff)
-
WebKit2/ChangeLog (modified) (1 diff)
-
WebKit2/WebProcess/Plugins/PDF/DeprecatedPDFPlugin.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r200341 r200342 1 2016-05-02 Simon Fraser <simon.fraser@apple.com> 2 3 Fix shouldUpdateScrollLayerPositionSynchronously() for non-main frames. Remove updatesScrollLayerPositionOnMainThread() 4 https://bugs.webkit.org/show_bug.cgi?id=157277 5 6 Reviewed by Dean Jackson, Tim Horton. 7 8 shouldUpdateScrollLayerPositionSynchronously() gave an answer for the main frame even if 9 called for a subframe. This could have caused scroll snapping, and isRubberBandInProgress() 10 to give wrong answers sometimes. Fix by passing in the FrameView. 11 12 I was unable to easily come up with a testcase to detect the incorrect behavior. 13 14 Remove updatesScrollLayerPositionOnMainThread() which is unused by all ports. 15 16 * page/FrameView.cpp: 17 (WebCore::FrameView::isScrollSnapInProgress): 18 (WebCore::FrameView::shouldUpdateCompositingLayersAfterScrolling): 19 (WebCore::FrameView::isRubberBandInProgress): 20 (WebCore::FrameView::updatesScrollLayerPositionOnMainThread): Deleted. 21 * page/FrameView.h: 22 * page/scrolling/ScrollingCoordinator.cpp: 23 (WebCore::ScrollingCoordinator::updateSynchronousScrollingReasons): 24 (WebCore::ScrollingCoordinator::shouldUpdateScrollLayerPositionSynchronously): 25 * page/scrolling/ScrollingCoordinator.h: 26 * page/scrolling/mac/ScrollingCoordinatorMac.mm: 27 (WebCore::ScrollingCoordinatorMac::updateTiledScrollingIndicator): 28 * platform/ScrollableArea.h: 29 * platform/win/PopupMenuWin.h: 30 * rendering/RenderLayer.cpp: 31 (WebCore::RenderLayer::setupFontSubpixelQuantization): 32 * rendering/RenderLayer.h: 33 * rendering/RenderListBox.h: 34 1 35 2016-05-02 Simon Fraser <simon.fraser@apple.com> 2 36 -
trunk/Source/WebCore/page/FrameView.cpp
r200161 r200342 971 971 if (Page* page = frame().page()) { 972 972 if (ScrollingCoordinator* scrollingCoordinator = page->scrollingCoordinator()) { 973 if (!scrollingCoordinator->shouldUpdateScrollLayerPositionSynchronously( ))973 if (!scrollingCoordinator->shouldUpdateScrollLayerPositionSynchronously(*this)) 974 974 return scrollingCoordinator->isScrollSnapInProgress(); 975 975 } … … 2308 2308 return true; 2309 2309 2310 if (scrollingCoordinator->shouldUpdateScrollLayerPositionSynchronously( ))2310 if (scrollingCoordinator->shouldUpdateScrollLayerPositionSynchronously(*this)) 2311 2311 return true; 2312 2312 … … 2341 2341 if (Page* page = frame().page()) { 2342 2342 if (ScrollingCoordinator* scrollingCoordinator = page->scrollingCoordinator()) { 2343 if (!scrollingCoordinator->shouldUpdateScrollLayerPositionSynchronously( ))2343 if (!scrollingCoordinator->shouldUpdateScrollLayerPositionSynchronously(*this)) 2344 2344 return scrollingCoordinator->isRubberBandInProgress(); 2345 2345 } … … 3526 3526 Page* page = frame().page(); 3527 3527 return page && page->focusController().isActive(); 3528 }3529 3530 bool FrameView::updatesScrollLayerPositionOnMainThread() const3531 {3532 if (Page* page = frame().page()) {3533 if (ScrollingCoordinator* scrollingCoordinator = page->scrollingCoordinator())3534 return scrollingCoordinator->shouldUpdateScrollLayerPositionSynchronously();3535 }3536 3537 return true;3538 3528 } 3539 3529 -
trunk/Source/WebCore/page/FrameView.h
r200116 r200342 487 487 488 488 bool isActive() const override; 489 bool updatesScrollLayerPositionOnMainThread() const override;490 489 bool forceUpdateScrollbarsOnMainThreadForPerformanceTesting() const override; 491 490 -
trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp
r197841 r200342 348 348 } 349 349 350 void ScrollingCoordinator::updateSynchronousScrollingReasons( FrameView& frameView)350 void ScrollingCoordinator::updateSynchronousScrollingReasons(const FrameView& frameView) 351 351 { 352 352 // FIXME: Once we support async scrolling of iframes, we'll have to track the synchronous scrolling … … 368 368 } 369 369 370 bool ScrollingCoordinator::shouldUpdateScrollLayerPositionSynchronously() const 371 { 372 if (FrameView* frameView = m_page->mainFrame().view()) 373 return synchronousScrollingReasons(*frameView); 370 bool ScrollingCoordinator::shouldUpdateScrollLayerPositionSynchronously(const FrameView& frameView) const 371 { 372 if (&frameView == m_page->mainFrame().view()) 373 return synchronousScrollingReasons(frameView); 374 374 375 return true; 375 376 } -
trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.h
r197841 r200342 196 196 197 197 SynchronousScrollingReasons synchronousScrollingReasons(const FrameView&) const; 198 bool shouldUpdateScrollLayerPositionSynchronously( ) const;198 bool shouldUpdateScrollLayerPositionSynchronously(const FrameView&) const; 199 199 200 200 virtual void willDestroyScrollableArea(ScrollableArea&) { } … … 228 228 229 229 virtual bool hasVisibleSlowRepaintViewportConstrainedObjects(const FrameView&) const; 230 void updateSynchronousScrollingReasons( FrameView&);230 void updateSynchronousScrollingReasons(const FrameView&); 231 231 232 232 Region absoluteNonFastScrollableRegionForFrame(const Frame&) const; -
trunk/Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.mm
r194496 r200342 136 136 137 137 ScrollingModeIndication indicatorMode; 138 if (shouldUpdateScrollLayerPositionSynchronously( ))138 if (shouldUpdateScrollLayerPositionSynchronously(*frameView)) 139 139 indicatorMode = SynchronousScrollingBecauseOfStyleIndication; 140 140 else -
trunk/Source/WebCore/platform/ScrollableArea.h
r200116 r200342 156 156 WEBCORE_EXPORT virtual void invalidateScrollCorner(const IntRect&); 157 157 158 virtual bool updatesScrollLayerPositionOnMainThread() const = 0;159 160 158 virtual bool forceUpdateScrollbarsOnMainThreadForPerformanceTesting() const = 0; 161 159 -
trunk/Source/WebCore/platform/win/PopupMenuWin.h
r200116 r200342 107 107 IntSize contentsSize() const override; 108 108 IntRect scrollableAreaBoundingBox(bool* = nullptr) const override; 109 bool updatesScrollLayerPositionOnMainThread() const override { return true; }110 109 bool forceUpdateScrollbarsOnMainThreadForPerformanceTesting() const override { return false; } 111 110 bool shouldPlaceBlockDirectionScrollbarOnLeft() const final { return false; } -
trunk/Source/WebCore/rendering/RenderLayer.cpp
r200284 r200342 4025 4025 if (Page* page = renderer().frame().page()) { 4026 4026 if (ScrollingCoordinator* scrollingCoordinator = page->scrollingCoordinator()) 4027 scrollingOnMainThread = scrollingCoordinator->shouldUpdateScrollLayerPositionSynchronously( );4027 scrollingOnMainThread = scrollingCoordinator->shouldUpdateScrollLayerPositionSynchronously(renderer().view().frameView()); 4028 4028 } 4029 4029 #endif -
trunk/Source/WebCore/rendering/RenderLayer.h
r200284 r200342 884 884 IntRect scrollableAreaBoundingBox(bool* isInsideFixed = nullptr) const override; 885 885 bool isRubberBandInProgress() const override; 886 bool updatesScrollLayerPositionOnMainThread() const override { return true; }887 886 bool forceUpdateScrollbarsOnMainThreadForPerformanceTesting() const override; 888 887 #if ENABLE(CSS_SCROLL_SNAP) -
trunk/Source/WebCore/rendering/RenderListBox.h
r200265 r200342 132 132 bool isHandlingWheelEvent() const override; 133 133 bool shouldSuspendScrollAnimations() const override; 134 bool updatesScrollLayerPositionOnMainThread() const override { return true; }135 134 bool forceUpdateScrollbarsOnMainThreadForPerformanceTesting() const override; 136 135 -
trunk/Source/WebKit2/ChangeLog
r200335 r200342 1 2016-05-02 Simon Fraser <simon.fraser@apple.com> 2 3 Fix shouldUpdateScrollLayerPositionSynchronously() for non-main frames. Remove updatesScrollLayerPositionOnMainThread() 4 https://bugs.webkit.org/show_bug.cgi?id=157277 5 6 Reviewed by Dean Jackson, Tim Horton. 7 8 Remove updatesScrollLayerPositionOnMainThread() which is unused by all ports. 9 10 * WebProcess/Plugins/PDF/DeprecatedPDFPlugin.h: 11 1 12 2016-05-02 Alex Christensen <achristensen@webkit.org> 2 13 -
trunk/Source/WebKit2/WebProcess/Plugins/PDF/DeprecatedPDFPlugin.h
r200116 r200342 214 214 WebCore::IntPoint convertFromScrollbarToContainingView(const WebCore::Scrollbar&, const WebCore::IntPoint& scrollbarPoint) const override; 215 215 WebCore::IntPoint convertFromContainingViewToScrollbar(const WebCore::Scrollbar&, const WebCore::IntPoint& parentPoint) const override; 216 bool updatesScrollLayerPositionOnMainThread() const override { return true; }217 216 bool forceUpdateScrollbarsOnMainThreadForPerformanceTesting() const override; 218 217
Note:
See TracChangeset
for help on using the changeset viewer.