Bug 179895 - Simple Line Layout's split() function only works if all characters/glyphs have positive advances
Summary: Simple Line Layout's split() function only works if all characters/glyphs hav...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: zalan
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-20 12:50 PST by Myles C. Maxfield
Modified: 2017-11-20 14:06 PST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Myles C. Maxfield 2017-11-20 12:50:38 PST
Binary search only works if all characters/glyphs have positive advances. Otherwise, the results would be unstable as you resize the window.
Comment 1 Myles C. Maxfield 2017-11-20 12:51:05 PST
I assume you did perf tests to verify that binary search is faster than linear scan with an early-out?
Comment 2 zalan 2017-11-20 14:06:49 PST
(In reply to Myles C. Maxfield from comment #1)
> I assume you did perf tests to verify that binary search is faster than
> linear scan with an early-out?

I did (i went back and forth a few times on this) and there was no measurable difference. I wish I could measure glyphs individually.