[webkit-reviews] review granted: [Bug 109764] Make BackgroundHTMLParser work with doc.writes that enter or leave foreign content : [Attachment 192578] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Mar 11 15:52:41 PDT 2013


Eric Seidel <eric at webkit.org> has granted Adam Barth <abarth at webkit.org>'s
request for review:
Bug 109764: Make BackgroundHTMLParser work with doc.writes that enter or leave
foreign content
https://bugs.webkit.org/show_bug.cgi?id=109764

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

------- Additional Comments from Eric Seidel <eric at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=192578&action=review


LGTM.  Please return the "simulator" prefix. :)

> Source/WebCore/html/parser/BackgroundHTMLParser.cpp:155
> +	   if (!m_treeBuilder.simulate(m_pendingTokens->last(),
m_tokenizer.get()) || m_pendingTokens->size() >= pendingTokenLimit)

This is a little confusing.  It's not really a tree-builder, and if it was you
wouldn't tell it to "simulate". :)

> Source/WebCore/html/parser/HTMLTreeBuilder.h:71
> +    HTMLElementStack* openElements() const { return m_tree.openElements(); }


Should this be const?  We don't want folks modifying this. :)

> Source/WebCore/html/parser/HTMLTreeBuilderSimulator.cpp:136
> +    return namespaceStack;

You're going to end up copying the vector a couple times here.


More information about the webkit-reviews mailing list