REGRESSION (r116203): overflow sections don't have scrollbars
authorjchaffraix@webkit.org <jchaffraix@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 11 Jul 2012 17:50:47 +0000 (17:50 +0000)
committerjchaffraix@webkit.org <jchaffraix@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 11 Jul 2012 17:50:47 +0000 (17:50 +0000)
commit310db1bfd8b1e13caa96dcc0d68b5753cff48f2d
treec57ddfb9d570562c6f7be273861686b2e49ef2a6
parent5ed6dc2823f56802eb8fcd8f9a3dd20bdb013598
REGRESSION (r116203): overflow sections don't have scrollbars
https://bugs.webkit.org/show_bug.cgi?id=90052

Reviewed by Simon Fraser.

This issue stems from RenderLayers with overlay scrollbars not being considered
self-painting.

After r120395 (follow-up of r116203), we ignore subtrees that have no self-painting layer for
painting. Normal scrollbars are painted by their renderer so they were properly painted. However
overlay scrollbars need to be painted by their RenderLayer as a separate phase (see bug 57057) so
they were not painted anymore. The fix is simple: make RenderLayer with overlay scrollbars
self-painting as they should have been in the first place.

Unfortunately no tests as I don't think we have a good way of testing overlay
scrollbars. Tested manually though on the super simple test case from the bug.

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::shouldBeSelfPaintingLayer):
Overlay scrollbars make the layer self-painting.

(WebCore::RenderLayer::updateScrollbarsAfterLayout):
Added a call to updateSelfPaintingLayer.

(WebCore::RenderLayer::styleChanged):
Moved the call to updateSelfPaintingLayer after recomputing the scrollbars to ensure proper behavior.
Added a comment underlining the reason.

(WebCore::RenderLayer::updateSelfPaintingLayer):
Renamed as it is now called during layout too.

* rendering/RenderLayer.h:
(RenderLayer): Updated after updateSelfPaintingLayer rename.

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