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

Unified Diff: Source/core/layout/ClipRects.h

Issue 1307203004: Revert "Reworks the clipping logic" and follow-up. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 3 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
« no previous file with comments | « Source/core/layout/ClipRect.h ('k') | Source/core/layout/ClipRectsCache.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/ClipRects.h
diff --git a/Source/core/layout/ClipRects.h b/Source/core/layout/ClipRects.h
index d53b1f5fe0a3fd0db4701526ddf8a9546bf6155f..7086aef68e23c3fc768e4ece94e36625f6530132 100644
--- a/Source/core/layout/ClipRects.h
+++ b/Source/core/layout/ClipRects.h
@@ -31,15 +31,20 @@
namespace blink {
-class DeprecatedPaintLayer;
-
-class ClipRects {
+class ClipRects : public RefCounted<ClipRects> {
WTF_MAKE_FAST_ALLOCATED(ClipRects);
public:
+ static PassRefPtr<ClipRects> create()
+ {
+ return adoptRef(new ClipRects);
+ }
+ static PassRefPtr<ClipRects> create(const ClipRects& other)
+ {
+ return adoptRef(new ClipRects(other));
+ }
ClipRects()
- : m_rootLayer(nullptr)
- , m_fixed(0)
+ : m_fixed(0)
{
}
@@ -77,24 +82,12 @@ public:
m_fixedClipRect = other.fixedClipRect();
m_posClipRect = other.posClipRect();
m_fixed = other.fixed();
- m_rootLayer = other.m_rootLayer;
return *this;
}
- void setRootLayer(const DeprecatedPaintLayer* layer)
- {
- m_rootLayer = layer;
- }
-
- const DeprecatedPaintLayer* rootLayer()
- {
- return m_rootLayer;
- }
-
private:
ClipRects(const LayoutRect& r)
- : m_rootLayer(nullptr)
- , m_overflowClipRect(r)
+ : m_overflowClipRect(r)
, m_fixedClipRect(r)
, m_posClipRect(r)
, m_fixed(0)
@@ -102,18 +95,13 @@ private:
}
ClipRects(const ClipRects& other)
- : m_rootLayer(other.m_rootLayer)
- , m_overflowClipRect(other.overflowClipRect())
+ : m_overflowClipRect(other.overflowClipRect())
, m_fixedClipRect(other.fixedClipRect())
, m_posClipRect(other.posClipRect())
, m_fixed(other.fixed())
{
}
- // ClipRects are accumulated relative to this layer. Its clips and the clips
- // of its descendents are intersected down to the layer being calculated. It
- // also determines the coordinate space of the clips.
- const DeprecatedPaintLayer* m_rootLayer;
ClipRect m_overflowClipRect;
ClipRect m_fixedClipRect;
ClipRect m_posClipRect;
« no previous file with comments | « Source/core/layout/ClipRect.h ('k') | Source/core/layout/ClipRectsCache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698