WebKit Bugzilla
Attachment 373230 Details for
Bug 199360
: REGRESSION(r240047): Overflow scrollers on WK1 fail to update their content size when it changes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
wk1-scrolled-contents-size.patch (text/plain), 6.01 KB, created by
Antti Koivisto
on 2019-07-01 06:55:17 PDT
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Antti Koivisto
Created:
2019-07-01 06:55:17 PDT
Size:
6.01 KB
patch
obsolete
>Index: Source/WebCore/ChangeLog >=================================================================== >--- Source/WebCore/ChangeLog (revision 247005) >+++ Source/WebCore/ChangeLog (working copy) >@@ -1,3 +1,33 @@ >+2019-07-01 Antti Koivisto <antti@apple.com> >+ >+ REGRESSION(r240047): Overflow scrollers on WK1 fail to update their content size when it changes >+ https://bugs.webkit.org/show_bug.cgi?id=199360 >+ <rdar://problem/51643386> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ r240047 replaced didCommitChangesForLayer() mechanism by a more narrow didChangePlatformLayerForLayer mechanism. >+ Unfortunately on WK1 we relied on scroll layers being invalidated after every size (and scrollbar) change. >+ Without this invalidation we don't call WebChromeClientIOS::addOrUpdateScrollingLayer and the UIKit delegate >+ that resizes the UIScrollView content. >+ >+ Fix removing the scroll layer invalidation mechanism from LegacyWebKitScrollingLayerCoordinator completely and instead >+ simply update all scroll layers after commit. The UIKit delegate doesn't do any significant work if nothing changes, >+ this was not a very meaninful optimization. >+ >+ * rendering/RenderLayerCompositor.cpp: >+ (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayersAfterFlush): >+ >+ Update all scroll layers after flush (similar to viewport constrained layers). >+ >+ (WebCore::RenderLayerCompositor::didChangePlatformLayerForLayer): >+ (WebCore::LegacyWebKitScrollingLayerCoordinator::updateScrollingLayer): >+ (WebCore::LegacyWebKitScrollingLayerCoordinator::addScrollingLayer): >+ (WebCore::LegacyWebKitScrollingLayerCoordinator::removeScrollingLayer): >+ (WebCore::LegacyWebKitScrollingLayerCoordinator::registerScrollingLayersNeedingUpdate): Deleted. >+ (WebCore::LegacyWebKitScrollingLayerCoordinator::didChangePlatformLayerForLayer): Deleted. >+ * rendering/RenderLayerCompositor.h: >+ > 2019-07-01 Carlos Garcia Campos <cgarcia@igalia.com> > > Unreviewed. Fix GTK build with GSTREAMER_GL disabled after r246710 >Index: Source/WebCore/rendering/RenderLayerCompositor.cpp >=================================================================== >--- Source/WebCore/rendering/RenderLayerCompositor.cpp (revision 246962) >+++ Source/WebCore/rendering/RenderLayerCompositor.cpp (working copy) >@@ -557,18 +557,13 @@ void RenderLayerCompositor::updateScroll > { > if (m_legacyScrollingLayerCoordinator) { > m_legacyScrollingLayerCoordinator->registerAllViewportConstrainedLayers(*this); >- m_legacyScrollingLayerCoordinator->registerScrollingLayersNeedingUpdate(); >+ m_legacyScrollingLayerCoordinator->registerAllScrollingLayers(); > } > } > #endif > > void RenderLayerCompositor::didChangePlatformLayerForLayer(RenderLayer& layer, const GraphicsLayer*) > { >-#if PLATFORM(IOS_FAMILY) >- if (m_legacyScrollingLayerCoordinator) >- m_legacyScrollingLayerCoordinator->didChangePlatformLayerForLayer(layer); >-#endif >- > auto* scrollingCoordinator = this->scrollingCoordinator(); > if (!scrollingCoordinator) > return; >@@ -4777,6 +4772,7 @@ void LegacyWebKitScrollingLayerCoordinat > > bool allowHorizontalScrollbar = !layer.horizontalScrollbarHiddenByStyle(); > bool allowVerticalScrollbar = !layer.verticalScrollbarHiddenByStyle(); >+ > m_chromeClient.addOrUpdateScrollingLayer(layer.renderer().element(), backing->scrollContainerLayer()->platformLayer(), backing->scrolledContentsLayer()->platformLayer(), > layer.reachableTotalContentsSize(), allowHorizontalScrollbar, allowVerticalScrollbar); > } >@@ -4787,14 +4783,6 @@ void LegacyWebKitScrollingLayerCoordinat > updateScrollingLayer(*layer); > } > >-void LegacyWebKitScrollingLayerCoordinator::registerScrollingLayersNeedingUpdate() >-{ >- for (auto* layer : m_scrollingLayersNeedingUpdate) >- updateScrollingLayer(*layer); >- >- m_scrollingLayersNeedingUpdate.clear(); >-} >- > void LegacyWebKitScrollingLayerCoordinator::unregisterAllScrollingLayers() > { > for (auto* layer : m_scrollingLayers) { >@@ -4807,12 +4795,10 @@ void LegacyWebKitScrollingLayerCoordinat > void LegacyWebKitScrollingLayerCoordinator::addScrollingLayer(RenderLayer& layer) > { > m_scrollingLayers.add(&layer); >- m_scrollingLayersNeedingUpdate.add(&layer); > } > > void LegacyWebKitScrollingLayerCoordinator::removeScrollingLayer(RenderLayer& layer, RenderLayerBacking& backing) > { >- m_scrollingLayersNeedingUpdate.remove(&layer); > if (m_scrollingLayers.remove(&layer)) { > auto* scrollContainerLayer = backing.scrollContainerLayer()->platformLayer(); > auto* scrolledContentsLayer = backing.scrolledContentsLayer()->platformLayer(); >@@ -4838,12 +4824,6 @@ void LegacyWebKitScrollingLayerCoordinat > m_viewportConstrainedLayers.remove(&layer); > } > >-void LegacyWebKitScrollingLayerCoordinator::didChangePlatformLayerForLayer(RenderLayer& layer) >-{ >- if (m_scrollingLayers.contains(&layer)) >- m_scrollingLayersNeedingUpdate.add(&layer); >-} >- > #endif > > } // namespace WebCore >Index: Source/WebCore/rendering/RenderLayerCompositor.h >=================================================================== >--- Source/WebCore/rendering/RenderLayerCompositor.h (revision 246962) >+++ Source/WebCore/rendering/RenderLayerCompositor.h (working copy) >@@ -118,7 +118,6 @@ public: > void unregisterAllViewportConstrainedLayers(); > > void registerAllScrollingLayers(); >- void registerScrollingLayersNeedingUpdate(); > void unregisterAllScrollingLayers(); > > void addScrollingLayer(RenderLayer&); >@@ -127,8 +126,6 @@ public: > void addViewportConstrainedLayer(RenderLayer&); > void removeViewportConstrainedLayer(RenderLayer&); > >- void didChangePlatformLayerForLayer(RenderLayer&); >- > void removeLayer(RenderLayer&); > > private: >@@ -139,7 +136,6 @@ private: > HashSet<RenderLayer*> m_scrollingLayers; > HashSet<RenderLayer*> m_viewportConstrainedLayers; > >- HashSet<RenderLayer*> m_scrollingLayersNeedingUpdate; > const bool m_coordinateViewportConstrainedLayers; > }; > #endif
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 199360
:
373230
|
373231