Add a helper function for getting strings from tokens (and make it 8-bit aware)
Created attachment 183614 [details]
Comment on attachment 183614 [details]
View in context: https://bugs.webkit.org/attachment.cgi?id=183614&action=review
> + 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.
> + 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.