REGRESSION(r240047): Overflow scrollers on WK1 fail to update their content size...
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 1 Jul 2019 18:09:27 +0000 (18:09 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 1 Jul 2019 18:09:27 +0000 (18:09 +0000)
commit29fb33aedd32a7edf601eaaafff80466688a1903
treef5c39c38f4444be170770a16c32703211f3f3dea
parent469197e290228e6b676de19c9e461dac5299d028
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 Simon Fraser.

r240047 replaced didCommitChangesForLayer() mechanism by a more narrow didChangePlatformLayerForLayer.
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 by 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:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@247012 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderLayerCompositor.cpp
Source/WebCore/rendering/RenderLayerCompositor.h