-
simon.fraser@apple.com authored
https://bugs.webkit.org/show_bug.cgi?id=100205 Reviewed by Dean Jackson. Source/WebCore: When an element has "transform-style: preserve-3d", its GraphicsLayerCA has a m_structuralLayer which is a CATransformLayer. The primary CALayer which contains rendered content becomes a sublayer of the CATransformLayer. If the element has backface-visibility:hidden, it is the primary layer that is set to be single-sided. In r131940 we started to use TileCaches in place of CATiledLayer. TileCaches work via "customSublayers" returned from the PlatformCALayer, where the custom sublayer is the tile cache container layer. However, the custom sublayers were being added as children of the structural (CATransformLayer) layer, not of the primary (CALayer) layer, thus they were not affected by the doubleSided property. This change cleans up the confusing code in GraphicsLayerCA::updateSublayerList() by maintaining two vectors of PlatformCALayers, one for sublayers of the structural layer, and one for sublayers of the primary layer. It adds custom sublayers to the latter list, so now the tile cache container layer becomes a sublayer of the primary layer, so is affected by that layer's doubleSided property. Test: compositing/tiling/backface-preserve-3d-tiled.html * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::updateSublayerList): LayoutTests: Pixel test that tests backface-visibility on a tile cache layer. Mark the test as failing on Chromium. * compositing/tiling/backface-preserve-3d-tiled-expected.png: Added. * compositing/tiling/backface-preserve-3d-tiled-expected.txt: Added. * compositing/tiling/backface-preserve-3d-tiled.html: Added. * platform/chromium/TestExpectations: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132394 268f45cc-cd09-0410-ab3c-d52691b4dbfc
8137f28a