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

Side by Side Diff: Source/core/svg/SVGUseElement.h

Issue 134263003: Followup fixes for bug 332066. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: setTimeout == race with load Created 6 years, 11 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann <zimmermann@kde .org> 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann <zimmermann@kde .org>
3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org>
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 50
51 SVGAnimatedLength* x() const { return m_x.get(); } 51 SVGAnimatedLength* x() const { return m_x.get(); }
52 SVGAnimatedLength* y() const { return m_y.get(); } 52 SVGAnimatedLength* y() const { return m_y.get(); }
53 SVGAnimatedLength* width() const { return m_width.get(); } 53 SVGAnimatedLength* width() const { return m_width.get(); }
54 SVGAnimatedLength* height() const { return m_height.get(); } 54 SVGAnimatedLength* height() const { return m_height.get(); }
55 55
56 private: 56 private:
57 SVGUseElement(Document&, bool wasInsertedByParser); 57 SVGUseElement(Document&, bool wasInsertedByParser);
58 58
59 virtual bool isValid() const OVERRIDE { return SVGTests::isValid(); } 59 virtual bool isValid() const OVERRIDE { return SVGTests::isValid(); }
60 virtual bool isStructurallyExternal() const OVERRIDE { return isExternalURIR eference(hrefCurrentValue(), document()); } 60 virtual bool isStructurallyExternal() const OVERRIDE { return !hrefCurrentVa lue().isNull() && isExternalURIReference(hrefCurrentValue(), document()); }
61
61 virtual bool supportsFocus() const OVERRIDE { return hasFocusEventListeners( ); } 62 virtual bool supportsFocus() const OVERRIDE { return hasFocusEventListeners( ); }
62 63
63 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE; 64 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
64 virtual void removedFrom(ContainerNode*) OVERRIDE; 65 virtual void removedFrom(ContainerNode*) OVERRIDE;
65 virtual void buildPendingResource() OVERRIDE; 66 virtual void buildPendingResource() OVERRIDE;
66 67
67 bool isSupportedAttribute(const QualifiedName&); 68 bool isSupportedAttribute(const QualifiedName&);
68 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR IDE; 69 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR IDE;
69 virtual void svgAttributeChanged(const QualifiedName&) OVERRIDE; 70 virtual void svgAttributeChanged(const QualifiedName&) OVERRIDE;
70 71
71 virtual void attach(const AttachContext& = AttachContext()) OVERRIDE; 72 virtual void attach(const AttachContext& = AttachContext()) OVERRIDE;
72 virtual void willRecalcStyle(StyleRecalcChange) OVERRIDE; 73 virtual void willRecalcStyle(StyleRecalcChange) OVERRIDE;
73 74
74 virtual RenderObject* createRenderer(RenderStyle*) OVERRIDE; 75 virtual RenderObject* createRenderer(RenderStyle*) OVERRIDE;
75 virtual void toClipPath(Path&) OVERRIDE; 76 virtual void toClipPath(Path&) OVERRIDE;
76 77
77 void clearResourceReferences(); 78 void clearResourceReferences();
78 void buildShadowAndInstanceTree(SVGElement* target); 79 void buildShadowAndInstanceTree(SVGElement* target);
79 void detachInstance(); 80 void detachInstance();
80 81
81 virtual bool haveLoadedRequiredResources() OVERRIDE { return m_haveFiredLoad Event; } 82 virtual bool haveLoadedRequiredResources() OVERRIDE { return !isStructurally External() || m_haveFiredLoadEvent; }
82 83
83 virtual void finishParsingChildren() OVERRIDE; 84 virtual void finishParsingChildren() OVERRIDE;
84 virtual bool selfHasRelativeLengths() const OVERRIDE; 85 virtual bool selfHasRelativeLengths() const OVERRIDE;
85 86
86 // Instance tree handling 87 // Instance tree handling
87 void buildInstanceTree(SVGElement* target, SVGElementInstance* targetInstanc e, bool& foundCycle, bool foundUse); 88 void buildInstanceTree(SVGElement* target, SVGElementInstance* targetInstanc e, bool& foundCycle, bool foundUse);
88 bool hasCycleUseReferencing(SVGUseElement*, SVGElementInstance* targetInstan ce, SVGElement*& newTarget); 89 bool hasCycleUseReferencing(SVGUseElement*, SVGElementInstance* targetInstan ce, SVGElement*& newTarget);
89 90
90 // Shadow tree handling 91 // Shadow tree handling
91 void buildShadowTree(SVGElement* target, SVGElementInstance* targetInstance) ; 92 void buildShadowTree(SVGElement* target, SVGElementInstance* targetInstance) ;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 RefPtr<SVGElementInstance> m_targetElementInstance; 124 RefPtr<SVGElementInstance> m_targetElementInstance;
124 ResourcePtr<DocumentResource> m_resource; 125 ResourcePtr<DocumentResource> m_resource;
125 Timer<SVGElement> m_svgLoadEventTimer; 126 Timer<SVGElement> m_svgLoadEventTimer;
126 }; 127 };
127 128
128 DEFINE_NODE_TYPE_CASTS(SVGUseElement, hasTagName(SVGNames::useTag)); 129 DEFINE_NODE_TYPE_CASTS(SVGUseElement, hasTagName(SVGNames::useTag));
129 130
130 } 131 }
131 132
132 #endif 133 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698