WebKit Bugzilla
Attachment 372246 Details for
Bug 198917
: Convert macOS to scroll by changing layer boundsOrigin
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-198917-20190617083848.patch (text/plain), 30.51 KB, created by
Simon Fraser (smfr)
on 2019-06-17 08:38:50 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Simon Fraser (smfr)
Created:
2019-06-17 08:38:50 PDT
Size:
30.51 KB
patch
obsolete
>Subversion Revision: 246343 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index af84a73cea5c09eafbbb0f17878cd7954a5e51e5..b57995c8e1770b19248989e5c5458c025ed4d43a 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,49 @@ >+2019-06-17 Simon Fraser <simon.fraser@apple.com> >+ >+ Convert macOS to scroll by changing layer boundsOrigin >+ https://bugs.webkit.org/show_bug.cgi?id=198917 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ macOS did frame and overflow scrolling by changing the position of the scrolled >+ contents layer. iOS scrolls by changing the boundsOrigin of the scrollContainer layer >+ (which it has to, to match how UIScrollView works). >+ >+ The iOS approach removes the need for an extra layer whose only role is for >+ scroll positioning, so migrate macOS to the same approach. A later patch can remove >+ m_scrolledContentsLayer. >+ >+ * page/scrolling/AsyncScrollingCoordinator.cpp: >+ (WebCore::AsyncScrollingCoordinator::reconcileScrollPosition): >+ * page/scrolling/ScrollingCoordinator.cpp: >+ (WebCore::ScrollingCoordinator::insetClipLayerForFrameView): >+ * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm: >+ (WebCore::ScrollingTreeFrameScrollingNodeMac::repositionScrollingLayers): >+ * page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm: >+ (WebCore::ScrollingTreeOverflowScrollingNodeMac::repositionScrollingLayers): >+ * platform/graphics/cocoa/WebCoreCALayerExtras.h: >+ * platform/graphics/cocoa/WebCoreCALayerExtras.mm: >+ (-[CALayer _web_setLayerBoundsOrigin:]): >+ * rendering/RenderLayerBacking.cpp: >+ (WebCore::RenderLayerBacking::updateGeometry): >+ (WebCore::RenderLayerBacking::setLocationOfScrolledContents): >+ (WebCore::RenderLayerBacking::updateScrollOffset): >+ * rendering/RenderLayerCompositor.cpp: >+ (WebCore::RenderLayerCompositor::~RenderLayerCompositor): >+ (WebCore::RenderLayerCompositor::flushPendingLayerChanges): >+ (WebCore::RenderLayerCompositor::frameViewDidChangeSize): >+ (WebCore::RenderLayerCompositor::updateLayersForScrollPosition): >+ (WebCore::RenderLayerCompositor::updateScrollContainerGeometry): >+ (WebCore::RenderLayerCompositor::frameViewDidScroll): >+ (WebCore::RenderLayerCompositor::updateRootLayerPosition): >+ (WebCore::RenderLayerCompositor::updateOverflowControlsLayers): >+ (WebCore::RenderLayerCompositor::ensureRootLayer): >+ (WebCore::RenderLayerCompositor::destroyRootLayer): >+ (WebCore::RenderLayerCompositor::updateScrollingNodeLayers): >+ (WebCore::RenderLayerCompositor::updateScrollLayerPosition): Deleted. >+ (WebCore::RenderLayerCompositor::updateScrollLayerClipping): Deleted. >+ * rendering/RenderLayerCompositor.h: >+ > 2019-06-15 Simon Fraser <simon.fraser@apple.com> > > Implement ScrollableArea::scrollOffset() >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index e91e3861e6213e8709af835e9ae8f6aacdb79dc7..1711704cf268d901957b0ab334365e82baf30ef2 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,15 @@ >+2019-06-17 Simon Fraser <simon.fraser@apple.com> >+ >+ Convert macOS to scroll by changing layer boundsOrigin >+ https://bugs.webkit.org/show_bug.cgi?id=198917 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Remove unreached and confusing code. >+ >+ * UIProcess/RemoteLayerTree/ios/ScrollingTreeFrameScrollingNodeRemoteIOS.mm: >+ (WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::repositionScrollingLayers): >+ > 2019-06-15 Simon Fraser <simon.fraser@apple.com> > > Implement ScrollableArea::scrollOffset() >diff --git a/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp b/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp >index d5e447bf256de70f9d980ceaf0636dc4a9194e26..012f7805b8df90d9dd9617f48b7a54d29533f27e 100644 >--- a/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp >+++ b/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp >@@ -446,24 +446,13 @@ void AsyncScrollingCoordinator::reconcileScrollingState(FrameView& frameView, co > > void AsyncScrollingCoordinator::reconcileScrollPosition(FrameView& frameView, ScrollingLayerPositionAction scrollingLayerPositionAction) > { >-#if PLATFORM(IOS_FAMILY) >- // Doing all scrolling like this (UIScrollView style) would simplify code. > auto* scrollContainerLayer = scrollContainerLayerForFrameView(frameView); > if (!scrollContainerLayer) > return; > if (scrollingLayerPositionAction == ScrollingLayerPositionAction::Set) >- scrollContainerLayer->setBoundsOrigin(frameView.scrollPosition()); >+ scrollContainerLayer->setBoundsOrigin(frameView.scrollPosition()); // offset? > else > scrollContainerLayer->syncBoundsOrigin(frameView.scrollPosition()); >-#else >- auto* scrolledContentsLayer = scrolledContentsLayerForFrameView(frameView); >- if (!scrolledContentsLayer) >- return; >- if (scrollingLayerPositionAction == ScrollingLayerPositionAction::Set) >- scrolledContentsLayer->setPosition(-frameView.scrollPosition()); >- else >- scrolledContentsLayer->syncPosition(-frameView.scrollPosition()); >-#endif > } > > void AsyncScrollingCoordinator::scrollableAreaScrollbarLayerDidChange(ScrollableArea& scrollableArea, ScrollbarOrientation orientation) >diff --git a/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp b/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp >index 9290b8b475ca94cd6512d4beeeb29170c7690ef9..c0685e2ff506872ac60013e4aa34bc1cb15c5eb4 100644 >--- a/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp >+++ b/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp >@@ -272,7 +272,7 @@ GraphicsLayer* ScrollingCoordinator::counterScrollingLayerForFrameView(FrameView > GraphicsLayer* ScrollingCoordinator::insetClipLayerForFrameView(FrameView& frameView) > { > if (auto* renderView = frameView.frame().contentRenderer()) >- return renderView->compositor().clipLayer(); >+ return renderView->compositor().scrollContainerLayer(); > return nullptr; > } > >diff --git a/Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm b/Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm >index 1477441cb3e29f3e492ee5901266a311ec8cd8f3..cf6d06d8574ee08453086377d63e726acccd94f9 100644 >--- a/Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm >+++ b/Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm >@@ -199,7 +199,8 @@ void ScrollingTreeFrameScrollingNodeMac::currentScrollPositionChanged() > > void ScrollingTreeFrameScrollingNodeMac::repositionScrollingLayers() > { >- scrolledContentsLayer().position = -currentScrollPosition(); >+ // We use scroll position here because the root content layer is offset to account for scrollOrigin (see FrameView::positionForRootContentLayer). >+ [scrollContainerLayer() _web_setLayerBoundsOrigin:currentScrollPosition()]; > } > > void ScrollingTreeFrameScrollingNodeMac::repositionRelatedLayers() >diff --git a/Source/WebCore/page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm b/Source/WebCore/page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm >index d15fa947857225c7bc1b3e4bfdda47f9fcd191d2..9b101f215bd45035ec134a1ba2c2a3968f980f6c 100644 >--- a/Source/WebCore/page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm >+++ b/Source/WebCore/page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm >@@ -91,7 +91,9 @@ FloatPoint ScrollingTreeOverflowScrollingNodeMac::adjustedScrollPosition(const F > void ScrollingTreeOverflowScrollingNodeMac::repositionScrollingLayers() > { > auto scrollOffset = ScrollableArea::scrollOffsetFromPosition(currentScrollPosition(), toFloatSize(scrollOrigin())); >- scrolledContentsLayer().position = -scrollOffset; >+ auto bounds = scrollContainerLayer().bounds; >+ bounds.origin = scrollOffset; >+ scrollContainerLayer().bounds = bounds; > } > > void ScrollingTreeOverflowScrollingNodeMac::repositionRelatedLayers() >diff --git a/Source/WebCore/platform/graphics/cocoa/WebCoreCALayerExtras.h b/Source/WebCore/platform/graphics/cocoa/WebCoreCALayerExtras.h >index ce684d2d4722f1db799ceb1b1383f5fb18f6b2dc..f656eda2d38dc93ad8c7690b478559a46b607633 100644 >--- a/Source/WebCore/platform/graphics/cocoa/WebCoreCALayerExtras.h >+++ b/Source/WebCore/platform/graphics/cocoa/WebCoreCALayerExtras.h >@@ -28,6 +28,7 @@ > @interface CALayer (WebCoreCALayerExtras) > > - (void)web_disableAllActions; >+- (void)_web_setLayerBoundsOrigin:(CGPoint)origin; > - (void)_web_setLayerTopLeftPosition:(CGPoint)position; > + (CALayer *)_web_renderLayerWithContextID:(uint32_t)contextID; > >diff --git a/Source/WebCore/platform/graphics/cocoa/WebCoreCALayerExtras.mm b/Source/WebCore/platform/graphics/cocoa/WebCoreCALayerExtras.mm >index 74ec0538d8e24f5e0c2dd8605f313305a1ee1a7e..23bb0de9160dcb867d223203538ad5e7e32f5008 100644 >--- a/Source/WebCore/platform/graphics/cocoa/WebCoreCALayerExtras.mm >+++ b/Source/WebCore/platform/graphics/cocoa/WebCoreCALayerExtras.mm >@@ -56,6 +56,13 @@ - (void)web_disableAllActions > }; > } > >+- (void)_web_setLayerBoundsOrigin:(CGPoint)origin >+{ >+ CGRect bounds = [self bounds]; >+ bounds.origin = origin; >+ [self setBounds:bounds]; >+} >+ > - (void)_web_setLayerTopLeftPosition:(CGPoint)position > { > CGSize layerSize = [self bounds].size; >diff --git a/Source/WebCore/rendering/RenderLayerBacking.cpp b/Source/WebCore/rendering/RenderLayerBacking.cpp >index e3b6694820433942ed4c16a8a81b57ac13bf0a8e..1a1fa5cae6010c4c1fb10f797bbc3d5239ddb8be 100644 >--- a/Source/WebCore/rendering/RenderLayerBacking.cpp >+++ b/Source/WebCore/rendering/RenderLayerBacking.cpp >@@ -1225,9 +1225,6 @@ void RenderLayerBacking::updateGeometry() > > ScrollOffset scrollOffset = m_owningLayer.scrollOffset(); > updateScrollOffset(scrollOffset); >-#if PLATFORM(IOS_FAMILY) >- m_scrolledContentsLayer->setPosition({ }); // FIXME: necessary? >-#endif > > FloatSize oldScrollingLayerOffset = m_scrollContainerLayer->offsetFromRenderer(); > m_scrollContainerLayer->setOffsetFromRenderer(toFloatSize(paddingBoxIncludingScrollbar.location())); >@@ -1306,17 +1303,10 @@ void RenderLayerBacking::updateGeometry() > > void RenderLayerBacking::setLocationOfScrolledContents(ScrollOffset scrollOffset, ScrollingLayerPositionAction setOrSync) > { >-#if PLATFORM(IOS_FAMILY) > if (setOrSync == ScrollingLayerPositionAction::Sync) > m_scrollContainerLayer->syncBoundsOrigin(scrollOffset); > else > m_scrollContainerLayer->setBoundsOrigin(scrollOffset); >-#else >- if (setOrSync == ScrollingLayerPositionAction::Sync) >- m_scrolledContentsLayer->syncPosition(-scrollOffset); >- else >- m_scrolledContentsLayer->setPosition(-scrollOffset); >-#endif > } > > void RenderLayerBacking::updateScrollOffset(ScrollOffset scrollOffset) >@@ -1330,6 +1320,8 @@ void RenderLayerBacking::updateScrollOffset(ScrollOffset scrollOffset) > setLocationOfScrolledContents(scrollOffset, ScrollingLayerPositionAction::Set); > m_owningLayer.setRequiresScrollPositionReconciliation(false); > } >+ >+ ASSERT(m_scrolledContentsLayer->position().isZero()); > } > > void RenderLayerBacking::updateAfterDescendants() >diff --git a/Source/WebCore/rendering/RenderLayerCompositor.cpp b/Source/WebCore/rendering/RenderLayerCompositor.cpp >index a4084056033fd289a63783b459eeff47a6a531e3..28273db8898ddf17a7102ada8798714afc5d8569 100644 >--- a/Source/WebCore/rendering/RenderLayerCompositor.cpp >+++ b/Source/WebCore/rendering/RenderLayerCompositor.cpp >@@ -301,7 +301,6 @@ RenderLayerCompositor::~RenderLayerCompositor() > // Take care that the owned GraphicsLayers are deleted first as their destructors may call back here. > GraphicsLayer::unparentAndClear(m_rootContentsLayer); > >- GraphicsLayer::unparentAndClear(m_clipLayer); > GraphicsLayer::unparentAndClear(m_scrollContainerLayer); > GraphicsLayer::unparentAndClear(m_scrolledContentsLayer); > >@@ -521,7 +520,7 @@ void RenderLayerCompositor::flushPendingLayerChanges(bool isFlushRoot) > #if ENABLE(TREE_DEBUGGING) > if (layersLogEnabled()) { > LOG(Layers, "RenderLayerCompositor::flushPendingLayerChanges"); >- showGraphicsLayerTree(m_rootContentsLayer.get()); >+ showGraphicsLayerTree(m_overflowControlsHostLayer.get()); > } > #endif > } >@@ -1969,7 +1968,7 @@ void RenderLayerCompositor::frameViewDidChangeSize() > layer->setNeedsCompositingGeometryUpdate(); > > if (m_scrolledContentsLayer) { >- updateScrollLayerClipping(); >+ updateScrollContainerGeometry(); > frameViewDidScroll(); > updateOverflowControlsLayers(); > >@@ -1989,28 +1988,26 @@ bool RenderLayerCompositor::hasCoordinatedScrolling() const > return scrollingCoordinator && scrollingCoordinator->coordinatesScrollingForFrameView(m_renderView.frameView()); > } > >-void RenderLayerCompositor::updateScrollLayerPosition() >+void RenderLayerCompositor::updateLayersForScrollPosition() > { > ASSERT(!hasCoordinatedScrolling()); >- ASSERT(m_scrolledContentsLayer); >+ ASSERT(m_scrollContainerLayer); > > auto& frameView = m_renderView.frameView(); >- IntPoint scrollPosition = frameView.scrollPosition(); >- >- m_scrolledContentsLayer->setPosition(FloatPoint(-scrollPosition.x(), -scrollPosition.y())); >+ // We use scroll position here because the root content layer is offset to account for scrollOrigin (see FrameView::positionForRootContentLayer). >+ m_scrollContainerLayer->setBoundsOrigin(frameView.scrollPosition()); > > if (auto* fixedBackgroundLayer = fixedRootBackgroundLayer()) > fixedBackgroundLayer->setPosition(frameView.scrollPositionForFixedPosition()); > } > >-void RenderLayerCompositor::updateScrollLayerClipping() >+void RenderLayerCompositor::updateScrollContainerGeometry() > { >- auto* layerForClipping = this->layerForClipping(); >- if (!layerForClipping) >+ if (!m_scrollContainerLayer) > return; > >- layerForClipping->setSize(m_renderView.frameView().sizeForVisibleContent()); >- layerForClipping->setPosition(positionForClipLayer()); >+ m_scrollContainerLayer->setSize(m_renderView.frameView().sizeForVisibleContent()); >+ m_scrollContainerLayer->setPosition(positionForClipLayer()); > } > > FloatPoint RenderLayerCompositor::positionForClipLayer() const >@@ -2035,7 +2032,7 @@ void RenderLayerCompositor::frameViewDidScroll() > return; > } > >- updateScrollLayerPosition(); >+ updateLayersForScrollPosition(); > } > > void RenderLayerCompositor::frameViewDidAddOrRemoveScrollbars() >@@ -2252,10 +2249,10 @@ void RenderLayerCompositor::updateRootLayerPosition() > if (m_rootContentsLayer) { > m_rootContentsLayer->setSize(m_renderView.frameView().contentsSize()); > m_rootContentsLayer->setPosition(m_renderView.frameView().positionForRootContentLayer()); >- m_rootContentsLayer->setAnchorPoint(FloatPoint3D()); >+ m_rootContentsLayer->setAnchorPoint({ }); > } > >- updateScrollLayerClipping(); >+ updateScrollContainerGeometry(); > > #if ENABLE(RUBBER_BANDING) > if (m_contentShadowLayer && m_rootContentsLayer) { >@@ -3680,7 +3677,7 @@ void RenderLayerCompositor::updateOverflowControlsLayers() > > // We want the overhang areas layer to be positioned below the frame contents, > // so insert it below the clip layer. >- m_overflowControlsHostLayer->addChildBelow(*m_layerForOverhangAreas, layerForClipping()); >+ m_overflowControlsHostLayer->addChildBelow(*m_layerForOverhangAreas, m_scrollContainerLayer.get()); > } > } else > GraphicsLayer::unparentAndClear(m_layerForOverhangAreas); >@@ -3770,7 +3767,7 @@ void RenderLayerCompositor::ensureRootLayer() > m_rootContentsLayer->setName("content root"); > IntRect overflowRect = snappedIntRect(m_renderView.layoutOverflowRect()); > m_rootContentsLayer->setSize(FloatSize(overflowRect.maxX(), overflowRect.maxY())); >- m_rootContentsLayer->setPosition(FloatPoint()); >+ m_rootContentsLayer->setPosition({ }); > > #if PLATFORM(IOS_FAMILY) > // Page scale is applied above this on iOS, so we'll just say that our root layer applies it. >@@ -3786,52 +3783,35 @@ void RenderLayerCompositor::ensureRootLayer() > if (requiresScrollLayer(expectedAttachment)) { > if (!m_overflowControlsHostLayer) { > ASSERT(!m_scrolledContentsLayer); >- ASSERT(!m_clipLayer); > > // Create a layer to host the clipping layer and the overflow controls layers. > m_overflowControlsHostLayer = GraphicsLayer::create(graphicsLayerFactory(), *this); > m_overflowControlsHostLayer->setName("overflow controls host"); > >+ m_scrollContainerLayer = GraphicsLayer::create(graphicsLayerFactory(), *this, GraphicsLayer::Type::ScrollContainer); >+ m_scrollContainerLayer->setName("scroll container"); >+ m_scrollContainerLayer->setMasksToBounds(true); >+ m_scrollContainerLayer->setAnchorPoint({ }); >+ > m_scrolledContentsLayer = GraphicsLayer::create(graphicsLayerFactory(), *this, GraphicsLayer::Type::ScrolledContents); > m_scrolledContentsLayer->setName("scrolled contents"); > m_scrolledContentsLayer->setAnchorPoint({ }); > >-#if PLATFORM(IOS_FAMILY) >- if (m_renderView.settings().asyncFrameScrollingEnabled()) { >- m_scrollContainerLayer = GraphicsLayer::create(graphicsLayerFactory(), *this, GraphicsLayer::Type::ScrollContainer); >- >- m_scrollContainerLayer->setName("scroll container"); >- m_scrollContainerLayer->setMasksToBounds(true); >- m_scrollContainerLayer->setAnchorPoint({ }); >- >- m_scrollContainerLayer->addChild(*m_scrolledContentsLayer); >- m_overflowControlsHostLayer->addChild(*m_scrollContainerLayer); >- } >-#endif >- if (!m_scrollContainerLayer) { >- m_clipLayer = GraphicsLayer::create(graphicsLayerFactory(), *this); >- m_clipLayer->setName("frame clipping"); >- m_clipLayer->setMasksToBounds(true); >- m_clipLayer->setAnchorPoint({ }); >- >- m_clipLayer->addChild(*m_scrolledContentsLayer); >- m_overflowControlsHostLayer->addChild(*m_clipLayer); >- } >- >+ m_overflowControlsHostLayer->addChild(*m_scrollContainerLayer); >+ m_scrollContainerLayer->addChild(*m_scrolledContentsLayer); > m_scrolledContentsLayer->addChild(*m_rootContentsLayer); > >- updateScrollLayerClipping(); >+ updateScrollContainerGeometry(); > updateOverflowControlsLayers(); > > if (hasCoordinatedScrolling()) > scheduleLayerFlush(true); > else >- updateScrollLayerPosition(); >+ updateLayersForScrollPosition(); > } > } else { > if (m_overflowControlsHostLayer) { > GraphicsLayer::unparentAndClear(m_overflowControlsHostLayer); >- GraphicsLayer::unparentAndClear(m_clipLayer); > GraphicsLayer::unparentAndClear(m_scrollContainerLayer); > GraphicsLayer::unparentAndClear(m_scrolledContentsLayer); > } >@@ -3878,7 +3858,6 @@ void RenderLayerCompositor::destroyRootLayer() > > if (m_overflowControlsHostLayer) { > GraphicsLayer::unparentAndClear(m_overflowControlsHostLayer); >- GraphicsLayer::unparentAndClear(m_clipLayer); > GraphicsLayer::unparentAndClear(m_scrollContainerLayer); > GraphicsLayer::unparentAndClear(m_scrolledContentsLayer); > } >@@ -4318,7 +4297,7 @@ void RenderLayerCompositor::updateScrollingNodeLayers(ScrollingNodeID nodeID, Re > FrameView& frameView = m_renderView.frameView(); > scrollingCoordinator.setNodeLayers(nodeID, { nullptr, > scrollContainerLayer(), scrolledContentsLayer(), >- fixedRootBackgroundLayer(), clipLayer(), rootContentsLayer(), >+ fixedRootBackgroundLayer(), nullptr, rootContentsLayer(), > frameView.layerForHorizontalScrollbar(), frameView.layerForVerticalScrollbar() }); > } else { > auto& backing = *layer.backing(); >diff --git a/Source/WebCore/rendering/RenderLayerCompositor.h b/Source/WebCore/rendering/RenderLayerCompositor.h >index 9134779bf094a39aeb8583ddd03e2bc5a83d28d4..fe8d75c44a56ddf522783d26e708c85d83a5fac0 100644 >--- a/Source/WebCore/rendering/RenderLayerCompositor.h >+++ b/Source/WebCore/rendering/RenderLayerCompositor.h >@@ -246,11 +246,8 @@ public: > > GraphicsLayer* scrollContainerLayer() const { return m_scrollContainerLayer.get(); } > GraphicsLayer* scrolledContentsLayer() const { return m_scrolledContentsLayer.get(); } >- GraphicsLayer* clipLayer() const { return m_clipLayer.get(); } > GraphicsLayer* rootContentsLayer() const { return m_rootContentsLayer.get(); } > >- GraphicsLayer* layerForClipping() const { return m_clipLayer ? m_clipLayer.get() : m_scrollContainerLayer.get(); } >- > #if ENABLE(RUBBER_BANDING) > GraphicsLayer* headerLayer() const { return m_layerForHeader.get(); } > GraphicsLayer* footerLayer() const { return m_layerForFooter.get(); } >@@ -440,8 +437,8 @@ private: > > void updateOverflowControlsLayers(); > >- void updateScrollLayerPosition(); >- void updateScrollLayerClipping(); >+ void updateLayersForScrollPosition(); >+ void updateScrollContainerGeometry(); > > FloatPoint positionForClipLayer() const; > >@@ -574,7 +571,6 @@ private: > RefPtr<GraphicsLayer> m_rootContentsLayer; > > // Enclosing clipping layer for iframe content >- RefPtr<GraphicsLayer> m_clipLayer; > RefPtr<GraphicsLayer> m_scrollContainerLayer; > RefPtr<GraphicsLayer> m_scrolledContentsLayer; > >diff --git a/Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeFrameScrollingNodeRemoteIOS.mm b/Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeFrameScrollingNodeRemoteIOS.mm >index 1136fc962b44a962355f227217b3d1e752ef0970..f47548ad3a127100608511c0ded570ab422e603e 100644 >--- a/Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeFrameScrollingNodeRemoteIOS.mm >+++ b/Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeFrameScrollingNodeRemoteIOS.mm >@@ -121,10 +121,8 @@ void ScrollingTreeFrameScrollingNodeRemoteIOS::repositionScrollingLayers() > m_scrollingNodeDelegate->repositionScrollingLayers(); > return; > } >- >- auto scrollPosition = currentScrollPosition(); >- // FIXME: This is always wrong on iOS. Maybe assert that we always have a delegate. >- [scrolledContentsLayer() setPosition:-scrollPosition]; >+ >+ ASSERT_NOT_REACHED(); > } > > void ScrollingTreeFrameScrollingNodeRemoteIOS::repositionRelatedLayers() >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 2bdb40660a5b90eef746a752cf35a6f291edbc04..f8ed3085a2ce75b7225f06fc3d154eb14ef43dca 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,18 @@ >+2019-06-17 Simon Fraser <simon.fraser@apple.com> >+ >+ Convert macOS to scroll by changing layer boundsOrigin >+ https://bugs.webkit.org/show_bug.cgi?id=198917 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * compositing/iframes/scrolling-iframe-expected.txt: >+ * compositing/overflow/textarea-scroll-touch-expected.txt: >+ * compositing/repaint/iframes/compositing-iframe-scroll-repaint-expected.txt: >+ * compositing/repaint/iframes/compositing-iframe-with-fixed-background-doc-repaint-expected.txt: >+ * compositing/repaint/scroller-with-foreground-layer-repaints-expected.txt: >+ * compositing/rtl/rtl-scrolling-with-transformed-descendants-expected.txt: >+ * scrollingcoordinator/scrolling-tree/fixed-inside-frame-expected.txt: >+ > 2019-06-11 Commit Queue <commit-queue@webkit.org> > > Unreviewed, rolling out r246320. >diff --git a/LayoutTests/compositing/iframes/scrolling-iframe-expected.txt b/LayoutTests/compositing/iframes/scrolling-iframe-expected.txt >index f1db5140dd68ca681887410a48729573ce8753a4..8b849e9fa28dd7eb2764ab330f6ce8f03a30773f 100644 >--- a/LayoutTests/compositing/iframes/scrolling-iframe-expected.txt >+++ b/LayoutTests/compositing/iframes/scrolling-iframe-expected.txt >@@ -16,11 +16,11 @@ > (position 43.00 43.00) > (children 1 > (GraphicsLayer >+ (bounds origin 80.00 80.00) > (anchor 0.00 0.00) > (bounds 285.00 135.00) > (children 1 > (GraphicsLayer >- (position -80.00 -80.00) > (anchor 0.00 0.00) > (children 1 > (GraphicsLayer >diff --git a/LayoutTests/compositing/overflow/textarea-scroll-touch-expected.txt b/LayoutTests/compositing/overflow/textarea-scroll-touch-expected.txt >index ab91eeecc8cc9c06373645c62290cb9563f998db..30f54271ad0a55a2fac32dcf6da805975eb5eb02 100644 >--- a/LayoutTests/compositing/overflow/textarea-scroll-touch-expected.txt >+++ b/LayoutTests/compositing/overflow/textarea-scroll-touch-expected.txt >@@ -16,12 +16,12 @@ > (GraphicsLayer > (offsetFromRenderer width=1 height=1) > (position 1.00 1.00) >+ (bounds origin 0.00 50.00) > (bounds 189.00 124.00) > (children 1 > (GraphicsLayer > (offsetFromRenderer width=1 height=1) > (scrollOffset (0,50)) >- (position 0.00 -50.00) > (anchor 0.00 0.00) > (bounds 189.00 270.00) > (drawsContent 1) >@@ -39,12 +39,12 @@ > (GraphicsLayer > (offsetFromRenderer width=1 height=1) > (position 1.00 1.00) >+ (bounds origin 0.00 50.00) > (bounds 189.00 124.00) > (children 1 > (GraphicsLayer > (offsetFromRenderer width=1 height=1) > (scrollOffset (0,50)) >- (position 0.00 -50.00) > (anchor 0.00 0.00) > (bounds 189.00 270.00) > (drawsContent 1) >diff --git a/LayoutTests/compositing/repaint/iframes/compositing-iframe-scroll-repaint-expected.txt b/LayoutTests/compositing/repaint/iframes/compositing-iframe-scroll-repaint-expected.txt >index 16ffe62aa99bbab84df308f4c99f31a3a8104961..5351ea70d51428db347fedaa58b4a9a13f493103 100644 >--- a/LayoutTests/compositing/repaint/iframes/compositing-iframe-scroll-repaint-expected.txt >+++ b/LayoutTests/compositing/repaint/iframes/compositing-iframe-scroll-repaint-expected.txt >@@ -17,11 +17,11 @@ > (position 16.00 16.00) > (children 1 > (GraphicsLayer >+ (bounds origin 0.00 100.00) > (anchor 0.00 0.00) > (bounds 400.00 300.00) > (children 1 > (GraphicsLayer >- (position 0.00 -100.00) > (anchor 0.00 0.00) > (children 1 > (GraphicsLayer >diff --git a/LayoutTests/compositing/repaint/iframes/compositing-iframe-with-fixed-background-doc-repaint-expected.txt b/LayoutTests/compositing/repaint/iframes/compositing-iframe-with-fixed-background-doc-repaint-expected.txt >index b3af98c3444d2198de8f924b2a4456f26a22c039..3a3eda3247bf8b25b49c63c1a8bbd0ff8f6f8ebd 100644 >--- a/LayoutTests/compositing/repaint/iframes/compositing-iframe-with-fixed-background-doc-repaint-expected.txt >+++ b/LayoutTests/compositing/repaint/iframes/compositing-iframe-with-fixed-background-doc-repaint-expected.txt >@@ -17,11 +17,11 @@ > (position 16.00 16.00) > (children 1 > (GraphicsLayer >+ (bounds origin 0.00 100.00) > (anchor 0.00 0.00) > (bounds 400.00 300.00) > (children 1 > (GraphicsLayer >- (position 0.00 -100.00) > (anchor 0.00 0.00) > (children 1 > (GraphicsLayer >diff --git a/LayoutTests/compositing/repaint/scroller-with-foreground-layer-repaints-expected.txt b/LayoutTests/compositing/repaint/scroller-with-foreground-layer-repaints-expected.txt >index 871c0c63d02c6ae3d9f164986b61cefee6d0c655..6e4c878b3cfd8b125ca12b5c98adb5a177ca57a1 100644 >--- a/LayoutTests/compositing/repaint/scroller-with-foreground-layer-repaints-expected.txt >+++ b/LayoutTests/compositing/repaint/scroller-with-foreground-layer-repaints-expected.txt >@@ -20,12 +20,12 @@ Scrolled contents > (GraphicsLayer > (offsetFromRenderer width=1 height=1) > (position 1.00 1.00) >+ (bounds origin 0.00 200.00) > (bounds 305.00 305.00) > (children 1 > (GraphicsLayer > (offsetFromRenderer width=1 height=1) > (scrollOffset (0,200)) >- (position 0.00 -200.00) > (anchor 0.00 0.00) > (bounds 305.00 1020.00) > (drawsContent 1) >diff --git a/LayoutTests/compositing/rtl/rtl-scrolling-with-transformed-descendants-expected.txt b/LayoutTests/compositing/rtl/rtl-scrolling-with-transformed-descendants-expected.txt >index c70ede2616ee69470b1073b97b8ed4a5c45a4483..78d6316946ef3f931faa0ab7f999b336332091f6 100644 >--- a/LayoutTests/compositing/rtl/rtl-scrolling-with-transformed-descendants-expected.txt >+++ b/LayoutTests/compositing/rtl/rtl-scrolling-with-transformed-descendants-expected.txt >@@ -15,12 +15,12 @@ > (GraphicsLayer > (offsetFromRenderer width=2 height=2) > (position 2.00 2.00) >+ (bounds origin 366.00 0.00) > (bounds 400.00 204.00) > (children 1 > (GraphicsLayer > (offsetFromRenderer width=2 height=2) > (scrollOffset (366,0)) >- (position -366.00 0.00) > (anchor 0.00 0.00) > (bounds 766.00 204.00) > (drawsContent 1) >diff --git a/LayoutTests/scrollingcoordinator/scrolling-tree/fixed-inside-frame-expected.txt b/LayoutTests/scrollingcoordinator/scrolling-tree/fixed-inside-frame-expected.txt >index 84560dfb7d956ea1fb317f596d0616ad468969fc..dd7e0867b8f1c7349f9a66162301297c54ef5905 100644 >--- a/LayoutTests/scrollingcoordinator/scrolling-tree/fixed-inside-frame-expected.txt >+++ b/LayoutTests/scrollingcoordinator/scrolling-tree/fixed-inside-frame-expected.txt >@@ -65,11 +65,11 @@ > (position 12.00 12.00) > (children 1 > (GraphicsLayer >+ (bounds origin 0.00 120.00) > (anchor 0.00 0.00) > (bounds 465.00 400.00) > (children 1 > (GraphicsLayer >- (position 0.00 -120.00) > (anchor 0.00 0.00) > (children 1 > (GraphicsLayer
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 198917
:
372246
|
372251
|
372252
|
372254
|
372255
|
372276
|
372284
|
372285
|
372302
|
372311
|
372317
|
372322