Should update compositing state when an out-of-view fixed position element becomes in-view
https://bugs.webkit.org/show_bug.cgi?id=107410

Reviewed by Simon Fraser.

Source/WebCore:

When a non-compositing page contains some not-composited fixed position element because of bounds out-of-view, when the element changes position and RenderLayerCompositor::updateCompositingLayers() is called, the function may return early because of "if (!m_reevaluateCompositingAfterLayout && !m_compositing)" without updating the compositing layers.

Set m_reevaluateCompositingAfterLayout when a fixed position element is not composited because of bounds out-of-view.

Test: compositing/layer-creation/fixed-position-change-out-of-view-in-view.html

* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::requiresCompositingForPosition):

LayoutTests:

Tests if compositing status is properly updated when fixed position elements change from out-of-view to in-view and back.

* compositing/layer-creation/fixed-position-change-out-of-view-in-view-expected.txt: Added.
* compositing/layer-creation/fixed-position-change-out-of-view-in-view.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140593 268f45cc-cd09-0410-ab3c-d52691b4dbfc
5 files changed