Fix the bug of backface-visibility:hidden
authorHurnjoo Lee <hurnjoo.lee@samsung.com>
Tue, 15 Oct 2013 04:38:26 +0000 (13:38 +0900)
committerGerrit Code Review <gerrit@gerrit.vlan144.tizendev.org>
Tue, 15 Oct 2013 09:52:01 +0000 (09:52 +0000)
[Title] Fix the bug of backface-visibility:hidden
[Issues] P130925-02172, P130925-02094
[Problem] Inspite of backface-visibility:hidden, backface of the element is visible.
[Solution] If the layer hasn't own 3D rendering context, m_state.visible of TextureMapperLayer should be inherited.

Change-Id: Ica79a79ec645f5c394e6b1bd143cc04bd5a35d31

Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp

index 4e3aa24..703447d 100755 (executable)
@@ -144,7 +144,9 @@ void TextureMapperLayer::computeTransformsRecursive()
     // Tizen backface culling algorithm ignores above line (common texturemapper style)
     m_state.visible = true;
 
-    if (!m_state.backfaceVisibility) {
+    if (m_parent && !m_parent->m_state.visible && !m_parent->m_state.preserves3D)
+        m_state.visible = false;
+    else if (!m_state.backfaceVisibility) {
         FloatQuad mappedLayer = m_transform.combined().mapQuad(FloatQuad(layerRect()));
         FloatSize horizontalDir = mappedLayer.p2() - mappedLayer.p1();
         FloatSize verticalDir = mappedLayer.p4() - mappedLayer.p1();