Use background color for GraphicsLayers when applicable
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 8 Dec 2012 23:46:05 +0000 (23:46 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 8 Dec 2012 23:46:05 +0000 (23:46 +0000)
https://bugs.webkit.org/show_bug.cgi?id=103786

Source/WebCore:

Updated RenderLayerBacking to call GraphicsLayer::setContentsToBackgroundColor when the following conditions take place:
1. The layer doesn't paint its own content, other than background/decoration.
2. There are no borders or other box decorations (border radius, borders, outline, shadow etc.)
3. The image has only a background color, and no background image.
4. background-composite is set to source-over, and background-clip is anything apart from text.
5. The port supports setContentsToBackgroundColor.

This allows any implementation of GraphicsLayer that supports setContentsToBackgroundColor to avoid allocating a backing store
for that layer, but instead draw that solid color directly.
In addition to setting the background color, the layer's contentsRect needs to be adjusted, since the default contents rect of
a layer is not always equivalent to the rect where the background is supposed to be painted, which is derived from the box's
background-clip property.

Patch by No'am Rosenthal <noam@webkit.org> on 2012-12-08
Reviewed by Simon Fraser.

Tests: compositing/background-color/background-color-alpha.html
       compositing/background-color/background-color-change-to-text.html
       compositing/background-color/background-color-composite.html
       compositing/background-color/background-color-container.html
       compositing/background-color/background-color-content-clip.html
       compositing/background-color/background-color-padding-change.html
       compositing/background-color/background-color-padding-clip.html
       compositing/background-color/background-color-simple.html
       compositing/background-color/background-color-text-change.html
       compositing/background-color/background-color-text-clip.html

* platform/graphics/GraphicsLayer.h:
(WebCore::GraphicsLayer::supportsBackgroundColorContent):
    Allows different implementation of GraphicsLayer to identify whether they implement setContentsToBackgroundColor.
    Currently only the MAC implementation and TextureMapper falls under that category.

* rendering/RenderBox.h:
(WebCore::RenderBox::paddingBoxRect):
    Added paddingBoxRect to compliment borderBoxRect and contentsBoxRect. paddingBoxRect corresponds to
    background-clip: padding.

* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
    Update the background color if needed, for every configuration change.
    This should accomodate the old behavior for full-screen, while enabling background color changes for other layers.

(WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
    Move the contentsRect logic to updateContentsRect.

(WebCore::RenderLayerBacking::updateContentsRect):
    Use the background box when directly compositing backgrounds.

(WebCore::RenderLayerBacking::updateBackgroundColor):
    Set the background color if applicable, otherwise set to trasnparent and clear.
    This was not needed in the past because background colors were only used for the special case of full-screen.

(WebCore::supportsDirectBoxDecorationsComposition):
    Helper function to determine whether a particular background can be directly composited. Right now only
    background color can be composited, and only if the GraphicsLayer implementation supports background colors.
    Also we don't yet support background-clip: text and any background-composite other than source-over.

(WebCore::RenderLayerBacking::paintsBoxDecorations):
    Apply the new supportsDirectBoxDecorationsComposition logic.

(WebCore::RenderLayerBacking::contentsBox):
    Remove unnecessary local variable.

(WebCore::backgroundRectForBox):
(WebCore::RenderLayerBacking::backgroundBox):
    Figure out the correct rect for the GraphicsLayer's contentsRect, based on the renderer's backgroundClip.
    The rectangle has to be adjusted based on the composited layer offset, and snapped to an IntRect as
    GraphicsLayer::contentsRect expects snapped pixels.

LayoutTests:

Created new tests for composited background colors, update existing tests that are affected by the change,
and created platform-specific overrides for Chromium, since it does not yet support composited background
colors.

Patch by No'am Rosenthal <noam@webkit.org> on 2012-12-08
Reviewed by Simon Fraser.

* compositing/background-color/background-color-alpha-expected.html: Added.
* compositing/background-color/background-color-alpha.html: Added.
* compositing/background-color/background-color-change-to-text-expected.html: Added.
* compositing/background-color/background-color-change-to-text.html: Added.
* compositing/background-color/background-color-composite-expected.html: Added.
* compositing/background-color/background-color-composite.html: Added.
* compositing/background-color/background-color-container-expected.html: Added.
* compositing/background-color/background-color-container.html: Added.
* compositing/background-color/background-color-content-clip-expected.html: Added.
* compositing/background-color/background-color-content-clip.html: Added.
* compositing/background-color/background-color-padding-change-expected.html: Added.
* compositing/background-color/background-color-padding-change.html: Added.
* compositing/background-color/background-color-padding-clip-expected.html: Added.
* compositing/background-color/background-color-padding-clip.html: Added.
* compositing/background-color/background-color-simple-expected.html: Added.
* compositing/background-color/background-color-simple.html: Added.
* compositing/background-color/background-color-text-change-expected.html: Added.
* compositing/background-color/background-color-text-change.html: Added.
* compositing/background-color/background-color-text-clip-expected.html: Added.
* compositing/background-color/background-color-text-clip.html: Added.
        Added new tests for the specific functionality added, with the edge cases regarding composited
        backgrounds.

* compositing/backing/no-backing-for-clip-expected.txt:
* compositing/backing/no-backing-for-clip-overlap-expected.txt:
* compositing/backing/no-backing-for-perspective-expected.txt:
* compositing/columns/composited-in-paginated-expected.txt:
* compositing/geometry/ancestor-overflow-change-expected.txt:
* compositing/geometry/bounds-ignores-hidden-composited-descendant-expected.txt:
* compositing/geometry/bounds-ignores-hidden-dynamic-negzindex-expected.txt:
* compositing/geometry/clip-expected.txt:
* compositing/geometry/composited-in-columns-expected.txt:
* compositing/geometry/flipped-writing-mode-expected.txt:
* compositing/geometry/layer-due-to-layer-children-deep-switch-expected.txt:
* compositing/geometry/limit-layer-bounds-fixed-positioned-expected.txt:
* compositing/geometry/limit-layer-bounds-overflow-root-expected.txt:
* compositing/geometry/limit-layer-bounds-positioned-expected.txt:
* compositing/geometry/limit-layer-bounds-positioned-transition-expected.txt:
* compositing/geometry/limit-layer-bounds-transformed-expected.txt:
* compositing/geometry/limit-layer-bounds-transformed-overflow-expected.txt:
* compositing/geometry/preserve-3d-switching-expected.txt:
* compositing/iframes/become-composited-nested-iframes-expected.txt:
* compositing/iframes/become-overlapped-iframe-expected.txt:
* compositing/iframes/composited-parent-iframe-expected.txt:
* compositing/iframes/connect-compositing-iframe-delayed-expected.txt:
* compositing/iframes/connect-compositing-iframe-expected.txt:
* compositing/iframes/connect-compositing-iframe2-expected.txt:
* compositing/iframes/connect-compositing-iframe3-expected.txt:
* compositing/iframes/enter-compositing-iframe-expected.txt:
* compositing/iframes/iframe-resize-expected.txt:
* compositing/iframes/invisible-nested-iframe-hide-expected.txt:
* compositing/iframes/invisible-nested-iframe-show-expected.txt:
* compositing/iframes/overlapped-iframe-expected.txt:
* compositing/iframes/overlapped-iframe-iframe-expected.txt:
* compositing/iframes/page-cache-layer-tree-expected.txt:
* compositing/iframes/scrolling-iframe-expected.txt:
* compositing/layer-creation/animation-overlap-with-children-expected.txt:
* compositing/layer-creation/fixed-position-and-transform-expected.txt:
* compositing/layer-creation/fixed-position-under-transform-expected.txt:
* compositing/layer-creation/no-compositing-for-preserve-3d-expected.txt:
* compositing/layer-creation/overflow-scroll-overlap-expected.txt:
* compositing/layer-creation/overlap-animation-expected.txt:
* compositing/layer-creation/overlap-child-layer-expected.txt:
* compositing/layer-creation/overlap-clipping-expected.txt:
* compositing/layer-creation/overlap-transformed-and-clipped-expected.txt:
* compositing/layer-creation/overlap-transformed-layer-expected.txt:
* compositing/layer-creation/overlap-transforms-expected.txt:
* compositing/layer-creation/scroll-partial-update-expected.txt:
* compositing/layer-creation/spanOverlapsCanvas-expected.txt:
* compositing/layer-creation/stacking-context-overlap-expected.txt:
* compositing/layer-creation/stacking-context-overlap-nested-expected.txt:
* compositing/layer-creation/translatez-overlap-expected.txt:
* compositing/overflow-trumps-transform-style-expected.txt:
* compositing/overflow/clip-descendents-expected.txt:
* compositing/plugins/no-backing-store-expected.txt:
* compositing/rtl/rtl-absolute-expected.txt:
* compositing/rtl/rtl-absolute-overflow-expected.txt:
* compositing/rtl/rtl-absolute-overflow-scrolled-expected.txt:
* compositing/rtl/rtl-fixed-expected.txt:
* compositing/rtl/rtl-fixed-overflow-expected.txt:
* compositing/rtl/rtl-relative-expected.txt:
* compositing/tiled-layers-hidpi-expected.txt:
* compositing/visible-rect/2d-transformed-expected.txt:
* compositing/visible-rect/3d-transform-style-expected.txt:
* compositing/visible-rect/3d-transformed-expected.txt:
* compositing/visible-rect/animated-expected.txt:
* compositing/visible-rect/animated-from-none-expected.txt:
* compositing/visible-rect/clipped-by-viewport-expected.txt:
* compositing/visible-rect/clipped-visible-rect-expected.txt:
* compositing/visible-rect/iframe-and-layers-expected.txt:
* compositing/visible-rect/nested-transform-expected.txt:
* compositing/visible-rect/scrolled-expected.txt:
* css3/filters/filtered-compositing-descendant-expected.txt:
        Updated existing tests that now print different layer-tree results.

* platform/chromium/compositing/backing/no-backing-for-clip-expected.txt: Copied from LayoutTests/compositing/backing/no-backing-for-clip-expected.txt.
* platform/chromium/compositing/backing/no-backing-for-clip-overlap-expected.txt: Copied from LayoutTests/compositing/backing/no-backing-for-clip-overlap-expected.txt.
* platform/chromium/compositing/backing/no-backing-for-perspective-expected.txt: Copied from LayoutTests/compositing/backing/no-backing-for-perspective-expected.txt.
* platform/chromium/compositing/columns/composited-in-paginated-expected.txt: Copied from LayoutTests/compositing/columns/composited-in-paginated-expected.txt.
* platform/chromium/compositing/geometry/ancestor-overflow-change-expected.txt: Copied from LayoutTests/compositing/geometry/ancestor-overflow-change-expected.txt.
* platform/chromium/compositing/geometry/bounds-ignores-hidden-composited-descendant-expected.txt: Copied from LayoutTests/compositing/geometry/bounds-ignores-hidden-composited-descendant-expected.txt.
* platform/chromium/compositing/geometry/bounds-ignores-hidden-dynamic-negzindex-expected.txt: Copied from LayoutTests/compositing/geometry/bounds-ignores-hidden-dynamic-negzindex-expected.txt.
* platform/chromium/compositing/geometry/clip-expected.txt: Copied from LayoutTests/compositing/geometry/clip-expected.txt.
* platform/chromium/compositing/geometry/composited-in-columns-expected.txt: Copied from LayoutTests/compositing/geometry/composited-in-columns-expected.txt.
* platform/chromium/compositing/geometry/flipped-writing-mode-expected.txt: Copied from LayoutTests/compositing/geometry/flipped-writing-mode-expected.txt.
* platform/chromium/compositing/geometry/layer-due-to-layer-children-deep-switch-expected.txt: Copied from LayoutTests/compositing/geometry/layer-due-to-layer-children-deep-switch-expected.txt.
* platform/chromium/compositing/geometry/limit-layer-bounds-overflow-root-expected.txt: Copied from LayoutTests/compositing/geometry/limit-layer-bounds-overflow-root-expected.txt.
* platform/chromium/compositing/geometry/limit-layer-bounds-positioned-expected.txt: Copied from LayoutTests/compositing/geometry/limit-layer-bounds-positioned-expected.txt.
* platform/chromium/compositing/geometry/limit-layer-bounds-positioned-transition-expected.txt: Copied from LayoutTests/compositing/geometry/limit-layer-bounds-positioned-transition-expected.txt.
* platform/chromium/compositing/geometry/limit-layer-bounds-transformed-expected.txt: Copied from LayoutTests/compositing/geometry/limit-layer-bounds-transformed-expected.txt.
* platform/chromium/compositing/geometry/preserve-3d-switching-expected.txt: Copied from LayoutTests/compositing/geometry/preserve-3d-switching-expected.txt.
* platform/chromium/compositing/iframes/invisible-nested-iframe-hide-expected.txt: Copied from LayoutTests/compositing/iframes/invisible-nested-iframe-hide-expected.txt.
* platform/chromium/compositing/layer-creation/fixed-position-and-transform-expected.txt: Copied from LayoutTests/compositing/layer-creation/fixed-position-and-transform-expected.txt.
* platform/chromium/compositing/layer-creation/fixed-position-under-transform-expected.txt: Copied from LayoutTests/compositing/layer-creation/fixed-position-under-transform-expected.txt.
* platform/chromium/compositing/layer-creation/no-compositing-for-preserve-3d-expected.txt: Copied from LayoutTests/compositing/layer-creation/no-compositing-for-preserve-3d-expected.txt.
* platform/chromium/compositing/layer-creation/overlap-animation-expected.txt: Copied from LayoutTests/compositing/layer-creation/overlap-animation-expected.txt.
* platform/chromium/compositing/layer-creation/overlap-child-layer-expected.txt: Copied from LayoutTests/compositing/layer-creation/overlap-child-layer-expected.txt.
* platform/chromium/compositing/layer-creation/overlap-clipping-expected.txt: Copied from LayoutTests/compositing/layer-creation/overlap-clipping-expected.txt.
* platform/chromium/compositing/layer-creation/overlap-transformed-and-clipped-expected.txt: Copied from LayoutTests/compositing/layer-creation/overlap-transformed-and-clipped-expected.txt.
* platform/chromium/compositing/layer-creation/overlap-transformed-layer-expected.txt: Copied from LayoutTests/compositing/layer-creation/overlap-transformed-layer-expected.txt.
* platform/chromium/compositing/layer-creation/overlap-transforms-expected.txt: Copied from LayoutTests/compositing/layer-creation/overlap-transforms-expected.txt.
* platform/chromium/compositing/layer-creation/scroll-partial-update-expected.txt: Copied from LayoutTests/compositing/layer-creation/scroll-partial-update-expected.txt.
* platform/chromium/compositing/layer-creation/stacking-context-overlap-expected.txt: Copied from LayoutTests/compositing/layer-creation/stacking-context-overlap-expected.txt.
* platform/chromium/compositing/layer-creation/stacking-context-overlap-nested-expected.txt: Copied from LayoutTests/compositing/layer-creation/stacking-context-overlap-nested-expected.txt.
* platform/chromium/compositing/layer-creation/translatez-overlap-expected.txt: Copied from LayoutTests/compositing/layer-creation/translatez-overlap-expected.txt.
* platform/chromium/compositing/overflow-trumps-transform-style-expected.txt: Copied from LayoutTests/compositing/overflow-trumps-transform-style-expected.txt.
* platform/chromium/compositing/rtl/rtl-absolute-expected.txt: Copied from LayoutTests/compositing/rtl/rtl-absolute-expected.txt.
* platform/chromium/compositing/rtl/rtl-absolute-overflow-expected.txt: Copied from LayoutTests/compositing/rtl/rtl-absolute-overflow-expected.txt.
* platform/chromium/compositing/rtl/rtl-absolute-overflow-scrolled-expected.txt: Copied from LayoutTests/compositing/rtl/rtl-absolute-overflow-scrolled-expected.txt.
* platform/chromium/compositing/rtl/rtl-fixed-expected.txt: Copied from LayoutTests/compositing/rtl/rtl-fixed-expected.txt.
* platform/chromium/compositing/rtl/rtl-fixed-overflow-expected.txt: Copied from LayoutTests/compositing/rtl/rtl-fixed-overflow-expected.txt.
* platform/chromium/compositing/rtl/rtl-relative-expected.txt: Copied from LayoutTests/compositing/rtl/rtl-relative-expected.txt.
* platform/chromium/css3/filters/filtered-compositing-descendant-expected.txt: Copied from LayoutTests/css3/filters/filtered-compositing-descendant-expected.txt.
        Create chromium-specific results since chromium does not yet support setContentsToBackgroundColor.

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

148 files changed:
LayoutTests/ChangeLog
LayoutTests/compositing/background-color/background-color-alpha-expected.html [new file with mode: 0644]
LayoutTests/compositing/background-color/background-color-alpha.html [new file with mode: 0644]
LayoutTests/compositing/background-color/background-color-change-to-text-expected.html [new file with mode: 0644]
LayoutTests/compositing/background-color/background-color-change-to-text.html [new file with mode: 0644]
LayoutTests/compositing/background-color/background-color-composite-expected.html [new file with mode: 0644]
LayoutTests/compositing/background-color/background-color-composite.html [new file with mode: 0644]
LayoutTests/compositing/background-color/background-color-container-expected.html [new file with mode: 0644]
LayoutTests/compositing/background-color/background-color-container.html [new file with mode: 0644]
LayoutTests/compositing/background-color/background-color-content-clip-expected.html [new file with mode: 0644]
LayoutTests/compositing/background-color/background-color-content-clip.html [new file with mode: 0644]
LayoutTests/compositing/background-color/background-color-padding-change-expected.html [new file with mode: 0644]
LayoutTests/compositing/background-color/background-color-padding-change.html [new file with mode: 0644]
LayoutTests/compositing/background-color/background-color-padding-clip-expected.html [new file with mode: 0644]
LayoutTests/compositing/background-color/background-color-padding-clip.html [new file with mode: 0644]
LayoutTests/compositing/background-color/background-color-simple-expected.html [new file with mode: 0644]
LayoutTests/compositing/background-color/background-color-simple.html [new file with mode: 0644]
LayoutTests/compositing/background-color/background-color-text-change-expected.html [new file with mode: 0644]
LayoutTests/compositing/background-color/background-color-text-change.html [new file with mode: 0644]
LayoutTests/compositing/background-color/background-color-text-clip-expected.html [new file with mode: 0644]
LayoutTests/compositing/background-color/background-color-text-clip.html [new file with mode: 0644]
LayoutTests/compositing/backing/no-backing-for-clip-expected.txt
LayoutTests/compositing/backing/no-backing-for-clip-overlap-expected.txt
LayoutTests/compositing/backing/no-backing-for-perspective-expected.txt
LayoutTests/compositing/columns/composited-in-paginated-expected.txt
LayoutTests/compositing/geometry/ancestor-overflow-change-expected.txt
LayoutTests/compositing/geometry/bounds-ignores-hidden-composited-descendant-expected.txt
LayoutTests/compositing/geometry/bounds-ignores-hidden-dynamic-negzindex-expected.txt
LayoutTests/compositing/geometry/clip-expected.txt
LayoutTests/compositing/geometry/composited-in-columns-expected.txt
LayoutTests/compositing/geometry/flipped-writing-mode-expected.txt
LayoutTests/compositing/geometry/layer-due-to-layer-children-deep-switch-expected.txt
LayoutTests/compositing/geometry/limit-layer-bounds-fixed-positioned-expected.txt
LayoutTests/compositing/geometry/limit-layer-bounds-overflow-root-expected.txt
LayoutTests/compositing/geometry/limit-layer-bounds-positioned-expected.txt
LayoutTests/compositing/geometry/limit-layer-bounds-positioned-transition-expected.txt
LayoutTests/compositing/geometry/limit-layer-bounds-transformed-expected.txt
LayoutTests/compositing/geometry/limit-layer-bounds-transformed-overflow-expected.txt
LayoutTests/compositing/geometry/preserve-3d-switching-expected.txt
LayoutTests/compositing/iframes/become-composited-nested-iframes-expected.txt
LayoutTests/compositing/iframes/become-overlapped-iframe-expected.txt
LayoutTests/compositing/iframes/composited-parent-iframe-expected.txt
LayoutTests/compositing/iframes/connect-compositing-iframe-delayed-expected.txt
LayoutTests/compositing/iframes/connect-compositing-iframe-expected.txt
LayoutTests/compositing/iframes/connect-compositing-iframe2-expected.txt
LayoutTests/compositing/iframes/connect-compositing-iframe3-expected.txt
LayoutTests/compositing/iframes/enter-compositing-iframe-expected.txt
LayoutTests/compositing/iframes/iframe-resize-expected.txt
LayoutTests/compositing/iframes/invisible-nested-iframe-hide-expected.txt
LayoutTests/compositing/iframes/invisible-nested-iframe-show-expected.txt
LayoutTests/compositing/iframes/overlapped-iframe-expected.txt
LayoutTests/compositing/iframes/overlapped-iframe-iframe-expected.txt
LayoutTests/compositing/iframes/page-cache-layer-tree-expected.txt
LayoutTests/compositing/iframes/scrolling-iframe-expected.txt
LayoutTests/compositing/layer-creation/animation-overlap-with-children-expected.txt
LayoutTests/compositing/layer-creation/fixed-position-and-transform-expected.txt
LayoutTests/compositing/layer-creation/fixed-position-under-transform-expected.txt
LayoutTests/compositing/layer-creation/no-compositing-for-preserve-3d-expected.txt
LayoutTests/compositing/layer-creation/overflow-scroll-overlap-expected.txt
LayoutTests/compositing/layer-creation/overlap-animation-expected.txt
LayoutTests/compositing/layer-creation/overlap-child-layer-expected.txt
LayoutTests/compositing/layer-creation/overlap-clipping-expected.txt
LayoutTests/compositing/layer-creation/overlap-transformed-and-clipped-expected.txt
LayoutTests/compositing/layer-creation/overlap-transformed-layer-expected.txt
LayoutTests/compositing/layer-creation/overlap-transforms-expected.txt
LayoutTests/compositing/layer-creation/scroll-partial-update-expected.txt
LayoutTests/compositing/layer-creation/spanOverlapsCanvas-expected.txt
LayoutTests/compositing/layer-creation/stacking-context-overlap-expected.txt
LayoutTests/compositing/layer-creation/stacking-context-overlap-nested-expected.txt
LayoutTests/compositing/layer-creation/translatez-overlap-expected.txt
LayoutTests/compositing/overflow-trumps-transform-style-expected.txt
LayoutTests/compositing/overflow/clip-descendents-expected.txt
LayoutTests/compositing/overflow/content-gains-scrollbars-expected.txt
LayoutTests/compositing/overflow/overflow-scrollbar-layers-expected.txt
LayoutTests/compositing/overflow/resize-painting-expected.txt
LayoutTests/compositing/plugins/no-backing-store-expected.txt
LayoutTests/compositing/rtl/rtl-absolute-expected.txt
LayoutTests/compositing/rtl/rtl-absolute-overflow-expected.txt
LayoutTests/compositing/rtl/rtl-absolute-overflow-scrolled-expected.txt
LayoutTests/compositing/rtl/rtl-fixed-expected.txt
LayoutTests/compositing/rtl/rtl-fixed-overflow-expected.txt
LayoutTests/compositing/rtl/rtl-relative-expected.txt
LayoutTests/compositing/tiled-layers-hidpi-expected.txt
LayoutTests/compositing/visible-rect/2d-transformed-expected.txt
LayoutTests/compositing/visible-rect/3d-transform-style-expected.txt
LayoutTests/compositing/visible-rect/3d-transformed-expected.txt
LayoutTests/compositing/visible-rect/animated-expected.txt
LayoutTests/compositing/visible-rect/animated-from-none-expected.txt
LayoutTests/compositing/visible-rect/clipped-by-viewport-expected.txt
LayoutTests/compositing/visible-rect/clipped-visible-rect-expected.txt
LayoutTests/compositing/visible-rect/iframe-and-layers-expected.txt
LayoutTests/compositing/visible-rect/nested-transform-expected.txt
LayoutTests/compositing/visible-rect/scrolled-expected.txt
LayoutTests/css3/filters/filtered-compositing-descendant-expected.txt
LayoutTests/platform/chromium/compositing/backing/no-backing-for-clip-expected.txt [new file with mode: 0644]
LayoutTests/platform/chromium/compositing/backing/no-backing-for-clip-overlap-expected.txt [new file with mode: 0644]
LayoutTests/platform/chromium/compositing/backing/no-backing-for-perspective-expected.txt [new file with mode: 0644]
LayoutTests/platform/chromium/compositing/columns/composited-in-paginated-expected.txt [new file with mode: 0644]
LayoutTests/platform/chromium/compositing/geometry/ancestor-overflow-change-expected.txt [new file with mode: 0644]
LayoutTests/platform/chromium/compositing/geometry/bounds-ignores-hidden-composited-descendant-expected.txt [new file with mode: 0644]
LayoutTests/platform/chromium/compositing/geometry/bounds-ignores-hidden-dynamic-negzindex-expected.txt [new file with mode: 0644]
LayoutTests/platform/chromium/compositing/geometry/clip-expected.txt [new file with mode: 0644]
LayoutTests/platform/chromium/compositing/geometry/composited-in-columns-expected.txt [new file with mode: 0644]
LayoutTests/platform/chromium/compositing/geometry/flipped-writing-mode-expected.txt [new file with mode: 0644]
LayoutTests/platform/chromium/compositing/geometry/layer-due-to-layer-children-deep-switch-expected.txt [new file with mode: 0644]
LayoutTests/platform/chromium/compositing/geometry/limit-layer-bounds-overflow-root-expected.txt [new file with mode: 0644]
LayoutTests/platform/chromium/compositing/geometry/limit-layer-bounds-positioned-expected.txt [new file with mode: 0644]
LayoutTests/platform/chromium/compositing/geometry/limit-layer-bounds-positioned-transition-expected.txt [new file with mode: 0644]
LayoutTests/platform/chromium/compositing/geometry/limit-layer-bounds-transformed-expected.txt [new file with mode: 0644]
LayoutTests/platform/chromium/compositing/geometry/preserve-3d-switching-expected.txt [new file with mode: 0644]
LayoutTests/platform/chromium/compositing/iframes/invisible-nested-iframe-hide-expected.txt [new file with mode: 0644]
LayoutTests/platform/chromium/compositing/layer-creation/fixed-position-and-transform-expected.txt [new file with mode: 0644]
LayoutTests/platform/chromium/compositing/layer-creation/fixed-position-under-transform-expected.txt [new file with mode: 0644]
LayoutTests/platform/chromium/compositing/layer-creation/no-compositing-for-preserve-3d-expected.txt [new file with mode: 0644]
LayoutTests/platform/chromium/compositing/layer-creation/overlap-animation-expected.txt [new file with mode: 0644]
LayoutTests/platform/chromium/compositing/layer-creation/overlap-child-layer-expected.txt [new file with mode: 0644]
LayoutTests/platform/chromium/compositing/layer-creation/overlap-clipping-expected.txt [new file with mode: 0644]
LayoutTests/platform/chromium/compositing/layer-creation/overlap-transformed-and-clipped-expected.txt [new file with mode: 0644]
LayoutTests/platform/chromium/compositing/layer-creation/overlap-transformed-layer-expected.txt [new file with mode: 0644]
LayoutTests/platform/chromium/compositing/layer-creation/overlap-transforms-expected.txt [new file with mode: 0644]
LayoutTests/platform/chromium/compositing/layer-creation/scroll-partial-update-expected.txt [new file with mode: 0644]
LayoutTests/platform/chromium/compositing/layer-creation/stacking-context-overlap-expected.txt [new file with mode: 0644]
LayoutTests/platform/chromium/compositing/layer-creation/stacking-context-overlap-nested-expected.txt [new file with mode: 0644]
LayoutTests/platform/chromium/compositing/layer-creation/translatez-overlap-expected.txt [new file with mode: 0644]
LayoutTests/platform/chromium/compositing/overflow-trumps-transform-style-expected.txt [new file with mode: 0644]
LayoutTests/platform/chromium/compositing/overflow/content-gains-scrollbars-expected.txt
LayoutTests/platform/chromium/compositing/overflow/overflow-scrollbar-layers-expected.txt
LayoutTests/platform/chromium/compositing/overflow/resize-painting-expected.txt
LayoutTests/platform/chromium/compositing/rtl/rtl-absolute-expected.txt [new file with mode: 0644]
LayoutTests/platform/chromium/compositing/rtl/rtl-absolute-overflow-expected.txt [new file with mode: 0644]
LayoutTests/platform/chromium/compositing/rtl/rtl-absolute-overflow-scrolled-expected.txt [new file with mode: 0644]
LayoutTests/platform/chromium/compositing/rtl/rtl-fixed-expected.txt [new file with mode: 0644]
LayoutTests/platform/chromium/compositing/rtl/rtl-fixed-overflow-expected.txt [new file with mode: 0644]
LayoutTests/platform/chromium/compositing/rtl/rtl-relative-expected.txt [new file with mode: 0644]
LayoutTests/platform/chromium/css3/filters/filtered-compositing-descendant-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/compositing/geometry/fixed-position-composited-switch-expected.txt
LayoutTests/platform/mac/compositing/iframes/resizer-expected.txt
LayoutTests/platform/mac/compositing/repaint/invalidations-on-composited-layers-expected.txt
LayoutTests/platform/mac/compositing/tiling/crash-reparent-tiled-layer-expected.txt
LayoutTests/platform/mac/compositing/tiling/huge-layer-add-remove-child-expected.txt
LayoutTests/platform/mac/compositing/tiling/huge-layer-with-layer-children-expected.txt
LayoutTests/platform/mac/compositing/tiling/huge-layer-with-layer-children-resize-expected.txt
LayoutTests/platform/mac/compositing/tiling/tile-cache-zoomed-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/GraphicsLayer.h
Source/WebCore/rendering/RenderBox.h
Source/WebCore/rendering/RenderLayerBacking.cpp
Source/WebCore/rendering/RenderLayerBacking.h

index f211479..eb3e42d 100644 (file)
@@ -1,3 +1,149 @@
+2012-12-08  No'am Rosenthal  <noam@webkit.org>
+
+        Use background color for GraphicsLayers when applicable
+        https://bugs.webkit.org/show_bug.cgi?id=103786
+
+        Created new tests for composited background colors, update existing tests that are affected by the change,
+        and created platform-specific overrides for Chromium, since it does not yet support composited background
+        colors.
+
+        Reviewed by Simon Fraser.
+
+        * compositing/background-color/background-color-alpha-expected.html: Added.
+        * compositing/background-color/background-color-alpha.html: Added.
+        * compositing/background-color/background-color-change-to-text-expected.html: Added.
+        * compositing/background-color/background-color-change-to-text.html: Added.
+        * compositing/background-color/background-color-composite-expected.html: Added.
+        * compositing/background-color/background-color-composite.html: Added.
+        * compositing/background-color/background-color-container-expected.html: Added.
+        * compositing/background-color/background-color-container.html: Added.
+        * compositing/background-color/background-color-content-clip-expected.html: Added.
+        * compositing/background-color/background-color-content-clip.html: Added.
+        * compositing/background-color/background-color-padding-change-expected.html: Added.
+        * compositing/background-color/background-color-padding-change.html: Added.
+        * compositing/background-color/background-color-padding-clip-expected.html: Added.
+        * compositing/background-color/background-color-padding-clip.html: Added.
+        * compositing/background-color/background-color-simple-expected.html: Added.
+        * compositing/background-color/background-color-simple.html: Added.
+        * compositing/background-color/background-color-text-change-expected.html: Added.
+        * compositing/background-color/background-color-text-change.html: Added.
+        * compositing/background-color/background-color-text-clip-expected.html: Added.
+        * compositing/background-color/background-color-text-clip.html: Added.
+                Added new tests for the specific functionality added, with the edge cases regarding composited
+                backgrounds.
+
+        * compositing/backing/no-backing-for-clip-expected.txt:
+        * compositing/backing/no-backing-for-clip-overlap-expected.txt:
+        * compositing/backing/no-backing-for-perspective-expected.txt:
+        * compositing/columns/composited-in-paginated-expected.txt:
+        * compositing/geometry/ancestor-overflow-change-expected.txt:
+        * compositing/geometry/bounds-ignores-hidden-composited-descendant-expected.txt:
+        * compositing/geometry/bounds-ignores-hidden-dynamic-negzindex-expected.txt:
+        * compositing/geometry/clip-expected.txt:
+        * compositing/geometry/composited-in-columns-expected.txt:
+        * compositing/geometry/flipped-writing-mode-expected.txt:
+        * compositing/geometry/layer-due-to-layer-children-deep-switch-expected.txt:
+        * compositing/geometry/limit-layer-bounds-fixed-positioned-expected.txt:
+        * compositing/geometry/limit-layer-bounds-overflow-root-expected.txt:
+        * compositing/geometry/limit-layer-bounds-positioned-expected.txt:
+        * compositing/geometry/limit-layer-bounds-positioned-transition-expected.txt:
+        * compositing/geometry/limit-layer-bounds-transformed-expected.txt:
+        * compositing/geometry/limit-layer-bounds-transformed-overflow-expected.txt:
+        * compositing/geometry/preserve-3d-switching-expected.txt:
+        * compositing/iframes/become-composited-nested-iframes-expected.txt:
+        * compositing/iframes/become-overlapped-iframe-expected.txt:
+        * compositing/iframes/composited-parent-iframe-expected.txt:
+        * compositing/iframes/connect-compositing-iframe-delayed-expected.txt:
+        * compositing/iframes/connect-compositing-iframe-expected.txt:
+        * compositing/iframes/connect-compositing-iframe2-expected.txt:
+        * compositing/iframes/connect-compositing-iframe3-expected.txt:
+        * compositing/iframes/enter-compositing-iframe-expected.txt:
+        * compositing/iframes/iframe-resize-expected.txt:
+        * compositing/iframes/invisible-nested-iframe-hide-expected.txt:
+        * compositing/iframes/invisible-nested-iframe-show-expected.txt:
+        * compositing/iframes/overlapped-iframe-expected.txt:
+        * compositing/iframes/overlapped-iframe-iframe-expected.txt:
+        * compositing/iframes/page-cache-layer-tree-expected.txt:
+        * compositing/iframes/scrolling-iframe-expected.txt:
+        * compositing/layer-creation/animation-overlap-with-children-expected.txt:
+        * compositing/layer-creation/fixed-position-and-transform-expected.txt:
+        * compositing/layer-creation/fixed-position-under-transform-expected.txt:
+        * compositing/layer-creation/no-compositing-for-preserve-3d-expected.txt:
+        * compositing/layer-creation/overflow-scroll-overlap-expected.txt:
+        * compositing/layer-creation/overlap-animation-expected.txt:
+        * compositing/layer-creation/overlap-child-layer-expected.txt:
+        * compositing/layer-creation/overlap-clipping-expected.txt:
+        * compositing/layer-creation/overlap-transformed-and-clipped-expected.txt:
+        * compositing/layer-creation/overlap-transformed-layer-expected.txt:
+        * compositing/layer-creation/overlap-transforms-expected.txt:
+        * compositing/layer-creation/scroll-partial-update-expected.txt:
+        * compositing/layer-creation/spanOverlapsCanvas-expected.txt:
+        * compositing/layer-creation/stacking-context-overlap-expected.txt:
+        * compositing/layer-creation/stacking-context-overlap-nested-expected.txt:
+        * compositing/layer-creation/translatez-overlap-expected.txt:
+        * compositing/overflow-trumps-transform-style-expected.txt:
+        * compositing/overflow/clip-descendents-expected.txt:
+        * compositing/plugins/no-backing-store-expected.txt:
+        * compositing/rtl/rtl-absolute-expected.txt:
+        * compositing/rtl/rtl-absolute-overflow-expected.txt:
+        * compositing/rtl/rtl-absolute-overflow-scrolled-expected.txt:
+        * compositing/rtl/rtl-fixed-expected.txt:
+        * compositing/rtl/rtl-fixed-overflow-expected.txt:
+        * compositing/rtl/rtl-relative-expected.txt:
+        * compositing/tiled-layers-hidpi-expected.txt:
+        * compositing/visible-rect/2d-transformed-expected.txt:
+        * compositing/visible-rect/3d-transform-style-expected.txt:
+        * compositing/visible-rect/3d-transformed-expected.txt:
+        * compositing/visible-rect/animated-expected.txt:
+        * compositing/visible-rect/animated-from-none-expected.txt:
+        * compositing/visible-rect/clipped-by-viewport-expected.txt:
+        * compositing/visible-rect/clipped-visible-rect-expected.txt:
+        * compositing/visible-rect/iframe-and-layers-expected.txt:
+        * compositing/visible-rect/nested-transform-expected.txt:
+        * compositing/visible-rect/scrolled-expected.txt:
+        * css3/filters/filtered-compositing-descendant-expected.txt:
+                Updated existing tests that now print different layer-tree results.
+
+        * platform/chromium/compositing/backing/no-backing-for-clip-expected.txt: Copied from LayoutTests/compositing/backing/no-backing-for-clip-expected.txt.
+        * platform/chromium/compositing/backing/no-backing-for-clip-overlap-expected.txt: Copied from LayoutTests/compositing/backing/no-backing-for-clip-overlap-expected.txt.
+        * platform/chromium/compositing/backing/no-backing-for-perspective-expected.txt: Copied from LayoutTests/compositing/backing/no-backing-for-perspective-expected.txt.
+        * platform/chromium/compositing/columns/composited-in-paginated-expected.txt: Copied from LayoutTests/compositing/columns/composited-in-paginated-expected.txt.
+        * platform/chromium/compositing/geometry/ancestor-overflow-change-expected.txt: Copied from LayoutTests/compositing/geometry/ancestor-overflow-change-expected.txt.
+        * platform/chromium/compositing/geometry/bounds-ignores-hidden-composited-descendant-expected.txt: Copied from LayoutTests/compositing/geometry/bounds-ignores-hidden-composited-descendant-expected.txt.
+        * platform/chromium/compositing/geometry/bounds-ignores-hidden-dynamic-negzindex-expected.txt: Copied from LayoutTests/compositing/geometry/bounds-ignores-hidden-dynamic-negzindex-expected.txt.
+        * platform/chromium/compositing/geometry/clip-expected.txt: Copied from LayoutTests/compositing/geometry/clip-expected.txt.
+        * platform/chromium/compositing/geometry/composited-in-columns-expected.txt: Copied from LayoutTests/compositing/geometry/composited-in-columns-expected.txt.
+        * platform/chromium/compositing/geometry/flipped-writing-mode-expected.txt: Copied from LayoutTests/compositing/geometry/flipped-writing-mode-expected.txt.
+        * platform/chromium/compositing/geometry/layer-due-to-layer-children-deep-switch-expected.txt: Copied from LayoutTests/compositing/geometry/layer-due-to-layer-children-deep-switch-expected.txt.
+        * platform/chromium/compositing/geometry/limit-layer-bounds-overflow-root-expected.txt: Copied from LayoutTests/compositing/geometry/limit-layer-bounds-overflow-root-expected.txt.
+        * platform/chromium/compositing/geometry/limit-layer-bounds-positioned-expected.txt: Copied from LayoutTests/compositing/geometry/limit-layer-bounds-positioned-expected.txt.
+        * platform/chromium/compositing/geometry/limit-layer-bounds-positioned-transition-expected.txt: Copied from LayoutTests/compositing/geometry/limit-layer-bounds-positioned-transition-expected.txt.
+        * platform/chromium/compositing/geometry/limit-layer-bounds-transformed-expected.txt: Copied from LayoutTests/compositing/geometry/limit-layer-bounds-transformed-expected.txt.
+        * platform/chromium/compositing/geometry/preserve-3d-switching-expected.txt: Copied from LayoutTests/compositing/geometry/preserve-3d-switching-expected.txt.
+        * platform/chromium/compositing/iframes/invisible-nested-iframe-hide-expected.txt: Copied from LayoutTests/compositing/iframes/invisible-nested-iframe-hide-expected.txt.
+        * platform/chromium/compositing/layer-creation/fixed-position-and-transform-expected.txt: Copied from LayoutTests/compositing/layer-creation/fixed-position-and-transform-expected.txt.
+        * platform/chromium/compositing/layer-creation/fixed-position-under-transform-expected.txt: Copied from LayoutTests/compositing/layer-creation/fixed-position-under-transform-expected.txt.
+        * platform/chromium/compositing/layer-creation/no-compositing-for-preserve-3d-expected.txt: Copied from LayoutTests/compositing/layer-creation/no-compositing-for-preserve-3d-expected.txt.
+        * platform/chromium/compositing/layer-creation/overlap-animation-expected.txt: Copied from LayoutTests/compositing/layer-creation/overlap-animation-expected.txt.
+        * platform/chromium/compositing/layer-creation/overlap-child-layer-expected.txt: Copied from LayoutTests/compositing/layer-creation/overlap-child-layer-expected.txt.
+        * platform/chromium/compositing/layer-creation/overlap-clipping-expected.txt: Copied from LayoutTests/compositing/layer-creation/overlap-clipping-expected.txt.
+        * platform/chromium/compositing/layer-creation/overlap-transformed-and-clipped-expected.txt: Copied from LayoutTests/compositing/layer-creation/overlap-transformed-and-clipped-expected.txt.
+        * platform/chromium/compositing/layer-creation/overlap-transformed-layer-expected.txt: Copied from LayoutTests/compositing/layer-creation/overlap-transformed-layer-expected.txt.
+        * platform/chromium/compositing/layer-creation/overlap-transforms-expected.txt: Copied from LayoutTests/compositing/layer-creation/overlap-transforms-expected.txt.
+        * platform/chromium/compositing/layer-creation/scroll-partial-update-expected.txt: Copied from LayoutTests/compositing/layer-creation/scroll-partial-update-expected.txt.
+        * platform/chromium/compositing/layer-creation/stacking-context-overlap-expected.txt: Copied from LayoutTests/compositing/layer-creation/stacking-context-overlap-expected.txt.
+        * platform/chromium/compositing/layer-creation/stacking-context-overlap-nested-expected.txt: Copied from LayoutTests/compositing/layer-creation/stacking-context-overlap-nested-expected.txt.
+        * platform/chromium/compositing/layer-creation/translatez-overlap-expected.txt: Copied from LayoutTests/compositing/layer-creation/translatez-overlap-expected.txt.
+        * platform/chromium/compositing/overflow-trumps-transform-style-expected.txt: Copied from LayoutTests/compositing/overflow-trumps-transform-style-expected.txt.
+        * platform/chromium/compositing/rtl/rtl-absolute-expected.txt: Copied from LayoutTests/compositing/rtl/rtl-absolute-expected.txt.
+        * platform/chromium/compositing/rtl/rtl-absolute-overflow-expected.txt: Copied from LayoutTests/compositing/rtl/rtl-absolute-overflow-expected.txt.
+        * platform/chromium/compositing/rtl/rtl-absolute-overflow-scrolled-expected.txt: Copied from LayoutTests/compositing/rtl/rtl-absolute-overflow-scrolled-expected.txt.
+        * platform/chromium/compositing/rtl/rtl-fixed-expected.txt: Copied from LayoutTests/compositing/rtl/rtl-fixed-expected.txt.
+        * platform/chromium/compositing/rtl/rtl-fixed-overflow-expected.txt: Copied from LayoutTests/compositing/rtl/rtl-fixed-overflow-expected.txt.
+        * platform/chromium/compositing/rtl/rtl-relative-expected.txt: Copied from LayoutTests/compositing/rtl/rtl-relative-expected.txt.
+        * platform/chromium/css3/filters/filtered-compositing-descendant-expected.txt: Copied from LayoutTests/css3/filters/filtered-compositing-descendant-expected.txt.
+                Create chromium-specific results since chromium does not yet support setContentsToBackgroundColor.
+
 2012-12-08  Kondapally Kalyan  <kalyan.kondapally@intel.com>
 
         [EFL] Enable WebGL by default.
diff --git a/LayoutTests/compositing/background-color/background-color-alpha-expected.html b/LayoutTests/compositing/background-color/background-color-alpha-expected.html
new file mode 100644 (file)
index 0000000..c67e99b
--- /dev/null
@@ -0,0 +1,28 @@
+<html>
+    <head>
+        <style type="text/css">
+            .green {
+                width: 100px;
+                height: 100px;
+                background-color: rgba(0, 128, 0, 128);
+                display: block;
+            }
+            .blue {
+                width: 50px;
+                height: 50px;
+                background-color: rgba(0, 0, 128, 128);
+                display: block;
+            }
+
+            .composited {
+                -webkit-transform: translateZ(0);
+            }
+        </style>
+    </head>
+    <body>
+        <div class="green">
+            <div class="blue">
+            </div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/LayoutTests/compositing/background-color/background-color-alpha.html b/LayoutTests/compositing/background-color/background-color-alpha.html
new file mode 100644 (file)
index 0000000..ed94a9b
--- /dev/null
@@ -0,0 +1,28 @@
+<html>
+    <head>
+        <style type="text/css">
+            .green {
+                width: 100px;
+                height: 100px;
+                background-color: rgba(0, 128, 0, 128);
+                display: block;
+            }
+            .blue {
+                width: 50px;
+                height: 50px;
+                background-color: rgba(0, 0, 128, 128);
+                display: block;
+            }
+
+            .composited {
+                -webkit-transform: translateZ(0);
+            }
+        </style>
+    </head>
+    <body>
+        <div class="green composited">
+            <div class="blue composited">
+            </div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/LayoutTests/compositing/background-color/background-color-change-to-text-expected.html b/LayoutTests/compositing/background-color/background-color-change-to-text-expected.html
new file mode 100644 (file)
index 0000000..ec5669a
--- /dev/null
@@ -0,0 +1,43 @@
+<!DOCTYPE>
+<html>
+<head>
+<style type="text/css" media="screen">
+    #background {
+        width: 200px;
+        height: 200px;
+        display: block;
+        background-color: green;
+    }
+
+    .composited {
+        -webkit-transform: translateZ(0);
+    }
+</style>
+<script type="text/javascript" charset="utf-8">
+    if (window.testRunner) {
+        testRunner.waitUntilDone();
+        testRunner.dumpAsText(true);
+    }
+    function doTest()
+    {
+        var bg = document.getElementById("background");
+
+        window.setTimeout(function() {
+            // Change the layer to become background only.
+            bg.innerHTML = "Text";
+            if (window.testRunner) {
+                window.setTimeout(function() {
+                    testRunner.notifyDone();
+                }, 0);
+            }
+        }, 0);
+    }
+
+    window.addEventListener('load', doTest, false);
+</script>
+</head>
+<body>
+<!-- When the test is done, there should only be a green square on the page -->
+<div id="background"></div>
+</body>
+</html>
diff --git a/LayoutTests/compositing/background-color/background-color-change-to-text.html b/LayoutTests/compositing/background-color/background-color-change-to-text.html
new file mode 100644 (file)
index 0000000..c22b2de
--- /dev/null
@@ -0,0 +1,43 @@
+<!DOCTYPE>
+<html>
+<head>
+<style type="text/css" media="screen">
+    #background {
+        width: 200px;
+        height: 200px;
+        display: block;
+        background-color: green;
+    }
+
+    .composited {
+        -webkit-transform: translateZ(0);
+    }
+</style>
+<script type="text/javascript" charset="utf-8">
+    if (window.testRunner) {
+        testRunner.waitUntilDone();
+        testRunner.dumpAsText(true);
+    }
+    function doTest()
+    {
+        var bg = document.getElementById("background");
+
+        window.setTimeout(function() {
+            // Change the layer to become background only.
+            bg.innerHTML = "Text";
+            if (window.testRunner) {
+                window.setTimeout(function() {
+                    testRunner.notifyDone();
+                }, 0);
+            }
+        }, 0);
+    }
+
+    window.addEventListener('load', doTest, false);
+</script>
+</head>
+<body>
+<!-- When the test is done, there should only be a green square on the page -->
+<div id="background" class="composited"></div>
+</body>
+</html>
diff --git a/LayoutTests/compositing/background-color/background-color-composite-expected.html b/LayoutTests/compositing/background-color/background-color-composite-expected.html
new file mode 100644 (file)
index 0000000..7cf3838
--- /dev/null
@@ -0,0 +1,30 @@
+<html>
+    <head>
+        <style type="text/css">
+            .green {
+                width: 100px;
+                height: 100px;
+                background-color: green;
+                display: block;
+                padding: 10px;                
+                -webkit-background-composite: border;
+            }
+            .blue {
+                width: 50px;
+                height: 50px;
+                background-color: blue;
+                display: block;
+            }
+
+            .composited {
+                -webkit-transform: translateZ(0);
+            }
+        </style>
+    </head>
+    <body>
+        <div class="green">
+            <div class="blue">
+            </div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/LayoutTests/compositing/background-color/background-color-composite.html b/LayoutTests/compositing/background-color/background-color-composite.html
new file mode 100644 (file)
index 0000000..978c79e
--- /dev/null
@@ -0,0 +1,30 @@
+<html>
+    <head>
+        <style type="text/css">
+            .green {
+                width: 100px;
+                height: 100px;
+                background-color: green;
+                display: block;
+                padding: 10px;                
+                -webkit-background-composite: border;
+            }
+            .blue {
+                width: 50px;
+                height: 50px;
+                background-color: blue;
+                display: block;
+            }
+
+            .composited {
+                -webkit-transform: translateZ(0);
+            }
+        </style>
+    </head>
+    <body>
+        <div class="green composited">
+            <div class="blue composited">
+            </div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/LayoutTests/compositing/background-color/background-color-container-expected.html b/LayoutTests/compositing/background-color/background-color-container-expected.html
new file mode 100644 (file)
index 0000000..76c6cad
--- /dev/null
@@ -0,0 +1,28 @@
+<html>
+    <head>
+        <style type="text/css">
+            .green {
+                width: 100px;
+                height: 100px;
+                background-color: green;
+                display: block;
+            }
+            .blue {
+                width: 50px;
+                height: 50px;
+                background-color: blue;
+                display: block;
+            }
+
+            .composited {
+                -webkit-transform: translateZ(0);
+            }
+        </style>
+    </head>
+    <body>
+        <div class="green">
+            <div class="blue">
+            </div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/LayoutTests/compositing/background-color/background-color-container.html b/LayoutTests/compositing/background-color/background-color-container.html
new file mode 100644 (file)
index 0000000..f942a73
--- /dev/null
@@ -0,0 +1,28 @@
+<html>
+    <head>
+        <style type="text/css">
+            .green {
+                width: 100px;
+                height: 100px;
+                background-color: green;
+                display: block;
+            }
+            .blue {
+                width: 50px;
+                height: 50px;
+                background-color: blue;
+                display: block;
+            }
+
+            .composited {
+                -webkit-transform: translateZ(0);
+            }
+        </style>
+    </head>
+    <body>
+        <div class="green composited">
+            <div class="blue composited">
+            </div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/LayoutTests/compositing/background-color/background-color-content-clip-expected.html b/LayoutTests/compositing/background-color/background-color-content-clip-expected.html
new file mode 100644 (file)
index 0000000..8d40294
--- /dev/null
@@ -0,0 +1,30 @@
+<html>
+    <head>
+        <style type="text/css">
+            .green {
+                width: 100px;
+                height: 100px;
+                background-color: green;
+                display: block;
+                padding: 10px;                
+                -webkit-background-clip: content;
+            }
+            .blue {
+                width: 50px;
+                height: 50px;
+                background-color: blue;
+                display: block;
+            }
+
+            .composited {
+                -webkit-transform: translateZ(0);
+            }
+        </style>
+    </head>
+    <body>
+        <div class="green">
+            <div class="blue">
+            </div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/LayoutTests/compositing/background-color/background-color-content-clip.html b/LayoutTests/compositing/background-color/background-color-content-clip.html
new file mode 100644 (file)
index 0000000..290e4c8
--- /dev/null
@@ -0,0 +1,30 @@
+<html>
+    <head>
+        <style type="text/css">
+            .green {
+                width: 100px;
+                height: 100px;
+                background-color: green;
+                display: block;
+                padding: 10px;                
+                -webkit-background-clip: content;
+            }
+            .blue {
+                width: 50px;
+                height: 50px;
+                background-color: blue;
+                display: block;
+            }
+
+            .composited {
+                -webkit-transform: translateZ(0);
+            }
+        </style>
+    </head>
+    <body>
+        <div class="green composited">
+            <div class="blue composited">
+            </div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/LayoutTests/compositing/background-color/background-color-padding-change-expected.html b/LayoutTests/compositing/background-color/background-color-padding-change-expected.html
new file mode 100644 (file)
index 0000000..41ecb20
--- /dev/null
@@ -0,0 +1,53 @@
+<!DOCTYPE>
+<html>
+<head>
+<style type="text/css" media="screen">
+    #background {
+        width: 200px;
+        height: 200px;
+        display: block;
+        background-color: green;
+        -webkit-background-clip: content;
+    }
+
+    #content {
+        width: 100px;
+        height: 100px;
+        display: block;
+        background-color: blue;
+    }
+
+    .composited {
+        -webkit-transform: translateZ(0);
+    }
+</style>
+<script type="text/javascript" charset="utf-8">
+    if (window.testRunner) {
+        testRunner.waitUntilDone();
+        testRunner.dumpAsText(true);
+    }
+    function doTest()
+    {
+        var bg = document.getElementById("background");
+
+        window.setTimeout(function() {
+            // Change the layer to become background only.
+            bg.style.padding = "50px";
+            if (window.testRunner) {
+                window.setTimeout(function() {
+                    testRunner.notifyDone();
+                }, 0);
+            }
+        }, 0);
+    }
+
+    window.addEventListener('load', doTest, false);
+</script>
+</head>
+<body>
+<!-- When the test is done, there should only be a green square on the page -->
+<div id="background">
+    <div id="content"></div>
+</div>
+</body>
+</html>
diff --git a/LayoutTests/compositing/background-color/background-color-padding-change.html b/LayoutTests/compositing/background-color/background-color-padding-change.html
new file mode 100644 (file)
index 0000000..a9951f4
--- /dev/null
@@ -0,0 +1,53 @@
+<!DOCTYPE>
+<html>
+<head>
+<style type="text/css" media="screen">
+    #background {
+        width: 200px;
+        height: 200px;
+        display: block;
+        background-color: green;
+        -webkit-background-clip: content;
+    }
+
+    #content {
+        width: 100px;
+        height: 100px;
+        display: block;
+        background-color: blue;
+    }
+
+    .composited {
+        -webkit-transform: translateZ(0);
+    }
+</style>
+<script type="text/javascript" charset="utf-8">
+    if (window.testRunner) {
+        testRunner.waitUntilDone();
+        testRunner.dumpAsText(true);
+    }
+    function doTest()
+    {
+        var bg = document.getElementById("background");
+
+        window.setTimeout(function() {
+            // Change the layer to become background only.
+            bg.style.padding = "50px";
+            if (window.testRunner) {
+                window.setTimeout(function() {
+                    testRunner.notifyDone();
+                }, 0);
+            }
+        }, 0);
+    }
+
+    window.addEventListener('load', doTest, false);
+</script>
+</head>
+<body>
+<!-- When the test is done, there should only be a green square on the page -->
+<div id="background" class="composited">
+    <div id="content"></div>
+</div>
+</body>
+</html>
diff --git a/LayoutTests/compositing/background-color/background-color-padding-clip-expected.html b/LayoutTests/compositing/background-color/background-color-padding-clip-expected.html
new file mode 100644 (file)
index 0000000..7c41661
--- /dev/null
@@ -0,0 +1,30 @@
+<html>
+    <head>
+        <style type="text/css">
+            .green {
+                width: 100px;
+                height: 100px;
+                background-color: green;
+                display: block;
+                padding: 10px;                
+                -webkit-background-clip: padding;
+            }
+            .blue {
+                width: 50px;
+                height: 50px;
+                background-color: blue;
+                display: block;
+            }
+
+            .composited {
+                -webkit-transform: translateZ(0);
+            }
+        </style>
+    </head>
+    <body>
+        <div class="green">
+            <div class="blue">
+            </div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/LayoutTests/compositing/background-color/background-color-padding-clip.html b/LayoutTests/compositing/background-color/background-color-padding-clip.html
new file mode 100644 (file)
index 0000000..bf26e49
--- /dev/null
@@ -0,0 +1,30 @@
+<html>
+    <head>
+        <style type="text/css">
+            .green {
+                width: 100px;
+                height: 100px;
+                background-color: green;
+                display: block;
+                padding: 10px;
+                -webkit-background-clip: padding;
+            }
+            .blue {
+                width: 50px;
+                height: 50px;
+                background-color: blue;
+                display: block;
+            }
+
+            .composited {
+                -webkit-transform: translateZ(0);
+            }
+        </style>
+    </head>
+    <body>
+        <div class="green composited">
+            <div class="blue composited">
+            </div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/LayoutTests/compositing/background-color/background-color-simple-expected.html b/LayoutTests/compositing/background-color/background-color-simple-expected.html
new file mode 100644 (file)
index 0000000..0338da6
--- /dev/null
@@ -0,0 +1,19 @@
+<html>
+    <head>
+        <style type="text/css">
+            .green {
+                width: 100px;
+                height: 100px;
+                background-color: green;
+                display: block;
+            }
+
+            .composited {
+                -webkit-transform: translateZ(0);
+            }
+        </style>
+    </head>
+    <body>
+        <div class="green"></div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/LayoutTests/compositing/background-color/background-color-simple.html b/LayoutTests/compositing/background-color/background-color-simple.html
new file mode 100644 (file)
index 0000000..dfbed88
--- /dev/null
@@ -0,0 +1,19 @@
+<html>
+    <head>
+        <style type="text/css">
+            .green {
+                width: 100px;
+                height: 100px;
+                background-color: green;
+                display: block;
+            }
+
+            .composited {
+                -webkit-transform: translateZ(0);
+            }
+        </style>
+    </head>
+    <body>
+        <div class="green composited"></div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/LayoutTests/compositing/background-color/background-color-text-change-expected.html b/LayoutTests/compositing/background-color/background-color-text-change-expected.html
new file mode 100644 (file)
index 0000000..62c53ee
--- /dev/null
@@ -0,0 +1,43 @@
+<!DOCTYPE>
+<html>
+<head>
+<style type="text/css" media="screen">
+    #background {
+        width: 200px;
+        height: 200px;
+        display: block;
+        background-color: green;
+    }
+
+    .composited {
+        -webkit-transform: translateZ(0);
+    }
+</style>
+<script type="text/javascript" charset="utf-8">
+    if (window.testRunner) {
+        testRunner.waitUntilDone();
+        testRunner.dumpAsText(true);
+    }
+    function doTest()
+    {
+        var bg = document.getElementById("background");
+
+        window.setTimeout(function() {
+            // Change the layer to become background only.
+            bg.innerHTML = "";
+            if (window.testRunner) {
+                window.setTimeout(function() {
+                    testRunner.notifyDone();
+                }, 0);
+            }
+        }, 0);
+    }
+
+    window.addEventListener('load', doTest, false);
+</script>
+</head>
+<body>
+<!-- When the test is done, there should only be a green square on the page -->
+<div id="background"></div>
+</body>
+</html>
diff --git a/LayoutTests/compositing/background-color/background-color-text-change.html b/LayoutTests/compositing/background-color/background-color-text-change.html
new file mode 100644 (file)
index 0000000..707aefe
--- /dev/null
@@ -0,0 +1,45 @@
+<!DOCTYPE>
+<html>
+<head>
+<style type="text/css" media="screen">
+    #background {
+        width: 200px;
+        height: 200px;
+        display: block;
+        background-color: green;
+    }
+
+    .composited {
+        -webkit-transform: translateZ(0);
+    }
+</style>
+<script type="text/javascript" charset="utf-8">
+    if (window.testRunner) {
+        testRunner.waitUntilDone();
+        testRunner.dumpAsText(true);
+    }
+    function doTest()
+    {
+        var bg = document.getElementById("background");
+
+        window.setTimeout(function() {
+            // Change the layer to become background only.
+            bg.innerHTML = "";
+            if (window.testRunner) {
+                window.setTimeout(function() {
+                    testRunner.notifyDone();
+                }, 0);
+            }
+        }, 0);
+    }
+
+    window.addEventListener('load', doTest, false);
+</script>
+</head>
+<body>
+<!-- When the test is done, there should only be a green square on the page -->
+
+<!-- Start with a red image -->
+<div id="background" class="composited">Text</div>
+</body>
+</html>
diff --git a/LayoutTests/compositing/background-color/background-color-text-clip-expected.html b/LayoutTests/compositing/background-color/background-color-text-clip-expected.html
new file mode 100644 (file)
index 0000000..03402ee
--- /dev/null
@@ -0,0 +1,30 @@
+<html>
+    <head>
+        <style type="text/css">
+            .green {
+                width: 100px;
+                height: 100px;
+                background-color: green;
+                display: block;
+                padding: 10px;                
+                -webkit-background-clip: text;
+            }
+            .blue {
+                width: 50px;
+                height: 50px;
+                background-color: blue;
+                display: block;
+            }
+
+            .composited {
+                -webkit-transform: translateZ(0);
+            }
+        </style>
+    </head>
+    <body>
+        <div class="green">
+            <div class="blue">
+            </div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/LayoutTests/compositing/background-color/background-color-text-clip.html b/LayoutTests/compositing/background-color/background-color-text-clip.html
new file mode 100644 (file)
index 0000000..51d5ca1
--- /dev/null
@@ -0,0 +1,30 @@
+<html>
+    <head>
+        <style type="text/css">
+            .green {
+                width: 100px;
+                height: 100px;
+                background-color: green;
+                display: block;
+                padding: 10px;                
+                -webkit-background-clip: text;
+            }
+            .blue {
+                width: 50px;
+                height: 50px;
+                background-color: blue;
+                display: block;
+            }
+
+            .composited {
+                -webkit-transform: translateZ(0);
+            }
+        </style>
+    </head>
+    <body>
+        <div class="green composited">
+            <div class="blue composited">
+            </div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
index e50aa5c..8f97a74 100644 (file)
@@ -25,7 +25,7 @@ This layer should not have backing store.
                         (GraphicsLayer
                           (position 30.00 48.00)
                           (bounds 100.00 100.00)
-                          (drawsContent 1)
+                          (backgroundColor #C0C0C0)
                         )
                       )
                     )
