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

Unified Diff: Source/core/svg/SVGClipPathElement.cpp

Issue 423823004: Add support for SVG Clip paths in HTML (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Removed unwanted code from RenderLayerClipPathInfo.* and Renderlayer.cpp and Renamed filters to svg… 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/svg/SVGClipPathElement.cpp
diff --git a/Source/core/svg/SVGClipPathElement.cpp b/Source/core/svg/SVGClipPathElement.cpp
index 4de9d37af7a77d7f5b95606563cd4b34c9f1efb8..3daef1d0834af3a9ce4a1a36e97f789552794b2c 100644
--- a/Source/core/svg/SVGClipPathElement.cpp
+++ b/Source/core/svg/SVGClipPathElement.cpp
@@ -90,7 +90,26 @@ void SVGClipPathElement::childrenChanged(const ChildrenChange& change)
RenderObject* SVGClipPathElement::createRenderer(RenderStyle*)
{
- return new RenderSVGResourceClipper(this);
+ RenderSVGResourceClipper* renderer = new RenderSVGResourceClipper(this);
+
+ WillBeHeapHashSet<RefPtrWillBeMember<Node> >::iterator layerEnd = m_clientsToAdd.end();
+ for (WillBeHeapHashSet<RefPtrWillBeMember<Node> >::iterator it = m_clientsToAdd.begin(); it != layerEnd; ++it)
+ renderer->addClientRenderLayer(it->get());
+ m_clientsToAdd.clear();
+
+ return renderer;
+}
+
+void SVGClipPathElement::addClient(Node* client)
+{
+ ASSERT(client);
+ m_clientsToAdd.add(client);
+}
+
+void SVGClipPathElement::removeClient(Node* client)
+{
+ ASSERT(client);
+ m_clientsToAdd.remove(client);
}
}
« Source/core/svg/SVGClipPathElement.h ('K') | « Source/core/svg/SVGClipPathElement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698