[iOS WK2] Interactive elements of developer.apple.com are broken
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 14 Apr 2015 17:25:31 +0000 (17:25 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 14 Apr 2015 17:25:31 +0000 (17:25 +0000)
commit8723b41958394840eb234200294f08ff27860a80
treeb85deb3a01018c9bdd54cf1c8889f17d7fe3f31b
parent25e19106cd9063c3e5e6635a32bbb7278dceb55b
[iOS WK2] Interactive elements of developer.apple.com are broken
https://bugs.webkit.org/show_bug.cgi?id=143692
Source/WebCore:

rdar://problem/19320087

Reviewed by Sam Weinig.

When a composited RenderLayer had nodes in the scrolling tree by virtue of
both position and overflow:scroll, and one of those reasons disappeared,
we'd fail to remove the corresponding node from the scrolling tree. This
could leave an overflow:scroll element behaving as if it were position:fixed.

Fix by having RenderLayerCompositor::updateScrollCoordinationForThisFrame()
detach the layer on a per-role basis.

Test: platform/ios-simulator-wk2/scrolling/remove-scrolling-role.html

* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::detachFromScrollingCoordinatorForRole):
* rendering/RenderLayerBacking.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::detachScrollCoordinatedLayerForRole):
(WebCore::RenderLayerCompositor::detachScrollCoordinatedLayer): Just moved.
(WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer): Call detachScrollCoordinatedLayerForRole()
if the layer doesn't have the relevant scrolling reasons.
* rendering/RenderLayerCompositor.h:

LayoutTests:

Reviewed by Sam Weinig.

* platform/ios-simulator-wk2/scrolling/remove-scrolling-role-expected.txt: Added.
* platform/ios-simulator-wk2/scrolling/remove-scrolling-role.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@182799 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/platform/ios-simulator-wk2/scrolling/remove-scrolling-role-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator-wk2/scrolling/remove-scrolling-role.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderLayerBacking.cpp
Source/WebCore/rendering/RenderLayerBacking.h
Source/WebCore/rendering/RenderLayerCompositor.cpp
Source/WebCore/rendering/RenderLayerCompositor.h