index b260d0a..1d1905e 100644 (file)
@@ -17,7 +17,7 @@ This layer should have backing store.
                 (GraphicsLayer
                   (position 30.00 48.00)
                   (bounds 100.00 100.00)
-                  (drawsContent 1)
+                  (backgroundColor #C0C0C0)
                 )
               )
             )
@@ -35,7 +35,7 @@ This layer should have backing store.
                 (GraphicsLayer
                   (position 30.00 48.00)
                   (bounds 100.00 100.00)
-                  (drawsContent 1)
+                  (backgroundColor #C0C0C0)
                 )
               )
             )
index db434dc..cbee81f 100644 (file)
@@ -19,7 +19,7 @@ This layer should not have backing store.
                 (GraphicsLayer
                   (position 31.00 49.00)
                   (bounds 100.00 100.00)
-                  (drawsContent 1)
+                  (backgroundColor #C0C0C0)
                   (transform [1.00 0.00 0.00 0.00] [0.00 1.00 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 1.00 1.00])
                 )
               )
index cf71907..75c5d52 100644 (file)
@@ -7,7 +7,7 @@
         (GraphicsLayer
           (position 818.00 145.00)
           (bounds 100.00 100.00)
-          (drawsContent 1)
+          (backgroundColor #0000FF)
         )
       )
     )
