WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED CONFIGURATION CHANGED
113985
Kerned text blocks that are only spaces get word-spacing double-counted
https://bugs.webkit.org/show_bug.cgi?id=113985
Summary
Kerned text blocks that are only spaces get word-spacing double-counted
Vicki Pfau
Reported
2013-04-04 18:09:16 PDT
Created
attachment 196563
[details]
Repro When an inline text block contains only whitespace, the word-spacing around the whitespace will get double-counted in some cases. A repro is attached.
Attachments
Repro
(841 bytes, text/html)
2013-04-04 18:09 PDT
,
Vicki Pfau
no flags
Details
Patch
(3.96 KB, patch)
2013-04-04 19:07 PDT
,
Vicki Pfau
ggaren
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Vicki Pfau
Comment 1
2013-04-04 19:07:01 PDT
Created
attachment 196566
[details]
Patch
Geoffrey Garen
Comment 2
2013-04-10 08:34:00 PDT
I tried to review this, but I didn't know why wordMeasurement.startOffset was an appropriate test for ruling out a word that was only a single space character. Perhaps this would be obvious to a text expert. Otherwise, you should probably explain it in your ChangeLog.
Vicki Pfau
Comment 3
2013-04-10 12:38:47 PDT
(In reply to
comment #2
)
> I tried to review this, but I didn't know why wordMeasurement.startOffset was an appropriate test for ruling out a word that was only a single space character. Perhaps this would be obvious to a text expert. Otherwise, you should probably explain it in your ChangeLog.
Since we determine in that conditional that the wordLength is 1, if the start of the word is 0 and the character is a space, we can guarantee that the space is the only thing in that text run. Although you're right that that isn't obvious, and I should perhaps leave a comment.
Geoffrey Garen
Comment 4
2013-04-10 17:13:19 PDT
Comment on
attachment 196566
[details]
Patch OK, I get it. r=me
Ahmad Saleem
Comment 5
2022-10-26 04:05:40 PDT
It seems this r+ patch didn't landed while checking on Webkit GitHub with bug ID and this is current line of code, which this patch was trying to modify:
https://github.com/WebKit/WebKit/blob/89d57a6f366a8abe5d012e38f160f81388b46429/Source/WebCore/rendering/LegacyLineLayout.cpp#L506
Test Case from Patch -
https://jsfiddle.net/u0rc1z2t/show
Ahmad Saleem
Comment 6
2024-09-16 13:28:12 PDT
Might be IFC progression.
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