Changeset 246603 in webkit
- Timestamp:
- Jun 19, 2019, 12:00:49 PM (7 years ago)
- Location:
- tags/Safari-608.1.30
- Files:
-
- 29 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/compositing/iframes/scrolling-iframe-expected.txt (modified) (1 diff)
-
LayoutTests/compositing/overflow/textarea-scroll-touch-expected.txt (modified) (4 diffs)
-
LayoutTests/compositing/repaint/iframes/compositing-iframe-scroll-repaint-expected.txt (modified) (1 diff)
-
LayoutTests/compositing/repaint/iframes/compositing-iframe-with-fixed-background-doc-repaint-expected.txt (modified) (1 diff)
-
LayoutTests/compositing/repaint/scroller-with-foreground-layer-repaints-expected.txt (modified) (2 diffs)
-
LayoutTests/compositing/rtl/rtl-scrolling-with-transformed-descendants-expected.txt (modified) (2 diffs)
-
LayoutTests/platform/ios-wk2/compositing/iframes/scrolling-iframe-expected.txt (modified) (1 diff)
-
LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/fixed-inside-frame-expected.txt (modified) (1 diff)
-
LayoutTests/platform/mac-highsierra-wk1/compositing/repaint/iframes/compositing-iframe-scroll-repaint-expected.txt (modified) (1 diff)
-
LayoutTests/platform/mac-highsierra-wk1/compositing/repaint/iframes/compositing-iframe-with-fixed-background-doc-repaint-expected.txt (modified) (1 diff)
-
LayoutTests/platform/mac-sierra-wk1/compositing/repaint/iframes/compositing-iframe-scroll-repaint-expected.txt (modified) (1 diff)
-
LayoutTests/platform/mac-wk1/compositing/repaint/iframes/compositing-iframe-scroll-repaint-expected.txt (modified) (2 diffs)
-
LayoutTests/platform/mac-wk1/compositing/repaint/iframes/compositing-iframe-with-fixed-background-doc-repaint-expected.txt (modified) (1 diff)
-
LayoutTests/scrollingcoordinator/scrolling-tree/fixed-inside-frame-expected.txt (modified) (1 diff)
-
LayoutTests/tiled-drawing/scrolling/overflow/overflow-scrolled-down-tile-coverage-expected.txt (modified) (2 diffs)
-
LayoutTests/tiled-drawing/scrolling/overflow/overflow-scrolled-up-tile-coverage-expected.txt (modified) (2 diffs)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp (modified) (1 diff)
-
Source/WebCore/page/scrolling/ScrollingCoordinator.cpp (modified) (1 diff)
-
Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm (modified) (1 diff)
-
Source/WebCore/page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm (modified) (2 diffs)
-
Source/WebCore/platform/graphics/cocoa/WebCoreCALayerExtras.h (modified) (1 diff)
-
Source/WebCore/platform/graphics/cocoa/WebCoreCALayerExtras.mm (modified) (1 diff)
-
Source/WebCore/rendering/RenderLayerBacking.cpp (modified) (3 diffs)
-
Source/WebCore/rendering/RenderLayerCompositor.cpp (modified) (14 diffs)
-
Source/WebCore/rendering/RenderLayerCompositor.h (modified) (3 diffs)
-
Source/WebKit/ChangeLog (modified) (1 diff)
-
Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeFrameScrollingNodeRemoteIOS.mm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
tags/Safari-608.1.30/LayoutTests/ChangeLog
r246584 r246603 1 2019-06-19 Kocsen Chung <kocsen_chung@apple.com> 2 3 Revert r246538. rdar://problem/51905737 4 1 5 2019-06-19 Cathie Chen <cathiechen@igalia.com> 2 6 -
tags/Safari-608.1.30/LayoutTests/compositing/iframes/scrolling-iframe-expected.txt
r246538 r246603 17 17 (children 1 18 18 (GraphicsLayer 19 (bounds origin 80.00 80.00)20 19 (anchor 0.00 0.00) 21 20 (bounds 285.00 135.00) 22 21 (children 1 23 22 (GraphicsLayer 23 (position -80.00 -80.00) 24 24 (anchor 0.00 0.00) 25 25 (children 1 -
tags/Safari-608.1.30/LayoutTests/compositing/overflow/textarea-scroll-touch-expected.txt
r246538 r246603 17 17 (offsetFromRenderer width=1 height=1) 18 18 (position 1.00 1.00) 19 (bounds origin 0.00 50.00)20 19 (bounds 189.00 124.00) 21 20 (children 1 … … 23 22 (offsetFromRenderer width=1 height=1) 24 23 (scrollOffset (0,50)) 24 (position 0.00 -50.00) 25 25 (anchor 0.00 0.00) 26 26 (bounds 189.00 270.00) … … 40 40 (offsetFromRenderer width=1 height=1) 41 41 (position 1.00 1.00) 42 (bounds origin 0.00 50.00)43 42 (bounds 189.00 124.00) 44 43 (children 1 … … 46 45 (offsetFromRenderer width=1 height=1) 47 46 (scrollOffset (0,50)) 47 (position 0.00 -50.00) 48 48 (anchor 0.00 0.00) 49 49 (bounds 189.00 270.00) -
tags/Safari-608.1.30/LayoutTests/compositing/repaint/iframes/compositing-iframe-scroll-repaint-expected.txt
r246538 r246603 18 18 (children 1 19 19 (GraphicsLayer 20 (bounds origin 0.00 100.00)21 20 (anchor 0.00 0.00) 22 21 (bounds 400.00 300.00) 23 22 (children 1 24 23 (GraphicsLayer 24 (position 0.00 -100.00) 25 25 (anchor 0.00 0.00) 26 26 (children 1 -
tags/Safari-608.1.30/LayoutTests/compositing/repaint/iframes/compositing-iframe-with-fixed-background-doc-repaint-expected.txt
r246538 r246603 18 18 (children 1 19 19 (GraphicsLayer 20 (bounds origin 0.00 100.00)21 20 (anchor 0.00 0.00) 22 21 (bounds 400.00 300.00) 23 22 (children 1 24 23 (GraphicsLayer 24 (position 0.00 -100.00) 25 25 (anchor 0.00 0.00) 26 26 (children 1 -
tags/Safari-608.1.30/LayoutTests/compositing/repaint/scroller-with-foreground-layer-repaints-expected.txt
r246538 r246603 21 21 (offsetFromRenderer width=1 height=1) 22 22 (position 1.00 1.00) 23 (bounds origin 0.00 200.00)24 23 (bounds 305.00 305.00) 25 24 (children 1 … … 27 26 (offsetFromRenderer width=1 height=1) 28 27 (scrollOffset (0,200)) 28 (position 0.00 -200.00) 29 29 (anchor 0.00 0.00) 30 30 (bounds 305.00 1020.00) -
tags/Safari-608.1.30/LayoutTests/compositing/rtl/rtl-scrolling-with-transformed-descendants-expected.txt
r246538 r246603 16 16 (offsetFromRenderer width=2 height=2) 17 17 (position 2.00 2.00) 18 (bounds origin 366.00 0.00)19 18 (bounds 400.00 204.00) 20 19 (children 1 … … 22 21 (offsetFromRenderer width=2 height=2) 23 22 (scrollOffset (366,0)) 23 (position -366.00 0.00) 24 24 (anchor 0.00 0.00) 25 25 (bounds 766.00 204.00) -
tags/Safari-608.1.30/LayoutTests/platform/ios-wk2/compositing/iframes/scrolling-iframe-expected.txt
r246538 r246603 17 17 (children 1 18 18 (GraphicsLayer 19 (bounds origin 80.00 80.00)20 19 (anchor 0.00 0.00) 21 20 (bounds 300.00 150.00) -
tags/Safari-608.1.30/LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/fixed-inside-frame-expected.txt
r246538 r246603 64 64 (children 1 65 65 (GraphicsLayer 66 (bounds origin 0.00 120.00)67 66 (anchor 0.00 0.00) 68 67 (bounds 480.00 400.00) -
tags/Safari-608.1.30/LayoutTests/platform/mac-highsierra-wk1/compositing/repaint/iframes/compositing-iframe-scroll-repaint-expected.txt
r246538 r246603 22 22 (children 1 23 23 (GraphicsLayer 24 (bounds origin 0.00 100.00)25 24 (anchor 0.00 0.00) 26 25 (bounds 400.00 300.00) 27 26 (children 1 28 27 (GraphicsLayer 28 (position 0.00 -100.00) 29 29 (anchor 0.00 0.00) 30 30 (children 1 -
tags/Safari-608.1.30/LayoutTests/platform/mac-highsierra-wk1/compositing/repaint/iframes/compositing-iframe-with-fixed-background-doc-repaint-expected.txt
r246538 r246603 22 22 (children 1 23 23 (GraphicsLayer 24 (bounds origin 0.00 100.00)25 24 (anchor 0.00 0.00) 26 25 (bounds 400.00 300.00) 27 26 (children 1 28 27 (GraphicsLayer 28 (position 0.00 -100.00) 29 29 (anchor 0.00 0.00) 30 30 (children 1 -
tags/Safari-608.1.30/LayoutTests/platform/mac-sierra-wk1/compositing/repaint/iframes/compositing-iframe-scroll-repaint-expected.txt
r246538 r246603 21 21 (children 1 22 22 (GraphicsLayer 23 (bounds origin 0.00 100.00)24 23 (anchor 0.00 0.00) 25 24 (bounds 400.00 300.00) 26 25 (children 1 27 26 (GraphicsLayer 27 (position 0.00 -100.00) 28 28 (children 1 29 29 (GraphicsLayer -
tags/Safari-608.1.30/LayoutTests/platform/mac-wk1/compositing/repaint/iframes/compositing-iframe-scroll-repaint-expected.txt
r246538 r246603 21 21 (children 1 22 22 (GraphicsLayer 23 (bounds origin 0.00 100.00)24 23 (anchor 0.00 0.00) 25 24 (bounds 400.00 300.00) 26 25 (children 1 27 26 (GraphicsLayer 27 (position 0.00 -100.00) 28 28 (anchor 0.00 0.00) 29 29 (children 1 … … 35 35 (bounds 400.00 1016.00) 36 36 (drawsContent 1) 37 (repaint rects38 (rect 0.00 0.00 400.00 1016.00)39 (rect 0.00 0.00 400.00 1016.00)40 (rect 8.00 8.00 384.00 1000.00)41 (rect 0.00 0.00 400.00 1016.00)42 )43 37 (children 1 44 38 (GraphicsLayer -
tags/Safari-608.1.30/LayoutTests/platform/mac-wk1/compositing/repaint/iframes/compositing-iframe-with-fixed-background-doc-repaint-expected.txt
r246538 r246603 21 21 (children 1 22 22 (GraphicsLayer 23 (bounds origin 0.00 100.00)24 23 (anchor 0.00 0.00) 25 24 (bounds 400.00 300.00) 26 25 (children 1 27 26 (GraphicsLayer 27 (position 0.00 -100.00) 28 28 (anchor 0.00 0.00) 29 29 (children 1 -
tags/Safari-608.1.30/LayoutTests/scrollingcoordinator/scrolling-tree/fixed-inside-frame-expected.txt
r246538 r246603 66 66 (children 1 67 67 (GraphicsLayer 68 (bounds origin 0.00 120.00)69 68 (anchor 0.00 0.00) 70 69 (bounds 465.00 400.00) 71 70 (children 1 72 71 (GraphicsLayer 72 (position 0.00 -120.00) 73 73 (anchor 0.00 0.00) 74 74 (children 1 -
tags/Safari-608.1.30/LayoutTests/tiled-drawing/scrolling/overflow/overflow-scrolled-down-tile-coverage-expected.txt
r246538 r246603 31 31 (offsetFromRenderer width=1 height=1) 32 32 (position 1.00 1.00) 33 (bounds origin 0.00 1800.00)34 33 (bounds 385.00 512.00) 35 (visible rect 0.00, 1800.00 385.00 x 512.00)36 (coverage rect 0.00, 1800.00 385.00 x 512.00)34 (visible rect 0.00, 0.00 385.00 x 512.00) 35 (coverage rect 0.00, 0.00 385.00 x 512.00) 37 36 (intersects coverage rect 1) 38 37 (contentsScale 1.00) … … 41 40 (offsetFromRenderer width=1 height=1) 42 41 (scrollOffset (0,1800)) 42 (position 0.00 -1800.00) 43 43 (anchor 0.00 0.00) 44 44 (bounds 385.00 3000.00) -
tags/Safari-608.1.30/LayoutTests/tiled-drawing/scrolling/overflow/overflow-scrolled-up-tile-coverage-expected.txt
r246538 r246603 31 31 (offsetFromRenderer width=1 height=1) 32 32 (position 1.00 1.00) 33 (bounds origin 0.00 200.00)34 33 (bounds 385.00 512.00) 35 (visible rect 0.00, 200.00 385.00 x 512.00)36 (coverage rect 0.00, 200.00 385.00 x 512.00)34 (visible rect 0.00, 0.00 385.00 x 512.00) 35 (coverage rect 0.00, 0.00 385.00 x 512.00) 37 36 (intersects coverage rect 1) 38 37 (contentsScale 1.00) … … 41 40 (offsetFromRenderer width=1 height=1) 42 41 (scrollOffset (0,200)) 42 (position 0.00 -200.00) 43 43 (anchor 0.00 0.00) 44 44 (bounds 385.00 3000.00) -
tags/Safari-608.1.30/Source/WebCore/ChangeLog
r246579 r246603 1 2019-06-19 Kocsen Chung <kocsen_chung@apple.com> 2 3 Revert r246538. rdar://problem/51905737 4 1 5 2019-06-18 Saam Barati <sbarati@apple.com> 2 6 -
tags/Safari-608.1.30/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp
r246538 r246603 447 447 void AsyncScrollingCoordinator::reconcileScrollPosition(FrameView& frameView, ScrollingLayerPositionAction scrollingLayerPositionAction) 448 448 { 449 #if PLATFORM(IOS_FAMILY) 450 // Doing all scrolling like this (UIScrollView style) would simplify code. 449 451 auto* scrollContainerLayer = scrollContainerLayerForFrameView(frameView); 450 452 if (!scrollContainerLayer) 451 453 return; 452 453 // This uses scrollPosition because the root content layer accounts for scrollOrigin (see FrameView::positionForRootContentLayer()).454 454 if (scrollingLayerPositionAction == ScrollingLayerPositionAction::Set) 455 455 scrollContainerLayer->setBoundsOrigin(frameView.scrollPosition()); 456 456 else 457 457 scrollContainerLayer->syncBoundsOrigin(frameView.scrollPosition()); 458 #else 459 auto* scrolledContentsLayer = scrolledContentsLayerForFrameView(frameView); 460 if (!scrolledContentsLayer) 461 return; 462 if (scrollingLayerPositionAction == ScrollingLayerPositionAction::Set) 463 scrolledContentsLayer->setPosition(-frameView.scrollPosition()); 464 else 465 scrolledContentsLayer->syncPosition(-frameView.scrollPosition()); 466 #endif 458 467 } 459 468 -
tags/Safari-608.1.30/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp
r246538 r246603 273 273 { 274 274 if (auto* renderView = frameView.frame().contentRenderer()) 275 return renderView->compositor(). scrollContainerLayer();275 return renderView->compositor().clipLayer(); 276 276 return nullptr; 277 277 } -
tags/Safari-608.1.30/Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm
r246538 r246603 200 200 void ScrollingTreeFrameScrollingNodeMac::repositionScrollingLayers() 201 201 { 202 // We use scroll position here because the root content layer is offset to account for scrollOrigin (see FrameView::positionForRootContentLayer). 203 [scrollContainerLayer() _web_setLayerBoundsOrigin:currentScrollPosition()]; 202 scrolledContentsLayer().position = -currentScrollPosition(); 204 203 } 205 204 -
tags/Safari-608.1.30/Source/WebCore/page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm
r246538 r246603 32 32 #import "ScrollingStateOverflowScrollingNode.h" 33 33 #import "ScrollingTree.h" 34 #import "WebCoreCALayerExtras.h"35 34 #import <wtf/text/TextStream.h> 36 35 … … 93 92 { 94 93 auto scrollOffset = ScrollableArea::scrollOffsetFromPosition(currentScrollPosition(), toFloatSize(scrollOrigin())); 95 [scrollContainerLayer() _web_setLayerBoundsOrigin:scrollOffset];94 scrolledContentsLayer().position = -scrollOffset; 96 95 } 97 96 -
tags/Safari-608.1.30/Source/WebCore/platform/graphics/cocoa/WebCoreCALayerExtras.h
r246538 r246603 29 29 30 30 - (void)web_disableAllActions; 31 - (void)_web_setLayerBoundsOrigin:(CGPoint)origin;32 31 - (void)_web_setLayerTopLeftPosition:(CGPoint)position; 33 32 + (CALayer *)_web_renderLayerWithContextID:(uint32_t)contextID; -
tags/Safari-608.1.30/Source/WebCore/platform/graphics/cocoa/WebCoreCALayerExtras.mm
r246538 r246603 57 57 } 58 58 59 - (void)_web_setLayerBoundsOrigin:(CGPoint)origin60 {61 CGRect bounds = [self bounds];62 bounds.origin = origin;63 [self setBounds:bounds];64 }65 66 59 - (void)_web_setLayerTopLeftPosition:(CGPoint)position 67 60 { -
tags/Safari-608.1.30/Source/WebCore/rendering/RenderLayerBacking.cpp
r246538 r246603 1226 1226 ScrollOffset scrollOffset = m_owningLayer.scrollOffset(); 1227 1227 updateScrollOffset(scrollOffset); 1228 #if PLATFORM(IOS_FAMILY) 1229 m_scrolledContentsLayer->setPosition({ }); // FIXME: necessary? 1230 #endif 1228 1231 1229 1232 FloatSize oldScrollingLayerOffset = m_scrollContainerLayer->offsetFromRenderer(); … … 1304 1307 void RenderLayerBacking::setLocationOfScrolledContents(ScrollOffset scrollOffset, ScrollingLayerPositionAction setOrSync) 1305 1308 { 1309 #if PLATFORM(IOS_FAMILY) 1306 1310 if (setOrSync == ScrollingLayerPositionAction::Sync) 1307 1311 m_scrollContainerLayer->syncBoundsOrigin(scrollOffset); 1308 1312 else 1309 1313 m_scrollContainerLayer->setBoundsOrigin(scrollOffset); 1314 #else 1315 if (setOrSync == ScrollingLayerPositionAction::Sync) 1316 m_scrolledContentsLayer->syncPosition(-scrollOffset); 1317 else 1318 m_scrolledContentsLayer->setPosition(-scrollOffset); 1319 #endif 1310 1320 } 1311 1321 … … 1321 1331 m_owningLayer.setRequiresScrollPositionReconciliation(false); 1322 1332 } 1323 1324 ASSERT(m_scrolledContentsLayer->position().isZero());1325 1333 } 1326 1334 -
tags/Safari-608.1.30/Source/WebCore/rendering/RenderLayerCompositor.cpp
r246538 r246603 302 302 GraphicsLayer::unparentAndClear(m_rootContentsLayer); 303 303 304 GraphicsLayer::unparentAndClear(m_clipLayer); 304 305 GraphicsLayer::unparentAndClear(m_scrollContainerLayer); 305 306 GraphicsLayer::unparentAndClear(m_scrolledContentsLayer); … … 521 522 if (layersLogEnabled()) { 522 523 LOG(Layers, "RenderLayerCompositor::flushPendingLayerChanges"); 523 showGraphicsLayerTree(m_ overflowControlsHostLayer.get());524 showGraphicsLayerTree(m_rootContentsLayer.get()); 524 525 } 525 526 #endif … … 1969 1970 1970 1971 if (m_scrolledContentsLayer) { 1971 updateScroll ContainerGeometry();1972 updateScrollLayerClipping(); 1972 1973 frameViewDidScroll(); 1973 1974 updateOverflowControlsLayers(); … … 1989 1990 } 1990 1991 1991 void RenderLayerCompositor::update LayersForScrollPosition()1992 void RenderLayerCompositor::updateScrollLayerPosition() 1992 1993 { 1993 1994 ASSERT(!hasCoordinatedScrolling()); 1994 ASSERT(m_scroll ContainerLayer);1995 ASSERT(m_scrolledContentsLayer); 1995 1996 1996 1997 auto& frameView = m_renderView.frameView(); 1997 // This uses scrollPosition because the root content layer accounts for scrollOrigin (see FrameView::positionForRootContentLayer()). 1998 m_scrollContainerLayer->setBoundsOrigin(frameView.scrollPosition()); 1998 IntPoint scrollPosition = frameView.scrollPosition(); 1999 2000 m_scrolledContentsLayer->setPosition(FloatPoint(-scrollPosition.x(), -scrollPosition.y())); 1999 2001 2000 2002 if (auto* fixedBackgroundLayer = fixedRootBackgroundLayer()) … … 2002 2004 } 2003 2005 2004 void RenderLayerCompositor::updateScrollContainerGeometry() 2005 { 2006 if (!m_scrollContainerLayer) 2006 void RenderLayerCompositor::updateScrollLayerClipping() 2007 { 2008 auto* layerForClipping = this->layerForClipping(); 2009 if (!layerForClipping) 2007 2010 return; 2008 2011 2009 m_scrollContainerLayer->setSize(m_renderView.frameView().sizeForVisibleContent());2010 m_scrollContainerLayer->setPosition(positionForClipLayer());2012 layerForClipping->setSize(m_renderView.frameView().sizeForVisibleContent()); 2013 layerForClipping->setPosition(positionForClipLayer()); 2011 2014 } 2012 2015 … … 2033 2036 } 2034 2037 2035 update LayersForScrollPosition();2038 updateScrollLayerPosition(); 2036 2039 } 2037 2040 … … 2250 2253 m_rootContentsLayer->setSize(m_renderView.frameView().contentsSize()); 2251 2254 m_rootContentsLayer->setPosition(m_renderView.frameView().positionForRootContentLayer()); 2252 m_rootContentsLayer->setAnchorPoint( { });2253 } 2254 2255 updateScroll ContainerGeometry();2255 m_rootContentsLayer->setAnchorPoint(FloatPoint3D()); 2256 } 2257 2258 updateScrollLayerClipping(); 2256 2259 2257 2260 #if ENABLE(RUBBER_BANDING) … … 3680 3683 // We want the overhang areas layer to be positioned below the frame contents, 3681 3684 // so insert it below the clip layer. 3682 m_overflowControlsHostLayer->addChildBelow(*m_layerForOverhangAreas, m_scrollContainerLayer.get());3685 m_overflowControlsHostLayer->addChildBelow(*m_layerForOverhangAreas, layerForClipping()); 3683 3686 } 3684 3687 } else … … 3770 3773 IntRect overflowRect = snappedIntRect(m_renderView.layoutOverflowRect()); 3771 3774 m_rootContentsLayer->setSize(FloatSize(overflowRect.maxX(), overflowRect.maxY())); 3772 m_rootContentsLayer->setPosition( { });3775 m_rootContentsLayer->setPosition(FloatPoint()); 3773 3776 3774 3777 #if PLATFORM(IOS_FAMILY) … … 3786 3789 if (!m_overflowControlsHostLayer) { 3787 3790 ASSERT(!m_scrolledContentsLayer); 3791 ASSERT(!m_clipLayer); 3788 3792 3789 3793 // Create a layer to host the clipping layer and the overflow controls layers. … … 3791 3795 m_overflowControlsHostLayer->setName("overflow controls host"); 3792 3796 3793 m_scrollContainerLayer = GraphicsLayer::create(graphicsLayerFactory(), *this, GraphicsLayer::Type::ScrollContainer);3794 m_scrollContainerLayer->setName("scroll container");3795 m_scrollContainerLayer->setMasksToBounds(true);3796 m_scrollContainerLayer->setAnchorPoint({ });3797 3798 3797 m_scrolledContentsLayer = GraphicsLayer::create(graphicsLayerFactory(), *this, GraphicsLayer::Type::ScrolledContents); 3799 3798 m_scrolledContentsLayer->setName("scrolled contents"); 3800 3799 m_scrolledContentsLayer->setAnchorPoint({ }); 3801 3800 3802 m_overflowControlsHostLayer->addChild(*m_scrollContainerLayer); 3803 m_scrollContainerLayer->addChild(*m_scrolledContentsLayer); 3801 #if PLATFORM(IOS_FAMILY) 3802 if (m_renderView.settings().asyncFrameScrollingEnabled()) { 3803 m_scrollContainerLayer = GraphicsLayer::create(graphicsLayerFactory(), *this, GraphicsLayer::Type::ScrollContainer); 3804 3805 m_scrollContainerLayer->setName("scroll container"); 3806 m_scrollContainerLayer->setMasksToBounds(true); 3807 m_scrollContainerLayer->setAnchorPoint({ }); 3808 3809 m_scrollContainerLayer->addChild(*m_scrolledContentsLayer); 3810 m_overflowControlsHostLayer->addChild(*m_scrollContainerLayer); 3811 } 3812 #endif 3813 if (!m_scrollContainerLayer) { 3814 m_clipLayer = GraphicsLayer::create(graphicsLayerFactory(), *this); 3815 m_clipLayer->setName("frame clipping"); 3816 m_clipLayer->setMasksToBounds(true); 3817 m_clipLayer->setAnchorPoint({ }); 3818 3819 m_clipLayer->addChild(*m_scrolledContentsLayer); 3820 m_overflowControlsHostLayer->addChild(*m_clipLayer); 3821 } 3822 3804 3823 m_scrolledContentsLayer->addChild(*m_rootContentsLayer); 3805 3824 3806 updateScroll ContainerGeometry();3825 updateScrollLayerClipping(); 3807 3826 updateOverflowControlsLayers(); 3808 3827 … … 3810 3829 scheduleLayerFlush(true); 3811 3830 else 3812 update LayersForScrollPosition();3831 updateScrollLayerPosition(); 3813 3832 } 3814 3833 } else { 3815 3834 if (m_overflowControlsHostLayer) { 3816 3835 GraphicsLayer::unparentAndClear(m_overflowControlsHostLayer); 3836 GraphicsLayer::unparentAndClear(m_clipLayer); 3817 3837 GraphicsLayer::unparentAndClear(m_scrollContainerLayer); 3818 3838 GraphicsLayer::unparentAndClear(m_scrolledContentsLayer); … … 3861 3881 if (m_overflowControlsHostLayer) { 3862 3882 GraphicsLayer::unparentAndClear(m_overflowControlsHostLayer); 3883 GraphicsLayer::unparentAndClear(m_clipLayer); 3863 3884 GraphicsLayer::unparentAndClear(m_scrollContainerLayer); 3864 3885 GraphicsLayer::unparentAndClear(m_scrolledContentsLayer); … … 4300 4321 scrollingCoordinator.setNodeLayers(nodeID, { nullptr, 4301 4322 scrollContainerLayer(), scrolledContentsLayer(), 4302 fixedRootBackgroundLayer(), nullptr, rootContentsLayer(),4323 fixedRootBackgroundLayer(), clipLayer(), rootContentsLayer(), 4303 4324 frameView.layerForHorizontalScrollbar(), frameView.layerForVerticalScrollbar() }); 4304 4325 } else { -
tags/Safari-608.1.30/Source/WebCore/rendering/RenderLayerCompositor.h
r246538 r246603 247 247 GraphicsLayer* scrollContainerLayer() const { return m_scrollContainerLayer.get(); } 248 248 GraphicsLayer* scrolledContentsLayer() const { return m_scrolledContentsLayer.get(); } 249 GraphicsLayer* clipLayer() const { return m_clipLayer.get(); } 249 250 GraphicsLayer* rootContentsLayer() const { return m_rootContentsLayer.get(); } 251 252 GraphicsLayer* layerForClipping() const { return m_clipLayer ? m_clipLayer.get() : m_scrollContainerLayer.get(); } 250 253 251 254 #if ENABLE(RUBBER_BANDING) … … 438 441 void updateOverflowControlsLayers(); 439 442 440 void update LayersForScrollPosition();441 void updateScroll ContainerGeometry();443 void updateScrollLayerPosition(); 444 void updateScrollLayerClipping(); 442 445 443 446 FloatPoint positionForClipLayer() const; … … 572 575 573 576 // Enclosing clipping layer for iframe content 577 RefPtr<GraphicsLayer> m_clipLayer; 574 578 RefPtr<GraphicsLayer> m_scrollContainerLayer; 575 579 RefPtr<GraphicsLayer> m_scrolledContentsLayer; -
tags/Safari-608.1.30/Source/WebKit/ChangeLog
r246583 r246603 1 2019-06-19 Kocsen Chung <kocsen_chung@apple.com> 2 3 Revert r246538. rdar://problem/51905737 4 1 5 2019-06-18 Dean Jackson <dino@apple.com> 2 6 -
tags/Safari-608.1.30/Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeFrameScrollingNodeRemoteIOS.mm
r246538 r246603 123 123 } 124 124 125 // Main frame scrolling is handled by the main UIScrollView. 125 auto scrollPosition = currentScrollPosition(); 126 // FIXME: This is always wrong on iOS. Maybe assert that we always have a delegate. 127 [scrolledContentsLayer() setPosition:-scrollPosition]; 126 128 } 127 129
Note:
See TracChangeset
for help on using the changeset viewer.