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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/paint/ClipPaintPropertyNode.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 ClipPaintPropertyNode_h 5 #ifndef ClipPaintPropertyNode_h
6 #define ClipPaintPropertyNode_h 6 #define ClipPaintPropertyNode_h
7 7
8 #include "platform/PlatformExport.h" 8 #include "platform/PlatformExport.h"
9 #include "platform/geometry/FloatRoundedRect.h" 9 #include "platform/geometry/FloatRoundedRect.h"
10 #include "platform/graphics/paint/TransformPaintPropertyNode.h" 10 #include "platform/graphics/paint/TransformPaintPropertyNode.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 clip rect created by a css property such as "overflow" or "clip". 20 // A clip rect created by a css property such as "overflow" or "clip".
20 // Along with a reference to the transform space the clip rect is based on, 21 // Along with a reference to the transform space the clip rect is based on,
21 // and a parent ClipPaintPropertyNode for inherited clips. 22 // and a parent ClipPaintPropertyNode for inherited clips.
22 // 23 //
23 // The clip tree is rooted at a node with no parent. This root node should 24 // The clip tree is rooted at a node with no parent. This root node should
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 65
65 // The equality operator is used by FindPropertiesNeedingUpdate.h for checking 66 // The equality operator is used by FindPropertiesNeedingUpdate.h for checking
66 // if a clip node has changed. 67 // if a clip node has changed.
67 bool operator==(const ClipPaintPropertyNode& o) const { 68 bool operator==(const ClipPaintPropertyNode& o) const {
68 return m_parent == o.m_parent && 69 return m_parent == o.m_parent &&
69 m_localTransformSpace == o.m_localTransformSpace && 70 m_localTransformSpace == o.m_localTransformSpace &&
70 m_clipRect == o.m_clipRect; 71 m_clipRect == o.m_clipRect;
71 } 72 }
72 #endif 73 #endif
73 74
75 String toString() const;
76
74 private: 77 private:
75 ClipPaintPropertyNode( 78 ClipPaintPropertyNode(
76 PassRefPtr<const ClipPaintPropertyNode> parent, 79 PassRefPtr<const ClipPaintPropertyNode> parent,
77 PassRefPtr<const TransformPaintPropertyNode> localTransformSpace, 80 PassRefPtr<const TransformPaintPropertyNode> localTransformSpace,
78 const FloatRoundedRect& clipRect) 81 const FloatRoundedRect& clipRect)
79 : m_parent(parent), 82 : m_parent(parent),
80 m_localTransformSpace(localTransformSpace), 83 m_localTransformSpace(localTransformSpace),
81 m_clipRect(clipRect) {} 84 m_clipRect(clipRect) {}
82 85
83 RefPtr<const ClipPaintPropertyNode> m_parent; 86 RefPtr<const ClipPaintPropertyNode> m_parent;
84 RefPtr<const TransformPaintPropertyNode> m_localTransformSpace; 87 RefPtr<const TransformPaintPropertyNode> m_localTransformSpace;
85 FloatRoundedRect m_clipRect; 88 FloatRoundedRect m_clipRect;
86 }; 89 };
87 90
88 // Redeclared here to avoid ODR issues. 91 // Redeclared here to avoid ODR issues.
89 // See platform/testing/PaintPrinters.h. 92 // See platform/testing/PaintPrinters.h.
90 void PrintTo(const ClipPaintPropertyNode&, std::ostream*); 93 void PrintTo(const ClipPaintPropertyNode&, std::ostream*);
91 94
92 } // namespace blink 95 } // namespace blink
93 96
94 #endif // ClipPaintPropertyNode_h 97 #endif // ClipPaintPropertyNode_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698