Changeset 118002 in webkit
- Timestamp:
- May 22, 2012 10:51:24 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r118001 r118002 1 2012-05-22 Rob Buis <rbuis@rim.com> 2 3 ASSERTs in RenderInline::layout() 4 https://bugs.webkit.org/show_bug.cgi?id=63365 5 6 Reviewed by Nikolas Zimmermann. 7 8 Test text content element children inside elements. 9 10 * svg/custom/disallowed-text-content-rendering-expected.txt: Added. 11 * svg/custom/disallowed-text-content-rendering.svg: Added. 12 1 13 2012-05-22 Takashi Sakamoto <tasak@google.com> 2 14 -
trunk/Source/WebCore/ChangeLog
r118001 r118002 1 2012-05-22 Rob Buis <rbuis@rim.com> 2 3 ASSERTs in RenderInline::layout() 4 https://bugs.webkit.org/show_bug.cgi?id=63365 5 6 Reviewed by Nikolas Zimmermann. 7 8 Do not allow creation of renderers for text content children in elements by default. 9 Subclasses like SVGTextElement override this behavior. 10 This also fixes the <a><textPath</a> case because the <a> parent decides to allow <textPath> or not: 11 http://www.w3.org/2003/01/REC-SVG11-20030114-errata#linking-text-environment 12 13 Test: svg/custom/disallowed-text-content-rendering.svg 14 15 * svg/SVGElement.cpp: 16 (WebCore::SVGElement::childShouldCreateRenderer): 17 * svg/SVGElement.h: 18 (SVGElement): 19 1 20 2012-05-22 Takashi Sakamoto <tasak@google.com> 2 21 -
trunk/Source/WebCore/svg/SVGElement.cpp
r117242 r118002 496 496 bool SVGElement::childShouldCreateRenderer(const NodeRenderingContext& childContext) const 497 497 { 498 if (childContext.node()->isSVGElement()) 498 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, invalidTextContent, ()); 499 500 if (invalidTextContent.isEmpty()) { 501 invalidTextContent.add(SVGNames::textPathTag); 502 #if ENABLE(SVG_FONTS) 503 invalidTextContent.add(SVGNames::altGlyphTag); 504 #endif 505 invalidTextContent.add(SVGNames::trefTag); 506 invalidTextContent.add(SVGNames::tspanTag); 507 } 508 if (childContext.node()->isSVGElement()) { 509 if (invalidTextContent.contains(static_cast<SVGElement*>(childContext.node())->tagQName())) 510 return false; 511 499 512 return static_cast<SVGElement*>(childContext.node())->isValid(); 513 } 500 514 return false; 501 515 } -
trunk/Source/WebCore/svg/SVGElement.h
r117242 r118002 124 124 virtual void finishParsingChildren(); 125 125 virtual void attributeChanged(const Attribute&) OVERRIDE; 126 virtual bool childShouldCreateRenderer(const NodeRenderingContext&) const ;126 virtual bool childShouldCreateRenderer(const NodeRenderingContext&) const OVERRIDE; 127 127 128 128 virtual void removedFrom(Node*) OVERRIDE;
Note: See TracChangeset
for help on using the changeset viewer.