Changeset 240916 in webkit
- Timestamp:
- Feb 3, 2019 11:49:33 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r240911 r240916 1 2019-02-03 Antti Koivisto <antti@apple.com> 2 3 [iOS] Tiles not created in large scrollable iframes 4 https://bugs.webkit.org/show_bug.cgi?id=193665 5 6 Reviewed by Simon Fraser. 7 8 Test by Frédéric Wang. 9 10 * fast/scrolling/ios/scroll-iframe-expected.html: 11 * fast/scrolling/ios/scroll-iframe.html: 12 * platform/ios-wk2/compositing/iframes/scrolling-iframe-expected.txt: 13 * platform/ios-wk2/compositing/tiling/tiled-drawing-async-frame-scrolling-expected.txt: 14 * platform/ios-wk2/scrollingcoordinator/scrolling-tree/fixed-inside-frame-expected.txt: 15 1 16 2019-02-03 John Wilander <wilander@apple.com> 2 17 -
trunk/LayoutTests/fast/scrolling/ios/scroll-iframe-expected.html
r240233 r240916 19 19 <div class=testdiv></div> 20 20 <div class=testdiv></div> 21 <div class=testdiv></div> 21 22 </div> 22 23 </body> -
trunk/LayoutTests/fast/scrolling/ios/scroll-iframe.html
r240233 r240916 25 25 await touchAndDragFromPointToPoint(c.x, c.y, c.x - 150, c.y); 26 26 await liftUpAtPoint(c.x - 150, c.y); 27 27 28 c = centerOf("maxScrollY"); 28 29 await touchAndDragFromPointToPoint(c.x, c.y, c.x, c.y - 150); 29 30 await liftUpAtPoint(c.x, c.y - 150); 31 30 32 c = centerOf("maxScrollXY"); 31 33 await touchAndDragFromPointToPoint(c.x, c.y, c.x - 150, c.y - 150); 32 34 await liftUpAtPoint(c.x - 150, c.y - 150); 35 36 c = centerOf("largeContent"); 37 await touchAndDragFromPointToPoint(c.x, c.y, c.x, c.y - 2000); 38 await liftUpAtPoint(c.x, c.y - 2000); 33 39 34 40 // Wait for scrolling to stabilize and for scrollbars to disappear. … … 36 42 } 37 43 38 var frameToLoadCount = 3;44 var frameToLoadCount = 4; 39 45 function newFrameLoaded() { 40 46 frameToLoadCount--; … … 71 77 </body>" onload="newFrameLoaded()"> 72 78 </iframe> 79 <iframe id="largeContent" scrolling="yes" srcdoc=" 80 <body style='margin: 0;'> 81 <div style='width: 100px; height: 500px; background: red;'></div> 82 <div style='width: 100px; height: 500px; background: blue;'></div> 83 <div style='width: 100px; height: 500px; background: red;'></div> 84 <div style='width: 100px; height: 500px; background: blue;'></div> 85 <div style='width: 100px; height: 500px; background: green;'></div> 86 </body>" onload="newFrameLoaded()"> 87 </iframe> 73 88 </div> 74 89 </body> -
trunk/LayoutTests/platform/ios-wk2/compositing/iframes/scrolling-iframe-expected.txt
r240677 r240916 21 21 (children 1 22 22 (GraphicsLayer 23 (position -80.00 -80.00)24 23 (anchor 0.00 0.00) 25 24 (children 1 -
trunk/LayoutTests/platform/ios-wk2/compositing/tiling/tiled-drawing-async-frame-scrolling-expected.txt
r240677 r240916 45 45 (backingStoreAttached 1) 46 46 (visible rect 0.00, 0.00 300.00 x 150.00) 47 (coverage rect -10.00, -10.00 800.00 x 600.00)47 (coverage rect 0.00, 0.00 300.00 x 150.00) 48 48 (intersects coverage rect 1) 49 49 (contentsScale 2.00) … … 51 51 (GraphicsLayer 52 52 (anchor 0.00 0.00) 53 (bounds 400.00 300.00) 54 (backingStoreAttached 1) 55 (visible rect 0.00, 0.00 400.00 x 300.00) 56 (coverage rect 0.00, 0.00 400.00 x 300.00) 57 (intersects coverage rect 1) 53 (backingStoreAttached 0) 54 (visible rect 0.00, 0.00 0.00 x 0.00) 55 (coverage rect 0.00, 0.00 300.00 x 150.00) 56 (intersects coverage rect 0) 58 57 (contentsScale 2.00) 59 58 (children 1 60 59 (GraphicsLayer 60 (anchor 0.00 0.00) 61 61 (bounds 400.00 300.00) 62 (drawsContent 1)63 62 (backingStoreAttached 1) 64 (visible rect 0.00, 0.00 400.00 x 300.00)65 (coverage rect 0.00, 0.00 400.00 x 300.00)63 (visible rect 0.00, 0.00 300.00 x 150.00) 64 (coverage rect 0.00, 0.00 300.00 x 150.00) 66 65 (intersects coverage rect 1) 67 66 (contentsScale 2.00) 68 (tile cache coverage 0, 0 400 x 300)69 (tile size 512 x 512)70 (top left tile 0, 0 tiles grid 1 x 1)71 (in window 1)72 67 (children 1 73 68 (GraphicsLayer 74 (backingStoreAttached 0) 75 (visible rect 0.00, 0.00 0.00 x 0.00) 76 (coverage rect 0.00, 0.00 400.00 x 300.00) 77 (intersects coverage rect 0) 69 (bounds 400.00 300.00) 70 (drawsContent 1) 71 (backingStoreAttached 1) 72 (visible rect 0.00, 0.00 300.00 x 150.00) 73 (coverage rect 0.00, 0.00 300.00 x 150.00) 74 (intersects coverage rect 1) 78 75 (contentsScale 2.00) 76 (tile cache coverage 0, 0 400 x 300) 77 (tile size 512 x 512) 78 (top left tile 0, 0 tiles grid 1 x 1) 79 (in window 1) 80 (children 1 81 (GraphicsLayer 82 (backingStoreAttached 0) 83 (visible rect 0.00, 0.00 0.00 x 0.00) 84 (coverage rect 0.00, 0.00 300.00 x 150.00) 85 (intersects coverage rect 0) 86 (contentsScale 2.00) 87 ) 88 ) 79 89 ) 80 90 ) … … 111 121 (backingStoreAttached 1) 112 122 (visible rect 0.00, 0.00 300.00 x 150.00) 113 (coverage rect -318.00, -10.00 800.00 x 600.00)123 (coverage rect 0.00, 0.00 300.00 x 150.00) 114 124 (intersects coverage rect 1) 115 125 (contentsScale 2.00) … … 117 127 (GraphicsLayer 118 128 (anchor 0.00 0.00) 119 (bounds 400.00 300.00) 120 (backingStoreAttached 1) 121 (visible rect 0.00, 0.00 400.00 x 300.00) 122 (coverage rect 0.00, 0.00 400.00 x 300.00) 123 (intersects coverage rect 1) 129 (backingStoreAttached 0) 130 (visible rect 0.00, 0.00 0.00 x 0.00) 131 (coverage rect 0.00, 0.00 300.00 x 150.00) 132 (intersects coverage rect 0) 124 133 (contentsScale 2.00) 125 134 (children 1 126 135 (GraphicsLayer 136 (anchor 0.00 0.00) 127 137 (bounds 400.00 300.00) 128 (drawsContent 1)129 138 (backingStoreAttached 1) 130 (visible rect 0.00, 0.00 400.00 x 300.00)131 (coverage rect 0.00, 0.00 400.00 x 300.00)139 (visible rect 0.00, 0.00 300.00 x 150.00) 140 (coverage rect 0.00, 0.00 300.00 x 150.00) 132 141 (intersects coverage rect 1) 133 142 (contentsScale 2.00) 134 (tile cache coverage 0, 0 400 x 300)135 (tile size 512 x 512)136 (top left tile 0, 0 tiles grid 1 x 1)137 (in window 1)138 143 (children 1 139 144 (GraphicsLayer 140 (backingStoreAttached 0) 141 (visible rect 0.00, 0.00 0.00 x 0.00) 142 (coverage rect 0.00, 0.00 400.00 x 300.00) 143 (intersects coverage rect 0) 145 (bounds 400.00 300.00) 146 (drawsContent 1) 147 (backingStoreAttached 1) 148 (visible rect 0.00, 0.00 300.00 x 150.00) 149 (coverage rect 0.00, 0.00 300.00 x 150.00) 150 (intersects coverage rect 1) 144 151 (contentsScale 2.00) 152 (tile cache coverage 0, 0 400 x 300) 153 (tile size 512 x 512) 154 (top left tile 0, 0 tiles grid 1 x 1) 155 (in window 1) 156 (children 1 157 (GraphicsLayer 158 (backingStoreAttached 0) 159 (visible rect 0.00, 0.00 0.00 x 0.00) 160 (coverage rect 0.00, 0.00 300.00 x 150.00) 161 (intersects coverage rect 0) 162 (contentsScale 2.00) 163 ) 164 ) 145 165 ) 146 166 ) … … 177 197 (backingStoreAttached 1) 178 198 (visible rect 0.00, 0.00 300.00 x 150.00) 179 (coverage rect -10.00, -169.00 800.00 x 600.00)199 (coverage rect 0.00, 0.00 300.00 x 150.00) 180 200 (intersects coverage rect 1) 181 201 (contentsScale 2.00) … … 183 203 (GraphicsLayer 184 204 (anchor 0.00 0.00) 185 (bounds 400.00 300.00) 186 (backingStoreAttached 1) 187 (visible rect 0.00, 0.00 400.00 x 300.00) 188 (coverage rect 0.00, 0.00 400.00 x 300.00) 189 (intersects coverage rect 1) 205 (backingStoreAttached 0) 206 (visible rect 0.00, 0.00 0.00 x 0.00) 207 (coverage rect 0.00, 0.00 300.00 x 150.00) 208 (intersects coverage rect 0) 190 209 (contentsScale 2.00) 191 210 (children 1 192 211 (GraphicsLayer 212 (anchor 0.00 0.00) 193 213 (bounds 400.00 300.00) 194 (drawsContent 1)195 214 (backingStoreAttached 1) 196 (visible rect 0.00, 0.00 400.00 x 300.00)197 (coverage rect 0.00, 0.00 400.00 x 300.00)215 (visible rect 0.00, 0.00 300.00 x 150.00) 216 (coverage rect 0.00, 0.00 300.00 x 150.00) 198 217 (intersects coverage rect 1) 199 218 (contentsScale 2.00) 200 (tile cache coverage 0, 0 400 x 300)201 (tile size 512 x 512)202 (top left tile 0, 0 tiles grid 1 x 1)203 (in window 1)204 219 (children 1 205 220 (GraphicsLayer 206 (backingStoreAttached 0) 207 (visible rect 0.00, 0.00 0.00 x 0.00) 208 (coverage rect 0.00, 0.00 400.00 x 300.00) 209 (intersects coverage rect 0) 221 (bounds 400.00 300.00) 222 (drawsContent 1) 223 (backingStoreAttached 1) 224 (visible rect 0.00, 0.00 300.00 x 150.00) 225 (coverage rect 0.00, 0.00 300.00 x 150.00) 226 (intersects coverage rect 1) 210 227 (contentsScale 2.00) 228 (tile cache coverage 0, 0 400 x 300) 229 (tile size 512 x 512) 230 (top left tile 0, 0 tiles grid 1 x 1) 231 (in window 1) 232 (children 1 233 (GraphicsLayer 234 (backingStoreAttached 0) 235 (visible rect 0.00, 0.00 0.00 x 0.00) 236 (coverage rect 0.00, 0.00 300.00 x 150.00) 237 (intersects coverage rect 0) 238 (contentsScale 2.00) 239 ) 240 ) 211 241 ) 212 242 ) -
trunk/LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/fixed-inside-frame-expected.txt
r240713 r240916 69 69 (children 1 70 70 (GraphicsLayer 71 (position 0.00 -120.00)72 71 (anchor 0.00 0.00) 73 72 (children 1 -
trunk/Source/WebCore/ChangeLog
r240912 r240916 1 2019-02-03 Antti Koivisto <antti@apple.com> 2 3 [iOS] Tiles not created in large scrollable iframes 4 https://bugs.webkit.org/show_bug.cgi?id=193665 5 6 Reviewed by Simon Fraser. 7 8 We are not syncing scroll position back to the graphics layer tree correctly. 9 10 Test by Frédéric Wang. 11 12 * page/scrolling/AsyncScrollingCoordinator.cpp: 13 (WebCore::AsyncScrollingCoordinator::frameViewRootLayerDidChange): 14 (WebCore::AsyncScrollingCoordinator::reconcileScrollingState): 15 (WebCore::AsyncScrollingCoordinator::reconcileScrollPosition): 16 17 Factor setting and syncing scrolling layer positions into a function. 18 Use bounds.origin scrolling mechanic when scrollContainerLayer is present. 19 20 (WebCore::AsyncScrollingCoordinator::scrollableAreaScrollbarLayerDidChange): 21 (WebCore::AsyncScrollingCoordinator::setSynchronousScrollingReasons): 22 (WebCore::AsyncScrollingCoordinator::updateScrollLayerPosition): Deleted. 23 * page/scrolling/AsyncScrollingCoordinator.h: 24 * page/scrolling/ScrollingCoordinator.cpp: 25 (WebCore::ScrollingCoordinator::scrollContainerLayerForFrameView): 26 (WebCore::ScrollingCoordinator::scrolledContentsLayerForFrameView): 27 (WebCore::ScrollingCoordinator::scrollLayerForFrameView): Deleted. 28 * page/scrolling/ScrollingCoordinator.h: 29 * rendering/RenderLayerCompositor.cpp: 30 31 Rename scrollLayer to scrolledContentsLayer according to out preferred naming scheme and use it in that role only. 32 Add scrollContainerLayer as a separate layer. It is only constructed when using async scrolling on iOS. 33 34 (WebCore::RenderLayerCompositor::~RenderLayerCompositor): 35 (WebCore::RenderLayerCompositor::customPositionForVisibleRectComputation const): 36 (WebCore::RenderLayerCompositor::visibleRectForLayerFlushing const): 37 (WebCore::RenderLayerCompositor::didChangePlatformLayerForLayer): 38 (WebCore::RenderLayerCompositor::frameViewDidChangeSize): 39 (WebCore::RenderLayerCompositor::updateScrollLayerPosition): 40 (WebCore::RenderLayerCompositor::frameViewDidScroll): 41 (WebCore::RenderLayerCompositor::updateLayerForTopOverhangArea): 42 (WebCore::RenderLayerCompositor::updateLayerForBottomOverhangArea): 43 (WebCore::RenderLayerCompositor::updateLayerForHeader): 44 (WebCore::RenderLayerCompositor::updateLayerForFooter): 45 (WebCore::RenderLayerCompositor::updateOverflowControlsLayers): 46 (WebCore::RenderLayerCompositor::ensureRootLayer): 47 (WebCore::RenderLayerCompositor::destroyRootLayer): 48 (WebCore::RenderLayerCompositor::updateScrollingNodeForScrollingRole): 49 * rendering/RenderLayerCompositor.h: 50 1 51 2019-02-03 Simon Fraser <simon.fraser@apple.com> 2 52 -
trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp
r240861 r240916 227 227 228 228 auto* node = downcast<ScrollingStateFrameScrollingNode>(m_scrollingStateTree->stateNodeForID(frameView.scrollingNodeID())); 229 node->setScrolledContentsLayer(scrollLayerForFrameView(frameView)); 229 node->setScrollContainerLayer(scrollContainerLayerForFrameView(frameView)); 230 node->setScrolledContentsLayer(scrolledContentsLayerForFrameView(frameView)); 230 231 node->setRootContentsLayer(rootContentsLayerForFrameView(frameView)); 231 232 node->setCounterScrollingLayer(counterScrollingLayerForFrameView(frameView)); … … 414 415 } 415 416 416 auto* scrollLayer = scrollLayerForFrameView(frameView); 417 if (!scrollLayer) 417 if (!scrolledContentsLayerForFrameView(frameView)) 418 418 return; 419 419 … … 439 439 440 440 if (programmaticScroll || scrollingLayerPositionAction == ScrollingLayerPositionAction::Set) { 441 scrollLayer->setPosition(-frameView.scrollPosition()); 441 reconcileScrollPosition(frameView, ScrollingLayerPositionAction::Set); 442 442 443 if (counterScrollingLayer) 443 444 counterScrollingLayer->setPosition(scrollPositionForFixed); … … 453 454 footerLayer->setPosition(positionForFooterLayer); 454 455 } else { 455 scrollLayer->syncPosition(-frameView.scrollPosition()); 456 reconcileScrollPosition(frameView, ScrollingLayerPositionAction::Sync); 457 456 458 if (counterScrollingLayer) 457 459 counterScrollingLayer->syncPosition(scrollPositionForFixed); … … 469 471 } 470 472 473 void AsyncScrollingCoordinator::reconcileScrollPosition(FrameView& frameView, ScrollingLayerPositionAction scrollingLayerPositionAction) 474 { 475 #if PLATFORM(IOS_FAMILY) 476 // Doing all scrolling like this (UIScrollView style) would simplify code. 477 auto* scrollContainerLayer = scrollContainerLayerForFrameView(frameView); 478 if (!scrollContainerLayer) 479 return; 480 if (scrollingLayerPositionAction == ScrollingLayerPositionAction::Set) 481 scrollContainerLayer->setBoundsOrigin(frameView.scrollPosition()); 482 else 483 scrollContainerLayer->syncBoundsOrigin(frameView.scrollPosition()); 484 #else 485 auto* scrolledContentsLayer = scrolledContentsLayerForFrameView(frameView); 486 if (!scrolledContentsLayer) 487 return; 488 if (scrollingLayerPositionAction == ScrollingLayerPositionAction::Set) 489 scrolledContentsLayer->setPosition(-frameView.scrollPosition()); 490 else 491 scrolledContentsLayer->syncPosition(-frameView.scrollPosition()); 492 #endif 493 } 494 471 495 void AsyncScrollingCoordinator::scrollableAreaScrollbarLayerDidChange(ScrollableArea& scrollableArea, ScrollbarOrientation orientation) 472 496 { … … 481 505 else 482 506 scrollingNode.setHorizontalScrollbarLayer(scrollableArea.layerForHorizontalScrollbar()); 483 484 507 } 485 508 … … 660 683 // in order to avoid layer positioning bugs. 661 684 if (reasons) 662 updateScrollLayerPosition(frameView);685 reconcileScrollPosition(frameView, ScrollingLayerPositionAction::Set); 663 686 scrollingStateNode->setSynchronousScrollingReasons(reasons); 664 }665 666 void AsyncScrollingCoordinator::updateScrollLayerPosition(FrameView& frameView)667 {668 ASSERT(isMainThread());669 if (auto* scrollLayer = scrollLayerForFrameView(frameView))670 scrollLayer->setPosition(-frameView.scrollPosition());671 687 } 672 688 -
trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.h
r240861 r240916 114 114 115 115 WEBCORE_EXPORT void reconcileScrollingState(FrameView&, const FloatPoint&, const LayoutViewportOriginOrOverrideRect&, bool programmaticScroll, ViewportRectStability, ScrollingLayerPositionAction) override; 116 void reconcileScrollPosition(FrameView&, ScrollingLayerPositionAction); 116 117 117 118 bool isRubberBandInProgress() const override; … … 130 131 131 132 void ensureRootStateNodeForFrameView(FrameView&); 132 void updateScrollLayerPosition(FrameView&);133 133 134 134 void updateScrollPositionAfterAsyncScrollTimerFired(); -
trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp
r240891 r240916 225 225 } 226 226 227 GraphicsLayer* ScrollingCoordinator::scrollLayerForFrameView(FrameView& frameView) 228 { 229 if (auto* renderView = frameView.frame().contentRenderer()) 230 return renderView->compositor().scrollLayer(); 227 GraphicsLayer* ScrollingCoordinator::scrollContainerLayerForFrameView(FrameView& frameView) 228 { 229 if (auto* renderView = frameView.frame().contentRenderer()) 230 return renderView->compositor().scrollContainerLayer(); 231 return nullptr; 232 } 233 234 GraphicsLayer* ScrollingCoordinator::scrolledContentsLayerForFrameView(FrameView& frameView) 235 { 236 if (auto* renderView = frameView.frame().contentRenderer()) 237 return renderView->compositor().scrolledContentsLayer(); 231 238 return nullptr; 232 239 } -
trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.h
r240891 r240916 193 193 explicit ScrollingCoordinator(Page*); 194 194 195 GraphicsLayer* scrollLayerForFrameView(FrameView&); 195 GraphicsLayer* scrollContainerLayerForFrameView(FrameView&); 196 GraphicsLayer* scrolledContentsLayerForFrameView(FrameView&); 196 197 GraphicsLayer* counterScrollingLayerForFrameView(FrameView&); 197 198 GraphicsLayer* insetClipLayerForFrameView(FrameView&); -
trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp
r240912 r240916 292 292 // Take care that the owned GraphicsLayers are deleted first as their destructors may call back here. 293 293 m_clipLayer = nullptr; 294 m_scroll Layer = nullptr;294 m_scrolledContentsLayer = nullptr; 295 295 ASSERT(m_rootLayerAttachment == RootLayerUnattached); 296 296 } … … 412 412 void RenderLayerCompositor::customPositionForVisibleRectComputation(const GraphicsLayer* graphicsLayer, FloatPoint& position) const 413 413 { 414 if (graphicsLayer != m_scroll Layer.get())414 if (graphicsLayer != m_scrolledContentsLayer.get()) 415 415 return; 416 416 … … 454 454 return frameView.exposedContentRect(); 455 455 #else 456 // Having a m_scroll Layer indicates that we're doing scrolling via GraphicsLayers.457 FloatRect visibleRect = m_scroll Layer ? FloatRect({ }, frameView.sizeForVisibleContent()) : frameView.visibleContentRect();456 // Having a m_scrolledContentsLayer indicates that we're doing scrolling via GraphicsLayers. 457 FloatRect visibleRect = m_scrolledContentsLayer ? FloatRect({ }, frameView.sizeForVisibleContent()) : frameView.visibleContentRect(); 458 458 459 459 if (frameView.viewExposedRect()) … … 550 550 // FIXME: would be nice to not have to special-case the root. 551 551 ScrollingCoordinator::NodeLayers nodeLayers; 552 if (layer.isRenderViewLayer()) { 553 // FIXME: Reorganize the layers and pass the scrollContainerLayer. 554 nodeLayers = { nullptr, nullptr, m_scrollLayer.get(), fixedRootBackgroundLayer(), clipLayer(), m_rootContentsLayer.get() }; 555 } else 552 if (layer.isRenderViewLayer()) 553 nodeLayers = { nullptr, scrollContainerLayer(), scrolledContentsLayer(), fixedRootBackgroundLayer(), clipLayer(), rootContentsLayer() }; 554 else 556 555 nodeLayers = { layer.backing()->graphicsLayer(), backing->scrollContainerLayer(), backing->scrolledContentsLayer() }; 557 556 … … 1802 1801 layer->setNeedsCompositingGeometryUpdate(); 1803 1802 1804 if (m_scroll Layer) {1803 if (m_scrolledContentsLayer) { 1805 1804 updateScrollLayerClipping(); 1806 1805 frameViewDidScroll(); … … 1825 1824 void RenderLayerCompositor::updateScrollLayerPosition() 1826 1825 { 1827 ASSERT(m_scrollLayer); 1826 ASSERT(!hasCoordinatedScrolling()); 1827 ASSERT(m_scrolledContentsLayer); 1828 1828 1829 1829 auto& frameView = m_renderView.frameView(); 1830 1830 IntPoint scrollPosition = frameView.scrollPosition(); 1831 1831 1832 m_scroll Layer->setPosition(FloatPoint(-scrollPosition.x(), -scrollPosition.y()));1832 m_scrolledContentsLayer->setPosition(FloatPoint(-scrollPosition.x(), -scrollPosition.y())); 1833 1833 1834 1834 if (auto* fixedBackgroundLayer = fixedRootBackgroundLayer()) … … 1857 1857 void RenderLayerCompositor::frameViewDidScroll() 1858 1858 { 1859 if (!m_scroll Layer)1859 if (!m_scrolledContentsLayer) 1860 1860 return; 1861 1861 … … 3125 3125 m_layerForTopOverhangArea = GraphicsLayer::create(graphicsLayerFactory(), *this); 3126 3126 m_layerForTopOverhangArea->setName("top overhang"); 3127 m_scroll Layer->addChildBelow(*m_layerForTopOverhangArea, m_rootContentsLayer.get());3127 m_scrolledContentsLayer->addChildBelow(*m_layerForTopOverhangArea, m_rootContentsLayer.get()); 3128 3128 } 3129 3129 … … 3144 3144 m_layerForBottomOverhangArea = GraphicsLayer::create(graphicsLayerFactory(), *this); 3145 3145 m_layerForBottomOverhangArea->setName("bottom overhang"); 3146 m_scroll Layer->addChildBelow(*m_layerForBottomOverhangArea, m_rootContentsLayer.get());3146 m_scrolledContentsLayer->addChildBelow(*m_layerForBottomOverhangArea, m_rootContentsLayer.get()); 3147 3147 } 3148 3148 … … 3172 3172 m_layerForHeader = GraphicsLayer::create(graphicsLayerFactory(), *this); 3173 3173 m_layerForHeader->setName("header"); 3174 m_scroll Layer->addChildAbove(*m_layerForHeader, m_rootContentsLayer.get());3174 m_scrolledContentsLayer->addChildAbove(*m_layerForHeader, m_rootContentsLayer.get()); 3175 3175 m_renderView.frameView().addPaintPendingMilestones(DidFirstFlushForHeaderLayer); 3176 3176 } … … 3209 3209 m_layerForFooter = GraphicsLayer::create(graphicsLayerFactory(), *this); 3210 3210 m_layerForFooter->setName("footer"); 3211 m_scroll Layer->addChildAbove(*m_layerForFooter, m_rootContentsLayer.get());3211 m_scrolledContentsLayer->addChildAbove(*m_layerForFooter, m_rootContentsLayer.get()); 3212 3212 } 3213 3213 … … 3343 3343 m_contentShadowLayer->setCustomAppearance(GraphicsLayer::CustomAppearance::ScrollingShadow); 3344 3344 3345 m_scroll Layer->addChildBelow(*m_contentShadowLayer, m_rootContentsLayer.get());3345 m_scrolledContentsLayer->addChildBelow(*m_contentShadowLayer, m_rootContentsLayer.get()); 3346 3346 } 3347 3347 } else … … 3434 3434 if (requiresScrollLayer(expectedAttachment)) { 3435 3435 if (!m_overflowControlsHostLayer) { 3436 ASSERT(!m_scroll Layer);3436 ASSERT(!m_scrolledContentsLayer); 3437 3437 ASSERT(!m_clipLayer); 3438 3438 … … 3441 3441 m_overflowControlsHostLayer->setName("overflow controls host"); 3442 3442 3443 auto scrollLayerType = GraphicsLayer::Type::Normal; 3443 m_scrolledContentsLayer = GraphicsLayer::create(graphicsLayerFactory(), *this); 3444 m_scrolledContentsLayer->setName("scrolled contents layer"); 3445 m_scrolledContentsLayer->setAnchorPoint({ }); 3446 3444 3447 #if PLATFORM(IOS_FAMILY) 3445 if (m_renderView.settings().asyncFrameScrollingEnabled()) 3446 scrollLayerType = GraphicsLayer::Type::Scrolling; 3447 #endif 3448 m_scrollLayer = GraphicsLayer::create(graphicsLayerFactory(), *this, scrollLayerType); 3449 m_scrollLayer->setName("frame scrolling"); 3450 m_scrollLayer->setAnchorPoint({ }); 3451 3452 if (scrollLayerType == GraphicsLayer::Type::Scrolling) { 3453 // Scroll layer clips so there is no need for a separate clipping layer. 3454 m_overflowControlsHostLayer->addChild(*m_scrollLayer); 3455 } else { 3448 if (m_renderView.settings().asyncFrameScrollingEnabled()) { 3449 m_scrollContainerLayer = GraphicsLayer::create(graphicsLayerFactory(), *this, GraphicsLayer::Type::Scrolling); 3450 3451 m_scrollContainerLayer->setName("scroll containers layer"); 3452 m_scrollContainerLayer->setMasksToBounds(true); 3453 m_scrollContainerLayer->setAnchorPoint({ }); 3454 3455 m_scrollContainerLayer->addChild(*m_scrolledContentsLayer); 3456 m_overflowControlsHostLayer->addChild(*m_scrollContainerLayer); 3457 } 3458 #endif 3459 if (!m_scrollContainerLayer) { 3456 3460 m_clipLayer = GraphicsLayer::create(graphicsLayerFactory(), *this); 3457 3461 m_clipLayer->setName("frame clipping"); … … 3459 3463 m_clipLayer->setAnchorPoint({ }); 3460 3464 3461 m_clipLayer->addChild(*m_scroll Layer);3465 m_clipLayer->addChild(*m_scrolledContentsLayer); 3462 3466 m_overflowControlsHostLayer->addChild(*m_clipLayer); 3463 3467 } 3464 3468 3465 m_scroll Layer->addChild(*m_rootContentsLayer);3469 m_scrolledContentsLayer->addChild(*m_rootContentsLayer); 3466 3470 3467 3471 updateScrollLayerClipping(); … … 3477 3481 GraphicsLayer::unparentAndClear(m_overflowControlsHostLayer); 3478 3482 GraphicsLayer::unparentAndClear(m_clipLayer); 3479 GraphicsLayer::unparentAndClear(m_scrollLayer); 3483 GraphicsLayer::unparentAndClear(m_scrollContainerLayer); 3484 GraphicsLayer::unparentAndClear(m_scrolledContentsLayer); 3480 3485 } 3481 3486 } … … 3523 3528 GraphicsLayer::unparentAndClear(m_overflowControlsHostLayer); 3524 3529 GraphicsLayer::unparentAndClear(m_clipLayer); 3525 GraphicsLayer::unparentAndClear(m_scrollLayer); 3526 } 3527 ASSERT(!m_scrollLayer); 3530 GraphicsLayer::unparentAndClear(m_scrollContainerLayer); 3531 GraphicsLayer::unparentAndClear(m_scrolledContentsLayer); 3532 } 3533 ASSERT(!m_scrolledContentsLayer); 3528 3534 GraphicsLayer::unparentAndClear(m_rootContentsLayer); 3529 3535 … … 4014 4020 4015 4021 if (changes & ScrollingNodeChangeFlags::Layer) 4016 scrollingCoordinator->setNodeLayers(newNodeID, { nullptr, nullptr, m_scrollLayer.get(), fixedRootBackgroundLayer(), clipLayer(), m_rootContentsLayer.get() });4022 scrollingCoordinator->setNodeLayers(newNodeID, { nullptr, scrollContainerLayer(), scrolledContentsLayer(), fixedRootBackgroundLayer(), clipLayer(), rootContentsLayer() }); 4017 4023 4018 4024 if (changes & ScrollingNodeChangeFlags::LayerGeometry) { -
trunk/Source/WebCore/rendering/RenderLayerCompositor.h
r240800 r240916 242 242 GraphicsLayer* rootGraphicsLayer() const; 243 243 244 GraphicsLayer* scrollLayer() const { return m_scrollLayer.get(); } 244 GraphicsLayer* scrollContainerLayer() const { return m_scrollContainerLayer.get(); } 245 GraphicsLayer* scrolledContentsLayer() const { return m_scrolledContentsLayer.get(); } 245 246 GraphicsLayer* clipLayer() const { return m_clipLayer.get(); } 246 247 GraphicsLayer* rootContentsLayer() const { return m_rootContentsLayer.get(); } 247 248 248 GraphicsLayer* layerForClipping() const { return m_clipLayer ? m_clipLayer.get() : m_scroll Layer.get(); }249 GraphicsLayer* layerForClipping() const { return m_clipLayer ? m_clipLayer.get() : m_scrollContainerLayer.get(); } 249 250 250 251 #if ENABLE(RUBBER_BANDING) … … 565 566 // Enclosing clipping layer for iframe content 566 567 RefPtr<GraphicsLayer> m_clipLayer; 567 RefPtr<GraphicsLayer> m_scrollLayer; 568 RefPtr<GraphicsLayer> m_scrollContainerLayer; 569 RefPtr<GraphicsLayer> m_scrolledContentsLayer; 568 570 569 571 // Enclosing layer for overflow controls and the clipping layer -
trunk/Source/WebKit/ChangeLog
r240914 r240916 1 2019-02-03 Antti Koivisto <antti@apple.com> 2 3 [iOS] Tiles not created in large scrollable iframes 4 https://bugs.webkit.org/show_bug.cgi?id=193665 5 6 Reviewed by Simon Fraser. 7 8 * UIProcess/RemoteLayerTree/ios/ScrollingTreeFrameScrollingNodeRemoteIOS.mm: 9 (WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::commitStateBeforeChildren): 10 * UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm: 11 (WebKit::ScrollingTreeScrollingNodeDelegateIOS::commitStateBeforeChildren): 12 13 We now use scrollContainerLayer consistently so remove the special cases. 14 1 15 2019-02-03 Fujii Hironori <Hironori.Fujii@sony.com> 2 16 -
trunk/Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeFrameScrollingNodeRemoteIOS.mm
r240861 r240916 53 53 ScrollingTreeFrameScrollingNodeIOS::commitStateBeforeChildren(stateNode); 54 54 55 // FIXME: Should be ScrollContainerLayer. 56 if (stateNode.hasChangedProperty(ScrollingStateScrollingNode::ScrolledContentsLayer)) { 57 if (scrolledContentsLayer() && [[scrolledContentsLayer() delegate] isKindOfClass:[UIScrollView self]]) 55 if (stateNode.hasChangedProperty(ScrollingStateScrollingNode::ScrollContainerLayer)) { 56 if (scrollContainerLayer()) 58 57 m_scrollingNodeDelegate = std::make_unique<ScrollingTreeScrollingNodeDelegateIOS>(*this); 59 58 else -
trunk/Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm
r240875 r240916 216 216 void ScrollingTreeScrollingNodeDelegateIOS::commitStateBeforeChildren(const ScrollingStateScrollingNode& scrollingStateNode) 217 217 { 218 if (scrollingStateNode.hasChangedProperty(ScrollingStateScrollingNode::ScrollContainerLayer)) { 219 RetainPtr<CALayer> layer; 220 layer = scrollingStateNode.scrollContainerLayer(); 221 if ([[layer delegate] isKindOfClass:[UIScrollView self]]) 222 m_scrollLayer = layer; 223 } 224 225 // FIMXE: ScrollContainerLayer should always be the UIScrollView layer. 226 if (scrollingStateNode.hasChangedProperty(ScrollingStateScrollingNode::ScrolledContentsLayer)) { 227 RetainPtr<CALayer> layer; 228 layer = scrollingStateNode.scrolledContentsLayer(); 229 if ([[layer delegate] isKindOfClass:[UIScrollView self]]) 230 m_scrollLayer = layer; 231 } 218 if (scrollingStateNode.hasChangedProperty(ScrollingStateScrollingNode::ScrollContainerLayer)) 219 m_scrollLayer = scrollingStateNode.scrollContainerLayer(); 232 220 } 233 221
Note: See TracChangeset
for help on using the changeset viewer.