Summary: | [LFC][IFC] tabCharacter and newlineCharacter are also word separators when not preserved | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | zalan <zalan> | ||||||||
Component: | Layout and Rendering | Assignee: | zalan <zalan> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | bfulgham, darin, koivisto, simon.fraser, webkit-bug-importer, zalan | ||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||
Version: | WebKit Nightly Build | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
Bug Depends on: | |||||||||||
Bug Blocks: | 219706 | ||||||||||
Attachments: |
|
Description
zalan
2020-12-11 08:10:15 PST
Created attachment 415998 [details]
Patch
Comment on attachment 415998 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=415998&action=review > Source/WebCore/layout/inlineformatting/InlineTextItem.cpp:109 > isWordSeparator = text[startPosition] == space > + || text[startPosition] == tabCharacter > || text[startPosition] == noBreakSpace > || text[startPosition] == ethiopicWordspace > || text[startPosition] == aegeanWordSeparatorLine lambda? Apparently I confused it with the case when the tab character is resolved to a single space character (non-preserve case). let's repurpose this bug Created attachment 416055 [details]
Patch
Comment on attachment 416055 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=416055&action=review > Source/WebCore/layout/inlineformatting/InlineTextItem.cpp:120 > + return text[startPosition] == space > || text[startPosition] == noBreakSpace > || text[startPosition] == ethiopicWordspace > || text[startPosition] == aegeanWordSeparatorLine > || text[startPosition] == aegeanWordSeparatorDot > || text[startPosition] == ugariticWordDivider; maybe just put the text[startPosition] into a local? Created attachment 416101 [details]
Patch
Committed r270747: <https://trac.webkit.org/changeset/270747> All reviewed patches have been landed. Closing bug and clearing flags on attachment 416101 [details]. Comment on attachment 416055 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=416055&action=review >> Source/WebCore/layout/inlineformatting/InlineTextItem.cpp:120 >> || text[startPosition] == ugariticWordDivider; > > maybe just put the text[startPosition] into a local? Or make another isWordSeparator function/overload that just takes a character? (In reply to Darin Adler from comment #10) > Comment on attachment 416055 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=416055&action=review > > >> Source/WebCore/layout/inlineformatting/InlineTextItem.cpp:120 > >> || text[startPosition] == ugariticWordDivider; > > > > maybe just put the text[startPosition] into a local? > > Or make another isWordSeparator function/overload that just takes a > character? I was just about to make this change but this code got moved over to "moveToNextNonWhitespacePosition" where I actually introduced a function for this ... auto isWhitespaceCharacter = [&](auto character) { // white space processing in CSS affects only the document white space characters: spaces (U+0020), tabs (U+0009), and segment breaks. ... |