We should dump GraphicsLayer's anchorPoint z component
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 16 Apr 2015 05:59:18 +0000 (05:59 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 16 Apr 2015 05:59:18 +0000 (05:59 +0000)
https://bugs.webkit.org/show_bug.cgi?id=143815

Reviewed by Tim Horton.

We didn't include the z component of a layer's anchor point when dumping.
Dump if it's non-zero (to avoid having to change lots of test output).
No test with non-zero z appears to dump layers.

* platform/graphics/GraphicsLayer.cpp:
(WebCore::GraphicsLayer::dumpProperties):
* rendering/style/RenderStyle.cpp:
(WebCore::requireTransformOrigin): Remove a FIXME which, on further consideration,
is wrong.

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

Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/GraphicsLayer.cpp
Source/WebCore/rendering/style/RenderStyle.cpp

index f3ad12b..804e319 100644 (file)
@@ -1,3 +1,20 @@
+2015-04-15  Simon Fraser  <simon.fraser@apple.com>
+
+        We should dump GraphicsLayer's anchorPoint z component
+        https://bugs.webkit.org/show_bug.cgi?id=143815
+
+        Reviewed by Tim Horton.
+
+        We didn't include the z component of a layer's anchor point when dumping.
+        Dump if it's non-zero (to avoid having to change lots of test output).
+        No test with non-zero z appears to dump layers.
+
+        * platform/graphics/GraphicsLayer.cpp:
+        (WebCore::GraphicsLayer::dumpProperties):
+        * rendering/style/RenderStyle.cpp:
+        (WebCore::requireTransformOrigin): Remove a FIXME which, on further consideration,
+        is wrong.
+
 2015-04-15  Brent Fulgham  <bfulgham@apple.com>
 
         [Mac] Disable "Save to Downloads" option for local files
index 66c41f3..b83ff2b 100644 (file)
@@ -691,7 +691,10 @@ void GraphicsLayer::dumpProperties(TextStream& ts, int indent, LayerTreeAsTextBe
 
     if (m_anchorPoint != FloatPoint3D(0.5f, 0.5f, 0)) {
         writeIndent(ts, indent + 1);
-        ts << "(anchor " << m_anchorPoint.x() << " " << m_anchorPoint.y() << ")\n";
+        ts << "(anchor " << m_anchorPoint.x() << " " << m_anchorPoint.y();
+        if (m_anchorPoint.z())
+            ts << " " << m_anchorPoint.z();
+        ts << ")\n";
     }
 
     if (m_size != IntSize()) {
index 958ff02..2f62049 100644 (file)
@@ -1013,7 +1013,7 @@ static inline bool requireTransformOrigin(const Vector<RefPtr<TransformOperation
         if (type != TransformOperation::TRANSLATE_X
             && type != TransformOperation::TRANSLATE_Y
             && type != TransformOperation::TRANSLATE 
-            && type != TransformOperation::TRANSLATE_Z // FIXME: doesn't this depend on transform origin?
+            && type != TransformOperation::TRANSLATE_Z
             && type != TransformOperation::TRANSLATE_3D)
             return true;
     }