Disambiguate "background color" and "contents as solid color" on GraphicsLayer
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 15 Dec 2012 19:11:44 +0000 (19:11 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 15 Dec 2012 19:11:44 +0000 (19:11 +0000)
https://bugs.webkit.org/show_bug.cgi?id=104842

Source/WebCore:

Patch by No'am Rosenthal <noam.rosenthal@nokia.com> on 2012-12-15
Reviewed by Simon Fraser.

Rename overloads in GraphicsLayerTextureMapper and GraphicsLayerChromium to account for the rename in GraphicsLayer.

Covered by existing tests.

* platform/graphics/chromium/GraphicsLayerChromium.cpp:
* platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
(WebCore::GraphicsLayerTextureMapper::setContentsToSolidColor):
* platform/graphics/texmap/GraphicsLayerTextureMapper.h:
(GraphicsLayerTextureMapper):
(WebCore::GraphicsLayerTextureMapper::solidColor):
* platform/graphics/texmap/TextureMapperLayer.cpp:
(WebCore::TextureMapperLayer::paintSelf):
(WebCore::TextureMapperLayer::flushCompositingStateSelf):
* platform/graphics/texmap/TextureMapperLayer.h:
(State):

Source/WebKit2:

Patch by No'am Rosenthal <noam.rosenthal@nokia.com> on 2012-12-15
Reviewed by Simon Fraser.

Rename overloads in coordinated graphics to account for the rename in GraphicsLayer.

* Shared/CoordinatedGraphics/CoordinatedLayerInfo.h:
(CoordinatedLayerInfo):
* UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:
(WebKit::LayerTreeRenderer::setLayerState):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::setContentsToSolidColor):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h:
(CoordinatedGraphicsLayer):

LayoutTests:

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

Since we don't set the background color for a layer with a solid color, the test results have to be rebaselined.

* 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/clip-inside-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:
* platform/mac/compositing/geometry/fixed-position-composited-switch-expected.txt:
* platform/mac/compositing/iframes/resizer-expected.txt:
* platform/mac/compositing/repaint/invalidations-on-composited-layers-expected.txt:
* platform/mac/compositing/tiling/crash-reparent-tiled-layer-expected.txt:
* platform/mac/compositing/tiling/huge-layer-add-remove-child-expected.txt:
* platform/mac/compositing/tiling/huge-layer-with-layer-children-expected.txt:
* platform/mac/compositing/tiling/huge-layer-with-layer-children-resize-expected.txt:

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

100 files changed:
LayoutTests/ChangeLog
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/clip-inside-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/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/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/WebCore.exp.in
Source/WebCore/platform/graphics/GraphicsLayer.cpp
Source/WebCore/platform/graphics/GraphicsLayer.h
Source/WebCore/platform/graphics/blackberry/GraphicsLayerBlackBerry.cpp
Source/WebCore/platform/graphics/blackberry/GraphicsLayerBlackBerry.h
Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h
Source/WebCore/platform/graphics/chromium/GraphicsLayerChromium.cpp
Source/WebCore/platform/graphics/chromium/GraphicsLayerChromium.h
Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp
Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.h
Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp
Source/WebCore/platform/graphics/texmap/TextureMapperLayer.h
Source/WebCore/rendering/RenderLayerBacking.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedLayerInfo.h
Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp
Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp
Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h

index 619eddb..0cf4908 100644 (file)
@@ -1,3 +1,91 @@
+2012-12-15  No'am Rosenthal  <noam@webkit.org>
+
+        Disambiguate "background color" and "contents as solid color" on GraphicsLayer
+        https://bugs.webkit.org/show_bug.cgi?id=104842
+
+        Reviewed by Simon Fraser.
+
+        Since we don't set the background color for a layer with a solid color, the test results have to be rebaselined.
+
+        * 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/clip-inside-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:
+        * platform/mac/compositing/geometry/fixed-position-composited-switch-expected.txt:
+        * platform/mac/compositing/iframes/resizer-expected.txt:
+        * platform/mac/compositing/repaint/invalidations-on-composited-layers-expected.txt:
+        * platform/mac/compositing/tiling/crash-reparent-tiled-layer-expected.txt:
+        * platform/mac/compositing/tiling/huge-layer-add-remove-child-expected.txt:
+        * platform/mac/compositing/tiling/huge-layer-with-layer-children-expected.txt:
+        * platform/mac/compositing/tiling/huge-layer-with-layer-children-resize-expected.txt:
+
 2012-12-14  Beth Dakin  <bdakin@apple.com>
 
         https://bugs.webkit.org/show_bug.cgi?id=105064
index 8f97a74..a57f9f8 100644 (file)
@@ -25,7 +25,6 @@ This layer should not have backing store.
                         (GraphicsLayer
                           (position 30.00 48.00)
                           (bounds 100.00 100.00)
-                          (backgroundColor #C0C0C0)
                         )
                       )
                     )
index 1d1905e..1e724fa 100644 (file)
@@ -17,7 +17,6 @@ This layer should have backing store.
                 (GraphicsLayer
                   (position 30.00 48.00)
                   (bounds 100.00 100.00)
-                  (backgroundColor #C0C0C0)
                 )
               )
             )
@@ -35,7 +34,6 @@ This layer should have backing store.
                 (GraphicsLayer
                   (position 30.00 48.00)
                   (bounds 100.00 100.00)
-                  (backgroundColor #C0C0C0)
                 )
               )
             )