index e36d2c7..6a1804c 100644 (file)
@@ -7,7 +7,7 @@
         (GraphicsLayer
           (position 6.00 6.00)
           (bounds 104.00 104.00)
-          (drawsContent 1)
+          (backgroundColor #008000)
           (transform [1.00 0.00 0.00 0.00] [0.00 1.00 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 1.00 1.00])
         )
         (GraphicsLayer
index 3335b1a..9a91060 100644 (file)
@@ -21,7 +21,7 @@
             (GraphicsLayer
               (position 490.00 108.00)
               (bounds 100.00 100.00)
-              (drawsContent 1)
+              (backgroundColor #0000FF)
             )
           )
         )
index 023c8a3..c394cc1 100644 (file)
         )
         (GraphicsLayer
           (bounds 100.00 100.00)
-          (drawsContent 1)
+          (backgroundColor #008000)
         )
         (GraphicsLayer
           (position 0.00 250.00)
           (bounds 100.00 100.00)
-          (drawsContent 1)
+          (backgroundColor #008000)
         )
       )
     )
index 3255b7c..33499bd 100644 (file)
@@ -15,7 +15,7 @@ Test CSS clip with composited layers. Left and right sides should look the same.
         (GraphicsLayer
           (position 220.00 20.00)
           (bounds 100.00 100.00)
-          (drawsContent 1)
+          (backgroundColor #808080)
         )
         (GraphicsLayer
           (position 215.00 15.00)
@@ -24,7 +24,7 @@ Test CSS clip with composited layers. Left and right sides should look the same.
             (GraphicsLayer
               (position -5.00 -5.00)
               (bounds 120.00 120.00)
-              (drawsContent 1)
+              (backgroundColor #00000033)
               (transform [1.00 0.00 0.00 0.00] [0.00 1.00 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 1.00 1.00])
             )
           )
index 2b64736..6a00a15 100644 (file)
@@ -11,7 +11,7 @@
           (children 1
             (GraphicsLayer
               (bounds 60.00 60.00)
-              (drawsContent 1)
+              (backgroundColor #008000)
             )
           )
         )
@@ -22,7 +22,7 @@
           (children 1
             (GraphicsLayer
               (bounds 60.00 60.00)
-              (drawsContent 1)
+              (backgroundColor #008000)
             )
           )
         )
index 8f9dc3e..669eae9 100644 (file)
@@ -7,7 +7,7 @@
         (GraphicsLayer
           (position 18.00 10.00)
           (bounds 250.00 200.00)
-          (drawsContent 1)
+          (backgroundColor #C0C0C0)
           (children 1
             (GraphicsLayer
               (position 35.00 10.00)
index 2bad461..7292edf 100644 (file)
@@ -18,12 +18,12 @@ Second dump layer tree:
             (GraphicsLayer
               (position 31.00 39.00)
               (bounds 250.00 220.00)
-              (drawsContent 1)
+              (backgroundColor #0000FF)
               (children 1
                 (GraphicsLayer
                   (position 10.00 10.00)
                   (bounds 200.00 200.00)
-                  (drawsContent 1)
+                  (backgroundColor #FFFF00)
                   (transform [0.87 0.50 0.00 0.00] [-0.50 0.87 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 0.00 1.00])
                   (children 1
                     (GraphicsLayer
index 8676687..85e7f50 100644 (file)
@@ -12,7 +12,7 @@ Text here
         (GraphicsLayer
           (position 29.00 134.00)
           (bounds 100.00 100.00)
-          (drawsContent 1)
+          (backgroundColor #FF0000)
         )
         (GraphicsLayer
           (position 0.00 113.00)
index a715063..ce48a78 100644 (file)
@@ -11,7 +11,7 @@
         (GraphicsLayer
           (position 21.00 21.00)
           (bounds 100.00 100.00)
-          (drawsContent 1)
+          (backgroundColor #FF0000)
         )
         (GraphicsLayer
           (bounds 142.00 142.00)
index c2c3839..7585e18 100644 (file)
@@ -12,7 +12,7 @@ Text here
         (GraphicsLayer
           (position 29.00 29.00)
           (bounds 100.00 100.00)
-          (drawsContent 1)
+          (backgroundColor #FF0000)
         )
         (GraphicsLayer
           (position 0.00 8.00)
index c7c1f5e..8b6f466 100644 (file)
@@ -12,7 +12,7 @@ Text here
         (GraphicsLayer
           (position 29.00 29.00)
           (bounds 100.00 100.00)
-          (drawsContent 1)
+          (backgroundColor #FF0000)
         )
         (GraphicsLayer
           (position 0.00 8.00)
index 06bf10f..7d38bf1 100644 (file)
@@ -12,7 +12,7 @@ Text here
         (GraphicsLayer
           (position 129.00 29.00)
           (bounds 200.00 100.00)
-          (drawsContent 1)
+          (backgroundColor #FF0000)
         )
         (GraphicsLayer
           (position -971.00 8.00)
index f0c2b7f..bc4f471 100644 (file)
@@ -12,7 +12,7 @@ middle
         (GraphicsLayer
           (position 129.00 29.00)
           (bounds 200.00 100.00)
-          (drawsContent 1)
+          (backgroundColor #FF0000)
         )
         (GraphicsLayer
           (position 8.00 8.00)
index 791dda2..46bb843 100644 (file)
@@ -17,7 +17,7 @@ The green box appear angled out from the yellow box and embedded in it.
               (bounds 280.00 280.00)
               (opacity 0.80)
               (preserves3D 1)
-              (drawsContent 1)
+              (backgroundColor #FFFF00)
               (transform [0.77 -0.56 -0.32 0.00] [0.00 0.50 -0.87 0.00] [0.64 0.66 0.38 0.00] [0.00 0.00 0.00 1.00])
               (children 1
                 (GraphicsLayer
index b1543c3..cb64d14 100644 (file)
@@ -48,7 +48,7 @@
                                                         (GraphicsLayer
                                                           (position 18.00 10.00)
                                                           (bounds 210.00 210.00)
-                                                          (drawsContent 1)
+                                                          (backgroundColor #0000FF)
                                                         )
                                                       )
                                                     )
                                                         (GraphicsLayer
                                                           (position 18.00 10.00)
                                                           (bounds 210.00 210.00)
-                                                          (drawsContent 1)
+                                                          (backgroundColor #0000FF)
                                                         )
                                                       )
                                                     )
         )
         (GraphicsLayer
           (bounds 100.00 100.00)
-          (drawsContent 1)
+          (backgroundColor #0000FF)
         )
       )
     )
index 9c4f0f5..d0ec3c4 100644 (file)
@@ -28,7 +28,7 @@
                                 (GraphicsLayer
                                   (position 18.00 10.00)
                                   (bounds 210.00 210.00)
-                                  (drawsContent 1)
+                                  (backgroundColor #0000FF)
                                 )
                               )
                             )
@@ -45,7 +45,7 @@
         (GraphicsLayer
           (position 5.00 5.00)
           (bounds 150.00 150.00)
-          (drawsContent 1)
+          (backgroundColor #00000099)
         )
       )
     )
index 777fba7..8ddd697 100644 (file)
@@ -28,7 +28,7 @@
                                 (GraphicsLayer
                                   (position 18.00 10.00)
                                   (bounds 210.00 210.00)
-                                  (drawsContent 1)
+                                  (backgroundColor #0000FF)
                                 )
                               )
                             )
index 6322520..58be476 100644 (file)
@@ -30,7 +30,7 @@ When the parent document becomes composited, the layer trees should get connecte
                                 (GraphicsLayer
                                   (position 18.00 10.00)
                                   (bounds 210.00 210.00)
-                                  (drawsContent 1)
+                                  (backgroundColor #0000FF)
                                 )
                               )
                             )
@@ -47,7 +47,7 @@ When the parent document becomes composited, the layer trees should get connecte
         (GraphicsLayer
           (position 8.00 8.00)
           (bounds 100.00 100.00)
-          (drawsContent 1)
+          (backgroundColor #0000FF)
         )
       )
     )
index f662d26..ca2b1ac 100644 (file)
@@ -28,7 +28,7 @@
                                 (GraphicsLayer
                                   (position 18.00 10.00)
                                   (bounds 210.00 210.00)
-                                  (drawsContent 1)
+                                  (backgroundColor #0000FF)
                                 )
                               )
                             )
@@ -45,7 +45,7 @@
         (GraphicsLayer
           (position 5.00 5.00)
           (bounds 50.00 50.00)
-          (drawsContent 1)
+          (backgroundColor #00000033)
         )
       )
     )
index f662d26..ca2b1ac 100644 (file)
@@ -28,7 +28,7 @@
                                 (GraphicsLayer
                                   (position 18.00 10.00)
                                   (bounds 210.00 210.00)
-                                  (drawsContent 1)
+                                  (backgroundColor #0000FF)
                                 )
                               )
                             )
@@ -45,7 +45,7 @@
         (GraphicsLayer
           (position 5.00 5.00)
           (bounds 50.00 50.00)
-          (drawsContent 1)
+          (backgroundColor #00000033)
         )
       )
     )
index a05f178..6475d33 100644 (file)
@@ -28,7 +28,7 @@
                                 (GraphicsLayer
                                   (position 18.00 10.00)
                                   (bounds 210.00 210.00)
-                                  (drawsContent 1)
+                                  (backgroundColor #0000FF)
                                 )
                               )
                             )
index f662d26..ca2b1ac 100644 (file)
@@ -28,7 +28,7 @@
                                 (GraphicsLayer
                                   (position 18.00 10.00)
                                   (bounds 210.00 210.00)
-                                  (drawsContent 1)
+                                  (backgroundColor #0000FF)
                                 )
                               )
                             )
@@ -45,7 +45,7 @@
         (GraphicsLayer
           (position 5.00 5.00)
           (bounds 50.00 50.00)
-          (drawsContent 1)
+          (backgroundColor #00000033)
         )
       )
     )
index b1c5789..1383e7d 100644 (file)
@@ -28,7 +28,7 @@
                                 (GraphicsLayer
                                   (position 18.00 10.00)
                                   (bounds 210.00 210.00)
-                                  (drawsContent 1)
+                                  (backgroundColor #0000FF)
                                 )
                               )
                             )
@@ -45,7 +45,7 @@
         (GraphicsLayer
           (position 5.00 5.00)
           (bounds 50.00 50.00)
-          (drawsContent 1)
+          (backgroundColor #00000033)
         )
       )
     )
index 3d6cf04..3287a13 100644 (file)
@@ -7,7 +7,7 @@
         (GraphicsLayer
           (position 18.00 10.00)
           (bounds 210.00 210.00)
-          (drawsContent 1)
+          (backgroundColor #0000FF)
         )
       )
     )
index 409e8fd..4efc778 100644 (file)
@@ -47,7 +47,7 @@
                                                         (GraphicsLayer
                                                           (position 18.00 10.00)
                                                           (bounds 210.00 210.00)
-                                                          (drawsContent 1)
+                                                          (backgroundColor #0000FF)
                                                         )
                                                       )
                                                     )
@@ -76,7 +76,7 @@
         (GraphicsLayer
           (position 18.00 202.00)
           (bounds 210.00 210.00)
-          (drawsContent 1)
+          (backgroundColor #0000FF)
           (transform [1.00 0.00 0.00 0.00] [0.00 1.00 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 1.00 1.00])
         )
       )
index f662d26..ca2b1ac 100644 (file)
@@ -28,7 +28,7 @@
                                 (GraphicsLayer
                                   (position 18.00 10.00)
                                   (bounds 210.00 210.00)
-                                  (drawsContent 1)
+                                  (backgroundColor #0000FF)
                                 )
                               )
                             )
@@ -45,7 +45,7 @@
         (GraphicsLayer
           (position 5.00 5.00)
           (bounds 50.00 50.00)
-          (drawsContent 1)
+          (backgroundColor #00000033)
         )
       )
     )
index 2eff84a..1fafc47 100644 (file)
@@ -26,7 +26,7 @@
                                 (GraphicsLayer
                                   (position 18.00 10.00)
                                   (bounds 210.00 210.00)
-                                  (drawsContent 1)
+                                  (backgroundColor #0000FF)
                                 )
                               )
                             )
index ef11846..193662b 100644 (file)
@@ -52,7 +52,7 @@ This tests that layers are rebuilt properly after the page is restored from the
         (GraphicsLayer
           (position 13.00 55.00)
           (bounds 50.00 50.00)
-          (drawsContent 1)
+          (backgroundColor #00000033)
         )
         (GraphicsLayer
           (position 8.00 274.00)
@@ -77,7 +77,7 @@ This tests that layers are rebuilt properly after the page is restored from the
                                 (GraphicsLayer
                                   (position 108.00 100.00)
                                   (bounds 200.00 200.00)
-                                  (drawsContent 1)
+                                  (backgroundColor #0000FF)
                                 )
                               )
                             )
@@ -94,7 +94,7 @@ This tests that layers are rebuilt properly after the page is restored from the
         (GraphicsLayer
           (position 13.00 279.00)
           (bounds 50.00 50.00)
-          (drawsContent 1)
+          (backgroundColor #00000033)
         )
       )
     )
index 22e5e8b..878dcb7 100644 (file)
@@ -29,7 +29,7 @@
                                 (GraphicsLayer
                                   (position 108.00 100.00)
                                   (bounds 200.00 200.00)
-                                  (drawsContent 1)
+                                  (backgroundColor #0000FF)
                                 )
                               )
                             )
@@ -46,7 +46,7 @@
         (GraphicsLayer
           (position 5.00 5.00)
           (bounds 50.00 50.00)
-          (drawsContent 1)
+          (backgroundColor #00000033)
         )
       )
     )
index b81ded6..f672f64 100644 (file)
@@ -14,7 +14,7 @@ Should be composited
             (GraphicsLayer
               (position 6.00 6.00)
               (bounds 250.00 50.00)
-              (drawsContent 1)
+              (backgroundColor #C0C0C0)
             )
             (GraphicsLayer
               (position 11.00 21.00)
index 6a053f6..dc5a034 100644 (file)
@@ -7,12 +7,12 @@
         (GraphicsLayer
           (position 100.00 1100.00)
           (bounds 256.00 256.00)
-          (drawsContent 1)
+          (backgroundColor #FF0000)
         )
         (GraphicsLayer
           (position 0.00 1000.00)
           (bounds 500.00 500.00)
-          (drawsContent 1)
+          (backgroundColor #008000)
         )
       )
     )
index 66e94e6..fa4ce61 100644 (file)
@@ -14,7 +14,7 @@
         (GraphicsLayer
           (position 0.00 1000.00)
           (bounds 500.00 500.00)
-          (drawsContent 1)
+          (backgroundColor #008000)
         )
       )
     )
index d2f2867..68fb5f4 100644 (file)
@@ -16,7 +16,7 @@ This layer should be composited.
             (GraphicsLayer
               (position 31.00 49.00)
               (bounds 100.00 100.00)
-              (drawsContent 1)
+              (backgroundColor #C0C0C0)
               (transform [0.98 0.00 -0.17 0.00] [0.00 1.00 0.00 0.00] [0.17 0.00 0.98 0.00] [0.00 0.00 0.00 1.00])
             )
           )
index 7bdfd4a..a2f8a17 100644 (file)
@@ -20,7 +20,7 @@
             (GraphicsLayer
               (position 20.00 45.00)
               (bounds 210.00 100.00)
-              (drawsContent 1)
+              (backgroundColor #0000FF)
             )
           )
         )
index 9b73832..7f63ba2 100644 (file)
                 (GraphicsLayer
                   (position 10.00 10.00)
                   (bounds 100.00 100.00)
-                  (drawsContent 1)
+                  (backgroundColor #0000FF)
                 )
                 (GraphicsLayer
                   (position 10.00 120.00)
                   (bounds 100.00 100.00)
-                  (drawsContent 1)
+                  (backgroundColor #0000FF)
                 )
               )
             )
index c69fcd0..79d2e5f 100644 (file)
@@ -11,7 +11,7 @@
         )
         (GraphicsLayer
           (bounds 300.00 300.00)
-          (drawsContent 1)
+          (backgroundColor #008000)
         )
       )
     )
index 2300634..4b56ce0 100644 (file)
           (children 1
             (GraphicsLayer
               (bounds 500.00 100.00)
-              (drawsContent 1)
+              (backgroundColor #008000)
             )
           )
         )
         (GraphicsLayer
           (position 50.00 200.00)
           (bounds 500.00 100.00)
-          (drawsContent 1)
+          (backgroundColor #008000)
         )
         (GraphicsLayer
           (position 450.00 200.00)
           (bounds 100.00 100.00)
-          (drawsContent 1)
+          (backgroundColor #0000FF)
         )
       )
     )
index 99c9cbc..24e5d71 100644 (file)
               (children 2
                 (GraphicsLayer
                   (bounds 100.00 100.00)
-                  (drawsContent 1)
+                  (backgroundColor #FF0000)
                 )
                 (GraphicsLayer
                   (bounds 100.00 100.00)
-                  (drawsContent 1)
+                  (backgroundColor #008000)
                 )
               )
             )
index b0e1b35..f54d599 100644 (file)
@@ -18,7 +18,7 @@
         )
         (GraphicsLayer
           (bounds 300.00 300.00)
-          (drawsContent 1)
+          (backgroundColor #008000)
         )
       )
     )
