[webkit-reviews] review granted: [Bug 74885] Rename Element::setAttributeMap to parserSetAttributeMap and limit its use to the parser : [Attachment 119917] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Dec 19 14:29:37 PST 2011


Ryosuke Niwa <rniwa at webkit.org> has granted Adam Klein <adamk at chromium.org>'s
request for review:
Bug 74885: Rename Element::setAttributeMap to parserSetAttributeMap and limit
its use to the parser
https://bugs.webkit.org/show_bug.cgi?id=74885

Attachment 119917: Patch
https://bugs.webkit.org/attachment.cgi?id=119917&action=review

------- Additional Comments from Ryosuke Niwa <rniwa at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=119917&action=review


This looks great in general. Might want abarth or eseidel to have a look as
well.

> Source/WebCore/html/HTMLViewSourceDocument.cpp:82
> +    div->setAttribute(classAttr, "webkit-line-gutter-backdrop");

Maybe we should define static local AtomicString for these?

> Source/WebCore/html/track/WebVTTParser.cpp:365
> +	       if (m_token.classes().size() > 0)
> +		   child->setAttribute(classAttr,
AtomicString(m_token.classes().data(), m_token.classes().size()));
>	       if (child->hasTagName(qTag))
> -		   child->setAttribute(titleAttr,
String(m_token.annotation().data(), m_token.annotation().size()));
> +		   child->setAttribute(titleAttr,
AtomicString(m_token.annotation().data(), m_token.annotation().size()));

Why don't we use parserSetAttributeMap here?  I guess because NamedNodeMap had
not been allocated yet? If so, can we assert that?


More information about the webkit-reviews mailing list