Bug 9808

Summary: REGRESSION: Incorrect layout (and ERROR) when forcing ATSU For All Text
Product: WebKit Reporter: mitz
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P1    
Version: 420+   
Hardware: Macintosh   
OS: OS X 10.4   
Attachments:
Description Flags
Test case
none
Patch with manual test and changelog
none
Patch darin: review+

Description mitz 2006-07-09 11:02:11 PDT
To reproduce this bug, open the attached test case, choose Use ATSU For All Text from Safari's Debug menu and reload the page. Notice that the layout changes (the line breaks after Lorem) and if you are using a debug build, an error will be printed:
ERROR: unexpected result from ATSUGetGlyphBounds(): actualNumBounds(389998136) != 1
Comment 1 mitz 2006-07-09 11:02:47 PDT
Created attachment 9299 [details]
Test case
Comment 2 mitz 2006-07-09 11:18:33 PDT
Created attachment 9300 [details]
Patch with manual test and changelog
Comment 3 Darin Adler 2006-07-09 17:37:24 PDT
Comment on attachment 9300 [details]
Patch with manual test and changelog

Will this extra check have a measurable performance impact?

If not, then r=me, but how can we be sure?
Comment 4 mitz 2006-07-09 23:26:58 PDT
Comment on attachment 9300 [details]
Patch with manual test and changelog

Going to play it safe performance-wise and move the check into the complex path where it matters.
Comment 5 mitz 2006-07-10 07:46:26 PDT
Created attachment 9341 [details]
Patch

Move the empty run check down into floatWidthForComplexText()
Comment 6 Darin Adler 2006-07-10 08:29:23 PDT
Comment on attachment 9341 [details]
Patch

r=me

Even better if there was a comment explaining that this is not just an optimization, but required for correct results, but the layout test should suffice.
Comment 7 Darin Adler 2006-07-10 09:13:38 PDT
Committed revision 15305.