Changeset 107523 in webkit
- Timestamp:
- Feb 12, 2012 7:35:19 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r107519 r107523 1 2012-02-12 Shinya Kawanaka <shinyak@google.com> 2 3 SVGTRefElement shouldn't create a shadow root dynamically. 4 https://bugs.webkit.org/show_bug.cgi?id=77938 5 6 Reviewed by Hajime Morita. 7 8 Checks a shadow root exists of tref element in cases xlink:href is set and is not set. 9 10 * svg/custom/tref-shadowdom-expected.txt: Added. 11 * svg/custom/tref-shadowdom.html: Added. 12 1 13 2012-02-12 Abhishek Arya <inferno@chromium.org> 2 14 -
trunk/Source/WebCore/ChangeLog
r107520 r107523 1 2012-02-12 Shinya Kawanaka <shinyak@google.com> 2 3 SVGTRefElement shouldn't create a shadow root dynamically. 4 https://bugs.webkit.org/show_bug.cgi?id=77938 5 6 Reviewed by Hajime Morita. 7 8 SVGTRefElement creates a shadow root dynamically. This will cause a problem to support 9 multiple shadow subtrees. So it should be created in a constructor phase. 10 11 Test: svg/custom/tref-shadowdom.html 12 13 * svg/SVGTRefElement.cpp: 14 (WebCore::SVGTRefElement::create): 15 (WebCore::SVGTRefElement::createShadowSubtree): 16 (WebCore): 17 (WebCore::SVGTRefElement::updateReferencedText): 18 * svg/SVGTRefElement.h: 19 (SVGTRefElement): 20 1 21 2012-02-12 Kentaro Hara <haraken@chromium.org> 2 22 -
trunk/Source/WebCore/svg/SVGTRefElement.cpp
r106769 r107523 57 57 PassRefPtr<SVGTRefElement> SVGTRefElement::create(const QualifiedName& tagName, Document* document) 58 58 { 59 return adoptRef(new SVGTRefElement(tagName, document)); 59 RefPtr<SVGTRefElement> element = adoptRef(new SVGTRefElement(tagName, document)); 60 element->createShadowSubtree(); 61 return element.release(); 60 62 } 61 63 … … 145 147 } 146 148 149 void SVGTRefElement::createShadowSubtree() 150 { 151 ShadowRoot::create(this, ShadowRoot::CreatingUserAgentShadowRoot, ASSERT_NO_EXCEPTION); 152 } 153 147 154 void SVGTRefElement::updateReferencedText() 148 155 { … … 152 159 if (target->parentNode()) 153 160 textContent = target->textContent(); 154 ExceptionCode ignore = 0; 155 if (! ensureShadowRoot()->firstChild())156 shadowRoot()->appendChild(SVGShadowText::create(document(), textContent), ignore);161 162 if (!shadowRoot()->firstChild()) 163 shadowRoot()->appendChild(SVGShadowText::create(document(), textContent), ASSERT_NO_EXCEPTION); 157 164 else 158 shadowRoot()->firstChild()->setTextContent(textContent, ignore);165 shadowRoot()->firstChild()->setTextContent(textContent, ASSERT_NO_EXCEPTION); 159 166 } 160 167 -
trunk/Source/WebCore/svg/SVGTRefElement.h
r106769 r107523 41 41 virtual ~SVGTRefElement(); 42 42 43 void createShadowSubtree(); 44 43 45 bool isSupportedAttribute(const QualifiedName&); 44 46 virtual void parseAttribute(Attribute*) OVERRIDE;
Note: See TracChangeset
for help on using the changeset viewer.