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

Unified Diff: Source/core/svg/SVGFontFaceElement.h

Issue 216563002: [SVG Fonts] Fix <font-face> element leak document (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebased Created 6 years, 8 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/svg/SVGFontData.cpp ('k') | Source/core/svg/SVGFontFaceElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGFontFaceElement.h
diff --git a/Source/core/svg/SVGFontFaceElement.h b/Source/core/svg/SVGFontFaceElement.h
index 8690053172dedae30c5c447fc71fef146c76204e..21f70b6c03b4017c389994ac0ce5ee875a4e50b3 100644
--- a/Source/core/svg/SVGFontFaceElement.h
+++ b/Source/core/svg/SVGFontFaceElement.h
@@ -25,10 +25,12 @@
#if ENABLE(SVG_FONTS)
#include "SVGNames.h"
#include "core/svg/SVGElement.h"
+#include "wtf/WeakPtr.h"
namespace WebCore {
class SVGFontElement;
+class SVGFontData;
class StyleRuleFontFace;
class SVGFontFaceElement FINAL : public SVGElement {
@@ -51,6 +53,7 @@ public:
void rebuildFontFace();
StyleRuleFontFace* fontFaceRule() const { return m_fontFaceRule.get(); }
+ WeakPtr<SVGFontFaceElement> createWeakRef() { return m_weakFactory.createWeakPtr(); }
private:
explicit SVGFontFaceElement(Document&);
@@ -65,6 +68,7 @@ private:
RefPtrWillBePersistent<StyleRuleFontFace> m_fontFaceRule;
SVGFontElement* m_fontElement;
+ WeakPtrFactory<SVGFontFaceElement> m_weakFactory;
};
} // namespace WebCore
« no previous file with comments | « Source/core/svg/SVGFontData.cpp ('k') | Source/core/svg/SVGFontFaceElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698