WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
141140
ComplexTextController::offsetForPosition() might erroneously detect a ligature when instead CT simply omitted an invisible glyph
https://bugs.webkit.org/show_bug.cgi?id=141140
Summary
ComplexTextController::offsetForPosition() might erroneously detect a ligatur...
Myles C. Maxfield
Reported
2015-02-01 11:46:07 PST
Created
attachment 245837
[details]
Reproduction screenshot
https://www.opengl.org/wiki/Geometry_Shader
Double click on "triangle_strip" (see screenshot) Version 8.0.3 (10600.3.18,
r179440
) 14C109
Attachments
Reproduction screenshot
(10.02 KB, image/png)
2015-02-01 11:46 PST
,
Myles C. Maxfield
no flags
Details
Reduction
(124 bytes, text/html)
2015-08-27 00:17 PDT
,
Myles C. Maxfield
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Myles C. Maxfield
Comment 1
2015-08-27 00:17:16 PDT
Created
attachment 260046
[details]
Reduction
Myles C. Maxfield
Comment 2
2015-08-27 00:20:15 PDT
Not due to simple line layout
Myles C. Maxfield
Comment 3
2015-08-27 00:22:14 PDT
For some reason the ZWS is being layed out to be the right half of the "p"
Myles C. Maxfield
Comment 4
2015-08-27 00:44:05 PDT
offsetForPosition() uses the complex text code path. In this code path, when the string ends with a ZWS, CoreText simply doesn't return a glyph for that character. However, this means that in ComplexTextController::offsetForPosition(), it appears that the last glyph corresponds with two characters (since that ZWS doesn't get its own glyph). This makes us think that we are encountering a ligature, and we put the break between the two code points in the middle of the last glyph. When you double click, you select the word, without the ZWS. Therefore, the caret gets placed in the middle of the last glyph.
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