[Webkit-unassigned] [Bug 61556] REGRESSION(87152): Crash on page with svg fonts
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Jun 13 11:02:30 PDT 2011
https://bugs.webkit.org/show_bug.cgi?id=61556
--- Comment #17 from Darin Adler <darin at apple.com> 2011-06-13 11:02:30 PST ---
(From update of attachment 96757)
View in context: https://bugs.webkit.org/attachment.cgi?id=96757&action=review
> Source/WebCore/rendering/svg/SVGTextRunRenderingContext.cpp:272
> + String language;
> + if (SVGElement* element = static_cast<SVGElement*>(parentRenderObject->node()))
> + language = element->getAttribute(XMLNames::langAttr);
Attribute values are of type AtomicString. Normally it would be best to use that type for the local variable containing the attribute value too; depending on how the value is actually used, you could save a bit of work knowing at compile time that it was already uniqued.
Seems unnecessarily risky to cast to SVGElement here where all we want to do is getAttribute. Could be a cast to Element* instead. But I suppose this is OK if there is an ironclad guarantee this will be an SVG element.
Also, this code can use fastGetAttribute.
> Source/WebCore/rendering/svg/SVGTextRunRenderingContext.cpp:354
> + String language;
> + if (SVGElement* element = static_cast<SVGElement*>(parentRenderObject->node()))
> + language = element->getAttribute(XMLNames::langAttr);
Same comments.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list