index cbee81f..72fb7e8 100644 (file)
@@ -19,7 +19,6 @@ This layer should not have backing store.
                 (GraphicsLayer
                   (position 31.00 49.00)
                   (bounds 100.00 100.00)
-                  (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 75c5d52..4779908 100644 (file)
@@ -7,7 +7,6 @@
         (GraphicsLayer
           (position 818.00 145.00)
           (bounds 100.00 100.00)
-          (backgroundColor #0000FF)
         )
       )
     )
index 6a1804c..ca7d683 100644 (file)
@@ -7,7 +7,6 @@
         (GraphicsLayer
           (position 6.00 6.00)
           (bounds 104.00 104.00)
-          (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 9a91060..7299b1a 100644 (file)
@@ -21,7 +21,6 @@
             (GraphicsLayer
               (position 490.00 108.00)
               (bounds 100.00 100.00)
-              (backgroundColor #0000FF)
             )
           )
         )
index c394cc1..0e57db1 100644 (file)
         )
         (GraphicsLayer
           (bounds 100.00 100.00)
-          (backgroundColor #008000)
         )
         (GraphicsLayer
           (position 0.00 250.00)
           (bounds 100.00 100.00)
-          (backgroundColor #008000)
         )
       )
     )
index dc39c15..0f3fcb6 100644 (file)
@@ -24,7 +24,6 @@ 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)
-              (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 6c4d070..f0c8a7c 100644 (file)
@@ -25,7 +25,6 @@ Test CSS clip with composited layers. Left and right sides should look the same.
             (GraphicsLayer
               (position -15.00 -25.00)
               (bounds 120.00 120.00)
-              (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 6a00a15..beb5e80 100644 (file)
@@ -11,7 +11,6 @@
           (children 1
             (GraphicsLayer
               (bounds 60.00 60.00)
-              (backgroundColor #008000)
             )
           )
         )
@@ -22,7 +21,6 @@
           (children 1
             (GraphicsLayer
               (bounds 60.00 60.00)
-              (backgroundColor #008000)
             )
           )
         )
index 669eae9..307caa3 100644 (file)
@@ -7,7 +7,6 @@
         (GraphicsLayer
           (position 18.00 10.00)
           (bounds 250.00 200.00)
-          (backgroundColor #C0C0C0)
           (children 1
             (GraphicsLayer
               (position 35.00 10.00)
index 7292edf..e615738 100644 (file)
@@ -18,12 +18,10 @@ Second dump layer tree:
             (GraphicsLayer
               (position 31.00 39.00)
               (bounds 250.00 220.00)
-              (backgroundColor #0000FF)
               (children 1
                 (GraphicsLayer
                   (position 10.00 10.00)
                   (bounds 200.00 200.00)
-                  (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 85e7f50..a86ceac 100644 (file)
@@ -12,7 +12,6 @@ Text here
         (GraphicsLayer
           (position 29.00 134.00)
           (bounds 100.00 100.00)
-          (backgroundColor #FF0000)
         )
         (GraphicsLayer
           (position 0.00 113.00)
index ce48a78..70766ab 100644 (file)
@@ -11,7 +11,6 @@
         (GraphicsLayer
           (position 21.00 21.00)
           (bounds 100.00 100.00)
-          (backgroundColor #FF0000)
         )
         (GraphicsLayer
           (bounds 142.00 142.00)
index 7585e18..49929db 100644 (file)
@@ -12,7 +12,6 @@ Text here
         (GraphicsLayer
           (position 29.00 29.00)
           (bounds 100.00 100.00)
-          (backgroundColor #FF0000)
         )
         (GraphicsLayer
           (position 0.00 8.00)
index 8b6f466..25b907e 100644 (file)
@@ -12,7 +12,6 @@ Text here
         (GraphicsLayer
           (position 29.00 29.00)
           (bounds 100.00 100.00)
-          (backgroundColor #FF0000)
         )
         (GraphicsLayer
           (position 0.00 8.00)
index 7d38bf1..1e25fec 100644 (file)
@@ -12,7 +12,6 @@ Text here
         (GraphicsLayer
           (position 129.00 29.00)
           (bounds 200.00 100.00)
-          (backgroundColor #FF0000)
         )
         (GraphicsLayer
           (position -971.00 8.00)
index bc4f471..b92831e 100644 (file)
@@ -12,7 +12,6 @@ middle
         (GraphicsLayer
           (position 129.00 29.00)
           (bounds 200.00 100.00)
-          (backgroundColor #FF0000)
         )
         (GraphicsLayer
           (position 8.00 8.00)
index 46bb843..0cd313a 100644 (file)
@@ -17,7 +17,6 @@ The green box appear angled out from the yellow box and embedded in it.
               (bounds 280.00 280.00)
               (opacity 0.80)
               (preserves3D 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 cb64d14..ae46e80 100644 (file)
@@ -48,7 +48,6 @@
                                                         (GraphicsLayer
                                                           (position 18.00 10.00)
                                                           (bounds 210.00 210.00)
-                                                          (backgroundColor #0000FF)
                                                         )
                                                       )
                                                     )
                                                         (GraphicsLayer
                                                           (position 18.00 10.00)
                                                           (bounds 210.00 210.00)
-                                                          (backgroundColor #0000FF)
                                                         )
                                                       )
                                                     )
         )
         (GraphicsLayer
           (bounds 100.00 100.00)
-          (backgroundColor #0000FF)
         )
       )
     )
index d0ec3c4..6df9e2c 100644 (file)
@@ -28,7 +28,6 @@
                                 (GraphicsLayer
                                   (position 18.00 10.00)
                                   (bounds 210.00 210.00)
-                                  (backgroundColor #0000FF)
                                 )
                               )
                             )
@@ -45,7 +44,6 @@
         (GraphicsLayer
           (position 5.00 5.00)
           (bounds 150.00 150.00)
-          (backgroundColor #00000099)
         )
       )
     )
index 8ddd697..80c8709 100644 (file)
@@ -28,7 +28,6 @@
                                 (GraphicsLayer
                                   (position 18.00 10.00)
                                   (bounds 210.00 210.00)
-                                  (backgroundColor #0000FF)
                                 )
                               )
                             )
index 58be476..fd8b0a2 100644 (file)
@@ -30,7 +30,6 @@ When the parent document becomes composited, the layer trees should get connecte
                                 (GraphicsLayer
                                   (position 18.00 10.00)
                                   (bounds 210.00 210.00)
-                                  (backgroundColor #0000FF)
                                 )
                               )
                             )
@@ -47,7 +46,6 @@ When the parent document becomes composited, the layer trees should get connecte
         (GraphicsLayer
           (position 8.00 8.00)
           (bounds 100.00 100.00)
-          (backgroundColor #0000FF)
         )
       )
     )
index ca2b1ac..709c89d 100644 (file)
@@ -28,7 +28,6 @@
                                 (GraphicsLayer
                                   (position 18.00 10.00)
                                   (bounds 210.00 210.00)
-                                  (backgroundColor #0000FF)
                                 )
                               )
                             )
@@ -45,7 +44,6 @@
         (GraphicsLayer
           (position 5.00 5.00)
           (bounds 50.00 50.00)
-          (backgroundColor #00000033)
         )
       )
     )
index ca2b1ac..709c89d 100644 (file)
@@ -28,7 +28,6 @@
                                 (GraphicsLayer
                                   (position 18.00 10.00)
                                   (bounds 210.00 210.00)
-                                  (backgroundColor #0000FF)
                                 )
                               )
                             )
@@ -45,7 +44,6 @@
         (GraphicsLayer
           (position 5.00 5.00)
           (bounds 50.00 50.00)
-          (backgroundColor #00000033)
         )
       )
     )
index 6475d33..5cc014d 100644 (file)
@@ -28,7 +28,6 @@
                                 (GraphicsLayer
                                   (position 18.00 10.00)
                                   (bounds 210.00 210.00)
-                                  (backgroundColor #0000FF)
                                 )
                               )
                             )
index ca2b1ac..709c89d 100644 (file)
@@ -28,7 +28,6 @@
                                 (GraphicsLayer
                                   (position 18.00 10.00)
                                   (bounds 210.00 210.00)
-                                  (backgroundColor #0000FF)
                                 )
                               )
                             )
@@ -45,7 +44,6 @@
         (GraphicsLayer
           (position 5.00 5.00)
           (bounds 50.00 50.00)
-          (backgroundColor #00000033)
         )
       )
     )
index 1383e7d..f39c53a 100644 (file)
@@ -28,7 +28,6 @@
                                 (GraphicsLayer
                                   (position 18.00 10.00)
                                   (bounds 210.00 210.00)
-                                  (backgroundColor #0000FF)
                                 )
                               )
                             )
@@ -45,7 +44,6 @@
         (GraphicsLayer
           (position 5.00 5.00)
           (bounds 50.00 50.00)
-          (backgroundColor #00000033)
         )
       )
     )
index 3287a13..22fb60c 100644 (file)
@@ -7,7 +7,6 @@
         (GraphicsLayer
           (position 18.00 10.00)
           (bounds 210.00 210.00)
-          (backgroundColor #0000FF)
         )
       )
     )
index 4efc778..b1dde03 100644 (file)
@@ -47,7 +47,6 @@
                                                         (GraphicsLayer
                                                           (position 18.00 10.00)
                                                           (bounds 210.00 210.00)
-                                                          (backgroundColor #0000FF)
                                                         )
                                                       )
                                                     )
@@ -76,7 +75,6 @@
         (GraphicsLayer
           (position 18.00 202.00)
           (bounds 210.00 210.00)
-          (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 ca2b1ac..709c89d 100644 (file)
@@ -28,7 +28,6 @@
                                 (GraphicsLayer
                                   (position 18.00 10.00)
                                   (bounds 210.00 210.00)
-                                  (backgroundColor #0000FF)
                                 )
                               )
                             )
@@ -45,7 +44,6 @@
         (GraphicsLayer
           (position 5.00 5.00)
           (bounds 50.00 50.00)
-          (backgroundColor #00000033)
         )
       )
     )
index 1fafc47..b24982c 100644 (file)
@@ -26,7 +26,6 @@
                                 (GraphicsLayer
                                   (position 18.00 10.00)
                                   (bounds 210.00 210.00)
-                                  (backgroundColor #0000FF)
                                 )
                               )
                             )
index 193662b..db235aa 100644 (file)
@@ -52,7 +52,6 @@ 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)
-          (backgroundColor #00000033)
         )
         (GraphicsLayer
           (position 8.00 274.00)
@@ -77,7 +76,6 @@ 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)
-                                  (backgroundColor #0000FF)
                                 )
                               )
                             )
@@ -94,7 +92,6 @@ 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)
-          (backgroundColor #00000033)
         )
       )
     )
