Add a helper function for getting strings from tokens (and make it 8-bit aware)
Created attachment 183614 [details] Patch
Comment on attachment 183614 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=183614&action=review > Source/WebCore/html/parser/CompactHTMLToken.cpp:40 > + if (!vector.size()) > + return emptyString(); There's no reason to do this. Both String::make8BitFrom16BitSource and String have special-case logic for the empty string. > Source/WebCore/html/parser/CompactHTMLToken.cpp:41 > + if (token.isAll8BitData()) This isn't correct for anything other than m_data. We only track this flag for the main data vector. Perhaps we should make HTMLToken smarter and track this flag for the other strings as well?
Eric did this in a more general way.