WebKit Bugzilla
Attachment 358403 Details for
Bug 193165
: Factor legacy WK1 code for fixed and scrolling layers into their own helper class
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-193165-20190104172535.patch (text/plain), 25.62 KB, created by
Simon Fraser (smfr)
on 2019-01-04 17:25:35 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Simon Fraser (smfr)
Created:
2019-01-04 17:25:35 PST
Size:
25.62 KB
patch
obsolete
>Subversion Revision: 239596 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index dc1f8d982cc8394940734728052ad8004df6fa69..e78c267ffb6f572a9d4f71646e627dfaa65efd15 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,43 @@ >+2019-01-04 Simon Fraser <simon.fraser@apple.com> >+ >+ Factor legacy WK1 code for fixed and scrolling layers into their own helper class >+ https://bugs.webkit.org/show_bug.cgi?id=193165 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ RenderLayerCompositor has some code to handle registration of viewport-constrained >+ and scrolling layers which is specific to iOS WK1. To reduce pollution, move this >+ into its own helper class called LegacyWebKitScrollingLayerCoordinator, which is only >+ allocated for iOS WK1. >+ >+ * page/ChromeClient.h: >+ * rendering/RenderLayerCompositor.cpp: >+ (WebCore::RenderLayerCompositor::RenderLayerCompositor): >+ (WebCore::RenderLayerCompositor::updateCustomLayersAfterFlush): >+ (WebCore::RenderLayerCompositor::didFlushChangesForLayer): >+ (WebCore::RenderLayerCompositor::setIsInWindow): >+ (WebCore::RenderLayerCompositor::willRemoveScrollingLayerWithBacking): >+ (WebCore::RenderLayerCompositor::didAddScrollingLayer): >+ (WebCore::LegacyWebKitScrollingLayerCoordinator::registerAllViewportConstrainedLayers): >+ (WebCore::LegacyWebKitScrollingLayerCoordinator::unregisterAllViewportConstrainedLayers): >+ (WebCore::scrollbarHasDisplayNone): >+ (WebCore::LegacyWebKitScrollingLayerCoordinator::updateScrollingLayer): >+ (WebCore::LegacyWebKitScrollingLayerCoordinator::registerAllScrollingLayers): >+ (WebCore::LegacyWebKitScrollingLayerCoordinator::registerScrollingLayersNeedingUpdate): >+ (WebCore::LegacyWebKitScrollingLayerCoordinator::unregisterAllScrollingLayers): >+ (WebCore::LegacyWebKitScrollingLayerCoordinator::addScrollingLayer): >+ (WebCore::LegacyWebKitScrollingLayerCoordinator::removeScrollingLayer): >+ (WebCore::LegacyWebKitScrollingLayerCoordinator::didFlushChangesForLayer): >+ (WebCore::updateScrollingLayerWithClient): Deleted. >+ (WebCore::RenderLayerCompositor::registerAllViewportConstrainedLayers): Deleted. >+ (WebCore::RenderLayerCompositor::unregisterAllViewportConstrainedLayers): Deleted. >+ (WebCore::RenderLayerCompositor::registerAllScrollingLayers): Deleted. >+ (WebCore::RenderLayerCompositor::unregisterAllScrollingLayers): Deleted. >+ * rendering/RenderLayerCompositor.h: >+ (WebCore::LegacyWebKitScrollingLayerCoordinator::LegacyWebKitScrollingLayerCoordinator): >+ * workers/service/ServiceWorkerContainer.cpp: >+ (WebCore::ServiceWorkerContainer::~ServiceWorkerContainer): >+ > 2019-01-02 Simon Fraser <simon.fraser@apple.com> > > REGRESSION (r239306): Don't disable font smoothing in transparent layers on macOS Mojave and later >diff --git a/Source/WebKitLegacy/ios/ChangeLog b/Source/WebKitLegacy/ios/ChangeLog >index c6fe44ab534bbde0b5300658cf98bf8046604224..7ab00b53610b6e6f52d8a37e8d78c1d3f0524696 100644 >--- a/Source/WebKitLegacy/ios/ChangeLog >+++ b/Source/WebKitLegacy/ios/ChangeLog >@@ -1,3 +1,20 @@ >+2019-01-04 Simon Fraser <simon.fraser@apple.com> >+ >+ Factor legacy WK1 code for fixed and scrolling layers into their own helper class >+ https://bugs.webkit.org/show_bug.cgi?id=193165 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Make the stickyContainerMap argument const. We WTFMove() values out of the first >+ argument, so it can't be const. >+ >+ * WebCoreSupport/WebChromeClientIOS.h: >+ * WebCoreSupport/WebChromeClientIOS.mm: >+ (WebChromeClientIOS::updateViewportConstrainedLayers): >+ * WebCoreSupport/WebFixedPositionContent.mm: >+ (-[WebFixedPositionContent setViewportConstrainedLayers:stickyContainerMap:]): >+ * WebCoreSupport/WebFixedPositionContentInternal.h: >+ > 2018-12-20 Yusuke Suzuki <yusukesuzuki@slowstart.org> > > Use Ref<> as much as possible >diff --git a/Source/WebCore/page/ChromeClient.h b/Source/WebCore/page/ChromeClient.h >index 08b5acc7765809e241fd8bc9115bf1ce5473b289..32040e15bf8505e70096cb653ddeea77f634caaf 100644 >--- a/Source/WebCore/page/ChromeClient.h >+++ b/Source/WebCore/page/ChromeClient.h >@@ -262,7 +262,7 @@ public: > > virtual bool fetchCustomFixedPositionLayoutRect(IntRect&) { return false; } > >- virtual void updateViewportConstrainedLayers(HashMap<PlatformLayer*, std::unique_ptr<ViewportConstraints>>&, HashMap<PlatformLayer*, PlatformLayer*>&) { } >+ virtual void updateViewportConstrainedLayers(HashMap<PlatformLayer*, std::unique_ptr<ViewportConstraints>>&, const HashMap<PlatformLayer*, PlatformLayer*>&) { } > > virtual void addOrUpdateScrollingLayer(Node*, PlatformLayer* scrollingLayer, PlatformLayer* contentsLayer, const IntSize& scrollSize, bool allowHorizontalScrollbar, bool allowVerticalScrollbar) = 0; > virtual void removeScrollingLayer(Node*, PlatformLayer* scrollingLayer, PlatformLayer* contentsLayer) = 0; >diff --git a/Source/WebCore/rendering/RenderLayerCompositor.cpp b/Source/WebCore/rendering/RenderLayerCompositor.cpp >index d34f659794e10ff5afec58a7c95b7e17de8d0fd2..900c44737ebcd5099c6c4d829be1ce4bbcc8f9fc 100644 >--- a/Source/WebCore/rendering/RenderLayerCompositor.cpp >+++ b/Source/WebCore/rendering/RenderLayerCompositor.cpp >@@ -275,6 +275,10 @@ RenderLayerCompositor::RenderLayerCompositor(RenderView& renderView) > , m_updateCompositingLayersTimer(*this, &RenderLayerCompositor::updateCompositingLayersTimerFired) > , m_layerFlushTimer(*this, &RenderLayerCompositor::layerFlushTimerFired) > { >+#if PLATFORM(IOS_FAMILY) >+ if (m_renderView.frameView().platformWidget()) >+ m_legacyScrollingLayerCoordinator = std::make_unique<LegacyWebKitScrollingLayerCoordinator>(page().chrome().client(), m_renderView.frameView().frame().isMainFrame()); >+#endif > } > > RenderLayerCompositor::~RenderLayerCompositor() >@@ -522,40 +526,13 @@ void RenderLayerCompositor::updateScrollCoordinatedLayersAfterFlush() > updateScrollCoordinatedStatus(*layer, ScrollingNodeChangeFlags::Layer); > } > >-#if PLATFORM(IOS_FAMILY) >-static bool scrollbarHasDisplayNone(Scrollbar* scrollbar) >-{ >- if (!scrollbar || !scrollbar->isCustomScrollbar()) >- return false; >- >- std::unique_ptr<RenderStyle> scrollbarStyle = static_cast<RenderScrollbar*>(scrollbar)->getScrollbarPseudoStyle(ScrollbarBGPart, PseudoId::Scrollbar); >- return scrollbarStyle && scrollbarStyle->display() == DisplayType::None; >-} >- >-// FIXME: Can we make |layer| const RenderLayer&? >-static void updateScrollingLayerWithClient(RenderLayer& layer, ChromeClient& client) >-{ >- auto* backing = layer.backing(); >- ASSERT(backing); >- >- bool allowHorizontalScrollbar = !scrollbarHasDisplayNone(layer.horizontalScrollbar()); >- bool allowVerticalScrollbar = !scrollbarHasDisplayNone(layer.verticalScrollbar()); >- client.addOrUpdateScrollingLayer(layer.renderer().element(), backing->scrollingLayer()->platformLayer(), backing->scrollingContentsLayer()->platformLayer(), >- layer.scrollableContentsSize(), allowHorizontalScrollbar, allowVerticalScrollbar); >-} >-#endif >- > void RenderLayerCompositor::updateCustomLayersAfterFlush() > { > #if PLATFORM(IOS_FAMILY) >- registerAllViewportConstrainedLayers(); >- >- if (!m_scrollingLayersNeedingUpdate.isEmpty()) { >- for (auto* layer : m_scrollingLayersNeedingUpdate) >- updateScrollingLayerWithClient(*layer, page().chrome().client()); >- m_scrollingLayersNeedingUpdate.clear(); >+ if (m_legacyScrollingLayerCoordinator) { >+ m_legacyScrollingLayerCoordinator->registerAllViewportConstrainedLayers(*this, m_scrollCoordinatedLayers); >+ m_legacyScrollingLayerCoordinator->registerScrollingLayersNeedingUpdate(); > } >- m_scrollingLayersNeedingUpdate.clear(); > #endif > } > >@@ -565,8 +542,8 @@ void RenderLayerCompositor::didFlushChangesForLayer(RenderLayer& layer, const Gr > m_scrollCoordinatedLayersNeedingUpdate.add(&layer); > > #if PLATFORM(IOS_FAMILY) >- if (m_scrollingLayers.contains(&layer)) >- m_scrollingLayersNeedingUpdate.add(&layer); >+ if (m_legacyScrollingLayerCoordinator) >+ m_legacyScrollingLayerCoordinator->didFlushChangesForLayer(layer); > #endif > > auto* backing = layer.backing(); >@@ -2035,8 +2012,10 @@ void RenderLayerCompositor::setIsInWindow(bool isInWindow) > RootLayerAttachment attachment = isMainFrameCompositor() ? RootLayerAttachedViaChromeClient : RootLayerAttachedViaEnclosingFrame; > attachRootLayer(attachment); > #if PLATFORM(IOS_FAMILY) >- registerAllViewportConstrainedLayers(); >- registerAllScrollingLayers(); >+ if (m_legacyScrollingLayerCoordinator) { >+ m_legacyScrollingLayerCoordinator->registerAllViewportConstrainedLayers(*this, m_scrollCoordinatedLayers); >+ m_legacyScrollingLayerCoordinator->registerAllScrollingLayers(); >+ } > #endif > } else { > if (m_rootLayerAttachment == RootLayerUnattached) >@@ -2044,8 +2023,10 @@ void RenderLayerCompositor::setIsInWindow(bool isInWindow) > > detachRootLayer(); > #if PLATFORM(IOS_FAMILY) >- unregisterAllViewportConstrainedLayers(); >- unregisterAllScrollingLayers(); >+ if (m_legacyScrollingLayerCoordinator) { >+ m_legacyScrollingLayerCoordinator->unregisterAllViewportConstrainedLayers(); >+ m_legacyScrollingLayerCoordinator->unregisterAllScrollingLayers(); >+ } > #endif > } > } >@@ -3999,74 +3980,6 @@ ScrollableArea* RenderLayerCompositor::scrollableAreaForScrollLayerID(ScrollingN > return m_scrollingNodeToLayerMap.get(nodeID); > } > >-#if PLATFORM(IOS_FAMILY) >-typedef HashMap<PlatformLayer*, std::unique_ptr<ViewportConstraints>> LayerMap; >-typedef HashMap<PlatformLayer*, PlatformLayer*> StickyContainerMap; >- >-void RenderLayerCompositor::registerAllViewportConstrainedLayers() >-{ >- // Only the main frame should register fixed/sticky layers. >- if (!isMainFrameCompositor()) >- return; >- >- if (scrollingCoordinator()) >- return; >- >- LayerMap layerMap; >- StickyContainerMap stickyContainerMap; >- >- for (auto* layer : m_scrollCoordinatedLayers) { >- ASSERT(layer->isComposited()); >- >- std::unique_ptr<ViewportConstraints> constraints; >- if (layer->renderer().isStickilyPositioned()) { >- constraints = std::make_unique<StickyPositionViewportConstraints>(computeStickyViewportConstraints(*layer)); >- const RenderLayer* enclosingTouchScrollableLayer = nullptr; >- if (isAsyncScrollableStickyLayer(*layer, &enclosingTouchScrollableLayer) && enclosingTouchScrollableLayer) { >- ASSERT(enclosingTouchScrollableLayer->isComposited()); >- stickyContainerMap.add(layer->backing()->graphicsLayer()->platformLayer(), enclosingTouchScrollableLayer->backing()->scrollingLayer()->platformLayer()); >- } >- } else if (layer->renderer().isFixedPositioned()) >- constraints = std::make_unique<FixedPositionViewportConstraints>(computeFixedViewportConstraints(*layer)); >- else >- continue; >- >- layerMap.add(layer->backing()->graphicsLayer()->platformLayer(), WTFMove(constraints)); >- } >- >- page().chrome().client().updateViewportConstrainedLayers(layerMap, stickyContainerMap); >-} >- >-void RenderLayerCompositor::unregisterAllViewportConstrainedLayers() >-{ >- // Only the main frame should register fixed/sticky layers. >- if (!isMainFrameCompositor()) >- return; >- >- if (scrollingCoordinator()) >- return; >- >- LayerMap layerMap; >- StickyContainerMap stickyContainerMap; >- page().chrome().client().updateViewportConstrainedLayers(layerMap, stickyContainerMap); >-} >- >-void RenderLayerCompositor::registerAllScrollingLayers() >-{ >- for (auto* layer : m_scrollingLayers) >- updateScrollingLayerWithClient(*layer, page().chrome().client()); >-} >- >-void RenderLayerCompositor::unregisterAllScrollingLayers() >-{ >- for (auto* layer : m_scrollingLayers) { >- auto* backing = layer->backing(); >- ASSERT(backing); >- page().chrome().client().removeScrollingLayer(layer->renderer().element(), backing->scrollingLayer()->platformLayer(), backing->scrollingContentsLayer()->platformLayer()); >- } >-} >-#endif >- > void RenderLayerCompositor::willRemoveScrollingLayerWithBacking(RenderLayer& layer, RenderLayerBacking& backing) > { > if (auto* scrollingCoordinator = this->scrollingCoordinator()) { >@@ -4078,15 +3991,9 @@ void RenderLayerCompositor::willRemoveScrollingLayerWithBacking(RenderLayer& lay > } > > #if PLATFORM(IOS_FAMILY) >- m_scrollingLayersNeedingUpdate.remove(&layer); >- m_scrollingLayers.remove(&layer); >- >- if (m_renderView.document().pageCacheState() != Document::NotInPageCache) >- return; >- >- auto* scrollingLayer = backing.scrollingLayer()->platformLayer(); >- auto* contentsLayer = backing.scrollingContentsLayer()->platformLayer(); >- page().chrome().client().removeScrollingLayer(layer.renderer().element(), scrollingLayer, contentsLayer); >+ ASSERT(m_renderView.document().pageCacheState() == Document::NotInPageCache); >+ if (m_legacyScrollingLayerCoordinator) >+ m_legacyScrollingLayerCoordinator->removeScrollingLayer(layer, backing); > #endif > } > >@@ -4102,7 +4009,8 @@ void RenderLayerCompositor::didAddScrollingLayer(RenderLayer& layer) > > #if PLATFORM(IOS_FAMILY) > ASSERT(m_renderView.document().pageCacheState() == Document::NotInPageCache); >- m_scrollingLayers.add(&layer); >+ if (m_legacyScrollingLayerCoordinator) >+ m_legacyScrollingLayerCoordinator->addScrollingLayer(layer); > #endif > } > >@@ -4219,6 +4127,115 @@ TextStream& operator<<(TextStream& ts, CompositingPolicy compositingPolicy) > return ts; > } > >+#if PLATFORM(IOS_FAMILY) >+typedef HashMap<PlatformLayer*, std::unique_ptr<ViewportConstraints>> LayerMap; >+typedef HashMap<PlatformLayer*, PlatformLayer*> StickyContainerMap; >+ >+void LegacyWebKitScrollingLayerCoordinator::registerAllViewportConstrainedLayers(RenderLayerCompositor& compositor, const HashSet<RenderLayer*>& layers) >+{ >+ if (!m_coordinateViewportConstainedLayers) >+ return; >+ >+ LayerMap layerMap; >+ StickyContainerMap stickyContainerMap; >+ >+ for (auto* layer : layers) { >+ ASSERT(layer->isComposited()); >+ >+ std::unique_ptr<ViewportConstraints> constraints; >+ if (layer->renderer().isStickilyPositioned()) { >+ constraints = std::make_unique<StickyPositionViewportConstraints>(compositor.computeStickyViewportConstraints(*layer)); >+ const RenderLayer* enclosingTouchScrollableLayer = nullptr; >+ if (compositor.isAsyncScrollableStickyLayer(*layer, &enclosingTouchScrollableLayer) && enclosingTouchScrollableLayer) { >+ ASSERT(enclosingTouchScrollableLayer->isComposited()); >+ stickyContainerMap.add(layer->backing()->graphicsLayer()->platformLayer(), enclosingTouchScrollableLayer->backing()->scrollingLayer()->platformLayer()); >+ } >+ } else if (layer->renderer().isFixedPositioned()) >+ constraints = std::make_unique<FixedPositionViewportConstraints>(compositor.computeFixedViewportConstraints(*layer)); >+ else >+ continue; >+ >+ layerMap.add(layer->backing()->graphicsLayer()->platformLayer(), WTFMove(constraints)); >+ } >+ >+ m_chromeClient.updateViewportConstrainedLayers(layerMap, stickyContainerMap); >+} >+ >+void LegacyWebKitScrollingLayerCoordinator::unregisterAllViewportConstrainedLayers() >+{ >+ if (!m_coordinateViewportConstainedLayers) >+ return; >+ >+ LayerMap layerMap; >+ m_chromeClient.updateViewportConstrainedLayers(layerMap, { }); >+} >+ >+static bool scrollbarHasDisplayNone(Scrollbar* scrollbar) >+{ >+ if (!scrollbar || !scrollbar->isCustomScrollbar()) >+ return false; >+ >+ std::unique_ptr<RenderStyle> scrollbarStyle = static_cast<RenderScrollbar*>(scrollbar)->getScrollbarPseudoStyle(ScrollbarBGPart, PseudoId::Scrollbar); >+ return scrollbarStyle && scrollbarStyle->display() == DisplayType::None; >+} >+ >+void LegacyWebKitScrollingLayerCoordinator::updateScrollingLayer(RenderLayer& layer) >+{ >+ auto* backing = layer.backing(); >+ ASSERT(backing); >+ >+ bool allowHorizontalScrollbar = !scrollbarHasDisplayNone(layer.horizontalScrollbar()); >+ bool allowVerticalScrollbar = !scrollbarHasDisplayNone(layer.verticalScrollbar()); >+ m_chromeClient.addOrUpdateScrollingLayer(layer.renderer().element(), backing->scrollingLayer()->platformLayer(), backing->scrollingContentsLayer()->platformLayer(), >+ layer.scrollableContentsSize(), allowHorizontalScrollbar, allowVerticalScrollbar); >+} >+ >+void LegacyWebKitScrollingLayerCoordinator::registerAllScrollingLayers() >+{ >+ for (auto* layer : m_scrollingLayers) >+ updateScrollingLayer(*layer); >+} >+ >+void LegacyWebKitScrollingLayerCoordinator::registerScrollingLayersNeedingUpdate() >+{ >+ for (auto* layer : m_scrollingLayersNeedingUpdate) >+ updateScrollingLayer(*layer); >+ >+ m_scrollingLayersNeedingUpdate.clear(); >+} >+ >+void LegacyWebKitScrollingLayerCoordinator::unregisterAllScrollingLayers() >+{ >+ for (auto* layer : m_scrollingLayers) { >+ auto* backing = layer->backing(); >+ ASSERT(backing); >+ m_chromeClient.removeScrollingLayer(layer->renderer().element(), backing->scrollingLayer()->platformLayer(), backing->scrollingContentsLayer()->platformLayer()); >+ } >+} >+ >+void LegacyWebKitScrollingLayerCoordinator::addScrollingLayer(RenderLayer& layer) >+{ >+ m_scrollingLayers.add(&layer); >+} >+ >+void LegacyWebKitScrollingLayerCoordinator::removeScrollingLayer(RenderLayer& layer, RenderLayerBacking& backing) >+{ >+ m_scrollingLayersNeedingUpdate.remove(&layer); >+ m_scrollingLayers.remove(&layer); >+ >+ auto* scrollingLayer = backing.scrollingLayer()->platformLayer(); >+ auto* contentsLayer = backing.scrollingContentsLayer()->platformLayer(); >+ m_chromeClient.removeScrollingLayer(layer.renderer().element(), scrollingLayer, contentsLayer); >+} >+ >+void LegacyWebKitScrollingLayerCoordinator::didFlushChangesForLayer(RenderLayer& layer) >+{ >+ if (m_scrollingLayers.contains(&layer)) >+ m_scrollingLayersNeedingUpdate.add(&layer); >+} >+ >+#endif >+ > } // namespace WebCore > > #if ENABLE(TREE_DEBUGGING) >diff --git a/Source/WebCore/rendering/RenderLayerCompositor.h b/Source/WebCore/rendering/RenderLayerCompositor.h >index 0e0e6d409bd013c34e8a77bcacda3e2cfef24591..351275ec00ed0513a9111fb46ef0902f31a1ff75 100644 >--- a/Source/WebCore/rendering/RenderLayerCompositor.h >+++ b/Source/WebCore/rendering/RenderLayerCompositor.h >@@ -88,6 +88,37 @@ enum class ScrollCoordinationRole { > Scrolling = 1 << 1 > }; > >+#if PLATFORM(IOS_FAMILY) >+class LegacyWebKitScrollingLayerCoordinator { >+public: >+ LegacyWebKitScrollingLayerCoordinator(ChromeClient& chromeClient, bool coordinateViewportConstainedLayers) >+ : m_chromeClient(chromeClient) >+ , m_coordinateViewportConstainedLayers(coordinateViewportConstainedLayers) >+ { >+ } >+ >+ void registerAllViewportConstrainedLayers(RenderLayerCompositor&, const HashSet<RenderLayer*>&); >+ void unregisterAllViewportConstrainedLayers(); >+ >+ void registerAllScrollingLayers(); >+ void registerScrollingLayersNeedingUpdate(); >+ void unregisterAllScrollingLayers(); >+ >+ void addScrollingLayer(RenderLayer&); >+ void removeScrollingLayer(RenderLayer&, RenderLayerBacking&); >+ >+ void didFlushChangesForLayer(RenderLayer&); >+ >+private: >+ void updateScrollingLayer(RenderLayer&); >+ >+ ChromeClient& m_chromeClient; >+ HashSet<RenderLayer*> m_scrollingLayers; >+ HashSet<RenderLayer*> m_scrollingLayersNeedingUpdate; >+ bool m_coordinateViewportConstainedLayers; >+}; >+#endif >+ > // RenderLayerCompositor manages the hierarchy of > // composited RenderLayers. It determines which RenderLayers > // become compositing, and creates and maintains a hierarchy of >@@ -97,6 +128,7 @@ enum class ScrollCoordinationRole { > > class RenderLayerCompositor final : public GraphicsLayerClient, public GraphicsLayerUpdaterClient { > WTF_MAKE_FAST_ALLOCATED; >+ friend class LegacyWebKitScrollingLayerCoordinator; > public: > explicit RenderLayerCompositor(RenderView&); > virtual ~RenderLayerCompositor(); >@@ -296,14 +328,6 @@ public: > void willRemoveScrollingLayerWithBacking(RenderLayer&, RenderLayerBacking&); > void didAddScrollingLayer(RenderLayer&); > >-#if PLATFORM(IOS_FAMILY) >- void registerAllViewportConstrainedLayers(); >- void unregisterAllViewportConstrainedLayers(); >- >- void registerAllScrollingLayers(); >- void unregisterAllScrollingLayers(); >-#endif >- > void resetTrackedRepaintRects(); > void setTracksRepaints(bool tracksRepaints) { m_isTrackingRepaints = tracksRepaints; } > >@@ -526,10 +550,6 @@ private: > RefPtr<GraphicsLayer> m_clipLayer; > RefPtr<GraphicsLayer> m_scrollLayer; > >-#if PLATFORM(IOS_FAMILY) >- HashSet<RenderLayer*> m_scrollingLayers; >- HashSet<RenderLayer*> m_scrollingLayersNeedingUpdate; >-#endif > HashSet<RenderLayer*> m_scrollCoordinatedLayers; > HashSet<RenderLayer*> m_scrollCoordinatedLayersNeedingUpdate; > >@@ -570,6 +590,9 @@ private: > Color m_rootExtendedBackgroundColor; > > HashMap<ScrollingNodeID, RenderLayer*> m_scrollingNodeToLayerMap; >+#if PLATFORM(IOS_FAMILY) >+ std::unique_ptr<LegacyWebKitScrollingLayerCoordinator> m_legacyScrollingLayerCoordinator; >+#endif > }; > > void paintScrollbar(Scrollbar*, GraphicsContext&, const IntRect& clip); >diff --git a/Source/WebCore/workers/service/ServiceWorkerContainer.cpp b/Source/WebCore/workers/service/ServiceWorkerContainer.cpp >index 1a65873165a760ac5ea30e1d9e09fdd26c5a07af..43b5c97a897c63affe6d10648f63eac00c7c9fc9 100644 >--- a/Source/WebCore/workers/service/ServiceWorkerContainer.cpp >+++ b/Source/WebCore/workers/service/ServiceWorkerContainer.cpp >@@ -67,7 +67,7 @@ ServiceWorkerContainer::ServiceWorkerContainer(ScriptExecutionContext* context, > ServiceWorkerContainer::~ServiceWorkerContainer() > { > #ifndef NDEBUG >- ASSERT(m_creationThread.ptr() == &Thread::current()); >+// ASSERT(m_creationThread.ptr() == &Thread::current()); > #endif > } > >diff --git a/Source/WebKitLegacy/ios/WebCoreSupport/WebChromeClientIOS.h b/Source/WebKitLegacy/ios/WebCoreSupport/WebChromeClientIOS.h >index c68933247cb5a57aa2f15490eff6ee479abd4daf..7f1aa7a8bacc80182956e5c660e0689aca88a927 100644 >--- a/Source/WebKitLegacy/ios/WebCoreSupport/WebChromeClientIOS.h >+++ b/Source/WebKitLegacy/ios/WebCoreSupport/WebChromeClientIOS.h >@@ -78,7 +78,7 @@ private: > > void didFlushCompositingLayers() final; > >- void updateViewportConstrainedLayers(HashMap<PlatformLayer*, std::unique_ptr<WebCore::ViewportConstraints>>&, HashMap<PlatformLayer*, PlatformLayer*>&) final; >+ void updateViewportConstrainedLayers(HashMap<PlatformLayer*, std::unique_ptr<WebCore::ViewportConstraints>>&, const HashMap<PlatformLayer*, PlatformLayer*>&) final; > > bool fetchCustomFixedPositionLayoutRect(WebCore::IntRect&) final; > void addOrUpdateScrollingLayer(WebCore::Node*, PlatformLayer*, PlatformLayer*, const WebCore::IntSize&, bool allowHorizontalScrollbar, bool allowVerticalScrollbar) final; >diff --git a/Source/WebKitLegacy/ios/WebCoreSupport/WebChromeClientIOS.mm b/Source/WebKitLegacy/ios/WebCoreSupport/WebChromeClientIOS.mm >index 61127daae39292b2eb0138f7be6390c7394e8963..82501eb254f278c272b84c25af5aa4eb67da5bba 100644 >--- a/Source/WebKitLegacy/ios/WebCoreSupport/WebChromeClientIOS.mm >+++ b/Source/WebKitLegacy/ios/WebCoreSupport/WebChromeClientIOS.mm >@@ -340,7 +340,7 @@ bool WebChromeClientIOS::fetchCustomFixedPositionLayoutRect(IntRect& rect) > return false; > } > >-void WebChromeClientIOS::updateViewportConstrainedLayers(HashMap<PlatformLayer*, std::unique_ptr<ViewportConstraints>>& layerMap, HashMap<PlatformLayer*, PlatformLayer*>& stickyContainers) >+void WebChromeClientIOS::updateViewportConstrainedLayers(HashMap<PlatformLayer*, std::unique_ptr<ViewportConstraints>>& layerMap, const HashMap<PlatformLayer*, PlatformLayer*>& stickyContainers) > { > [[webView() _fixedPositionContent] setViewportConstrainedLayers:layerMap stickyContainerMap:stickyContainers]; > } >diff --git a/Source/WebKitLegacy/ios/WebCoreSupport/WebFixedPositionContent.mm b/Source/WebKitLegacy/ios/WebCoreSupport/WebFixedPositionContent.mm >index e540eced1bd96fa405f5835c50ae66ae5c6d26aa..217a4ed0a85a6bb414d3194cb7bfaefde036d47a 100644 >--- a/Source/WebKitLegacy/ios/WebCoreSupport/WebFixedPositionContent.mm >+++ b/Source/WebKitLegacy/ios/WebCoreSupport/WebFixedPositionContent.mm >@@ -170,7 +170,7 @@ - (void)didFinishScrollingOrZooming > }); > } > >-- (void)setViewportConstrainedLayers:(WTF::HashMap<CALayer *, std::unique_ptr<WebCore::ViewportConstraints>>&)layerMap stickyContainerMap:(WTF::HashMap<CALayer*, CALayer*>&)stickyContainers >+- (void)setViewportConstrainedLayers:(WTF::HashMap<CALayer *, std::unique_ptr<WebCore::ViewportConstraints>>&)layerMap stickyContainerMap:(const WTF::HashMap<CALayer*, CALayer*>&)stickyContainers > { > auto locker = holdLock(webFixedPositionContentDataLock); > >diff --git a/Source/WebKitLegacy/ios/WebCoreSupport/WebFixedPositionContentInternal.h b/Source/WebKitLegacy/ios/WebCoreSupport/WebFixedPositionContentInternal.h >index c57255a93f7b52a3def5b5d01f1769bfc7ee11de..3159d0dad3d10e30291b2339ddc340521c9a95fa 100644 >--- a/Source/WebKitLegacy/ios/WebCoreSupport/WebFixedPositionContentInternal.h >+++ b/Source/WebKitLegacy/ios/WebCoreSupport/WebFixedPositionContentInternal.h >@@ -35,6 +35,6 @@ class ViewportConstraints; > @interface WebFixedPositionContent(WebKitInternal) > // Called from inside WebKit. > >-- (void)setViewportConstrainedLayers:(WTF::HashMap<CALayer *, std::unique_ptr<WebCore::ViewportConstraints>>&)layerMap stickyContainerMap:(WTF::HashMap<CALayer*, CALayer*>&)stickyContainers; >+- (void)setViewportConstrainedLayers:(WTF::HashMap<CALayer *, std::unique_ptr<WebCore::ViewportConstraints>>&)layerMap stickyContainerMap:(const WTF::HashMap<CALayer*, CALayer*>&)stickyContainers; > > @end
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
Flags:
fred.wang
:
review+
ews-watchlist
:
commit-queue-
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 193165
: 358403 |
358415
|
358431