index 878dcb7..21f0ce2 100644 (file)
@@ -29,7 +29,6 @@
                                 (GraphicsLayer
                                   (position 108.00 100.00)
                                   (bounds 200.00 200.00)
-                                  (backgroundColor #0000FF)
                                 )
                               )
                             )
@@ -46,7 +45,6 @@
         (GraphicsLayer
           (position 5.00 5.00)
           (bounds 50.00 50.00)
-          (backgroundColor #00000033)
         )
       )
     )
index f672f64..8a464f5 100644 (file)
@@ -14,7 +14,6 @@ Should be composited
             (GraphicsLayer
               (position 6.00 6.00)
               (bounds 250.00 50.00)
-              (backgroundColor #C0C0C0)
             )
             (GraphicsLayer
               (position 11.00 21.00)
index dc5a034..a96fa9a 100644 (file)
@@ -7,12 +7,10 @@
         (GraphicsLayer
           (position 100.00 1100.00)
           (bounds 256.00 256.00)
-          (backgroundColor #FF0000)
         )
         (GraphicsLayer
           (position 0.00 1000.00)
           (bounds 500.00 500.00)
-          (backgroundColor #008000)
         )
       )
     )
index fa4ce61..13f52f7 100644 (file)
@@ -14,7 +14,6 @@
         (GraphicsLayer
           (position 0.00 1000.00)
           (bounds 500.00 500.00)
-          (backgroundColor #008000)
         )
       )
     )
index 68fb5f4..a45da4c 100644 (file)
@@ -16,7 +16,6 @@ This layer should be composited.
             (GraphicsLayer
               (position 31.00 49.00)
               (bounds 100.00 100.00)
-              (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 a2f8a17..8074a7b 100644 (file)
@@ -20,7 +20,6 @@
             (GraphicsLayer
               (position 20.00 45.00)
               (bounds 210.00 100.00)
-              (backgroundColor #0000FF)
             )
           )
         )
index 7f63ba2..aed7be2 100644 (file)
                 (GraphicsLayer
                   (position 10.00 10.00)
                   (bounds 100.00 100.00)
-                  (backgroundColor #0000FF)
                 )
                 (GraphicsLayer
                   (position 10.00 120.00)
                   (bounds 100.00 100.00)
-                  (backgroundColor #0000FF)
                 )
               )
             )
index 79d2e5f..5755acd 100644 (file)
@@ -11,7 +11,6 @@
         )
         (GraphicsLayer
           (bounds 300.00 300.00)
-          (backgroundColor #008000)
         )
       )
     )
index 4b56ce0..34aba01 100644 (file)
           (children 1
             (GraphicsLayer
               (bounds 500.00 100.00)
-              (backgroundColor #008000)
             )
           )
         )
         (GraphicsLayer
           (position 50.00 200.00)
           (bounds 500.00 100.00)
-          (backgroundColor #008000)
         )
         (GraphicsLayer
           (position 450.00 200.00)
           (bounds 100.00 100.00)
-          (backgroundColor #0000FF)
         )
       )
     )
index 24e5d71..444d0e5 100644 (file)
               (children 2
                 (GraphicsLayer
                   (bounds 100.00 100.00)
-                  (backgroundColor #FF0000)
                 )
                 (GraphicsLayer
                   (bounds 100.00 100.00)
-                  (backgroundColor #008000)
                 )
               )
             )
index f54d599..dc844b8 100644 (file)
@@ -18,7 +18,6 @@
         )
         (GraphicsLayer
           (bounds 300.00 300.00)
-          (backgroundColor #008000)
         )
       )
     )
index f3c20e8..8dfeb97 100644 (file)
                 (GraphicsLayer
                   (position 10.00 10.00)
                   (bounds 100.00 100.00)
-                  (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)
-                  (backgroundColor #0000FF)
                 )
               )
             )
