[TexMap] Match initializing members in GraphicsLayerTransform to initializing members...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 18 Jan 2013 00:04:37 +0000 (00:04 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 18 Jan 2013 00:04:37 +0000 (00:04 +0000)
https://bugs.webkit.org/show_bug.cgi?id=107090

Patch by Huang Dongsung <luxtella@company100.net> on 2013-01-17
Reviewed by Noam Rosenthal.

GraphicsLayer initializes m_anchorPoint to FloatPoint3D(0.5, 0.5, 0) and
m_preserves3D to false, while GraphicsLayerTransform initializes m_anchorPoint
to FloatPoint3D(0, 0, 0) and m_flattening (= !m_preserves3D) to false. It is a
potential bug. This patch corrects initialization of GraphicsLayerTransform.

Covered by existing compositing pixel tests.

* platform/graphics/GraphicsLayerTransform.cpp:
(WebCore::GraphicsLayerTransform::GraphicsLayerTransform):

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

Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/GraphicsLayerTransform.cpp

index 2cba117..b5df029 100644 (file)
@@ -1,3 +1,20 @@
+2013-01-17  Huang Dongsung  <luxtella@company100.net>
+
+        [TexMap] Match initializing members in GraphicsLayerTransform to initializing members in GraphicsLayer.
+        https://bugs.webkit.org/show_bug.cgi?id=107090
+
+        Reviewed by Noam Rosenthal.
+
+        GraphicsLayer initializes m_anchorPoint to FloatPoint3D(0.5, 0.5, 0) and
+        m_preserves3D to false, while GraphicsLayerTransform initializes m_anchorPoint
+        to FloatPoint3D(0, 0, 0) and m_flattening (= !m_preserves3D) to false. It is a
+        potential bug. This patch corrects initialization of GraphicsLayerTransform.
+
+        Covered by existing compositing pixel tests.
+
+        * platform/graphics/GraphicsLayerTransform.cpp:
+        (WebCore::GraphicsLayerTransform::GraphicsLayerTransform):
+
 2013-01-17  Filip Pizlo  <fpizlo@apple.com>
 
         ScriptDebugServer::didExecuteProgram should not try to pop stack if there is no stack to pop
index 909614f..04363cc 100644 (file)
@@ -23,7 +23,8 @@
 namespace WebCore {
 
 GraphicsLayerTransform::GraphicsLayerTransform()
-    : m_flattening(false)
+    : m_anchorPoint(0.5, 0.5, 0)
+    , m_flattening(true)
     , m_dirty(false) // false by default since all default values would be combined as the identity matrix
     , m_childrenDirty(false)
 {