Changeset 122389 in webkit
- Timestamp:
- Jul 11, 2012 5:05:12 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r122383 r122389 1 2012-07-11 Shinya Kawanaka <shinyak@chromium.org> 2 3 SVGUseElement should not use Element::ensureShadowRoot(). 4 https://bugs.webkit.org/show_bug.cgi?id=90938 5 6 Reviewed by Hajime Morita. 7 8 We would like to remove Element::ensureShadowRoot() because we would like to stabilize the lifecycle of Shadow DOM. 9 This patch rewrites SVGUseElement::create() not to use Element::ensureShadowRoot(). Since our convention to create 10 a shadow subtree is to create a method createShadowSubtree(), I obeyed it. 11 12 No new tests. Simple refactoring. 13 14 * svg/SVGUseElement.cpp: 15 (WebCore::SVGUseElement::create): 16 (WebCore::SVGUseElement::createShadowSubtree): 17 (WebCore): 18 * svg/SVGUseElement.h: 19 (SVGUseElement): 20 1 21 2012-07-11 Alexandre Elias <aelias@google.com> 2 22 -
trunk/Source/WebCore/svg/SVGUseElement.cpp
r120951 r122389 100 100 // Always build a #shadow-root for SVGUseElement. 101 101 RefPtr<SVGUseElement> use = adoptRef(new SVGUseElement(tagName, document, wasInsertedByParser)); 102 use-> ensureShadowRoot();102 use->createShadowSubtree(); 103 103 return use.release(); 104 104 } … … 108 108 if (m_cachedDocument) 109 109 m_cachedDocument->removeClient(this); 110 } 111 112 void SVGUseElement::createShadowSubtree() 113 { 114 ASSERT(!shadow()); 115 ShadowRoot::create(this, ShadowRoot::UserAgentShadowRoot); 110 116 } 111 117 -
trunk/Source/WebCore/svg/SVGUseElement.h
r118192 r122389 56 56 private: 57 57 SVGUseElement(const QualifiedName&, Document*, bool wasInsertedByParser); 58 59 void createShadowSubtree(); 58 60 59 61 virtual bool isValid() const { return SVGTests::isValid(); }
Note: See TracChangeset
for help on using the changeset viewer.