Left sidebar on cubic-bezier.com flickers
https://bugs.webkit.org/show_bug.cgi?id=123128

Source/WebCore:

Reviewed by Dean Jackson.

The logic that determined whether position:fixed elements outside the viewport
should be composited was incorrect if the fixed element also had a transform.

layer.calculateLayerBounds() only takes into account painted transforms (since they
affect layer bounds). So we need to compute the bounds relative to the layer
itself, then use localToContainerQuad() to map them to document coordinates,
but only to the RenderView so that we don't hit the page scale transform.

Tests: compositing/layer-creation/fixed-position-transformed-into-view.html
       compositing/layer-creation/fixed-position-transformed-outside-view.html

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

LayoutTests:

Reviewed by Dean Jackson.

Tests with transformed, fixed elements which dump the layer tree to see
which layers get composited.

* compositing/layer-creation/fixed-position-transformed-into-view-expected.txt: Added.
* compositing/layer-creation/fixed-position-transformed-into-view.html: Added.
* compositing/layer-creation/fixed-position-transformed-outside-view-expected.txt: Added.
* compositing/layer-creation/fixed-position-transformed-outside-view.html: Added.

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