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

Unified Diff: Source/core/rendering/RenderLayerClipPathInfo.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/RenderLayerClipPathInfo.h
diff --git a/Source/bindings/core/v8/custom/V8CustomXPathNSResolver.h b/Source/core/rendering/RenderLayerClipPathInfo.h
similarity index 61%
copy from Source/bindings/core/v8/custom/V8CustomXPathNSResolver.h
copy to Source/core/rendering/RenderLayerClipPathInfo.h
index 8f770d8a62497fdf48566293fc2ae873f7143fad..310d6ee946101aefad105b83940668579752052f 100644
--- a/Source/bindings/core/v8/custom/V8CustomXPathNSResolver.h
+++ b/Source/core/rendering/RenderLayerClipPathInfo.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009 Google Inc. All rights reserved.
+ * Copyright (c) 2014, Google Inc. All rights reserved.
pdr. 2014/07/28 16:23:52 Lets just leave this how it was instead of updatin
f(malita) 2014/07/29 01:21:16 This header is new, should be using the updated li
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -28,35 +28,41 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#ifndef RenderLayerClipPathInfo_h
+#define RenderLayerClipPathInfo_h
-#ifndef V8CustomXPathNSResolver_h
-#define V8CustomXPathNSResolver_h
-
-#include "core/xml/XPathNSResolver.h"
-#include "wtf/Forward.h"
+#include "core/dom/Element.h"
Stephen White 2014/07/29 15:26:18 Nit: this #include is unnecessary (you'll get it v
Shanmuga Pandi 2014/08/01 05:20:39 Done.
+#include "core/fetch/DocumentResource.h"
+#include "core/rendering/ClipPathOperation.h"
Stephen White 2014/07/29 15:26:18 Looks like you could forward-declare ClipPathOpera
Shanmuga Pandi 2014/08/01 05:20:39 Done.
+#include "core/svg/SVGClipPathElement.h"
#include "wtf/RefPtr.h"
-#include <v8.h>
namespace blink {
-// V8CustomXPathNSResolver does not create a persistent handle to the
-// given resolver object. So the lifetime of V8CustomXPathNSResolver
-// must not exceed the lifetime of the passed handle.
-class V8CustomXPathNSResolver FINAL : public XPathNSResolver {
-public:
- static PassRefPtrWillBeRawPtr<V8CustomXPathNSResolver> create(v8::Handle<v8::Object> resolver, v8::Isolate*);
+class RenderLayer;
+class RenderLayerClipPathInfo;
- virtual AtomicString lookupNamespaceURI(const String& prefix) OVERRIDE;
+typedef HashMap<const RenderLayer*, RenderLayerClipPathInfo*> RenderLayerClipPathInfoMap;
- virtual void trace(Visitor*) OVERRIDE;
+class RenderLayerClipPathInfo FINAL : public DocumentResourceClient {
+public:
+ static RenderLayerClipPathInfo* clipPathInfoForRenderLayer(const RenderLayer*);
+ static RenderLayerClipPathInfo* createClipPathInfoForRenderLayerIfNeeded(RenderLayer*);
+ static void removeClipPathInfoForRenderLayer(RenderLayer*);
+
+ void updateReferenceClipPathClients(ClipPathOperation*);
+ void removeReferenceClipPathClients();
private:
- V8CustomXPathNSResolver(v8::Handle<v8::Object> resolver, v8::Isolate*);
+ RenderLayerClipPathInfo(RenderLayer*);
+ virtual ~RenderLayerClipPathInfo();
+
+ RenderLayer* m_layer;
- v8::Handle<v8::Object> m_resolver; // Handle to resolver object.
- v8::Isolate* m_isolate;
+ static RenderLayerClipPathInfoMap* s_clipPathMap;
+ RefPtr<SVGClipPathElement> m_clipPathElement;
};
} // namespace blink
-#endif // V8CustomXPathNSResolver_h
+#endif // RenderLayerClipPathInfo_h

Powered by Google App Engine
This is Rietveld 408576698