REGRESSION: Fixed background on ColterReed.com scrolls
https://bugs.webkit.org/show_bug.cgi?id=115951

Source/WebCore:

Reviewed by Beth Dakin.

The logic for painting the fixed root background into its own layer was
broken when the document element's layer was composited. This could be caused
by a negative z-index child of the body, or by an explicit compositing-causing
style on the <html>.

There were two issues. First, when painting the layer for the fixed root
background, we would simply short-circuit the fixed background paint in
RenderLayer::paintLayer(), when checking for a composited layer. We have
to continue to paint through the composited <html> layer to get the root
background in this case.

Secondly, RenderLayerBacking::paintIntoLayer() would only set the PaintLayerPaintingSkipRootBackground
flag if this RenderLayerBacking had a m_backgroundLayer. However, when the <html> is
composited, we need to skip painting the root layer for both the RenderView's backing,
and for the <html>'s backing. Checking whether there is *any* layer that paints
the fixed root background (i.e. checking compositor()->fixedRootBackgroundLayer())
is a simple way to fix this test.

Tests: platform/mac-wk2/tiled-drawing/fixed-background/fixed-background-composited-html.html
       platform/mac-wk2/tiled-drawing/fixed-background/fixed-background-negative-z-index-fixed.html

* rendering/RenderLayer.cpp:
(WebCore::paintForFixedRootBackground):
(WebCore::RenderLayer::paintLayer):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::paintIntoLayer):

LayoutTests:

Reviewed by Beth Dakin.

Tests with a fixed background and two different ways of making the <html> composited.

* platform/mac-wk2/tiled-drawing/fixed-background/fixed-background-composited-html-expected.html: Added.
* platform/mac-wk2/tiled-drawing/fixed-background/fixed-background-composited-html.html: Added.
* platform/mac-wk2/tiled-drawing/fixed-background/fixed-background-negative-z-index-fixed-expected.html: Added.
* platform/mac-wk2/tiled-drawing/fixed-background/fixed-background-negative-z-index-fixed.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149949 268f45cc-cd09-0410-ab3c-d52691b4dbfc