Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(99)

Side by Side Diff: third_party/WebKit/Source/platform/graphics/paint/TransformPaintPropertyNode.h

Issue 2574713003: Add toString() for paint property node classes (Closed)
Patch Set: Update test Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef TransformPaintPropertyNode_h 5 #ifndef TransformPaintPropertyNode_h
6 #define TransformPaintPropertyNode_h 6 #define TransformPaintPropertyNode_h
7 7
8 #include "platform/PlatformExport.h" 8 #include "platform/PlatformExport.h"
9 #include "platform/geometry/FloatPoint3D.h" 9 #include "platform/geometry/FloatPoint3D.h"
10 #include "platform/transforms/TransformationMatrix.h" 10 #include "platform/transforms/TransformationMatrix.h"
11 #include "wtf/PassRefPtr.h" 11 #include "wtf/PassRefPtr.h"
12 #include "wtf/RefCounted.h" 12 #include "wtf/RefCounted.h"
13 #include "wtf/RefPtr.h" 13 #include "wtf/RefPtr.h"
14 #include "wtf/text/WTFString.h"
14 15
15 #include <iosfwd> 16 #include <iosfwd>
16 17
17 namespace blink { 18 namespace blink {
18 19
19 // A transform created by a css property such as "transform" or "perspective" 20 // A transform created by a css property such as "transform" or "perspective"
20 // along with a reference to the parent TransformPaintPropertyNode. 21 // along with a reference to the parent TransformPaintPropertyNode.
21 // 22 //
22 // The transform tree is rooted at a node with no parent. This root node should 23 // The transform tree is rooted at a node with no parent. This root node should
23 // not be modified. 24 // not be modified.
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 // The equality operator is used by FindPropertiesNeedingUpdate.h for checking 84 // The equality operator is used by FindPropertiesNeedingUpdate.h for checking
84 // if a transform node has changed. 85 // if a transform node has changed.
85 bool operator==(const TransformPaintPropertyNode& o) const { 86 bool operator==(const TransformPaintPropertyNode& o) const {
86 return m_matrix == o.m_matrix && m_origin == o.m_origin && 87 return m_matrix == o.m_matrix && m_origin == o.m_origin &&
87 m_parent == o.m_parent && 88 m_parent == o.m_parent &&
88 m_flattensInheritedTransform == o.m_flattensInheritedTransform && 89 m_flattensInheritedTransform == o.m_flattensInheritedTransform &&
89 m_renderingContextID == o.m_renderingContextID; 90 m_renderingContextID == o.m_renderingContextID;
90 } 91 }
91 #endif 92 #endif
92 93
94 String toString() const;
95
93 private: 96 private:
94 TransformPaintPropertyNode( 97 TransformPaintPropertyNode(
95 const TransformationMatrix& matrix, 98 const TransformationMatrix& matrix,
96 const FloatPoint3D& origin, 99 const FloatPoint3D& origin,
97 PassRefPtr<const TransformPaintPropertyNode> parent, 100 PassRefPtr<const TransformPaintPropertyNode> parent,
98 bool flattensInheritedTransform, 101 bool flattensInheritedTransform,
99 unsigned renderingContextID) 102 unsigned renderingContextID)
100 : m_matrix(matrix), 103 : m_matrix(matrix),
101 m_origin(origin), 104 m_origin(origin),
102 m_parent(parent), 105 m_parent(parent),
103 m_flattensInheritedTransform(flattensInheritedTransform), 106 m_flattensInheritedTransform(flattensInheritedTransform),
104 m_renderingContextID(renderingContextID) {} 107 m_renderingContextID(renderingContextID) {}
105 108
106 TransformationMatrix m_matrix; 109 TransformationMatrix m_matrix;
107 FloatPoint3D m_origin; 110 FloatPoint3D m_origin;
108 RefPtr<const TransformPaintPropertyNode> m_parent; 111 RefPtr<const TransformPaintPropertyNode> m_parent;
109 bool m_flattensInheritedTransform; 112 bool m_flattensInheritedTransform;
110 unsigned m_renderingContextID; 113 unsigned m_renderingContextID;
111 }; 114 };
112 115
113 // Redeclared here to avoid ODR issues. 116 // Redeclared here to avoid ODR issues.
114 // See platform/testing/PaintPrinters.h. 117 // See platform/testing/PaintPrinters.h.
115 void PrintTo(const TransformPaintPropertyNode&, std::ostream*); 118 void PrintTo(const TransformPaintPropertyNode&, std::ostream*);
116 119
117 } // namespace blink 120 } // namespace blink
118 121
119 #endif // TransformPaintPropertyNode_h 122 #endif // TransformPaintPropertyNode_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698