RenderBlock::handleTrailingSpaces() uses the characters() method to look for the range of space characters at the end of a text run. This should be updated to use characters8() or characters16() as appropriate.
Created attachment 169430 [details] Patch
Comment on attachment 169430 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=169430&action=review > Source/WebCore/rendering/RenderBlockLineLayout.cpp:1030 > + UChar current = characters[firstSpace - 1]; > + if (!isCollapsibleSpace(current, lastText)) Have you tried making current a CharacterType and making isCollapsibleSpace() a function template as well?
(In reply to comment #2) > (From update of attachment 169430 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=169430&action=review > > > Source/WebCore/rendering/RenderBlockLineLayout.cpp:1030 > > + UChar current = characters[firstSpace - 1]; > > + if (!isCollapsibleSpace(current, lastText)) > > Have you tried making current a CharacterType and making isCollapsibleSpace() a function template as well? In most cases I haven't done this. The implicit conversion from an LChar (unsigned char) to a UChar (unsigned short) is typically a nop. If you think it is more readable I can make that change.
Comment on attachment 169430 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=169430&action=review >>> Source/WebCore/rendering/RenderBlockLineLayout.cpp:1030 >>> + if (!isCollapsibleSpace(current, lastText)) >> >> Have you tried making current a CharacterType and making isCollapsibleSpace() a function template as well? > > In most cases I haven't done this. The implicit conversion from an LChar (unsigned char) to a UChar (unsigned short) is typically a nop. If you think it is more readable I can make that change. If it doesn’t change the generated code, then no, I don’t think it’s necessary.
Comment on attachment 169430 [details] Patch Clearing flags on attachment: 169430 Committed r131776: <http://trac.webkit.org/changeset/131776>
All reviewed patches have been landed. Closing bug.