Diff
Modified: trunk/Source/WebCore/ChangeLog (200341 => 200342)
--- trunk/Source/WebCore/ChangeLog 2016-05-02 22:19:23 UTC (rev 200341)
+++ trunk/Source/WebCore/ChangeLog 2016-05-02 22:19:29 UTC (rev 200342)
@@ -1,5 +1,39 @@
2016-05-02 Simon Fraser <[email protected]>
+ Fix shouldUpdateScrollLayerPositionSynchronously() for non-main frames. Remove updatesScrollLayerPositionOnMainThread()
+ https://bugs.webkit.org/show_bug.cgi?id=157277
+
+ Reviewed by Dean Jackson, Tim Horton.
+
+ shouldUpdateScrollLayerPositionSynchronously() gave an answer for the main frame even if
+ called for a subframe. This could have caused scroll snapping, and isRubberBandInProgress()
+ to give wrong answers sometimes. Fix by passing in the FrameView.
+
+ I was unable to easily come up with a testcase to detect the incorrect behavior.
+
+ Remove updatesScrollLayerPositionOnMainThread() which is unused by all ports.
+
+ * page/FrameView.cpp:
+ (WebCore::FrameView::isScrollSnapInProgress):
+ (WebCore::FrameView::shouldUpdateCompositingLayersAfterScrolling):
+ (WebCore::FrameView::isRubberBandInProgress):
+ (WebCore::FrameView::updatesScrollLayerPositionOnMainThread): Deleted.
+ * page/FrameView.h:
+ * page/scrolling/ScrollingCoordinator.cpp:
+ (WebCore::ScrollingCoordinator::updateSynchronousScrollingReasons):
+ (WebCore::ScrollingCoordinator::shouldUpdateScrollLayerPositionSynchronously):
+ * page/scrolling/ScrollingCoordinator.h:
+ * page/scrolling/mac/ScrollingCoordinatorMac.mm:
+ (WebCore::ScrollingCoordinatorMac::updateTiledScrollingIndicator):
+ * platform/ScrollableArea.h:
+ * platform/win/PopupMenuWin.h:
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::setupFontSubpixelQuantization):
+ * rendering/RenderLayer.h:
+ * rendering/RenderListBox.h:
+
+2016-05-02 Simon Fraser <[email protected]>
+
Add to the Animations log channel output about which properties are being blended
https://bugs.webkit.org/show_bug.cgi?id=157271
Modified: trunk/Source/WebCore/page/FrameView.cpp (200341 => 200342)
--- trunk/Source/WebCore/page/FrameView.cpp 2016-05-02 22:19:23 UTC (rev 200341)
+++ trunk/Source/WebCore/page/FrameView.cpp 2016-05-02 22:19:29 UTC (rev 200342)
@@ -970,7 +970,7 @@
// ScrollingCoordinator::isScrollSnapInProgress().
if (Page* page = frame().page()) {
if (ScrollingCoordinator* scrollingCoordinator = page->scrollingCoordinator()) {
- if (!scrollingCoordinator->shouldUpdateScrollLayerPositionSynchronously())
+ if (!scrollingCoordinator->shouldUpdateScrollLayerPositionSynchronously(*this))
return scrollingCoordinator->isScrollSnapInProgress();
}
}
@@ -2307,7 +2307,7 @@
if (!scrollingCoordinator->supportsFixedPositionLayers())
return true;
- if (scrollingCoordinator->shouldUpdateScrollLayerPositionSynchronously())
+ if (scrollingCoordinator->shouldUpdateScrollLayerPositionSynchronously(*this))
return true;
if (inProgrammaticScroll())
@@ -2340,7 +2340,7 @@
// ScrollingCoordinator::isRubberBandInProgress().
if (Page* page = frame().page()) {
if (ScrollingCoordinator* scrollingCoordinator = page->scrollingCoordinator()) {
- if (!scrollingCoordinator->shouldUpdateScrollLayerPositionSynchronously())
+ if (!scrollingCoordinator->shouldUpdateScrollLayerPositionSynchronously(*this))
return scrollingCoordinator->isRubberBandInProgress();
}
}
@@ -3527,16 +3527,6 @@
return page && page->focusController().isActive();
}
-bool FrameView::updatesScrollLayerPositionOnMainThread() const
-{
- if (Page* page = frame().page()) {
- if (ScrollingCoordinator* scrollingCoordinator = page->scrollingCoordinator())
- return scrollingCoordinator->shouldUpdateScrollLayerPositionSynchronously();
- }
-
- return true;
-}
-
bool FrameView::forceUpdateScrollbarsOnMainThreadForPerformanceTesting() const
{
Page* page = frame().page();
Modified: trunk/Source/WebCore/page/FrameView.h (200341 => 200342)
--- trunk/Source/WebCore/page/FrameView.h 2016-05-02 22:19:23 UTC (rev 200341)
+++ trunk/Source/WebCore/page/FrameView.h 2016-05-02 22:19:29 UTC (rev 200342)
@@ -486,7 +486,6 @@
#endif
bool isActive() const override;
- bool updatesScrollLayerPositionOnMainThread() const override;
bool forceUpdateScrollbarsOnMainThreadForPerformanceTesting() const override;
#if ENABLE(RUBBER_BANDING)
Modified: trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp (200341 => 200342)
--- trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp 2016-05-02 22:19:23 UTC (rev 200341)
+++ trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp 2016-05-02 22:19:29 UTC (rev 200342)
@@ -347,7 +347,7 @@
return synchronousScrollingReasons;
}
-void ScrollingCoordinator::updateSynchronousScrollingReasons(FrameView& frameView)
+void ScrollingCoordinator::updateSynchronousScrollingReasons(const FrameView& frameView)
{
// FIXME: Once we support async scrolling of iframes, we'll have to track the synchronous scrolling
// reasons per frame (maybe on scrolling tree nodes).
@@ -367,10 +367,11 @@
updateSynchronousScrollingReasons(*frameView);
}
-bool ScrollingCoordinator::shouldUpdateScrollLayerPositionSynchronously() const
+bool ScrollingCoordinator::shouldUpdateScrollLayerPositionSynchronously(const FrameView& frameView) const
{
- if (FrameView* frameView = m_page->mainFrame().view())
- return synchronousScrollingReasons(*frameView);
+ if (&frameView == m_page->mainFrame().view())
+ return synchronousScrollingReasons(frameView);
+
return true;
}
Modified: trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.h (200341 => 200342)
--- trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.h 2016-05-02 22:19:23 UTC (rev 200341)
+++ trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.h 2016-05-02 22:19:29 UTC (rev 200342)
@@ -195,7 +195,7 @@
};
SynchronousScrollingReasons synchronousScrollingReasons(const FrameView&) const;
- bool shouldUpdateScrollLayerPositionSynchronously() const;
+ bool shouldUpdateScrollLayerPositionSynchronously(const FrameView&) const;
virtual void willDestroyScrollableArea(ScrollableArea&) { }
virtual void scrollableAreaScrollLayerDidChange(ScrollableArea&) { }
@@ -227,7 +227,7 @@
virtual void setSynchronousScrollingReasons(SynchronousScrollingReasons) { }
virtual bool hasVisibleSlowRepaintViewportConstrainedObjects(const FrameView&) const;
- void updateSynchronousScrollingReasons(FrameView&);
+ void updateSynchronousScrollingReasons(const FrameView&);
Region absoluteNonFastScrollableRegionForFrame(const Frame&) const;
Modified: trunk/Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.mm (200341 => 200342)
--- trunk/Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.mm 2016-05-02 22:19:23 UTC (rev 200341)
+++ trunk/Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.mm 2016-05-02 22:19:29 UTC (rev 200342)
@@ -135,7 +135,7 @@
return;
ScrollingModeIndication indicatorMode;
- if (shouldUpdateScrollLayerPositionSynchronously())
+ if (shouldUpdateScrollLayerPositionSynchronously(*frameView))
indicatorMode = SynchronousScrollingBecauseOfStyleIndication;
else
indicatorMode = AsyncScrollingIndication;
Modified: trunk/Source/WebCore/platform/ScrollableArea.h (200341 => 200342)
--- trunk/Source/WebCore/platform/ScrollableArea.h 2016-05-02 22:19:23 UTC (rev 200341)
+++ trunk/Source/WebCore/platform/ScrollableArea.h 2016-05-02 22:19:29 UTC (rev 200342)
@@ -155,8 +155,6 @@
virtual IntRect scrollCornerRect() const = 0;
WEBCORE_EXPORT virtual void invalidateScrollCorner(const IntRect&);
- virtual bool updatesScrollLayerPositionOnMainThread() const = 0;
-
virtual bool forceUpdateScrollbarsOnMainThreadForPerformanceTesting() const = 0;
// Convert points and rects between the scrollbar and its containing view.
Modified: trunk/Source/WebCore/platform/win/PopupMenuWin.h (200341 => 200342)
--- trunk/Source/WebCore/platform/win/PopupMenuWin.h 2016-05-02 22:19:23 UTC (rev 200341)
+++ trunk/Source/WebCore/platform/win/PopupMenuWin.h 2016-05-02 22:19:29 UTC (rev 200342)
@@ -106,7 +106,6 @@
IntSize visibleSize() const override;
IntSize contentsSize() const override;
IntRect scrollableAreaBoundingBox(bool* = nullptr) const override;
- bool updatesScrollLayerPositionOnMainThread() const override { return true; }
bool forceUpdateScrollbarsOnMainThreadForPerformanceTesting() const override { return false; }
bool shouldPlaceBlockDirectionScrollbarOnLeft() const final { return false; }
Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (200341 => 200342)
--- trunk/Source/WebCore/rendering/RenderLayer.cpp 2016-05-02 22:19:23 UTC (rev 200341)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp 2016-05-02 22:19:29 UTC (rev 200342)
@@ -4024,7 +4024,7 @@
#if ENABLE(ASYNC_SCROLLING)
if (Page* page = renderer().frame().page()) {
if (ScrollingCoordinator* scrollingCoordinator = page->scrollingCoordinator())
- scrollingOnMainThread = scrollingCoordinator->shouldUpdateScrollLayerPositionSynchronously();
+ scrollingOnMainThread = scrollingCoordinator->shouldUpdateScrollLayerPositionSynchronously(renderer().view().frameView());
}
#endif
Modified: trunk/Source/WebCore/rendering/RenderLayer.h (200341 => 200342)
--- trunk/Source/WebCore/rendering/RenderLayer.h 2016-05-02 22:19:23 UTC (rev 200341)
+++ trunk/Source/WebCore/rendering/RenderLayer.h 2016-05-02 22:19:29 UTC (rev 200342)
@@ -883,7 +883,6 @@
bool shouldSuspendScrollAnimations() const override;
IntRect scrollableAreaBoundingBox(bool* isInsideFixed = nullptr) const override;
bool isRubberBandInProgress() const override;
- bool updatesScrollLayerPositionOnMainThread() const override { return true; }
bool forceUpdateScrollbarsOnMainThreadForPerformanceTesting() const override;
#if ENABLE(CSS_SCROLL_SNAP)
bool isScrollSnapInProgress() const override;
Modified: trunk/Source/WebCore/rendering/RenderListBox.h (200341 => 200342)
--- trunk/Source/WebCore/rendering/RenderListBox.h 2016-05-02 22:19:23 UTC (rev 200341)
+++ trunk/Source/WebCore/rendering/RenderListBox.h 2016-05-02 22:19:29 UTC (rev 200342)
@@ -131,7 +131,6 @@
IntPoint lastKnownMousePosition() const override;
bool isHandlingWheelEvent() const override;
bool shouldSuspendScrollAnimations() const override;
- bool updatesScrollLayerPositionOnMainThread() const override { return true; }
bool forceUpdateScrollbarsOnMainThreadForPerformanceTesting() const override;
ScrollableArea* enclosingScrollableArea() const override;
Modified: trunk/Source/WebKit2/ChangeLog (200341 => 200342)
--- trunk/Source/WebKit2/ChangeLog 2016-05-02 22:19:23 UTC (rev 200341)
+++ trunk/Source/WebKit2/ChangeLog 2016-05-02 22:19:29 UTC (rev 200342)
@@ -1,3 +1,14 @@
+2016-05-02 Simon Fraser <[email protected]>
+
+ Fix shouldUpdateScrollLayerPositionSynchronously() for non-main frames. Remove updatesScrollLayerPositionOnMainThread()
+ https://bugs.webkit.org/show_bug.cgi?id=157277
+
+ Reviewed by Dean Jackson, Tim Horton.
+
+ Remove updatesScrollLayerPositionOnMainThread() which is unused by all ports.
+
+ * WebProcess/Plugins/PDF/DeprecatedPDFPlugin.h:
+
2016-05-02 Alex Christensen <[email protected]>
Crash if a certificate chain has null certificates
Modified: trunk/Source/WebKit2/WebProcess/Plugins/PDF/DeprecatedPDFPlugin.h (200341 => 200342)
--- trunk/Source/WebKit2/WebProcess/Plugins/PDF/DeprecatedPDFPlugin.h 2016-05-02 22:19:23 UTC (rev 200341)
+++ trunk/Source/WebKit2/WebProcess/Plugins/PDF/DeprecatedPDFPlugin.h 2016-05-02 22:19:29 UTC (rev 200342)
@@ -213,7 +213,6 @@
WebCore::IntRect convertFromContainingViewToScrollbar(const WebCore::Scrollbar&, const WebCore::IntRect& parentRect) const override;
WebCore::IntPoint convertFromScrollbarToContainingView(const WebCore::Scrollbar&, const WebCore::IntPoint& scrollbarPoint) const override;
WebCore::IntPoint convertFromContainingViewToScrollbar(const WebCore::Scrollbar&, const WebCore::IntPoint& parentPoint) const override;
- bool updatesScrollLayerPositionOnMainThread() const override { return true; }
bool forceUpdateScrollbarsOnMainThreadForPerformanceTesting() const override;
// PDFPlugin functions.