WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
99731
Add 8-bit path to RenderBlock::handleTrailingSpaces()
https://bugs.webkit.org/show_bug.cgi?id=99731
Summary
Add 8-bit path to RenderBlock::handleTrailingSpaces()
Michael Saboff
Reported
2012-10-18 10:06:49 PDT
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.
Attachments
Patch
(2.65 KB, patch)
2012-10-18 10:13 PDT
,
Michael Saboff
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Michael Saboff
Comment 1
2012-10-18 10:13:55 PDT
Created
attachment 169430
[details]
Patch
mitz
Comment 2
2012-10-18 10:20:25 PDT
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?
Michael Saboff
Comment 3
2012-10-18 10:25:15 PDT
(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.
mitz
Comment 4
2012-10-18 10:27:19 PDT
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.
WebKit Review Bot
Comment 5
2012-10-18 11:03:21 PDT
Comment on
attachment 169430
[details]
Patch Clearing flags on attachment: 169430 Committed
r131776
: <
http://trac.webkit.org/changeset/131776
>
WebKit Review Bot
Comment 6
2012-10-18 11:03:25 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug