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

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

Issue 1318963006: Add a UseCounter for clip CSS or -webkit-clip-path that clips positioned descendants. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
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/html/HTMLCanvasElement.cpp ('k') | Source/core/paint/DeprecatedPaintLayerClipper.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/ClipRect.h
diff --git a/Source/core/layout/ClipRect.h b/Source/core/layout/ClipRect.h
index e04690d9cfa25df26a80c78f99fbd9f591fe46e8..347e336ad2110f78a93c2dd920a46ce156ae8a8c 100644
--- a/Source/core/layout/ClipRect.h
+++ b/Source/core/layout/ClipRect.h
@@ -38,11 +38,13 @@ class ClipRect {
public:
ClipRect()
: m_hasRadius(false)
+ , m_isClippedByClipCss(false)
{ }
ClipRect(const LayoutRect& rect)
: m_rect(rect)
, m_hasRadius(false)
+ , m_isClippedByClipCss(false)
{ }
const LayoutRect& rect() const { return m_rect; }
@@ -68,9 +70,14 @@ public:
bool isEmpty() const { return m_rect.isEmpty(); }
bool intersects(const HitTestLocation&) const;
+ // These have no semantic use. They are used for use-counting.
+ bool isClippedByClipCss() const { return m_isClippedByClipCss; }
+ ClipRect& setIsClippedByClipCss() { m_isClippedByClipCss = true; return *this; }
+
private:
LayoutRect m_rect;
bool m_hasRadius;
+ bool m_isClippedByClipCss;
};
inline ClipRect intersection(const ClipRect& a, const ClipRect& b)
« no previous file with comments | « Source/core/html/HTMLCanvasElement.cpp ('k') | Source/core/paint/DeprecatedPaintLayerClipper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698