Commit 8d1c25d9 authored by tonyg@chromium.org's avatar tonyg@chromium.org
Browse files

Threaded HTML parser should use 8 bit strings for attributes

https://bugs.webkit.org/show_bug.cgi?id=111610

Reviewed by Eric Seidel.

This fixes a 27% regression in dromaeo_jslibattrjquery on the threaded HTML parser vs. the main thread parser.

No new tests because no new functionality.

* html/parser/CompactHTMLToken.cpp:
(WebCore::CompactHTMLToken::CompactHTMLToken):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@144972 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent e93d975b
2013-03-06 Tony Gentilcore <tonyg@chromium.org>
Threaded HTML parser should use 8 bit strings for attributes
https://bugs.webkit.org/show_bug.cgi?id=111610
Reviewed by Eric Seidel.
This fixes a 27% regression in dromaeo_jslibattrjquery on the threaded HTML parser vs. the main thread parser.
No new tests because no new functionality.
* html/parser/CompactHTMLToken.cpp:
(WebCore::CompactHTMLToken::CompactHTMLToken):
2013-03-06 Alpha Lam <hclam@chromium.org>
 
More cleanup in GIFImageReader
......@@ -67,9 +67,8 @@ CompactHTMLToken::CompactHTMLToken(const HTMLToken* token, const TextPosition& t
break;
case HTMLToken::StartTag:
m_attributes.reserveInitialCapacity(token->attributes().size());
// FIXME: Attribute names and values should be 8bit when possible.
for (Vector<HTMLToken::Attribute>::const_iterator it = token->attributes().begin(); it != token->attributes().end(); ++it)
m_attributes.append(Attribute(String(it->name), String(it->value)));
m_attributes.append(Attribute(StringImpl::create8BitIfPossible(it->name), StringImpl::create8BitIfPossible(it->value)));
// Fall through!
case HTMLToken::EndTag:
m_selfClosing = token->selfClosing();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment