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

Unified Diff: third_party/WebKit/Source/platform/graphics/paint/ClipPaintPropertyNode.h

Issue 2161523002: Isolation of subtrees of stacking contexts and out-of-flow positioned objects (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@CachePaintProperties
Patch Set: - Created 4 years, 5 months 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/graphics/paint/ClipPaintPropertyNode.h
diff --git a/third_party/WebKit/Source/platform/graphics/paint/ClipPaintPropertyNode.h b/third_party/WebKit/Source/platform/graphics/paint/ClipPaintPropertyNode.h
index 40ed0288c79385d38478fc9005edd95ec2b204ef..fcb37652cb8ff74be3b9ba097eb3a3c42a47d0ef 100644
--- a/third_party/WebKit/Source/platform/graphics/paint/ClipPaintPropertyNode.h
+++ b/third_party/WebKit/Source/platform/graphics/paint/ClipPaintPropertyNode.h
@@ -7,10 +7,8 @@
#include "platform/PlatformExport.h"
#include "platform/geometry/FloatRoundedRect.h"
+#include "platform/geometry/LayoutRect.h"
#include "platform/graphics/paint/TransformPaintPropertyNode.h"
-#include "wtf/PassRefPtr.h"
-#include "wtf/RefCounted.h"
-#include "wtf/RefPtr.h"
#include <iosfwd>
@@ -19,7 +17,7 @@ namespace blink {
// A clip rect created by a css property such as "overflow" or "clip".
// Along with a refernce to the transform space the clip rect is based on,
// and an (optional) parent ClipPaintPropertyNode for inherited clips.
-class PLATFORM_EXPORT ClipPaintPropertyNode : public RefCounted<ClipPaintPropertyNode> {
+class PLATFORM_EXPORT ClipPaintPropertyNode : public PaintPropertyNode<ClipPaintPropertyNode> {
public:
using Value = FloatRoundedRect;
@@ -41,12 +39,6 @@ public:
const Value& value() const { return m_clipRect; }
const FloatRoundedRect& clipRect() const { return m_clipRect; }
- // Reference to inherited clips, or nullptr if this is the only clip.
- const ClipPaintPropertyNode* parent() const { return m_parent.get(); }
-
- // Moves this node and its subtrees under another parent.
- void setParent(PassRefPtr<ClipPaintPropertyNode> parent) { m_parent = parent; }
-
// This is separate from the create() method for child node for two purposes:
// 1. to let the method have the same parameter list as the method of other paint
// property node classes, so that they can be used in the same template;
@@ -55,11 +47,10 @@ public:
private:
ClipPaintPropertyNode(PassRefPtr<TransformPaintPropertyNode> localTransformSpace, const FloatRoundedRect& clipRect, PassRefPtr<ClipPaintPropertyNode> parent)
- : m_localTransformSpace(localTransformSpace), m_clipRect(clipRect), m_parent(parent) { }
+ : PaintPropertyNode(parent), m_localTransformSpace(localTransformSpace), m_clipRect(clipRect) { }
RefPtr<TransformPaintPropertyNode> m_localTransformSpace;
const FloatRoundedRect m_clipRect;
- RefPtr<ClipPaintPropertyNode> m_parent;
};
// Redeclared here to avoid ODR issues.

Powered by Google App Engine
This is Rietveld 408576698