index fffe6af..8791268 100644 (file)
@@ -12,7 +12,6 @@ scroll me
         (GraphicsLayer
           (position 10.00 10.00)
           (bounds 400.00 100.00)
-          (backgroundColor #0000007F)
         )
         (GraphicsLayer
           (position 200.00 8.00)
index 4a35b1d..5144617 100644 (file)
@@ -12,7 +12,6 @@
         (GraphicsLayer
           (position 8.00 8.00)
           (bounds 100.00 50.00)
-          (backgroundColor #008000)
         )
       )
     )
index 4329e0c..b8312b0 100644 (file)
@@ -7,7 +7,6 @@
         (GraphicsLayer
           (position 8.00 8.00)
           (bounds 20.00 20.00)
-          (backgroundColor #0000FF)
         )
         (GraphicsLayer
           (position 8.00 18.00)
index 90ef764..3a363a9 100644 (file)
@@ -19,7 +19,6 @@
         (GraphicsLayer
           (position 65.00 65.00)
           (bounds 76.00 76.00)
-          (backgroundColor #0000FF)
         )
       )
     )
index 0b9e3df..0e205ac 100644 (file)
@@ -7,7 +7,6 @@
         (GraphicsLayer
           (position 18.00 10.00)
           (bounds 100.00 100.00)
-          (backgroundColor #0000FF)
         )
       )
     )
index c060af6..dc35188 100644 (file)
@@ -10,13 +10,11 @@ flat
           (position 18.00 10.00)
           (bounds 100.00 100.00)
           (preserves3D 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)
-          (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 d90b14f..ef9d3bf 100644 (file)
@@ -13,7 +13,6 @@ Test overflow clipping of composited elements in various configurations.
             (GraphicsLayer
               (position 2.00 12.00)
               (bounds 100.00 150.00)
-              (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 +40,6 @@ Test overflow clipping of composited elements in various configurations.
             (GraphicsLayer
               (position 2.00 12.00)
               (bounds 100.00 150.00)
-              (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 +55,6 @@ Test overflow clipping of composited elements in various configurations.
                 (GraphicsLayer
                   (position 2.00 12.00)
                   (bounds 100.00 150.00)
-                  (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 +71,6 @@ Test overflow clipping of composited elements in various configurations.
                 (GraphicsLayer
                   (position 2.00 12.00)
                   (bounds 100.00 150.00)
-                  (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 499d54d..2249d27 100644 (file)
@@ -12,7 +12,6 @@
         (GraphicsLayer
           (position 266.00 20.00)
           (bounds 100.00 100.00)
-          (backgroundColor #0000FF)
         )
         (GraphicsLayer
           (position 390.00 18.00)
index f59b617..1b83431 100644 (file)
@@ -7,7 +7,6 @@
         (GraphicsLayer
           (position 50.00 50.00)
           (bounds 100.00 100.00)
-          (backgroundColor #008000)
         )
       )
     )
index 5ff22d5..c3893fa 100644 (file)
@@ -8,7 +8,6 @@
         (GraphicsLayer
           (position 265.00 50.00)
           (bounds 100.00 100.00)
-          (backgroundColor #008000)
         )
       )
     )
index e089df0..3b7ca7c 100644 (file)
@@ -8,7 +8,6 @@
         (GraphicsLayer
           (position 51.00 50.00)
           (bounds 100.00 100.00)
-          (backgroundColor #008000)
         )
       )
     )
index f59b617..1b83431 100644 (file)
@@ -7,7 +7,6 @@
         (GraphicsLayer
           (position 50.00 50.00)
           (bounds 100.00 100.00)
-          (backgroundColor #008000)
         )
       )
     )
index 5ff22d5..c3893fa 100644 (file)
@@ -8,7 +8,6 @@
         (GraphicsLayer
           (position 265.00 50.00)
           (bounds 100.00 100.00)
-          (backgroundColor #008000)
         )
       )
     )
index 8c63a1d..d1e9d78 100644 (file)
@@ -7,7 +7,6 @@
         (GraphicsLayer
           (position 642.00 58.00)
           (bounds 100.00 100.00)
-          (backgroundColor #008000)
         )
       )
     )
index dd1a350..9974df8 100644 (file)
@@ -7,7 +7,6 @@
         (GraphicsLayer
           (position 8.00 8.00)
           (bounds 1800.00 10.00)
-          (backgroundColor #0000FF)
         )
       )
     )
index 7dc7366..d08bfb4 100644 (file)
               (children 3
                 (GraphicsLayer
                   (bounds 200.00 200.00)
-                  (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)
-                  (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)
-                  (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 3512b1c..0f03c93 100644 (file)
@@ -24,7 +24,6 @@
                   (children 1
                     (GraphicsLayer
                       (bounds 300.00 300.00)
-                      (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 +51,6 @@
                   (children 1
                     (GraphicsLayer
                       (bounds 300.00 300.00)
-                      (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 4b7acf5..5252013 100644 (file)
@@ -20,7 +20,6 @@
                 (GraphicsLayer
                   (anchor 0.20 0.20)
                   (bounds 500.00 500.00)
-                  (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 +41,6 @@
                 (GraphicsLayer
                   (anchor 0.20 0.20)
                   (bounds 500.00 500.00)
-                  (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 1849e18..da7ffce 100644 (file)
@@ -18,7 +18,6 @@
               (children 1
                 (GraphicsLayer
                   (bounds 200.00 200.00)
-                  (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 fb1eae7..1dafbff 100644 (file)
@@ -19,7 +19,6 @@
                 (GraphicsLayer
                   (position -100.00 0.00)
                   (bounds 200.00 200.00)
-                  (backgroundColor #0000FF)
                   (visible rect 100.00, 0.00 100.00 x 200.00)
                 )
               )
index edcd67d..3d48077 100644 (file)
@@ -9,14 +9,12 @@
         (GraphicsLayer
           (position -100.00 -120.00)
           (bounds 200.00 200.00)
-          (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)
-          (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 9d4cc2c..1458d23 100644 (file)
                 (GraphicsLayer
                   (position -100.00 0.00)
                   (bounds 200.00 200.00)
-                  (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)
-                  (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)
-                  (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 2430013..3bd200f 100644 (file)
@@ -55,7 +55,6 @@
         (GraphicsLayer
           (position 8.00 226.00)
           (bounds 200.00 200.00)
-          (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 334497d..6e04fb8 100644 (file)
@@ -31,7 +31,6 @@
                       (children 1
                         (GraphicsLayer
                           (bounds 500.00 500.00)
-                          (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 +66,6 @@
                       (children 1
                         (GraphicsLayer
                           (bounds 500.00 500.00)
-                          (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 c04651d..a3ac2c4 100644 (file)
@@ -9,7 +9,6 @@
         (GraphicsLayer
           (position 8.00 0.00)
           (bounds 200.00 500.00)
-          (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 88d5bef..0652f0b 100644 (file)
@@ -12,7 +12,6 @@
             (GraphicsLayer
               (position 22.00 22.00)
               (bounds 100.00 100.00)
-              (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])
             )
           )
index abf96a5..946f9c5 100644 (file)
@@ -8,7 +8,6 @@ Before (should be empty):
         (GraphicsLayer
           (position 495.00 30.00)
           (bounds 300.00 100.00)
-          (backgroundColor #008000)
         )
       )
     )
@@ -25,7 +24,6 @@ After (should not be empty):
         (GraphicsLayer
           (position 495.00 30.00)
           (bounds 300.00 100.00)
-          (backgroundColor #008000)
         )
       )
     )
index 9bea3c1..5d3189e 100644 (file)
@@ -28,7 +28,6 @@
                                 (GraphicsLayer
                                   (position 18.00 10.00)
                                   (bounds 210.00 210.00)
-                                  (backgroundColor #0000FF)
                                 )
                               )
                             )
index b07a306..da12afd 100644 (file)
         (GraphicsLayer
           (position 8.00 41.00)
           (bounds 400.00 400.00)
-          (backgroundColor #008000)
           (children 1
             (GraphicsLayer
               (position 50.00 50.00)
               (bounds 75.00 75.00)
-              (backgroundColor #0000FF)
             )
           )
         )
index 67ae5d4..cef314c 100644 (file)
@@ -15,7 +15,6 @@ 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)
-              (backgroundColor #FF0000)
             )
           )
         )
index 4c09d67..122a4b4 100644 (file)
@@ -35,7 +35,6 @@ Second (child added):
             (GraphicsLayer
               (position 51.00 401.00)
               (bounds 200.00 200.00)
-              (backgroundColor #FF0000)
             )
           )
         )
index 21ff207..37bc971 100644 (file)
@@ -16,12 +16,10 @@ This is some text
             (GraphicsLayer
               (position 51.00 101.00)
               (bounds 200.00 200.00)
-              (backgroundColor #FF0000)
             )
             (GraphicsLayer
               (position 51.00 4701.00)
               (bounds 200.00 200.00)
-              (backgroundColor #0000FF)
             )
           )
         )
index 41f7163..f1d27c2 100644 (file)
@@ -15,12 +15,10 @@ First (small layer):
             (GraphicsLayer
               (position 51.00 101.00)
               (bounds 200.00 200.00)
-              (backgroundColor #FF0000)
             )
             (GraphicsLayer
               (position 276.00 201.00)
               (bounds 200.00 200.00)
-              (backgroundColor #0000FF)
             )
           )
         )
@@ -46,12 +44,10 @@ Second (huge layer):
             (GraphicsLayer
               (position 51.00 101.00)
               (bounds 200.00 200.00)
-              (backgroundColor #FF0000)
             )
             (GraphicsLayer
               (position 276.00 4701.00)
               (bounds 200.00 200.00)
-              (backgroundColor #0000FF)
             )
           )
         )
@@ -76,12 +72,10 @@ Third (small layer):
             (GraphicsLayer
               (position 51.00 101.00)
               (bounds 200.00 200.00)
-              (backgroundColor #FF0000)
             )
             (GraphicsLayer
               (position 276.00 201.00)
               (bounds 200.00 200.00)
-              (backgroundColor #0000FF)
             )
           )
         )
index 9771944..be8ab00 100644 (file)
@@ -11,7 +11,6 @@
         (GraphicsLayer
           (position 8.00 8.00)
           (bounds 700.00 2500.00)
-          (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)
         )
index 85975b5..0a3d2ae 100644 (file)
@@ -1,3 +1,79 @@
+2012-12-15  No'am Rosenthal  <noam.rosenthal@nokia.com>
+
+        Disambiguate "background color" and "contents as solid color" on GraphicsLayer
+        https://bugs.webkit.org/show_bug.cgi?id=104842
+
+        Reviewed by Simon Fraser.
+
+        Rename overloads in GraphicsLayerTextureMapper and GraphicsLayerChromium to account for the rename in GraphicsLayer.
+
+        Covered by existing tests.
+
+        * platform/graphics/chromium/GraphicsLayerChromium.cpp:
+        * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
+        (WebCore::GraphicsLayerTextureMapper::setContentsToSolidColor):
+        * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
+        (GraphicsLayerTextureMapper):
+        (WebCore::GraphicsLayerTextureMapper::solidColor):
+        * platform/graphics/texmap/TextureMapperLayer.cpp:
+        (WebCore::TextureMapperLayer::paintSelf):
+        (WebCore::TextureMapperLayer::flushCompositingStateSelf):
+        * platform/graphics/texmap/TextureMapperLayer.h:
+        (State):
+
+2012-12-13  Simon Fraser  <simon.fraser@apple.com>
+
+        Disambiguate "background color" and "contents as solid color" on GraphicsLayer
+        https://bugs.webkit.org/show_bug.cgi?id=104842
+
+        Reviewed by Dean Jackson.
+
+        GraphicsLayer failed to be clear about the distinction between
+        the layer background color, and setting the layer contents
+        to a color. This caused some recently added tests to fail,
+        and required some special-casing for the TileCache in
+        GraphicsLayerCA.
+        
+        Separate these two concepts on GraphicsLayer. setBackgroundColor()
+        now sets the background color on the entire layer, which will only
+        be used in special cases like the TileCache.
+        
+        The existing setContentsToBackgroundColor() is renamed to
+        setContentsToSolidColor(), and is an explicit request to create
+        a contents layer for the purpose of displaying a simple color.
+        
+        In both cases, 'clear' methods are not necessary; calling
+        the setter with an invalid color clears the color.
+
+        Covered by existing tests.
+
+        * WebCore.exp.in: Remove GraphicsLayer::clearBackgroundColor().
+        * platform/graphics/GraphicsLayer.cpp:
+        (WebCore::GraphicsLayer::GraphicsLayer):
+        (WebCore::GraphicsLayer::setBackgroundColor):
+        (WebCore::GraphicsLayer::dumpProperties):
+        * platform/graphics/GraphicsLayer.h:
+        (GraphicsLayer): Remove m_backgroundColorSet; we just check whether
+        the color is a valid color now.
+        (WebCore::GraphicsLayer::setContentsToSolidColor):
+        * platform/graphics/ca/GraphicsLayerCA.cpp:
+        (WebCore::GraphicsLayerCA::GraphicsLayerCA):
+        (WebCore::GraphicsLayerCA::setBackgroundColor):
+        (WebCore::GraphicsLayerCA::setContentsToSolidColor):
+        (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
+        (WebCore::GraphicsLayerCA::updateBackgroundColor):
+        (WebCore::GraphicsLayerCA::updateContentsColorLayer):
+        (WebCore):
+        * platform/graphics/ca/GraphicsLayerCA.h:
+        (GraphicsLayerCA):
+        * rendering/RenderLayerBacking.cpp:
+        (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): We have
+        to call updateBackgroundColor(), because the 'is simple compositing layer'
+        state may change in this code path.
+        (WebCore::RenderLayerBacking::updateBackgroundColor): Don't initialize
+        the Color to transparent (it will be invalid initially), and always
+        call setContentsToSolidColor() which will either set or remove the color.
+
 2012-12-15  Mark Lam  <mark.lam@apple.com>
 
         Re-landing patch for "Introducing the DatabaseStrategy and database servers".
index 0c831de..11d5205 100644 (file)
@@ -2167,7 +2167,6 @@ __ZN7WebCore13GraphicsLayer17distributeOpacityEf
 __ZN7WebCore13GraphicsLayer17removeAllChildrenEv
 __ZN7WebCore13GraphicsLayer17suspendAnimationsEd
 __ZN7WebCore13GraphicsLayer18setBackgroundColorERKNS_5ColorE
-__ZN7WebCore13GraphicsLayer20clearBackgroundColorEv
 __ZN7WebCore13GraphicsLayer20setReplicatedByLayerEPS0_
 __ZN7WebCore13GraphicsLayer6createEPNS_19GraphicsLayerClientE
 __ZN7WebCore13GraphicsLayer6createEPNS_20GraphicsLayerFactoryEPNS_19GraphicsLayerClientE
index a96bdc6..2263497 100644 (file)
@@ -80,7 +80,6 @@ GraphicsLayer::GraphicsLayer(GraphicsLayerClient* client)
     , m_anchorPoint(0.5f, 0.5f, 0)
     , m_opacity(1)
     , m_zPosition(0)
-    , m_backgroundColorSet(false)
     , m_contentsOpaque(false)
     , m_preserves3D(false)
     , m_backfaceVisibility(true)
@@ -313,13 +312,6 @@ void GraphicsLayer::setOffsetFromRenderer(const IntSize& offset, ShouldSetNeedsD
 void GraphicsLayer::setBackgroundColor(const Color& color)
 {
     m_backgroundColor = color;
-    m_backgroundColorSet = true;
-}
-
-void GraphicsLayer::clearBackgroundColor()
-{
-    m_backgroundColor = Color();
-    m_backgroundColorSet = false;
 }
 
 void GraphicsLayer::paintGraphicsLayerContents(GraphicsContext& context, const IntRect& clip)
@@ -657,7 +649,7 @@ void GraphicsLayer::dumpProperties(TextStream& ts, int indent, LayerTreeAsTextBe
         ts << ")\n";
     }
 
-    if (m_backgroundColorSet) {
+    if (m_backgroundColor.isValid()) {
         writeIndent(ts, indent + 1);
         ts << "(backgroundColor " << m_backgroundColor.nameForRenderTreeAsText() << ")\n";
     }
index b4b4186..5fe9aba 100644 (file)
@@ -292,11 +292,11 @@ public:
     bool acceleratesDrawing() const { return m_acceleratesDrawing; }
     virtual void setAcceleratesDrawing(bool b) { m_acceleratesDrawing = b; }
 
-    // The color used to paint the layer backgrounds
+    // The color used to paint the layer background. Pass an invalid color to remove it.
+    // Note that this covers the entire layer. Use setContentsToSolidColor() if the color should
+    // only cover the contentsRect.
     const Color& backgroundColor() const { return m_backgroundColor; }
     virtual void setBackgroundColor(const Color&);
-    virtual void clearBackgroundColor();
-    bool backgroundColorSet() const { return m_backgroundColorSet; }
 
     // opaque means that we know the layer contents have no alpha
     bool contentsOpaque() const { return m_contentsOpaque; }
@@ -346,7 +346,8 @@ public:
     virtual void setContentsToImage(Image*) { }
     virtual bool shouldDirectlyCompositeImage(Image*) const { return true; }
     virtual void setContentsToMedia(PlatformLayer*) { } // video or plug-in
-    virtual void setContentsToBackgroundColor(const Color&) { }
+    // Pass an invalid color to remove the contents layer.
+    virtual void setContentsToSolidColor(const Color&) { }
     virtual void setContentsToCanvas(PlatformLayer*) { }
     virtual bool hasContentsLayer() const { return false; }
 
@@ -497,7 +498,6 @@ protected:
     FilterOperations m_filters;
 #endif
 
-    bool m_backgroundColorSet : 1;
     bool m_contentsOpaque : 1;
     bool m_preserves3D: 1;
     bool m_backfaceVisibility : 1;
index 12fc69d..b6d21b3 100644 (file)
@@ -97,7 +97,6 @@ GraphicsLayerBlackBerry::GraphicsLayerBlackBerry(GraphicsLayerClient* client)
     : GraphicsLayer(client)
     , m_suspendTime(0)
     , m_contentsLayerPurpose(NoContentsLayer)
-    , m_contentsLayerHasBackgroundColor(false)
 {
     m_layer = LayerWebKitThread::create(LayerData::Layer, this);
 
@@ -330,24 +329,13 @@ bool GraphicsLayerBlackBerry::setFilters(const FilterOperations& filters)
 
 void GraphicsLayerBlackBerry::setBackgroundColor(const Color& color)
 {
-    if (m_backgroundColorSet && m_backgroundColor == color)
+    if (color == m_backgroundColor)
         return;
 
-    GraphicsLayer::setBackgroundColor(color);
-
-    m_contentsLayerHasBackgroundColor = true;
+    GraphicsLayer::setBackgroundColor(color.rgb());
     updateLayerBackgroundColor();
 }
 
-void GraphicsLayerBlackBerry::clearBackgroundColor()
-{
-    if (!m_backgroundColorSet)
-        return;
-
-    GraphicsLayer::clearBackgroundColor();
-    clearLayerBackgroundColor(*m_contentsLayer);
-}
-
 void GraphicsLayerBlackBerry::setContentsOpaque(bool opaque)
 {
     if (m_contentsOpaque == opaque)
@@ -835,14 +823,10 @@ void GraphicsLayerBlackBerry::updateHasFixedAncestorInDOMTree()
 
 void GraphicsLayerBlackBerry::updateLayerBackgroundColor()
 {
-    if (!m_contentsLayer)
-        return;
-
-    // We never create the contents layer just for background color yet.
-    if (m_backgroundColorSet)
-        setLayerBackgroundColor(*m_contentsLayer, m_backgroundColor);
+    if (m_backgroundColor.isValid())
+        setLayerBackgroundColor(*m_layer, m_backgroundColor);
     else
-        clearLayerBackgroundColor(*m_contentsLayer);
+        clearLayerBackgroundColor(*m_layer);
 }
 
 #if ENABLE(CSS_FILTERS)
index 5c86126..e2dd90c 100644 (file)
@@ -86,7 +86,6 @@ public:
 #endif
 
     virtual void setBackgroundColor(const Color&);
-    virtual void clearBackgroundColor();
 
     virtual void setContentsOpaque(bool);
     virtual void setBackfaceVisibility(bool);
@@ -186,7 +185,6 @@ private:
     };
 
     ContentsLayerPurpose m_contentsLayerPurpose;
-    bool m_contentsLayerHasBackgroundColor : 1;
 };
 
 } // namespace WebCore
index 567fd94..c9c486a 100644 (file)
@@ -274,7 +274,6 @@ PassOwnPtr<GraphicsLayer> GraphicsLayer::create(GraphicsLayerClient* client)
 GraphicsLayerCA::GraphicsLayerCA(GraphicsLayerClient* client)
     : GraphicsLayer(client)
     , m_contentsLayerPurpose(NoContentsLayer)
-    , m_contentsLayerHasBackgroundColor(false)
     , m_allowTiledLayer(true)
     , m_isPageTileCacheLayer(false)
     , m_uncommittedChanges(0)
@@ -564,22 +563,10 @@ void GraphicsLayerCA::setAllowTiledLayer(bool allowTiledLayer)
 
 void GraphicsLayerCA::setBackgroundColor(const Color& color)
 {
-    if (m_backgroundColorSet && m_backgroundColor == color)
+    if (m_backgroundColor == color)
         return;
 
     GraphicsLayer::setBackgroundColor(color);
-
-    m_contentsLayerHasBackgroundColor = true;
-    noteLayerPropertyChanged(BackgroundColorChanged);
-}
-
-void GraphicsLayerCA::clearBackgroundColor()
-{
-    if (!m_backgroundColorSet)
-        return;
-
-    GraphicsLayer::clearBackgroundColor();
-    m_contentsLayerHasBackgroundColor = false;
     noteLayerPropertyChanged(BackgroundColorChanged);
 }
 
@@ -756,10 +743,14 @@ void GraphicsLayerCA::platformCALayerAnimationStarted(CFTimeInterval startTime)
         m_client->notifyAnimationStarted(this, startTime);
 }
 
-void GraphicsLayerCA::setContentsToBackgroundColor(const Color& color)
+void GraphicsLayerCA::setContentsToSolidColor(const Color& color)
 {
-    setBackgroundColor(color);
-    if (color != Color::transparent) {
+    if (color == m_contentsSolidColor)
+        return;
+
+    m_contentsSolidColor = color;
+
+    if (m_contentsSolidColor.isValid()) {
         m_contentsLayerPurpose = ContentsLayerForBackgroundColor;
         m_contentsLayer = PlatformCALayer::create(PlatformCALayer::LayerTypeLayer, this);
 #ifndef NDEBUG
@@ -771,7 +762,7 @@ void GraphicsLayerCA::setContentsToBackgroundColor(const Color& color)
     }
 
     noteSublayersChanged();
-    noteLayerPropertyChanged(BackgroundColorChanged);
+    noteLayerPropertyChanged(ContentsColorLayerChanged);
 }
 
 void GraphicsLayerCA::setContentsToImage(Image* image)
@@ -1093,9 +1084,12 @@ void GraphicsLayerCA::commitLayerChangesBeforeSublayers(float pageScaleFactor, c
     
     if (m_uncommittedChanges & ContentsCanvasLayerChanged) // Needs to happen before ChildrenChanged
         updateContentsCanvasLayer();
+
+    if (m_uncommittedChanges & ContentsColorLayerChanged) // Needs to happen before ChildrenChanged
+        updateContentsColorLayer();
     
-    if (m_uncommittedChanges & BackgroundColorChanged) // Needs to happen before ChildrenChanged, and after updating image or video
-        updateLayerBackgroundColor();
+    if (m_uncommittedChanges & BackgroundColorChanged)
+        updateBackgroundColor();
 
     if (m_uncommittedChanges & TransformChanged)
         updateTransform();
@@ -1616,23 +1610,9 @@ void GraphicsLayerCA::updateVisibleRect(const FloatRect& oldVisibleRect)
     m_sizeAtLastVisibleRectUpdate = m_size;
 }
 
-void GraphicsLayerCA::updateLayerBackgroundColor()
+void GraphicsLayerCA::updateBackgroundColor()
 {
-    if (m_isPageTileCacheLayer) {
-        m_layer->setBackgroundColor(m_backgroundColor);
-        return;
-    }
-
-    if (!m_contentsLayer)
-        return;
-
-    setupContentsLayer(m_contentsLayer.get());
-    updateContentsRect();
-
-    if (m_backgroundColorSet)
-        m_contentsLayer->setBackgroundColor(m_backgroundColor);
-    else
-        m_contentsLayer->setBackgroundColor(Color::transparent);
+    m_layer->setBackgroundColor(m_backgroundColor);
 }
 
 void GraphicsLayerCA::updateContentsImage()
@@ -1686,6 +1666,17 @@ void GraphicsLayerCA::updateContentsCanvasLayer()
     }
 }
 
+void GraphicsLayerCA::updateContentsColorLayer()
+{
+    // Color layer was set as m_contentsLayer, and will get parented in updateSublayerList().
+    if (m_contentsLayer) {
+        setupContentsLayer(m_contentsLayer.get());
+        updateContentsRect();
+        ASSERT(m_contentsSolidColor.isValid()); // An invalid color should have removed the contents layer.
+        m_contentsLayer->setBackgroundColor(m_contentsSolidColor);
+    }
+}
+
 void GraphicsLayerCA::updateContentsRect()
 {
     if (!m_contentsLayer)
index 2deb2e2..bad5511 100644 (file)
@@ -89,7 +89,6 @@ public:
     virtual void setAcceleratesDrawing(bool);
 
     virtual void setBackgroundColor(const Color&);
-    virtual void clearBackgroundColor();
 
     virtual void setContentsOpaque(bool);
     virtual void setBackfaceVisibility(bool);
@@ -117,7 +116,7 @@ public:
     virtual void setContentsToImage(Image*);
     virtual void setContentsToMedia(PlatformLayer*);
     virtual void setContentsToCanvas(PlatformLayer*);
-    virtual void setContentsToBackgroundColor(const Color&);
+    virtual void setContentsToSolidColor(const Color&);
 
     virtual bool hasContentsLayer() const { return m_contentsLayer; }
     
@@ -317,11 +316,12 @@ private:
     void updateBackfaceVisibility();
     void updateStructuralLayer(float pixelAlignmentScale, const FloatPoint& positionRelativeToBase);
     void updateLayerDrawsContent(float pixelAlignmentScale, const FloatPoint& positionRelativeToBase);
-    void updateLayerBackgroundColor();
+    void updateBackgroundColor();
 
     void updateContentsImage();
     void updateContentsMediaLayer();
     void updateContentsCanvasLayer();
+    void updateContentsColorLayer();
     void updateContentsRect();
     void updateMaskLayer();
     void updateReplicatedLayers();
@@ -373,16 +373,17 @@ private:
         ContentsImageChanged = 1 << 15,
         ContentsMediaLayerChanged = 1 << 16,
         ContentsCanvasLayerChanged = 1 << 17,
-        ContentsRectChanged = 1 << 18,
-        MaskLayerChanged = 1 << 19,
-        ReplicatedLayerChanged = 1 << 20,
-        ContentsNeedsDisplay = 1 << 21,
-        AcceleratesDrawingChanged = 1 << 22,
-        ContentsScaleChanged = 1 << 23,
-        ContentsVisibilityChanged = 1 << 24,
-        VisibleRectChanged = 1 << 25,
-        FiltersChanged = 1 << 26,
-        DebugIndicatorsChanged = 1 << 27
+        ContentsColorLayerChanged = 1 << 18,
+        ContentsRectChanged = 1 << 19,
+        MaskLayerChanged = 1 << 20,
+        ReplicatedLayerChanged = 1 << 21,
+        ContentsNeedsDisplay = 1 << 22,
+        AcceleratesDrawingChanged = 1 << 23,
+        ContentsScaleChanged = 1 << 24,
+        ContentsVisibilityChanged = 1 << 25,
+        VisibleRectChanged = 1 << 26,
+        FiltersChanged = 1 << 27,
+        DebugIndicatorsChanged = 1 << 28
     };
     typedef unsigned LayerChangeFlags;
     void noteLayerPropertyChanged(LayerChangeFlags flags);
@@ -418,6 +419,8 @@ private:
     bool m_contentsLayerHasBackgroundColor : 1;
     bool m_allowTiledLayer : 1;
     bool m_isPageTileCacheLayer : 1;
+    
+    Color m_contentsSolidColor;
 
     RetainPtr<CGImageRef> m_uncorrectedContentsImage;
     RetainPtr<CGImageRef> m_pendingContentsImage;
index e747ba2..549afb5 100644 (file)
@@ -101,7 +101,6 @@ GraphicsLayerChromium::GraphicsLayerChromium(GraphicsLayerClient* client)
     , m_contentsLayerId(0)
     , m_linkHighlight(0)
     , m_contentsLayerPurpose(NoContentsLayer)
-    , m_contentsLayerHasBackgroundColor(false)
     , m_inSetChildren(false)
     , m_scrollableArea(0)
 {
@@ -285,20 +284,13 @@ void GraphicsLayerChromium::setContentsVisible(bool contentsVisible)
 
 void GraphicsLayerChromium::setBackgroundColor(const Color& color)
 {
-    GraphicsLayer::setBackgroundColor(color.rgb());
+    if (color == m_backgroundColor)
+        return;
 
-    m_contentsLayerHasBackgroundColor = true;
+    GraphicsLayer::setBackgroundColor(color);
     updateLayerBackgroundColor();
 }
 
-void GraphicsLayerChromium::clearBackgroundColor()
-{
-    GraphicsLayer::clearBackgroundColor();
-
-    if (WebLayer* contentsLayer = contentsLayerIfRegistered())
-        contentsLayer->setBackgroundColor(static_cast<RGBA32>(0));
-}
-
 void GraphicsLayerChromium::setContentsOpaque(bool opaque)
 {
     GraphicsLayer::setContentsOpaque(opaque);
@@ -803,15 +795,7 @@ void GraphicsLayerChromium::updateLayerIsDrawable()
 
 void GraphicsLayerChromium::updateLayerBackgroundColor()
 {
-    WebLayer* contentsLayer = contentsLayerIfRegistered();
-    if (!contentsLayer)
-        return;
-
-    // We never create the contents layer just for background color yet.
-    if (m_backgroundColorSet)
-        contentsLayer->setBackgroundColor(m_backgroundColor.rgb());
-    else
-        contentsLayer->setBackgroundColor(static_cast<RGBA32>(0));
+    m_layer->layer()->setBackgroundColor(m_backgroundColor.rgb());
 }
 
 void GraphicsLayerChromium::updateContentsVideo()
index 10fda76..6aa5a63 100644 (file)
@@ -92,7 +92,6 @@ public:
     virtual void setMaskLayer(GraphicsLayer*);
 
     virtual void setBackgroundColor(const Color&);
-    virtual void clearBackgroundColor();
 
     virtual void setContentsOpaque(bool);
     virtual void setBackfaceVisibility(bool);
@@ -200,7 +199,6 @@ private:
     OwnPtr<OpaqueRectTrackingContentLayerDelegate> m_opaqueRectTrackingContentLayerDelegate;
 
     ContentsLayerPurpose m_contentsLayerPurpose;
-    bool m_contentsLayerHasBackgroundColor : 1;
     bool m_inSetChildren;
 
     typedef HashMap<String, int> AnimationIdMap;
index 99bf575..9ed1311 100644 (file)
@@ -351,13 +351,12 @@ void GraphicsLayerTextureMapper::setContentsRect(const IntRect& value)
     notifyChange(TextureMapperLayer::ContentsRectChange);
 }
 
-void GraphicsLayerTextureMapper::setContentsToBackgroundColor(const Color& color)
+void GraphicsLayerTextureMapper::setContentsToSolidColor(const Color& color)
 {
-    if (color == m_backgroundColor)
+    if (color == m_solidColor)
         return;
 
-    m_backgroundColor = color;
-    setBackgroundColor(color);
+    m_solidColor = color;
     notifyChange(TextureMapperLayer::ContentChange);
 }
 
index ad3483b..750fce7 100644 (file)
@@ -66,8 +66,8 @@ public:
     virtual void setContentsRect(const IntRect& r);
     virtual void setReplicatedByLayer(GraphicsLayer*);
     virtual void setContentsToImage(Image*);
-    virtual void setContentsToBackgroundColor(const Color&);
-    Color backgroundColor() const { return m_backgroundColor; }
+    virtual void setContentsToSolidColor(const Color&);
+    Color solidColor() const { return m_solidColor; }
     virtual void setContentsToMedia(PlatformLayer*);
     virtual void setContentsToCanvas(PlatformLayer* canvas) { setContentsToMedia(canvas); }
     virtual void flushCompositingState(const FloatRect&);
@@ -116,7 +116,7 @@ private:
     bool m_needsDisplay;
     bool m_hasOwnBackingStore;
     bool m_fixedToViewport;
-    Color m_backgroundColor;
+    Color m_solidColor;
 
     Color m_debugBorderColor;
     float m_debugBorderWidth;
index 4a45c4a..ac7269b 100644 (file)
@@ -109,12 +109,16 @@ void TextureMapperLayer::paintSelf(const TextureMapperPaintOptions& options)
     float opacity = options.opacity;
     RefPtr<BitmapTexture> mask = options.mask;
 
-    if (m_state.backgroundColor.alpha() && !m_state.contentsRect.isEmpty()) {
-        Color color = m_state.backgroundColor;
+    if (m_state.solidColor.isValid() && !m_state.contentsRect.isEmpty()) {
+        if (!m_state.solidColor.alpha())
+            return;
+
+        Color color = m_state.solidColor;
         float r, g, b, a;
         color.getRGBA(r, g, b, a);
         color = Color(r * opacity, g * opacity, b * opacity, a * opacity);
         options.textureMapper->drawSolidColor(m_state.contentsRect, transform, color);
+        return;
     }
 
     if (m_backingStore) {
@@ -436,7 +440,7 @@ void TextureMapperLayer::flushCompositingStateSelf(GraphicsLayerTextureMapper* g
     m_state.backfaceVisibility = graphicsLayer->backfaceVisibility();
     m_state.childrenTransform = graphicsLayer->childrenTransform();
     m_state.opacity = graphicsLayer->opacity();
-    m_state.backgroundColor = graphicsLayer->backgroundColor();
+    m_state.solidColor = graphicsLayer->solidColor();
 #if ENABLE(CSS_FILTERS)
     if (changeMask & FilterChange)
         m_state.filters = graphicsLayer->filters();
index 2161d53..3ddad3c 100644 (file)
@@ -199,7 +199,7 @@ private:
         int descendantsWithContent;
         TextureMapperLayer* maskLayer;
         TextureMapperLayer* replicaLayer;
-        Color backgroundColor;
+        Color solidColor;
 #if ENABLE(CSS_FILTERS)
          FilterOperations filters;
 #endif
index 6f307c0..6600b49 100644 (file)
@@ -758,6 +758,7 @@ void RenderLayerBacking::updateGraphicsLayerGeometry()
     setRequiresOwnBackingStore(compositor()->requiresOwnBackingStore(m_owningLayer, compAncestor));
 
     updateContentsRect(isSimpleContainer);
+    updateBackgroundColor(isSimpleContainer);
     updateDrawsContent(isSimpleContainer);
     updateAfterWidgetResize();
 }
@@ -1150,12 +1151,12 @@ Color RenderLayerBacking::rendererBackgroundColor() const
 
 void RenderLayerBacking::updateBackgroundColor(bool isSimpleContainer)
 {
-    Color backgroundColor = Color::transparent;
+    Color backgroundColor;
     if (isSimpleContainer)
         backgroundColor = rendererBackgroundColor();
-    m_graphicsLayer->setContentsToBackgroundColor(backgroundColor);
-    if (backgroundColor == Color::transparent)
-        m_graphicsLayer->clearBackgroundColor();
+
+    // An unset (invalid) color will remove the solid color.
+    m_graphicsLayer->setContentsToSolidColor(backgroundColor);
 }
 
 static bool supportsDirectBoxDecorationsComposition(const RenderObject* renderer)
index 74c4d32..5ad7363 100644 (file)
@@ -1,3 +1,21 @@
+2012-12-15  No'am Rosenthal  <noam.rosenthal@nokia.com>
+
+        Disambiguate "background color" and "contents as solid color" on GraphicsLayer
+        https://bugs.webkit.org/show_bug.cgi?id=104842
+
+        Reviewed by Simon Fraser.
+
+        Rename overloads in coordinated graphics to account for the rename in GraphicsLayer.
+
+        * Shared/CoordinatedGraphics/CoordinatedLayerInfo.h:
+        (CoordinatedLayerInfo):
+        * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:
+        (WebKit::LayerTreeRenderer::setLayerState):
+        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
+        (WebCore::CoordinatedGraphicsLayer::setContentsToSolidColor):
+        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h:
+        (CoordinatedGraphicsLayer):
+
 2012-12-15  Christophe Dumez  <christophe.dumez@intel.com>
 
         [GTK][WK2] Memory leak in ChunkedUpdateDrawingArea::paintIntoUpdateChunk()
index 1714be6..652056d 100644 (file)
@@ -56,7 +56,7 @@ struct CoordinatedLayerInfo {
     WebCore::TransformationMatrix childrenTransform;
     WebCore::IntRect contentsRect;
     float opacity;
-    WebCore::Color backgroundColor;
+    WebCore::Color solidColor;
 
     union {
         struct {
index 1d5e74e..1a9f51d 100644 (file)
@@ -343,7 +343,7 @@ void LayerTreeRenderer::setLayerState(CoordinatedLayerID id, const CoordinatedLa
     layer->setBackfaceVisibility(layerInfo.backfaceVisible);
     layer->setContentsOpaque(layerInfo.contentsOpaque);
     layer->setContentsRect(layerInfo.contentsRect);
-    layer->setContentsToBackgroundColor(layerInfo.backgroundColor);
+    layer->setContentsToSolidColor(layerInfo.solidColor);
     layer->setDrawsContent(layerInfo.drawsContent);
     layer->setContentsVisible(layerInfo.contentsVisible);
     toGraphicsLayerTextureMapper(layer)->setFixedToViewport(layerInfo.fixedToViewport);
index 4e44c2a..c1da695 100644 (file)
@@ -362,14 +362,11 @@ bool CoordinatedGraphicsLayer::setFilters(const FilterOperations& newFilters)
 }
 #endif
 
-void CoordinatedGraphicsLayer::setContentsToBackgroundColor(const Color& color)
+void CoordinatedGraphicsLayer::setContentsToSolidColor(const Color& color)
 {
-    if (m_layerInfo.backgroundColor == color)
+    if (m_layerInfo.solidColor == color)
         return;
-    m_layerInfo.backgroundColor = color;
-
-    // This is in line with what CA does.
-    setBackgroundColor(color);
+    m_layerInfo.solidColor = color;
     didChangeLayerState();
 }
 
index 56bfbb8..0e42058 100644 (file)
@@ -110,7 +110,7 @@ public:
     virtual void setOpacity(float) OVERRIDE;
     virtual void setContentsRect(const IntRect&) OVERRIDE;
     virtual void setContentsToImage(Image*) OVERRIDE;
-    virtual void setContentsToBackgroundColor(const Color&) OVERRIDE;
+    virtual void setContentsToSolidColor(const Color&) OVERRIDE;
     virtual bool shouldDirectlyCompositeImage(Image*) const OVERRIDE;
     virtual void setContentsToCanvas(PlatformLayer*) OVERRIDE;
     virtual void setMaskLayer(GraphicsLayer*) OVERRIDE;