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

Unified Diff: Source/core/rendering/RenderLayer.h

Issue 423823004: Add support for SVG Clip paths in HTML (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Try to correct A+ mode Created 6 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: Source/core/rendering/RenderLayer.h
diff --git a/Source/core/rendering/RenderLayer.h b/Source/core/rendering/RenderLayer.h
index 5871a502fb9036b79b1d2b1bb0f9a6679b22da5e..29f7262bd862c5096f631565f70319d24e22aced 100644
--- a/Source/core/rendering/RenderLayer.h
+++ b/Source/core/rendering/RenderLayer.h
@@ -49,6 +49,7 @@
#include "core/rendering/LayerPaintingInfo.h"
#include "core/rendering/RenderBox.h"
#include "core/rendering/RenderLayerBlendInfo.h"
+#include "core/rendering/RenderLayerClipPathInfo.h"
#include "core/rendering/RenderLayerClipper.h"
#include "core/rendering/RenderLayerFilterInfo.h"
#include "core/rendering/RenderLayerReflectionInfo.h"
@@ -385,6 +386,33 @@ public:
void updateFilters(const RenderStyle* oldStyle, const RenderStyle* newStyle);
+ bool hasClipPath() const
+ {
+ return renderer()->hasClipPath();
+ }
+ bool hasClipPathInfo() const
+ {
+ return m_hasClipPathInfo;
+ }
+ void setHasClipPathInfo(bool hasClipPathInfo)
+ {
+ m_hasClipPathInfo = hasClipPathInfo;
+ }
+ void updateClipPath(const RenderStyle* oldStyle, const RenderStyle* newStyle);
+ void removeClipPathInfoIfNeeded()
+ {
+ if (hasClipPathInfo())
+ RenderLayerClipPathInfo::removeClipPathInfoForRenderLayer(this);
+ }
+ RenderLayerClipPathInfo* clipPathInfo() const
+ {
+ return hasClipPathInfo() ? RenderLayerClipPathInfo::clipPathInfoForRenderLayer(this) : 0;
+ }
+ RenderLayerClipPathInfo* ensureClipPathInfo()
+ {
+ return RenderLayerClipPathInfo::createClipPathInfoForRenderLayerIfNeeded(this);
+ }
+
Node* enclosingElement() const;
bool isInTopLayer() const;
@@ -659,6 +687,7 @@ private:
bool update3DTransformedDescendantStatus();
void updateOrRemoveFilterClients();
+ void updateOrRemoveClipPathClients();
LayoutRect paintingExtent(const RenderLayer* rootLayer, const LayoutRect& paintDirtyRect, const LayoutSize& subPixelAccumulation, PaintBehavior);
@@ -702,6 +731,7 @@ private:
unsigned m_containsDirtyOverlayScrollbars : 1;
unsigned m_hasFilterInfo : 1;
+ unsigned m_hasClipPathInfo : 1;
unsigned m_needsAncestorDependentCompositingInputsUpdate : 1;
unsigned m_needsDescendantDependentCompositingInputsUpdate : 1;
unsigned m_childNeedsCompositingInputsUpdate : 1;

Powered by Google App Engine
This is Rietveld 408576698