index 90f7440..f3c20e8 100644 (file)
                 (GraphicsLayer
                   (position 10.00 10.00)
                   (bounds 100.00 100.00)
-                  (drawsContent 1)
+                  (backgroundColor #0000FF)
                   (transform [1.00 0.00 0.00 0.00] [0.00 1.00 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 1.00 1.00])
                 )
                 (GraphicsLayer
                   (position 10.00 120.00)
                   (bounds 100.00 100.00)
-                  (drawsContent 1)
+                  (backgroundColor #0000FF)
                 )
               )
             )
index 09526c5..fffe6af 100644 (file)
@@ -12,7 +12,7 @@ scroll me
         (GraphicsLayer
           (position 10.00 10.00)
           (bounds 400.00 100.00)
-          (drawsContent 1)
+          (backgroundColor #0000007F)
         )
         (GraphicsLayer
           (position 200.00 8.00)
index d9c3263..4a35b1d 100644 (file)
@@ -12,7 +12,7 @@
         (GraphicsLayer
           (position 8.00 8.00)
           (bounds 100.00 50.00)
-          (drawsContent 1)
+          (backgroundColor #008000)
         )
       )
     )
index 15510cb..4329e0c 100644 (file)
@@ -7,7 +7,7 @@
         (GraphicsLayer
           (position 8.00 8.00)
           (bounds 20.00 20.00)
-          (drawsContent 1)
+          (backgroundColor #0000FF)
         )
         (GraphicsLayer
           (position 8.00 18.00)
index 5c2b30e..90ef764 100644 (file)
@@ -19,7 +19,7 @@
         (GraphicsLayer
           (position 65.00 65.00)
           (bounds 76.00 76.00)
-          (drawsContent 1)
+          (backgroundColor #0000FF)
         )
       )
     )
index 9dec581..0b9e3df 100644 (file)
@@ -7,7 +7,7 @@
         (GraphicsLayer
           (position 18.00 10.00)
           (bounds 100.00 100.00)
-          (drawsContent 1)
+          (backgroundColor #0000FF)
         )
       )
     )
index 6051e34..c060af6 100644 (file)
@@ -10,13 +10,13 @@ flat
           (position 18.00 10.00)
           (bounds 100.00 100.00)
           (preserves3D 1)
-          (drawsContent 1)
+          (backgroundColor #0000FF)
           (transform [1.00 0.00 0.00 0.00] [0.00 1.00 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 1.00 1.00])
         )
         (GraphicsLayer
           (position 18.00 120.00)
           (bounds 100.00 100.00)
-          (drawsContent 1)
+          (backgroundColor #0000FF)
           (transform [1.00 0.00 0.00 0.00] [0.00 1.00 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 1.00 1.00])
         )
       )
index 702ca84..d90b14f 100644 (file)
@@ -13,7 +13,7 @@ Test overflow clipping of composited elements in various configurations.
             (GraphicsLayer
               (position 2.00 12.00)
               (bounds 100.00 150.00)
-              (drawsContent 1)
+              (backgroundColor #808080)
               (transform [1.00 0.00 0.00 0.00] [0.00 1.00 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 1.00 1.00])
             )
           )
@@ -41,7 +41,7 @@ Test overflow clipping of composited elements in various configurations.
             (GraphicsLayer
               (position 2.00 12.00)
               (bounds 100.00 150.00)
-              (drawsContent 1)
+              (backgroundColor #808080)
               (transform [1.00 0.00 0.00 0.00] [0.00 1.00 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 1.00 1.00])
             )
           )
@@ -57,7 +57,7 @@ Test overflow clipping of composited elements in various configurations.
                 (GraphicsLayer
                   (position 2.00 12.00)
                   (bounds 100.00 150.00)
-                  (drawsContent 1)
+                  (backgroundColor #808080)
                   (transform [1.00 0.00 0.00 0.00] [0.00 1.00 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 1.00 1.00])
                 )
               )
@@ -74,7 +74,7 @@ Test overflow clipping of composited elements in various configurations.
                 (GraphicsLayer
                   (position 2.00 12.00)
                   (bounds 100.00 150.00)
-                  (drawsContent 1)
+                  (backgroundColor #808080)
                   (transform [1.00 0.00 0.00 0.00] [0.00 1.00 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 1.00 1.00])
                 )
               )
index 21d9be0..2b34621 100644 (file)
@@ -7,7 +7,6 @@
         (GraphicsLayer
           (position 8.00 13.00)
           (bounds 100.00 100.00)
-          (drawsContent 1)
           (children 1
             (GraphicsLayer
               (bounds 85.00 100.00)
@@ -22,7 +21,6 @@
         (GraphicsLayer
           (position 8.00 13.00)
           (bounds 100.00 100.00)
-          (drawsContent 1)
           (children 1
             (GraphicsLayer
               (bounds 100.00 85.00)
@@ -37,7 +35,6 @@
         (GraphicsLayer
           (position 8.00 13.00)
           (bounds 100.00 100.00)
-          (drawsContent 1)
           (children 1
             (GraphicsLayer
               (bounds 85.00 85.00)
         (GraphicsLayer
           (position 8.00 13.00)
           (bounds 100.00 100.00)
-          (drawsContent 1)
           (children 1
             (GraphicsLayer
               (bounds 100.00 100.00)
               (children 1
                 (GraphicsLayer
                   (bounds 10.00 10.00)
-                  (drawsContent 1)
                 )
               )
             )
index 21d9be0..2b34621 100644 (file)
@@ -7,7 +7,6 @@
         (GraphicsLayer
           (position 8.00 13.00)
           (bounds 100.00 100.00)
-          (drawsContent 1)
           (children 1
             (GraphicsLayer
               (bounds 85.00 100.00)
@@ -22,7 +21,6 @@
         (GraphicsLayer
           (position 8.00 13.00)
           (bounds 100.00 100.00)
-          (drawsContent 1)
           (children 1
             (GraphicsLayer
               (bounds 100.00 85.00)
@@ -37,7 +35,6 @@
         (GraphicsLayer
           (position 8.00 13.00)
           (bounds 100.00 100.00)
-          (drawsContent 1)
           (children 1
             (GraphicsLayer
               (bounds 85.00 85.00)
         (GraphicsLayer
           (position 8.00 13.00)
           (bounds 100.00 100.00)
-          (drawsContent 1)
           (children 1
             (GraphicsLayer
               (bounds 100.00 100.00)
               (children 1
                 (GraphicsLayer
                   (bounds 10.00 10.00)
-                  (drawsContent 1)
                 )
               )
             )
index 9dec581..0e205ac 100644 (file)
@@ -7,7 +7,6 @@
         (GraphicsLayer
           (position 18.00 10.00)
           (bounds 100.00 100.00)
-          (drawsContent 1)
         )
       )
     )
index e7776d7..499d54d 100644 (file)
@@ -12,7 +12,7 @@
         (GraphicsLayer
           (position 266.00 20.00)
           (bounds 100.00 100.00)
-          (drawsContent 1)
+          (backgroundColor #0000FF)
         )
         (GraphicsLayer
           (position 390.00 18.00)
index bdcf0c4..f59b617 100644 (file)
@@ -7,7 +7,7 @@
         (GraphicsLayer
           (position 50.00 50.00)
           (bounds 100.00 100.00)
-          (drawsContent 1)
+          (backgroundColor #008000)
         )
       )
     )
index f3a133e..5ff22d5 100644 (file)
@@ -8,7 +8,7 @@
         (GraphicsLayer
           (position 265.00 50.00)
           (bounds 100.00 100.00)
-          (drawsContent 1)
+          (backgroundColor #008000)
         )
       )
     )
index e7dc21f..e089df0 100644 (file)
@@ -8,7 +8,7 @@
         (GraphicsLayer
           (position 51.00 50.00)
           (bounds 100.00 100.00)
-          (drawsContent 1)
+          (backgroundColor #008000)
         )
       )
     )
index bdcf0c4..f59b617 100644 (file)
@@ -7,7 +7,7 @@
         (GraphicsLayer
           (position 50.00 50.00)
           (bounds 100.00 100.00)
-          (drawsContent 1)
+          (backgroundColor #008000)
         )
       )
     )
index f3a133e..5ff22d5 100644 (file)
@@ -8,7 +8,7 @@
         (GraphicsLayer
           (position 265.00 50.00)
           (bounds 100.00 100.00)
-          (drawsContent 1)
+          (backgroundColor #008000)
         )
       )
     )
index c9daf41..8c63a1d 100644 (file)
@@ -7,7 +7,7 @@
         (GraphicsLayer
           (position 642.00 58.00)
           (bounds 100.00 100.00)
-          (drawsContent 1)
+          (backgroundColor #008000)
         )
       )
     )
index 2c87600..dd1a350 100644 (file)
@@ -7,7 +7,7 @@
         (GraphicsLayer
           (position 8.00 8.00)
           (bounds 1800.00 10.00)
-          (drawsContent 1)
+          (backgroundColor #0000FF)
         )
       )
     )
index f138940..7dc7366 100644 (file)
               (children 3
                 (GraphicsLayer
                   (bounds 200.00 200.00)
-                  (drawsContent 1)
+                  (backgroundColor #0000FF)
                   (transform [1.00 0.00 0.00 0.00] [0.00 1.00 0.00 0.00] [0.00 0.00 1.00 0.00] [-100.00 0.00 0.00 1.00])
                   (visible rect 100.00, 0.00 100.00 x 200.00)
                 )
                 (GraphicsLayer
                   (bounds 200.00 200.00)
-                  (drawsContent 1)
+                  (backgroundColor #0000FF)
                   (transform [0.71 0.71 0.00 0.00] [-0.71 0.71 0.00 0.00] [0.00 0.00 1.00 0.00] [150.00 0.00 0.00 1.00])
                   (visible rect 0.00, 0.00 200.00 x 200.00)
                 )
                 (GraphicsLayer
                   (bounds 200.00 200.00)
-                  (drawsContent 1)
+                  (backgroundColor #0000FF)
                   (transform [1.00 0.00 0.00 0.00] [0.00 1.00 0.00 0.00] [0.00 0.00 1.00 0.00] [400.00 0.00 0.00 1.00])
                   (visible rect 0.00, 0.00 100.00 x 200.00)
                 )
index e649ec5..3512b1c 100644 (file)
@@ -24,7 +24,7 @@
                   (children 1
                     (GraphicsLayer
                       (bounds 300.00 300.00)
-                      (drawsContent 1)
+                      (backgroundColor #0000FF)
                       (transform [1.00 0.00 0.00 0.00] [0.00 0.91 0.42 0.00] [0.00 -0.42 0.91 0.00] [0.00 0.00 0.00 1.00])
                       (visible rect 0.00, 0.00 213.67 x 200.68)
                     )
@@ -52,7 +52,7 @@
                   (children 1
                     (GraphicsLayer
                       (bounds 300.00 300.00)
-                      (drawsContent 1)
+                      (backgroundColor #0000FF)
                       (transform [0.91 0.00 0.42 0.00] [0.00 1.00 0.00 0.00] [-0.42 0.00 0.91 0.00] [0.00 0.00 0.00 1.00])
                       (visible rect 0.00, 0.00 200.68 x 213.67)
                     )
index a5f2272..4b7acf5 100644 (file)
@@ -20,7 +20,7 @@
                 (GraphicsLayer
                   (anchor 0.20 0.20)
                   (bounds 500.00 500.00)
-                  (drawsContent 1)
+                  (backgroundColor #0000FF)
                   (transform [1.00 0.00 0.00 0.00] [0.00 0.71 0.71 0.00] [0.00 -0.71 0.71 0.00] [0.00 0.00 0.00 1.00])
                   (visible rect 0.00, 0.00 220.62 x 218.46)
                 )
@@ -42,7 +42,7 @@
                 (GraphicsLayer
                   (anchor 0.20 0.20)
                   (bounds 500.00 500.00)
-                  (drawsContent 1)
+                  (backgroundColor #0000FF)
                   (transform [0.71 0.00 0.71 0.00] [0.00 1.00 0.00 0.00] [-0.71 0.00 0.71 0.00] [0.00 0.00 0.00 1.00])
                   (visible rect 0.00, 0.00 218.46 x 220.62)
                 )
index 522beba..1849e18 100644 (file)
@@ -18,7 +18,7 @@
               (children 1
                 (GraphicsLayer
                   (bounds 200.00 200.00)
-                  (drawsContent 1)
+                  (backgroundColor #0000FF)
                   (transform [1.00 0.00 0.00 0.00] [0.00 1.00 0.00 0.00] [0.00 0.00 1.00 0.00] [-100.00 0.00 0.00 1.00])
                   (visible rect 100.00, 0.00 100.00 x 200.00)
                 )
index bb42157..fb1eae7 100644 (file)
@@ -19,7 +19,7 @@
                 (GraphicsLayer
                   (position -100.00 0.00)
                   (bounds 200.00 200.00)
-                  (drawsContent 1)
+                  (backgroundColor #0000FF)
                   (visible rect 100.00, 0.00 100.00 x 200.00)
                 )
               )
index 470df6d..edcd67d 100644 (file)
@@ -9,14 +9,14 @@
         (GraphicsLayer
           (position -100.00 -120.00)
           (bounds 200.00 200.00)
-          (drawsContent 1)
+          (backgroundColor #0000FF)
           (transform [1.00 0.00 0.00 0.00] [0.00 1.00 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 1.00 1.00])
           (visible rect 100.00, 120.00 100.00 x 80.00)
         )
         (GraphicsLayer
           (position -100.00 200.00)
           (bounds 200.00 200.00)
-          (drawsContent 1)
+          (backgroundColor #0000FF)
           (transform [1.00 0.00 0.00 0.00] [0.00 1.00 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 1.00 1.00])
           (visible rect 100.00, 0.00 100.00 x 200.00)
         )
index d596b58..9d4cc2c 100644 (file)
                 (GraphicsLayer
                   (position -100.00 0.00)
                   (bounds 200.00 200.00)
-                  (drawsContent 1)
+                  (backgroundColor #0000FF)
                   (transform [1.00 0.00 0.00 0.00] [0.00 1.00 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 1.00 1.00])
                   (visible rect 100.00, 0.00 100.00 x 200.00)
                 )
                 (GraphicsLayer
                   (position 150.00 0.00)
                   (bounds 200.00 200.00)
-                  (drawsContent 1)
+                  (backgroundColor #0000FF)
                   (transform [1.00 0.00 0.00 0.00] [0.00 1.00 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 1.00 1.00])
                   (visible rect 0.00, 0.00 200.00 x 200.00)
                 )
                 (GraphicsLayer
                   (position 400.00 0.00)
                   (bounds 200.00 200.00)
-                  (drawsContent 1)
+                  (backgroundColor #0000FF)
                   (transform [1.00 0.00 0.00 0.00] [0.00 1.00 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 1.00 1.00])
                   (visible rect 0.00, 0.00 100.00 x 200.00)
                 )
index 5d75874..2430013 100644 (file)
@@ -55,7 +55,7 @@
         (GraphicsLayer
           (position 8.00 226.00)
           (bounds 200.00 200.00)
-          (drawsContent 1)
+          (backgroundColor #0000FF)
           (transform [1.00 0.00 0.00 0.00] [0.00 1.00 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 1.00 1.00])
           (visible rect 0.00, 0.00 200.00 x 200.00)
         )
index 1ba7921..334497d 100644 (file)
@@ -31,7 +31,7 @@
                       (children 1
                         (GraphicsLayer
                           (bounds 500.00 500.00)
-                          (drawsContent 1)
+                          (backgroundColor #0000FF)
                           (transform [1.00 0.00 0.00 0.00] [0.00 0.82 0.57 0.00] [0.00 -0.57 0.82 0.00] [0.00 0.00 0.00 1.00])
                           (visible rect 0.00, 0.00 500.00 x 369.91)
                         )
@@ -67,7 +67,7 @@
                       (children 1
                         (GraphicsLayer
                           (bounds 500.00 500.00)
-                          (drawsContent 1)
+                          (backgroundColor #0000FF)
                           (transform [1.00 0.00 0.00 0.00] [0.00 0.82 0.57 0.00] [0.00 -0.57 0.82 0.00] [0.00 0.00 0.00 1.00])
                           (visible rect 0.00, 0.00 500.00 x 351.87)
                         )
index e6b7e6d..c04651d 100644 (file)
@@ -9,7 +9,7 @@
         (GraphicsLayer
           (position 8.00 0.00)
           (bounds 200.00 500.00)
-          (drawsContent 1)
+          (backgroundColor #0000FF)
           (transform [1.00 0.00 0.00 0.00] [0.00 1.00 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 1.00 1.00])
           (visible rect 17.00, 200.00 183.00 x 300.00)
         )
index 66d755b..88d5bef 100644 (file)
@@ -12,7 +12,7 @@
             (GraphicsLayer
               (position 22.00 22.00)
               (bounds 100.00 100.00)
-              (drawsContent 1)
+              (backgroundColor #FF0000)
               (transform [1.00 0.00 0.00 0.00] [0.00 1.00 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 1.00 1.00])
             )
           )
diff --git a/LayoutTests/platform/chromium/compositing/backing/no-backing-for-clip-expected.txt b/LayoutTests/platform/chromium/compositing/backing/no-backing-for-clip-expected.txt
new file mode 100644 (file)
index 0000000..e50aa5c
--- /dev/null
@@ -0,0 +1,42 @@
+This layer should not have backing store.
+This layer should not have backing store.
+(GraphicsLayer
+  (bounds 800.00 600.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 800.00 600.00)
+      (children 1
+        (GraphicsLayer
+          (position 8.00 8.00)
+          (bounds 342.00 240.00)
+          (children 1
+            (GraphicsLayer
+              (position 1.00 1.00)
+              (bounds 340.00 238.00)
+              (children 1
+                (GraphicsLayer
+                  (position 20.00 38.00)
+                  (bounds 320.00 180.00)
+                  (children 1
+                    (GraphicsLayer
+                      (position 1.00 1.00)
+                      (bounds 340.00 178.00)
+                      (children 1
+                        (GraphicsLayer
+                          (position 30.00 48.00)
+                          (bounds 100.00 100.00)
+                          (drawsContent 1)
+                        )
+                      )
+                    )
+                  )
+                )
+              )
+            )
+          )
+        )
+      )
+    )
+  )
+)
+
diff --git a/LayoutTests/platform/chromium/compositing/backing/no-backing-for-clip-overlap-expected.txt b/LayoutTests/platform/chromium/compositing/backing/no-backing-for-clip-overlap-expected.txt
new file mode 100644 (file)
index 0000000..b260d0a
--- /dev/null
@@ -0,0 +1,48 @@
+This layer should not have backing store.
+This layer should have backing store.
+(GraphicsLayer
+  (bounds 800.00 600.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 800.00 600.00)
+      (children 2
+        (GraphicsLayer
+          (position 8.00 8.00)
+          (bounds 342.00 180.00)
+          (children 1
+            (GraphicsLayer
+              (position 1.00 1.00)
+              (bounds 340.00 178.00)
+              (children 1
+                (GraphicsLayer
+                  (position 30.00 48.00)
+                  (bounds 100.00 100.00)
+                  (drawsContent 1)
+                )
+              )
+            )
+          )
+        )
+        (GraphicsLayer
+          (position 8.00 178.00)
+          (bounds 342.00 180.00)
+          (drawsContent 1)
+          (children 1
+            (GraphicsLayer
+              (position 1.00 1.00)
+              (bounds 340.00 178.00)
+              (children 1
+                (GraphicsLayer
+                  (position 30.00 48.00)
+                  (bounds 100.00 100.00)
+                  (drawsContent 1)
+                )
+              )
+            )
+          )
+        )
+      )
+    )
+  )
+)
+
diff --git a/LayoutTests/platform/chromium/compositing/backing/no-backing-for-perspective-expected.txt b/LayoutTests/platform/chromium/compositing/backing/no-backing-for-perspective-expected.txt
new file mode 100644 (file)
index 0000000..db434dc
--- /dev/null
@@ -0,0 +1,33 @@
+This layer should not have backing store.
+This layer should not have backing store.
+(GraphicsLayer
+  (bounds 800.00 600.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 800.00 600.00)
+      (children 1
+        (GraphicsLayer
+          (position 8.00 8.00)
+          (bounds 342.00 240.00)
+          (childrenTransform [1.00 0.00 0.00 0.00] [0.00 1.00 0.00 0.00] [0.00 0.00 1.00 -0.00] [0.00 0.00 0.00 1.00])
+          (children 1
+            (GraphicsLayer
+              (position 21.00 39.00)
+              (bounds 342.00 180.00)
+              (childrenTransform [1.00 0.00 0.00 0.00] [0.00 1.00 0.00 0.00] [0.00 0.00 1.00 -0.00] [0.00 0.00 0.00 1.00])
+              (children 1
+                (GraphicsLayer
+                  (position 31.00 49.00)
+                  (bounds 100.00 100.00)
+                  (drawsContent 1)
+                  (transform [1.00 0.00 0.00 0.00] [0.00 1.00 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 1.00 1.00])
+                )
+              )
+            )
+          )
+        )
+      )
+    )
+  )
+)
+
diff --git a/LayoutTests/platform/chromium/compositing/columns/composited-in-paginated-expected.txt b/LayoutTests/platform/chromium/compositing/columns/composited-in-paginated-expected.txt
new file mode 100644 (file)
index 0000000..cf71907
--- /dev/null
@@ -0,0 +1,16 @@
+(GraphicsLayer
+  (bounds 1600.00 585.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 1600.00 585.00)
+      (children 1
+        (GraphicsLayer
+          (position 818.00 145.00)
+          (bounds 100.00 100.00)
+          (drawsContent 1)
+        )
+      )
+    )
+  )
+)
+
diff --git a/LayoutTests/platform/chromium/compositing/geometry/ancestor-overflow-change-expected.txt b/LayoutTests/platform/chromium/compositing/geometry/ancestor-overflow-change-expected.txt
new file mode 100644 (file)
index 0000000..e36d2c7
--- /dev/null
@@ -0,0 +1,23 @@
+(GraphicsLayer
+  (bounds 800.00 600.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 800.00 600.00)
+      (children 2
+        (GraphicsLayer
+          (position 6.00 6.00)
+          (bounds 104.00 104.00)
+          (drawsContent 1)
+          (transform [1.00 0.00 0.00 0.00] [0.00 1.00 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 1.00 1.00])
+        )
+        (GraphicsLayer
+          (position 6.00 119.00)
+          (bounds 788.00 19.00)
+          (opacity 0.00)
+          (drawsContent 1)
+        )
+      )
+    )
+  )
+)
+
diff --git a/LayoutTests/platform/chromium/compositing/geometry/bounds-ignores-hidden-composited-descendant-expected.txt b/LayoutTests/platform/chromium/compositing/geometry/bounds-ignores-hidden-composited-descendant-expected.txt
new file mode 100644 (file)
index 0000000..3335b1a
--- /dev/null
@@ -0,0 +1,32 @@
+
+
+(GraphicsLayer
+  (bounds 800.00 600.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 800.00 600.00)
+      (children 2
+        (GraphicsLayer
+          (position 10.00 10.00)
+          (anchor -0.02 -0.05)
+          (bounds 590.00 208.00)
+          (drawsContent 1)
+        )
+        (GraphicsLayer
+          (position 10.00 260.00)
+          (anchor -0.02 -0.05)
+          (bounds 590.00 208.00)
+          (drawsContent 1)
+          (children 1
+            (GraphicsLayer
+              (position 490.00 108.00)
+              (bounds 100.00 100.00)
+              (drawsContent 1)
+            )
+          )
+        )
+      )
+    )
+  )
+)
+
diff --git a/LayoutTests/platform/chromium/compositing/geometry/bounds-ignores-hidden-dynamic-negzindex-expected.txt b/LayoutTests/platform/chromium/compositing/geometry/bounds-ignores-hidden-dynamic-negzindex-expected.txt
new file mode 100644 (file)
index 0000000..023c8a3
--- /dev/null
@@ -0,0 +1,51 @@
+
+
+(GraphicsLayer
+  (bounds 800.00 600.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 800.00 600.00)
+      (children 5
+        (GraphicsLayer
+          (anchor 0.10 0.20)
+          (bounds 500.00 250.00)
+          (drawsContent 1)
+          (children 1
+            (GraphicsLayer
+              (bounds 500.00 250.00)
+              (drawsContent 1)
+            )
+          )
+        )
+        (GraphicsLayer
+          (position 0.00 250.00)
+          (anchor 0.33 0.33)
+          (bounds 150.00 150.00)
+          (drawsContent 1)
+          (children 1
+            (GraphicsLayer
+              (bounds 150.00 150.00)
+              (drawsContent 1)
+            )
+          )
+        )
+        (GraphicsLayer
+          (position 8.00 8.00)
+          (bounds 784.00 15.00)
+          (opacity 0.00)
+          (drawsContent 1)
+        )
+        (GraphicsLayer
+          (bounds 100.00 100.00)
+          (drawsContent 1)
+        )
+        (GraphicsLayer
+          (position 0.00 250.00)
+          (bounds 100.00 100.00)
+          (drawsContent 1)
+        )
+      )
+    )
+  )
+)
+
diff --git a/LayoutTests/platform/chromium/compositing/geometry/clip-expected.txt b/LayoutTests/platform/chromium/compositing/geometry/clip-expected.txt
new file mode 100644 (file)
index 0000000..3255b7c
--- /dev/null
@@ -0,0 +1,36 @@
+Test CSS clip with composited layers. Left and right sides should look the same.
+
+(GraphicsLayer
+  (bounds 800.00 600.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 800.00 600.00)
+      (children 3
+        (GraphicsLayer
+          (position 20.00 20.00)
+          (bounds 100.00 100.00)
+          (drawsContent 1)
+          (transform [1.00 0.00 0.00 0.00] [0.00 1.00 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 1.00 1.00])
+        )
+        (GraphicsLayer
+          (position 220.00 20.00)
+          (bounds 100.00 100.00)
+          (drawsContent 1)
+        )
+        (GraphicsLayer
+          (position 215.00 15.00)
+          (bounds 110.00 110.00)
+          (children 1
+            (GraphicsLayer
+              (position -5.00 -5.00)
+              (bounds 120.00 120.00)
+              (drawsContent 1)
+              (transform [1.00 0.00 0.00 0.00] [0.00 1.00 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 1.00 1.00])
+            )
+          )
+        )
+      )
+    )
+  )
+)
+
diff --git a/LayoutTests/platform/chromium/compositing/geometry/composited-in-columns-expected.txt b/LayoutTests/platform/chromium/compositing/geometry/composited-in-columns-expected.txt
new file mode 100644 (file)
index 0000000..2b64736
--- /dev/null
@@ -0,0 +1,33 @@
+ (GraphicsLayer
+  (bounds 800.00 600.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 800.00 600.00)
+      (children 2
+        (GraphicsLayer
+          (position 14.00 162.00)
+          (bounds 210.00 60.00)
+          (drawsContent 1)
+          (children 1
+            (GraphicsLayer
+              (bounds 60.00 60.00)
+              (drawsContent 1)
+            )
+          )
+        )
+        (GraphicsLayer
+          (position 272.00 88.00)
+          (bounds 210.00 60.00)
+          (drawsContent 1)
+          (children 1
+            (GraphicsLayer
+              (bounds 60.00 60.00)
+              (drawsContent 1)
+            )
+          )
+        )
+      )
+    )
+  )
+)
+
diff --git a/LayoutTests/platform/chromium/compositing/geometry/flipped-writing-mode-expected.txt b/LayoutTests/platform/chromium/compositing/geometry/flipped-writing-mode-expected.txt
new file mode 100644 (file)
index 0000000..8f9dc3e
--- /dev/null
@@ -0,0 +1,24 @@
+(GraphicsLayer
+  (bounds 800.00 600.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 800.00 600.00)
+      (children 1
+        (GraphicsLayer
+          (position 18.00 10.00)
+          (bounds 250.00 200.00)
+          (drawsContent 1)
+          (children 1
+            (GraphicsLayer
+              (position 35.00 10.00)
+              (anchor 0.74 0.50)
+              (bounds 195.00 100.00)
+              (drawsContent 1)
+            )
+          )
+        )
+      )
+    )
+  )
+)
+
diff --git a/LayoutTests/platform/chromium/compositing/geometry/layer-due-to-layer-children-deep-switch-expected.txt b/LayoutTests/platform/chromium/compositing/geometry/layer-due-to-layer-children-deep-switch-expected.txt
new file mode 100644 (file)
index 0000000..2bad461
--- /dev/null
@@ -0,0 +1,47 @@
+This content is in the parent
+Box should switch between perspective and flat
+
+First dump layer tree:
+
+Second dump layer tree:
+(GraphicsLayer
+  (bounds 800.00 600.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 800.00 600.00)
+      (children 1
+        (GraphicsLayer
+          (position 8.00 8.00)
+          (bounds 342.00 292.00)
+          (drawsContent 1)
+          (children 1
+            (GraphicsLayer
+              (position 31.00 39.00)
+              (bounds 250.00 220.00)
+              (drawsContent 1)
+              (children 1
+                (GraphicsLayer
+                  (position 10.00 10.00)
+                  (bounds 200.00 200.00)
+                  (drawsContent 1)
+                  (transform [0.87 0.50 0.00 0.00] [-0.50 0.87 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 0.00 1.00])
+                  (children 1
+                    (GraphicsLayer
+                      (position 100.00 0.00)
+                      (bounds 250.00 100.00)
+                      (drawsContent 1)
+                      (transform [0.50 0.00 -0.87 0.00] [0.00 1.00 0.00 0.00] [0.87 0.00 0.50 -0.00] [-30.00 30.00 100.00 0.75])
+                    )
+                  )
+                )
+              )
+            )
+          )
+        )
+      )
+    )
+  )
+)
+
+Third dump layer tree:
+
diff --git a/LayoutTests/platform/chromium/compositing/geometry/limit-layer-bounds-overflow-root-expected.txt b/LayoutTests/platform/chromium/compositing/geometry/limit-layer-bounds-overflow-root-expected.txt
new file mode 100644 (file)
index 0000000..a715063
--- /dev/null
@@ -0,0 +1,29 @@
+(GraphicsLayer
+  (bounds 800.00 600.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 800.00 600.00)
+      (children 4
+        (GraphicsLayer
+          (position 21.00 21.00)
+          (bounds 100.00 100.00)
+        )
+        (GraphicsLayer
+          (position 21.00 21.00)
+          (bounds 100.00 100.00)
+          (drawsContent 1)
+        )
+        (GraphicsLayer
+          (bounds 142.00 142.00)
+          (drawsContent 1)
+        )
+        (GraphicsLayer
+          (position 0.00 13.00)
+          (bounds 216.00 15.00)
+          (drawsContent 1)
+        )
+      )
+    )
+  )
+)
+
diff --git a/LayoutTests/platform/chromium/compositing/geometry/limit-layer-bounds-positioned-expected.txt b/LayoutTests/platform/chromium/compositing/geometry/limit-layer-bounds-positioned-expected.txt
new file mode 100644 (file)
index 0000000..c2c3839
--- /dev/null
@@ -0,0 +1,26 @@
+Text here
+(GraphicsLayer
+  (bounds 800.00 600.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 800.00 600.00)
+      (children 3
+        (GraphicsLayer
+          (position 29.00 29.00)
+          (bounds 100.00 100.00)
+        )
+        (GraphicsLayer
+          (position 29.00 29.00)
+          (bounds 100.00 100.00)
+          (drawsContent 1)
+        )
+        (GraphicsLayer
+          (position 0.00 8.00)
+          (bounds 150.00 142.00)
+          (drawsContent 1)
+        )
+      )
+    )
+  )
+)
+
diff --git a/LayoutTests/platform/chromium/compositing/geometry/limit-layer-bounds-positioned-transition-expected.txt b/LayoutTests/platform/chromium/compositing/geometry/limit-layer-bounds-positioned-transition-expected.txt
new file mode 100644 (file)
index 0000000..c7c1f5e
--- /dev/null
@@ -0,0 +1,26 @@
+Text here
+(GraphicsLayer
+  (bounds 800.00 600.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 800.00 600.00)
+      (children 3
+        (GraphicsLayer
+          (position 29.00 29.00)
+          (bounds 100.00 100.00)
+        )
+        (GraphicsLayer
+          (position 29.00 29.00)
+          (bounds 100.00 100.00)
+          (drawsContent 1)
+        )
+        (GraphicsLayer
+          (position 0.00 8.00)
+          (bounds 429.00 142.00)
+          (drawsContent 1)
+        )
+      )
+    )
+  )
+)
+
diff --git a/LayoutTests/platform/chromium/compositing/geometry/limit-layer-bounds-transformed-expected.txt b/LayoutTests/platform/chromium/compositing/geometry/limit-layer-bounds-transformed-expected.txt
new file mode 100644 (file)
index 0000000..06bf10f
--- /dev/null
@@ -0,0 +1,28 @@
+Text here
+(GraphicsLayer
+  (bounds 800.00 600.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 800.00 600.00)
+      (children 3
+        (GraphicsLayer
+          (position 129.00 29.00)
+          (bounds 100.00 100.00)
+        )
+        (GraphicsLayer
+          (position 129.00 29.00)
+          (bounds 200.00 100.00)
+          (drawsContent 1)
+        )
+        (GraphicsLayer
+          (position -971.00 8.00)
+          (anchor 0.90 0.50)
+          (bounds 1221.00 142.00)
+          (drawsContent 1)
+          (transform [1.00 0.00 0.00 0.00] [0.00 1.00 0.00 0.00] [0.00 0.00 1.00 0.00] [100.00 0.00 0.00 1.00])
+        )
+      )
+    )
+  )
+)
+
diff --git a/LayoutTests/platform/chromium/compositing/geometry/preserve-3d-switching-expected.txt b/LayoutTests/platform/chromium/compositing/geometry/preserve-3d-switching-expected.txt
new file mode 100644 (file)
index 0000000..791dda2
--- /dev/null
@@ -0,0 +1,38 @@
+The green box appear angled out from the yellow box and embedded in it.
+
+-webkit-transform: translateZ(-100px) rotateY(45deg);
+(GraphicsLayer
+  (bounds 800.00 600.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 800.00 600.00)
+      (children 1
+        (GraphicsLayer
+          (position 108.00 73.00)
+          (bounds 304.00 304.00)
+          (childrenTransform [1.00 0.00 0.00 0.00] [0.00 1.00 0.00 0.00] [0.00 0.00 1.00 -0.00] [0.00 0.00 0.00 1.00])
+          (children 1
+            (GraphicsLayer
+              (position 12.00 12.00)
+              (bounds 280.00 280.00)
+              (opacity 0.80)
+              (preserves3D 1)
+              (drawsContent 1)
+              (transform [0.77 -0.56 -0.32 0.00] [0.00 0.50 -0.87 0.00] [0.64 0.66 0.38 0.00] [0.00 0.00 0.00 1.00])
+              (children 1
+                (GraphicsLayer
+                  (position 40.00 40.00)
+                  (bounds 200.00 200.00)
+                  (opacity 0.70)
+                  (drawsContent 1)
+                  (transform [0.77 0.00 0.64 0.00] [0.00 1.00 0.00 0.00] [-0.64 0.00 0.77 0.00] [0.00 0.00 50.00 1.00])
+                )
+              )
+            )
+          )
+        )
+      )
+    )
+  )
+)
+
diff --git a/LayoutTests/platform/chromium/compositing/iframes/invisible-nested-iframe-hide-expected.txt b/LayoutTests/platform/chromium/compositing/iframes/invisible-nested-iframe-hide-expected.txt
new file mode 100644 (file)
index 0000000..3d6cf04
--- /dev/null
@@ -0,0 +1,16 @@
+(GraphicsLayer
+  (bounds 800.00 600.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 800.00 600.00)
+      (children 1
+        (GraphicsLayer
+          (position 18.00 10.00)
+          (bounds 210.00 210.00)
+          (drawsContent 1)
+        )
+      )
+    )
+  )
+)
+
diff --git a/LayoutTests/platform/chromium/compositing/layer-creation/fixed-position-and-transform-expected.txt b/LayoutTests/platform/chromium/compositing/layer-creation/fixed-position-and-transform-expected.txt
new file mode 100644 (file)
index 0000000..6a053f6
--- /dev/null
@@ -0,0 +1,21 @@
+(GraphicsLayer
+  (bounds 785.00 5021.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 785.00 5021.00)
+      (children 2
+        (GraphicsLayer
+          (position 100.00 1100.00)
+          (bounds 256.00 256.00)
+          (drawsContent 1)
+        )
+        (GraphicsLayer
+          (position 0.00 1000.00)
+          (bounds 500.00 500.00)
+          (drawsContent 1)
+        )
+      )
+    )
+  )
+)
+
diff --git a/LayoutTests/platform/chromium/compositing/layer-creation/fixed-position-under-transform-expected.txt b/LayoutTests/platform/chromium/compositing/layer-creation/fixed-position-under-transform-expected.txt
new file mode 100644 (file)
index 0000000..66e94e6
--- /dev/null
@@ -0,0 +1,23 @@
+(GraphicsLayer
+  (bounds 785.00 5021.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 785.00 5021.00)
+      (children 2
+        (GraphicsLayer
+          (position 108.00 113.00)
+          (anchor 1.11 -0.39)
+          (bounds 256.00 256.00)
+          (drawsContent 1)
+          (transform [1.00 0.00 0.00 0.00] [0.00 1.00 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 1000.00 0.00 1.00])
+        )
+        (GraphicsLayer
+          (position 0.00 1000.00)
+          (bounds 500.00 500.00)
+          (drawsContent 1)
+        )
+      )
+    )
+  )
+)
+
diff --git a/LayoutTests/platform/chromium/compositing/layer-creation/no-compositing-for-preserve-3d-expected.txt b/LayoutTests/platform/chromium/compositing/layer-creation/no-compositing-for-preserve-3d-expected.txt
new file mode 100644 (file)
index 0000000..d2f2867
--- /dev/null
@@ -0,0 +1,28 @@
+This layer should not be composited.
+This layer should not be composited.
+This layer should be composited.
+(GraphicsLayer
+  (bounds 785.00 611.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 785.00 611.00)
+      (children 1
+        (GraphicsLayer
+          (position 18.00 390.00)
+          (bounds 342.00 180.00)
+          (preserves3D 1)
+          (drawsContent 1)
+          (children 1
+            (GraphicsLayer
+              (position 31.00 49.00)
+              (bounds 100.00 100.00)
+              (drawsContent 1)
+              (transform [0.98 0.00 -0.17 0.00] [0.00 1.00 0.00 0.00] [0.17 0.00 0.98 0.00] [0.00 0.00 0.00 1.00])
+            )
+          )
+        )
+      )
+    )
+  )
+)
+
diff --git a/LayoutTests/platform/chromium/compositing/layer-creation/overlap-animation-expected.txt b/LayoutTests/platform/chromium/compositing/layer-creation/overlap-animation-expected.txt
new file mode 100644 (file)
index 0000000..9b73832
--- /dev/null
@@ -0,0 +1,33 @@
+(GraphicsLayer
+  (bounds 800.00 600.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 800.00 600.00)
+      (children 1
+        (GraphicsLayer
+          (position 8.00 8.00)
+          (bounds 122.00 242.00)
+          (children 1
+            (GraphicsLayer
+              (position 1.00 1.00)
+              (bounds 120.00 240.00)
+              (children 2
+                (GraphicsLayer
+                  (position 10.00 10.00)
+                  (bounds 100.00 100.00)
+                  (drawsContent 1)
+                )
+                (GraphicsLayer
+                  (position 10.00 120.00)
+                  (bounds 100.00 100.00)
+                  (drawsContent 1)
+                )
+              )
+            )
+          )
+        )
+      )
+    )
+  )
+)
+
diff --git a/LayoutTests/platform/chromium/compositing/layer-creation/overlap-child-layer-expected.txt b/LayoutTests/platform/chromium/compositing/layer-creation/overlap-child-layer-expected.txt
new file mode 100644 (file)
index 0000000..c69fcd0
--- /dev/null
@@ -0,0 +1,20 @@
+(GraphicsLayer
+  (bounds 800.00 600.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 800.00 600.00)
+      (children 2
+        (GraphicsLayer
+          (anchor 1.56 0.00)
+          (bounds 256.00 256.00)
+          (drawsContent 1)
+        )
+        (GraphicsLayer
+          (bounds 300.00 300.00)
+          (drawsContent 1)
+        )
+      )
+    )
+  )
+)
+
diff --git a/LayoutTests/platform/chromium/compositing/layer-creation/overlap-clipping-expected.txt b/LayoutTests/platform/chromium/compositing/layer-creation/overlap-clipping-expected.txt
new file mode 100644 (file)
index 0000000..2300634
--- /dev/null
@@ -0,0 +1,31 @@
+(GraphicsLayer
+  (bounds 800.00 600.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 800.00 600.00)
+      (children 3
+        (GraphicsLayer
+          (position 50.00 50.00)
+          (bounds 100.00 100.00)
+          (children 1
+            (GraphicsLayer
+              (bounds 500.00 100.00)
+              (drawsContent 1)
+            )
+          )
+        )
+        (GraphicsLayer
+          (position 50.00 200.00)
+          (bounds 500.00 100.00)
+          (drawsContent 1)
+        )
+        (GraphicsLayer
+          (position 450.00 200.00)
+          (bounds 100.00 100.00)
+          (drawsContent 1)
+        )
+      )
+    )
+  )
+)
+
diff --git a/LayoutTests/platform/chromium/compositing/layer-creation/overlap-transformed-and-clipped-expected.txt b/LayoutTests/platform/chromium/compositing/layer-creation/overlap-transformed-and-clipped-expected.txt
new file mode 100644 (file)
index 0000000..99c9cbc
--- /dev/null
@@ -0,0 +1,30 @@
+(GraphicsLayer
+  (bounds 800.00 600.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 800.00 600.00)
+      (children 1
+        (GraphicsLayer
+          (bounds 100.00 100.00)
+          (transform [1.00 0.00 0.00 0.00] [0.00 1.00 0.00 0.00] [0.00 0.00 1.00 0.00] [110.00 0.00 0.00 1.00])
+          (children 1
+            (GraphicsLayer
+              (bounds 100.00 100.00)
+              (children 2
+                (GraphicsLayer
+                  (bounds 100.00 100.00)
+                  (drawsContent 1)
+                )
+                (GraphicsLayer
+                  (bounds 100.00 100.00)
+                  (drawsContent 1)
+                )
+              )
+            )
+          )
+        )
+      )
+    )
+  )
+)
+
diff --git a/LayoutTests/platform/chromium/compositing/layer-creation/overlap-transformed-layer-expected.txt b/LayoutTests/platform/chromium/compositing/layer-creation/overlap-transformed-layer-expected.txt
new file mode 100644 (file)
index 0000000..b0e1b35
--- /dev/null
@@ -0,0 +1,27 @@
+(GraphicsLayer
+  (bounds 800.00 600.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 800.00 600.00)
+      (children 2
+        (GraphicsLayer
+          (position 23.00 8.00)
+          (anchor 1.47 0.00)
+          (bounds 256.00 256.00)
+          (drawsContent 1)
+          (transform [1.00 0.00 0.00 0.00] [0.00 1.00 0.00 0.00] [0.00 0.00 1.00 0.00] [-10.00 0.00 0.00 1.00])
+          (children 1
+            (GraphicsLayer
+              (position 385.00 0.00)
+            )
+          )
+        )
+        (GraphicsLayer
+          (bounds 300.00 300.00)
+          (drawsContent 1)
+        )
+      )
+    )
+  )
+)
+
diff --git a/LayoutTests/platform/chromium/compositing/layer-creation/overlap-transforms-expected.txt b/LayoutTests/platform/chromium/compositing/layer-creation/overlap-transforms-expected.txt
new file mode 100644 (file)
index 0000000..90f7440
--- /dev/null
@@ -0,0 +1,34 @@
+(GraphicsLayer
+  (bounds 800.00 600.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 800.00 600.00)
+      (children 1
+        (GraphicsLayer
+          (position 8.00 8.00)
+          (bounds 122.00 242.00)
+          (children 1
+            (GraphicsLayer
+              (position 1.00 1.00)
+              (bounds 120.00 240.00)
+              (children 2
+                (GraphicsLayer
+                  (position 10.00 10.00)
+                  (bounds 100.00 100.00)
+                  (drawsContent 1)
+                  (transform [1.00 0.00 0.00 0.00] [0.00 1.00 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 1.00 1.00])
+                )
+                (GraphicsLayer
+                  (position 10.00 120.00)
+                  (bounds 100.00 100.00)
+                  (drawsContent 1)
+                )
+              )
+            )
+          )
+        )
+      )
+    )
+  )
+)
+
diff --git a/LayoutTests/platform/chromium/compositing/layer-creation/scroll-partial-update-expected.txt b/LayoutTests/platform/chromium/compositing/layer-creation/scroll-partial-update-expected.txt
new file mode 100644 (file)
index 0000000..09526c5
--- /dev/null
@@ -0,0 +1,26 @@
+scroll me
+ (GraphicsLayer
+  (bounds 800.00 600.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 800.00 600.00)
+      (children 3
+        (GraphicsLayer
+          (position 8.00 8.00)
+          (bounds 20.00 20.00)
+        )
+        (GraphicsLayer
+          (position 10.00 10.00)
+          (bounds 400.00 100.00)
+          (drawsContent 1)
+        )
+        (GraphicsLayer
+          (position 200.00 8.00)
+          (bounds 204.00 204.00)
+          (drawsContent 1)
+        )
+      )
+    )
+  )
+)
+
diff --git a/LayoutTests/platform/chromium/compositing/layer-creation/stacking-context-overlap-expected.txt b/LayoutTests/platform/chromium/compositing/layer-creation/stacking-context-overlap-expected.txt
new file mode 100644 (file)
index 0000000..15510cb
--- /dev/null
@@ -0,0 +1,21 @@
+(GraphicsLayer
+  (bounds 800.00 600.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 800.00 600.00)
+      (children 2
+        (GraphicsLayer
+          (position 8.00 8.00)
+          (bounds 20.00 20.00)
+          (drawsContent 1)
+        )
+        (GraphicsLayer
+          (position 8.00 18.00)
+          (bounds 142.00 142.00)
+          (drawsContent 1)
+        )
+      )
+    )
+  )
+)
+
diff --git a/LayoutTests/platform/chromium/compositing/layer-creation/stacking-context-overlap-nested-expected.txt b/LayoutTests/platform/chromium/compositing/layer-creation/stacking-context-overlap-nested-expected.txt
new file mode 100644 (file)
index 0000000..5c2b30e
--- /dev/null
@@ -0,0 +1,28 @@
+(GraphicsLayer
+  (bounds 800.00 600.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 800.00 600.00)
+      (children 2
+        (GraphicsLayer
+          (position 10.00 10.00)
+          (bounds 120.00 120.00)
+          (drawsContent 1)
+          (children 1
+            (GraphicsLayer
+              (position 50.00 50.00)
+              (bounds 220.00 120.00)
+              (drawsContent 1)
+            )
+          )
+        )
+        (GraphicsLayer
+          (position 65.00 65.00)
+          (bounds 76.00 76.00)
+          (drawsContent 1)
+        )
+      )
+    )
+  )
+)
+
diff --git a/LayoutTests/platform/chromium/compositing/layer-creation/translatez-overlap-expected.txt b/LayoutTests/platform/chromium/compositing/layer-creation/translatez-overlap-expected.txt
new file mode 100644 (file)
index 0000000..9dec581
--- /dev/null
@@ -0,0 +1,16 @@
+(GraphicsLayer
+  (bounds 800.00 600.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 800.00 600.00)
+      (children 1
+        (GraphicsLayer
+          (position 18.00 10.00)
+          (bounds 100.00 100.00)
+          (drawsContent 1)
+        )
+      )
+    )
+  )
+)
+
diff --git a/LayoutTests/platform/chromium/compositing/overflow-trumps-transform-style-expected.txt b/LayoutTests/platform/chromium/compositing/overflow-trumps-transform-style-expected.txt
new file mode 100644 (file)
index 0000000..6051e34
--- /dev/null
@@ -0,0 +1,26 @@
+preserve-3d
+flat
+(GraphicsLayer
+  (bounds 800.00 600.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 800.00 600.00)
+      (children 2
+        (GraphicsLayer
+          (position 18.00 10.00)
+          (bounds 100.00 100.00)
+          (preserves3D 1)
+          (drawsContent 1)
+          (transform [1.00 0.00 0.00 0.00] [0.00 1.00 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 1.00 1.00])
+        )
+        (GraphicsLayer
+          (position 18.00 120.00)
+          (bounds 100.00 100.00)
+          (drawsContent 1)
+          (transform [1.00 0.00 0.00 0.00] [0.00 1.00 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 1.00 1.00])
+        )
+      )
+    )
+  )
+)
+
index 979dd1f..8bcad3f 100644 (file)
@@ -7,7 +7,6 @@
         (GraphicsLayer
           (position 8.00 13.00)
           (bounds 100.00 100.00)
-          (drawsContent 1)
           (children 2
             (GraphicsLayer
               (bounds 85.00 100.00)
@@ -27,7 +26,6 @@
         (GraphicsLayer
           (position 8.00 13.00)
           (bounds 100.00 100.00)
-          (drawsContent 1)
           (children 2
             (GraphicsLayer
               (bounds 100.00 85.00)
@@ -47,7 +45,6 @@
         (GraphicsLayer
           (position 8.00 13.00)
           (bounds 100.00 100.00)
-          (drawsContent 1)
           (children 4
             (GraphicsLayer
               (bounds 85.00 85.00)
         (GraphicsLayer
           (position 8.00 13.00)
           (bounds 100.00 100.00)
-          (drawsContent 1)
           (children 2
             (GraphicsLayer
               (bounds 100.00 100.00)
               (children 1
                 (GraphicsLayer
                   (bounds 10.00 10.00)
-                  (drawsContent 1)
                   (children 1
                     (GraphicsLayer
                     )
index 979dd1f..8bcad3f 100644 (file)
@@ -7,7 +7,6 @@
         (GraphicsLayer
           (position 8.00 13.00)
           (bounds 100.00 100.00)
-          (drawsContent 1)
           (children 2
             (GraphicsLayer
               (bounds 85.00 100.00)
@@ -27,7 +26,6 @@
         (GraphicsLayer
           (position 8.00 13.00)
           (bounds 100.00 100.00)
-          (drawsContent 1)
           (children 2
             (GraphicsLayer
               (bounds 100.00 85.00)
@@ -47,7 +45,6 @@
         (GraphicsLayer
           (position 8.00 13.00)
           (bounds 100.00 100.00)
-          (drawsContent 1)
           (children 4
             (GraphicsLayer
               (bounds 85.00 85.00)
         (GraphicsLayer
           (position 8.00 13.00)
           (bounds 100.00 100.00)
-          (drawsContent 1)
           (children 2
             (GraphicsLayer
               (bounds 100.00 100.00)
               (children 1
                 (GraphicsLayer
                   (bounds 10.00 10.00)
-                  (drawsContent 1)
                   (children 1
                     (GraphicsLayer
                     )
index 67c9096..853d13b 100644 (file)
@@ -7,7 +7,6 @@
         (GraphicsLayer
           (position 18.00 10.00)
           (bounds 100.00 100.00)
-          (drawsContent 1)
           (children 1
             (GraphicsLayer
               (position 85.00 85.00)
diff --git a/LayoutTests/platform/chromium/compositing/rtl/rtl-absolute-expected.txt b/LayoutTests/platform/chromium/compositing/rtl/rtl-absolute-expected.txt
new file mode 100644 (file)
index 0000000..bdcf0c4
--- /dev/null
@@ -0,0 +1,16 @@
+(GraphicsLayer
+  (bounds 800.00 600.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 800.00 600.00)
+      (children 1
+        (GraphicsLayer
+          (position 50.00 50.00)
+          (bounds 100.00 100.00)
+          (drawsContent 1)
+        )
+      )
+    )
+  )
+)
+
diff --git a/LayoutTests/platform/chromium/compositing/rtl/rtl-absolute-overflow-expected.txt b/LayoutTests/platform/chromium/compositing/rtl/rtl-absolute-overflow-expected.txt
new file mode 100644 (file)
index 0000000..f3a133e
--- /dev/null
@@ -0,0 +1,17 @@
+(GraphicsLayer
+  (position -215.00 0.00)
+  (bounds 1000.00 1000.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 1000.00 1000.00)
+      (children 1
+        (GraphicsLayer
+          (position 265.00 50.00)
+          (bounds 100.00 100.00)
+          (drawsContent 1)
+        )
+      )
+    )
+  )
+)
+
diff --git a/LayoutTests/platform/chromium/compositing/rtl/rtl-absolute-overflow-scrolled-expected.txt b/LayoutTests/platform/chromium/compositing/rtl/rtl-absolute-overflow-scrolled-expected.txt
new file mode 100644 (file)
index 0000000..e7dc21f
--- /dev/null
@@ -0,0 +1,17 @@
+(GraphicsLayer
+  (position -215.00 0.00)
+  (bounds 1000.00 1000.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 1000.00 1000.00)
+      (children 1
+        (GraphicsLayer
+          (position 51.00 50.00)
+          (bounds 100.00 100.00)
+          (drawsContent 1)
+        )
+      )
+    )
+  )
+)
+
diff --git a/LayoutTests/platform/chromium/compositing/rtl/rtl-fixed-expected.txt b/LayoutTests/platform/chromium/compositing/rtl/rtl-fixed-expected.txt
new file mode 100644 (file)
index 0000000..bdcf0c4
--- /dev/null
@@ -0,0 +1,16 @@
+(GraphicsLayer
+  (bounds 800.00 600.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 800.00 600.00)
+      (children 1
+        (GraphicsLayer
+          (position 50.00 50.00)
+          (bounds 100.00 100.00)
+          (drawsContent 1)
+        )
+      )
+    )
+  )
+)
+
diff --git a/LayoutTests/platform/chromium/compositing/rtl/rtl-fixed-overflow-expected.txt b/LayoutTests/platform/chromium/compositing/rtl/rtl-fixed-overflow-expected.txt
new file mode 100644 (file)
index 0000000..f3a133e
--- /dev/null
@@ -0,0 +1,17 @@
+(GraphicsLayer
+  (position -215.00 0.00)
+  (bounds 1000.00 1000.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 1000.00 1000.00)
+      (children 1
+        (GraphicsLayer
+          (position 265.00 50.00)
+          (bounds 100.00 100.00)
+          (drawsContent 1)
+        )
+      )
+    )
+  )
+)
+
diff --git a/LayoutTests/platform/chromium/compositing/rtl/rtl-relative-expected.txt b/LayoutTests/platform/chromium/compositing/rtl/rtl-relative-expected.txt
new file mode 100644 (file)
index 0000000..c9daf41
--- /dev/null
@@ -0,0 +1,16 @@
+(GraphicsLayer
+  (bounds 800.00 600.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 800.00 600.00)
+      (children 1
+        (GraphicsLayer
+          (position 642.00 58.00)
+          (bounds 100.00 100.00)
+          (drawsContent 1)
+        )
+      )
+    )
+  )
+)
+
diff --git a/LayoutTests/platform/chromium/css3/filters/filtered-compositing-descendant-expected.txt b/LayoutTests/platform/chromium/css3/filters/filtered-compositing-descendant-expected.txt
new file mode 100644 (file)
index 0000000..66d755b
--- /dev/null
@@ -0,0 +1,30 @@
+(GraphicsLayer
+  (bounds 800.00 600.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 800.00 600.00)
+      (children 2
+        (GraphicsLayer
+          (position 8.00 8.00)
+          (bounds 144.00 144.00)
+          (drawsContent 1)
+          (children 1
+            (GraphicsLayer
+              (position 22.00 22.00)
+              (bounds 100.00 100.00)
+              (drawsContent 1)
+              (transform [1.00 0.00 0.00 0.00] [0.00 1.00 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 1.00 1.00])
+            )
+          )
+        )
+        (GraphicsLayer
+          (position 8.00 165.00)
+          (bounds 784.00 15.00)
+          (opacity 0.00)
+          (drawsContent 1)
+        )
+      )
+    )
+  )
+)
+
index 921d017..abf96a5 100644 (file)
@@ -8,7 +8,7 @@ Before (should be empty):
         (GraphicsLayer
           (position 495.00 30.00)
           (bounds 300.00 100.00)
-          (drawsContent 1)
+          (backgroundColor #008000)
         )
       )
     )
@@ -25,7 +25,7 @@ After (should not be empty):
         (GraphicsLayer
           (position 495.00 30.00)
           (bounds 300.00 100.00)
-          (drawsContent 1)
+          (backgroundColor #008000)
         )
       )
     )
index 3b65f87..9bea3c1 100644 (file)
@@ -28,7 +28,7 @@
                                 (GraphicsLayer
                                   (position 18.00 10.00)
                                   (bounds 210.00 210.00)
-                                  (drawsContent 1)
+                                  (backgroundColor #0000FF)
                                 )
                               )
                             )
index 7a4da31..b07a306 100644 (file)
         (GraphicsLayer
           (position 8.00 41.00)
           (bounds 400.00 400.00)
-          (drawsContent 1)
-          (repaint rects
-            (rect 0.00 0.00 400.00 400.00)
-          )
+          (backgroundColor #008000)
           (children 1
             (GraphicsLayer
               (position 50.00 50.00)
               (bounds 75.00 75.00)
-              (drawsContent 1)
-              (repaint rects
-                (rect 0.00 0.00 75.00 75.00)
-              )
+              (backgroundColor #0000FF)
             )
           )
         )
index 67e8015..67ae5d4 100644 (file)
@@ -15,8 +15,7 @@ From https://bugs.webkit.org/show_bug.cgi?id=44629. The parent is a tiled layer.
             (GraphicsLayer
               (position 51.00 101.00)
               (bounds 200.00 4800.00)
-              (usingTiledLayer 1)
-              (drawsContent 1)
+              (backgroundColor #FF0000)
             )
           )
         )
index 606f7d6..4c09d67 100644 (file)
@@ -35,7 +35,7 @@ Second (child added):
             (GraphicsLayer
               (position 51.00 401.00)
               (bounds 200.00 200.00)
-              (drawsContent 1)
+              (backgroundColor #FF0000)
             )
           )
         )
index 87daf18..21ff207 100644 (file)
@@ -16,12 +16,12 @@ This is some text
             (GraphicsLayer
               (position 51.00 101.00)
               (bounds 200.00 200.00)
-              (drawsContent 1)
+              (backgroundColor #FF0000)
             )
             (GraphicsLayer
               (position 51.00 4701.00)
               (bounds 200.00 200.00)
-              (drawsContent 1)
+              (backgroundColor #0000FF)
             )
           )
         )
index 5af103f..41f7163 100644 (file)
@@ -15,12 +15,12 @@ First (small layer):
             (GraphicsLayer
               (position 51.00 101.00)
               (bounds 200.00 200.00)
-              (drawsContent 1)
+              (backgroundColor #FF0000)
             )
             (GraphicsLayer
               (position 276.00 201.00)
               (bounds 200.00 200.00)
-              (drawsContent 1)
+              (backgroundColor #0000FF)
             )
           )
         )
@@ -46,12 +46,12 @@ Second (huge layer):
             (GraphicsLayer
               (position 51.00 101.00)
               (bounds 200.00 200.00)
-              (drawsContent 1)
+              (backgroundColor #FF0000)
             )
             (GraphicsLayer
               (position 276.00 4701.00)
               (bounds 200.00 200.00)
-              (drawsContent 1)
+              (backgroundColor #0000FF)
             )
           )
         )
@@ -76,12 +76,12 @@ Third (small layer):
             (GraphicsLayer
               (position 51.00 101.00)
               (bounds 200.00 200.00)
-              (drawsContent 1)
+              (backgroundColor #FF0000)
             )
             (GraphicsLayer
               (position 276.00 201.00)
               (bounds 200.00 200.00)
-              (drawsContent 1)
+              (backgroundColor #0000FF)
             )
           )
         )
index eeeac31..9771944 100644 (file)
         (GraphicsLayer
           (position 8.00 8.00)
           (bounds 700.00 2500.00)
-          (usingTiledLayer 1)
-          (drawsContent 1)
+          (backgroundColor #C0C0C0)
           (transform [1.00 0.00 0.00 0.00] [0.00 1.00 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 1.00 1.00])
           (visible rect 0.00, 0.00 482.63 x 357.63)
-          (tile cache coverage 0, 0 640 x 640)
-          (tile size 512 x 512)
-          (top left tile 0, 0 tiles grid 2 x 2)
         )
       )
     )
index 9ae3e37..c3a7d21 100644 (file)
@@ -1,3 +1,77 @@
+2012-12-08  No'am Rosenthal  <noam@webkit.org>
+
+        Use background color for GraphicsLayers when applicable
+        https://bugs.webkit.org/show_bug.cgi?id=103786
+
+        Updated RenderLayerBacking to call GraphicsLayer::setContentsToBackgroundColor when the following conditions take place:
+        1. The layer doesn't paint its own content, other than background/decoration.
+        2. There are no borders or other box decorations (border radius, borders, outline, shadow etc.)
+        3. The image has only a background color, and no background image.
+        4. background-composite is set to source-over, and background-clip is anything apart from text.
+        5. The port supports setContentsToBackgroundColor.
+
+        This allows any implementation of GraphicsLayer that supports setContentsToBackgroundColor to avoid allocating a backing store
+        for that layer, but instead draw that solid color directly.
+        In addition to setting the background color, the layer's contentsRect needs to be adjusted, since the default contents rect of
+        a layer is not always equivalent to the rect where the background is supposed to be painted, which is derived from the box's
+        background-clip property.
+
+        Reviewed by Simon Fraser.
+
+        Tests: compositing/background-color/background-color-alpha.html
+               compositing/background-color/background-color-change-to-text.html
+               compositing/background-color/background-color-composite.html
+               compositing/background-color/background-color-container.html
+               compositing/background-color/background-color-content-clip.html
+               compositing/background-color/background-color-padding-change.html
+               compositing/background-color/background-color-padding-clip.html
+               compositing/background-color/background-color-simple.html
+               compositing/background-color/background-color-text-change.html
+               compositing/background-color/background-color-text-clip.html
+
+        * platform/graphics/GraphicsLayer.h:
+        (WebCore::GraphicsLayer::supportsBackgroundColorContent):
+            Allows different implementation of GraphicsLayer to identify whether they implement setContentsToBackgroundColor.
+            Currently only the MAC implementation and TextureMapper falls under that category.
+
+        * rendering/RenderBox.h:
+        (WebCore::RenderBox::paddingBoxRect):
+            Added paddingBoxRect to compliment borderBoxRect and contentsBoxRect. paddingBoxRect corresponds to 
+            background-clip: padding.
+
+        * rendering/RenderLayerBacking.cpp:
+        (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
+            Update the background color if needed, for every configuration change.
+            This should accomodate the old behavior for full-screen, while enabling background color changes for other layers.
+
+        (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
+            Move the contentsRect logic to updateContentsRect.
+
+        (WebCore::RenderLayerBacking::updateContentsRect):
+            Use the background box when directly compositing backgrounds.
+
+        (WebCore::RenderLayerBacking::updateBackgroundColor):
+            Set the background color if applicable, otherwise set to trasnparent and clear.
+            This was not needed in the past because background colors were only used for the special case of full-screen.
+
+        (WebCore::supportsDirectBoxDecorationsComposition):
+            Helper function to determine whether a particular background can be directly composited. Right now only 
+            background color can be composited, and only if the GraphicsLayer implementation supports background colors.
+            Also we don't yet support background-clip: text and any background-composite other than source-over.
+
+        (WebCore::RenderLayerBacking::paintsBoxDecorations):
+            Apply the new supportsDirectBoxDecorationsComposition logic.
+
+        (WebCore::RenderLayerBacking::contentsBox):
+            Remove unnecessary local variable.
+
+        (WebCore::backgroundRectForBox):
+        (WebCore::RenderLayerBacking::backgroundBox):
+            Figure out the correct rect for the GraphicsLayer's contentsRect, based on the renderer's backgroundClip.
+            The rectangle has to be adjusted based on the composited layer offset, and snapped to an IntRect as 
+            GraphicsLayer::contentsRect expects snapped pixels.
+
+
 2012-12-08  Patrick Gansterer  <paroga@webkit.org>
 
         Build fix for WinCE after r137011.
index a461071..4aa38ba 100644 (file)
@@ -425,6 +425,15 @@ public:
     static void setGraphicsLayerFactory(GraphicsLayerFactoryCallback);
 #endif
 
+    static bool supportsBackgroundColorContent()
+    {
+#if PLATFORM(MAC) || USE(TEXTURE_MAPPER)
+        return true;
+#else
+        return false;
+#endif
+    }
+
     void updateDebugIndicators();
 
 protected:
index da6e842..8c5057f 100644 (file)
@@ -139,6 +139,7 @@ public:
     void setFrameRect(const LayoutRect& rect) { m_frameRect = rect; }
 
     LayoutRect borderBoxRect() const { return LayoutRect(LayoutPoint(), size()); }
+    LayoutRect paddingBoxRect() const { return LayoutRect(borderLeft(), borderTop(), contentWidth() + paddingLeft() + paddingRight(), contentHeight() + paddingTop() + paddingBottom()); }
     IntRect pixelSnappedBorderBoxRect() const { return IntRect(IntPoint(), m_frameRect.pixelSnappedSize()); }
     virtual IntRect borderBoundingBox() const { return pixelSnappedBorderBoxRect(); } 
 
index 88be08d..06ea612 100644 (file)
@@ -479,6 +479,8 @@ bool RenderLayerBacking::updateGraphicsLayerConfiguration()
     } else
         m_graphicsLayer->setReplicatedByLayer(0);
 
+    updateBackgroundColor(isSimpleContainerCompositingLayer());
+
     if (isDirectlyCompositedImage())
         updateImageContents();
 
@@ -500,19 +502,6 @@ bool RenderLayerBacking::updateGraphicsLayerConfiguration()
         layerConfigChanged = true;
     }
 #endif
-#if ENABLE(FULLSCREEN_API)
-    else if (renderer->isRenderFullScreen()) {
-        // RenderFullScreen renderers have no content, and only a solid
-        // background color.  They also can be large enough to trigger the
-        // creation of a tiled-layer, which can cause flashing problems
-        // during repainting.  Special case the RenderFullScreen case because
-        // we know its style does not come from CSS and it is therefore will
-        // not contain paintable content (e.g. background images, gradients,
-        // etc), so safe to set the layer's background color to the renderer's 
-        // style's background color.
-        updateBackgroundColor();
-    }
-#endif
     if (renderer->isRenderPart())
         layerConfigChanged = RenderLayerCompositor::parentFrameContentLayers(toRenderPart(renderer));
 
@@ -529,6 +518,7 @@ static IntRect clipBox(RenderBox* renderer)
         result.intersect(renderer->clipRect(LayoutPoint(), 0)); // FIXME: Incorrect for CSS regions.
 
     return pixelSnappedIntRect(result);
+
 }
 
 void RenderLayerBacking::updateGraphicsLayerGeometry()
@@ -553,6 +543,8 @@ void RenderLayerBacking::updateGraphicsLayerGeometry()
 #if ENABLE(CSS_COMPOSITING)
     updateLayerBlendMode(renderer()->style());
 #endif
+
+    bool isSimpleContainer = isSimpleContainerCompositingLayer();
     
     m_owningLayer->updateDescendantDependentFlags();
 
@@ -758,12 +750,11 @@ void RenderLayerBacking::updateGraphicsLayerGeometry()
         m_scrollingContentsLayer->setOffsetFromRenderer(scrollingContentsOffset, GraphicsLayer::DontSetNeedsDisplay);
     }
 
-    m_graphicsLayer->setContentsRect(contentsBox());
-
     // If this layer was created just for clipping or to apply perspective, it doesn't need its own backing store.
     setRequiresOwnBackingStore(compositor()->requiresOwnBackingStore(m_owningLayer, compAncestor));
 
-    updateDrawsContent();
+    updateContentsRect(isSimpleContainer);
+    updateDrawsContent(isSimpleContainer);
     updateAfterWidgetResize();
 }
 
@@ -805,8 +796,24 @@ void RenderLayerBacking::updateInternalHierarchy()
     }
 }
 
+void RenderLayerBacking::updateContentsRect(bool isSimpleContainer)
+{
+    IntRect contentsRect;
+    if (isSimpleContainer && renderer()->hasBackground())
+        contentsRect = backgroundBox();
+    else
+        contentsRect = contentsBox();
+
+    m_graphicsLayer->setContentsRect(contentsRect);
+}
+
 void RenderLayerBacking::updateDrawsContent()
 {
+    updateDrawsContent(isSimpleContainerCompositingLayer());
+}
+
+void RenderLayerBacking::updateDrawsContent(bool isSimpleContainer)
+{
     if (m_scrollingLayer) {
         // We don't have to consider overflow controls, because we know that the scrollbars are drawn elsewhere.
         // m_graphicsLayer only needs backing store if the non-scrolling parts (background, outlines, borders, shadows etc) need to paint.
@@ -820,7 +827,7 @@ void RenderLayerBacking::updateDrawsContent()
         return;
     }
 
-    bool hasPaintedContent = containsPaintedContent();
+    bool hasPaintedContent = !isSimpleContainer && containsPaintedContent();
 
     // FIXME: we could refine this to only allocate backing for one of these layers if possible.
     m_graphicsLayer->setDrawsContent(hasPaintedContent);
@@ -1137,9 +1144,32 @@ Color RenderLayerBacking::rendererBackgroundColor() const
     return backgroundRenderer->style()->visitedDependentColor(CSSPropertyBackgroundColor);
 }
 
-void RenderLayerBacking::updateBackgroundColor()
+void RenderLayerBacking::updateBackgroundColor(bool isSimpleContainer)
+{
+    Color backgroundColor = Color::transparent;
+    if (isSimpleContainer)
+        backgroundColor = rendererBackgroundColor();
+    m_graphicsLayer->setContentsToBackgroundColor(backgroundColor);
+    if (backgroundColor == Color::transparent)
+        m_graphicsLayer->clearBackgroundColor();
+}
+
+static bool supportsDirectBoxDecorationsComposition(const RenderObject* renderer)
 {
-    m_graphicsLayer->setContentsToBackgroundColor(rendererBackgroundColor());
+    if (!GraphicsLayer::supportsBackgroundColorContent())
+        return false;
+
+    if (hasBoxDecorationsOrBackgroundImage(renderer->style()))
+        return false;
+
+    // FIXME: we should be able to allow backgroundComposite; However since this is not a common use case it has been deferred for now.
+    if (renderer->style()->backgroundComposite() != CompositeSourceOver)
+        return false;
+
+    if (renderer->style()->backgroundClip() == TextFillBox)
+        return false;
+
+    return true;
 }
 
 bool RenderLayerBacking::paintsBoxDecorations() const
@@ -1147,7 +1177,10 @@ bool RenderLayerBacking::paintsBoxDecorations() const
     if (!m_owningLayer->hasVisibleContent())
         return false;
 
-    if (hasBoxDecorationsOrBackground(renderer()))
+    if (!hasBoxDecorationsOrBackground(renderer()))
+        return false;
+
+    if (!supportsDirectBoxDecorationsComposition(renderer()))
         return true;
 
     if (m_owningLayer->hasOverflowControls())
@@ -1333,7 +1366,7 @@ void RenderLayerBacking::contentChanged(ContentChangeType changeType)
         updateImageContents();
         return;
     }
-    
+
     if ((changeType == MaskImageChanged) && m_maskLayer) {
         // The composited layer bounds relies on box->maskClipRect(), which changes
         // when the mask image becomes available.
@@ -1368,7 +1401,8 @@ void RenderLayerBacking::updateImageContents()
 
     // This is a no-op if the layer doesn't have an inner layer for the image.
     m_graphicsLayer->setContentsToImage(image);
-    updateDrawsContent();
+    bool isSimpleContainer = false;
+    updateDrawsContent(isSimpleContainer);
     
     // Image animation is "lazy", in that it automatically stops unless someone is drawing
     // the image. So we have to kick the animation each time; this has the downside that the
@@ -1422,11 +1456,38 @@ IntRect RenderLayerBacking::contentsBox() const
 #endif
         contentsRect = pixelSnappedIntRect(toRenderBox(renderer())->contentBoxRect());
 
-    IntSize contentOffset = contentOffsetInCompostingLayer();
-    contentsRect.move(contentOffset);
+    contentsRect.move(contentOffsetInCompostingLayer());
     return contentsRect;
 }
 
+static LayoutRect backgroundRectForBox(const RenderBox* box)
+{
+    EFillBox clip = box->style()->backgroundClip();
+    switch (clip) {
+    case BorderFillBox:
+        return box->borderBoxRect();
+    case PaddingFillBox:
+        return box->paddingBoxRect();
+    case ContentFillBox:
+        return box->contentBoxRect();
+    case TextFillBox:
+        break;
+    }
+
+    ASSERT_NOT_REACHED();
+    return LayoutRect();
+}
+
+IntRect RenderLayerBacking::backgroundBox() const
+{
+    if (!renderer()->isBox())
+        return IntRect();
+
+    IntRect pixelSnappedBackgroundBox = pixelSnappedIntRect(backgroundRectForBox(toRenderBox(renderer())));
+    pixelSnappedBackgroundBox.move(contentOffsetInCompostingLayer());
+    return pixelSnappedBackgroundBox;
+}
+
 GraphicsLayer* RenderLayerBacking::parentForSublayers() const
 {
     if (m_scrollingContentsLayer)
index cdcc030..eb3c03e 100644 (file)
@@ -164,6 +164,7 @@ public:
 #endif
 
     IntRect contentsBox() const;
+    IntRect backgroundBox() const;
     
     // For informative purposes only.
     CompositingLayerType compositingLayerType() const;
@@ -203,6 +204,7 @@ private:
     bool requiresVerticalScrollbarLayer() const;
     bool requiresScrollCornerLayer() const;
     bool updateScrollingLayers(bool scrollingLayers);
+    void updateDrawsContent(bool isSimpleContainer);
 
     GraphicsLayerPaintingPhase paintingPhaseForPrimaryLayer() const;
     
@@ -237,7 +239,8 @@ private:
     void updateImageContents();
 
     Color rendererBackgroundColor() const;
-    void updateBackgroundColor();
+    void updateBackgroundColor(bool isSimpleContainer);
+    void updateContentsRect(bool isSimpleContainer);
 
     bool containsNonEmptyRenderers() const;
     bool hasVisibleNonCompositingDescendantLayers() const;