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

Unified Diff: third_party/WebKit/Source/core/svg/SVGURIReference.h

Issue 2737653006: Add a new mechanism for watching SVGElement 'href' targets (Closed)
Patch Set: Created 3 years, 9 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: third_party/WebKit/Source/core/svg/SVGURIReference.h
diff --git a/third_party/WebKit/Source/core/svg/SVGURIReference.h b/third_party/WebKit/Source/core/svg/SVGURIReference.h
index e90c7818587376b09d5c25f87d730ef16a9594fa..83887b19f24da6065d69b687139e694e84b0a20f 100644
--- a/third_party/WebKit/Source/core/svg/SVGURIReference.h
+++ b/third_party/WebKit/Source/core/svg/SVGURIReference.h
@@ -21,14 +21,17 @@
#ifndef SVGURIReference_h
#define SVGURIReference_h
+#include <memory>
#include "core/CoreExport.h"
#include "core/dom/Document.h"
#include "core/svg/SVGAnimatedHref.h"
#include "platform/heap/Handle.h"
+#include "wtf/Functional.h"
namespace blink {
class Element;
+class IdTargetObserver;
class CORE_EXPORT SVGURIReference : public GarbageCollectedMixin {
public:
@@ -53,6 +56,14 @@ class CORE_EXPORT SVGURIReference : public GarbageCollectedMixin {
const String& hrefString() const { return m_href->currentValue()->value(); }
+ // Create an 'id' observer for the href associated with this SVGURIReference
+ // and its corresponding SVGElement (which should be passed as
+ // |contextElement|.) Will call buildPendingResource() on |contextElement|
+ // when changes to the 'id' are noticed.
+ Element* observeTarget(Member<IdTargetObserver>&, SVGElement&);
+ // Unregister and destroy the observer.
+ static void unobserveTarget(Member<IdTargetObserver>&);
+
// JS API
SVGAnimatedHref* href() const { return m_href.get(); }
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGTextPathElement.cpp ('k') | third_party/WebKit/Source/core/svg/SVGURIReference.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698