Handle whitespace correctly
Created attachment 60963 [details] Patch
Comment on attachment 60963 [details] Patch WebCore/html/HTMLTreeBuilder.cpp:104 + String takeAll() Should this be takeRemaining()? WebCore/html/HTMLTreeBuilder.cpp:112 + String takeAllWhitespace() takeRemainingWhitespace? WebCore/html/HTMLTreeBuilder.cpp:109 + return String(start, m_current - start); Could this have an optimized branch which returned the original string if we never moved m_current? I like this change. I think it would be useful to know the performance impact. Not that it would actually change us from landing it, but would be useful to know how much perf we're losing here.
> WebCore/html/HTMLTreeBuilder.cpp:104 > + String takeAll() > Should this be takeRemaining()? Sure. > WebCore/html/HTMLTreeBuilder.cpp:112 > + String takeAllWhitespace() > takeRemainingWhitespace? Sure. > WebCore/html/HTMLTreeBuilder.cpp:109 > + return String(start, m_current - start); > Could this have an optimized branch which returned the original string if we never moved m_current? Yeah, but I'm going to make the source of these characters be the original buffer in the HTMLTokenizer, which is an inline buffer, not a String. > I like this change. I think it would be useful to know the performance impact. Not that it would actually change us from landing it, but would be useful to know how much perf we're losing here. True. I'm working from my laptop, so it's painful to build release from scratch. :(
Created attachment 60970 [details] Patch for landing
Committed r62912: <http://trac.webkit.org/changeset/62912>