Changeset 247012 in webkit
- Timestamp:
- Jul 1, 2019 11:09:27 AM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r247010 r247012 1 2019-07-01 Antti Koivisto <antti@apple.com> 2 3 REGRESSION(r240047): Overflow scrollers on WK1 fail to update their content size when it changes 4 https://bugs.webkit.org/show_bug.cgi?id=199360 5 <rdar://problem/51643386> 6 7 Reviewed by Simon Fraser. 8 9 r240047 replaced didCommitChangesForLayer() mechanism by a more narrow didChangePlatformLayerForLayer. 10 Unfortunately on WK1 we relied on scroll layers being invalidated after every size (and scrollbar) change. 11 Without this invalidation we don't call WebChromeClientIOS::addOrUpdateScrollingLayer and the UIKit delegate 12 that resizes the UIScrollView content. 13 14 Fix by removing the scroll layer invalidation mechanism from LegacyWebKitScrollingLayerCoordinator completely and instead 15 simply update all scroll layers after commit. The UIKit delegate doesn't do any significant work if nothing changes, 16 this was not a very meaninful optimization. 17 18 * rendering/RenderLayerCompositor.cpp: 19 (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayersAfterFlush): 20 21 Update all scroll layers after flush (similar to viewport constrained layers). 22 23 (WebCore::RenderLayerCompositor::didChangePlatformLayerForLayer): 24 (WebCore::LegacyWebKitScrollingLayerCoordinator::updateScrollingLayer): 25 (WebCore::LegacyWebKitScrollingLayerCoordinator::addScrollingLayer): 26 (WebCore::LegacyWebKitScrollingLayerCoordinator::removeScrollingLayer): 27 (WebCore::LegacyWebKitScrollingLayerCoordinator::registerScrollingLayersNeedingUpdate): Deleted. 28 (WebCore::LegacyWebKitScrollingLayerCoordinator::didChangePlatformLayerForLayer): Deleted. 29 * rendering/RenderLayerCompositor.h: 30 1 31 2019-07-01 Philippe Normand <pnormand@igalia.com> 2 32 -
trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp
r246869 r247012 558 558 if (m_legacyScrollingLayerCoordinator) { 559 559 m_legacyScrollingLayerCoordinator->registerAllViewportConstrainedLayers(*this); 560 m_legacyScrollingLayerCoordinator->register ScrollingLayersNeedingUpdate();560 m_legacyScrollingLayerCoordinator->registerAllScrollingLayers(); 561 561 } 562 562 } … … 565 565 void RenderLayerCompositor::didChangePlatformLayerForLayer(RenderLayer& layer, const GraphicsLayer*) 566 566 { 567 #if PLATFORM(IOS_FAMILY)568 if (m_legacyScrollingLayerCoordinator)569 m_legacyScrollingLayerCoordinator->didChangePlatformLayerForLayer(layer);570 #endif571 572 567 auto* scrollingCoordinator = this->scrollingCoordinator(); 573 568 if (!scrollingCoordinator) … … 4778 4773 bool allowHorizontalScrollbar = !layer.horizontalScrollbarHiddenByStyle(); 4779 4774 bool allowVerticalScrollbar = !layer.verticalScrollbarHiddenByStyle(); 4775 4780 4776 m_chromeClient.addOrUpdateScrollingLayer(layer.renderer().element(), backing->scrollContainerLayer()->platformLayer(), backing->scrolledContentsLayer()->platformLayer(), 4781 4777 layer.reachableTotalContentsSize(), allowHorizontalScrollbar, allowVerticalScrollbar); … … 4786 4782 for (auto* layer : m_scrollingLayers) 4787 4783 updateScrollingLayer(*layer); 4788 }4789 4790 void LegacyWebKitScrollingLayerCoordinator::registerScrollingLayersNeedingUpdate()4791 {4792 for (auto* layer : m_scrollingLayersNeedingUpdate)4793 updateScrollingLayer(*layer);4794 4795 m_scrollingLayersNeedingUpdate.clear();4796 4784 } 4797 4785 … … 4808 4796 { 4809 4797 m_scrollingLayers.add(&layer); 4810 m_scrollingLayersNeedingUpdate.add(&layer);4811 4798 } 4812 4799 4813 4800 void LegacyWebKitScrollingLayerCoordinator::removeScrollingLayer(RenderLayer& layer, RenderLayerBacking& backing) 4814 4801 { 4815 m_scrollingLayersNeedingUpdate.remove(&layer);4816 4802 if (m_scrollingLayers.remove(&layer)) { 4817 4803 auto* scrollContainerLayer = backing.scrollContainerLayer()->platformLayer(); … … 4839 4825 } 4840 4826 4841 void LegacyWebKitScrollingLayerCoordinator::didChangePlatformLayerForLayer(RenderLayer& layer)4842 {4843 if (m_scrollingLayers.contains(&layer))4844 m_scrollingLayersNeedingUpdate.add(&layer);4845 }4846 4847 4827 #endif 4848 4828 -
trunk/Source/WebCore/rendering/RenderLayerCompositor.h
r246869 r247012 119 119 120 120 void registerAllScrollingLayers(); 121 void registerScrollingLayersNeedingUpdate();122 121 void unregisterAllScrollingLayers(); 123 122 … … 128 127 void removeViewportConstrainedLayer(RenderLayer&); 129 128 130 void didChangePlatformLayerForLayer(RenderLayer&);131 132 129 void removeLayer(RenderLayer&); 133 130 … … 140 137 HashSet<RenderLayer*> m_viewportConstrainedLayers; 141 138 142 HashSet<RenderLayer*> m_scrollingLayersNeedingUpdate;143 139 const bool m_coordinateViewportConstrainedLayers; 144 140 };
Note: See TracChangeset
for help on using the changeset viewer.