Bug 49358

Summary: Empty spans after a line break are incorrectly positioned at the top left hand corner of their containing block
Product: WebKit Reporter: Justin Garcia <justin.garcia>
Component: HTML EditingAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: ddkilzer, hyatt, mitz, sam, simon.fraser
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Attachments:
Description Flags
testcase
none
testcase
none
testcase none

Description Justin Garcia 2010-11-10 19:12:02 PST
Created attachment 73569 [details]
testcase

Load the attached test case.  Notice that there is no rect for the empty line in the middle (or the second rect is wrong).
Comment 1 Justin Garcia 2010-11-10 19:12:59 PST
<rdar://problem/8639942>
Comment 2 Justin Garcia 2010-12-16 13:24:35 PST
Created attachment 76807 [details]
testcase

Here's a better example.  Basically getClientRects() will return a rect positioned at the top left hand corner for each empty span that occurs in the range.
Comment 3 Justin Garcia 2010-12-16 13:44:10 PST
getClientRects is just one way to see the problem, which is that the spans are incorrectly positioned.  Will attached a better reduction.
Comment 4 Justin Garcia 2010-12-16 13:45:51 PST
Created attachment 76810 [details]
testcase

In this reduction, an empty span just after a <br> is positioned at the top left hand corner of its containing block, instead of after the br.
Comment 5 Justin Garcia 2010-12-16 13:59:53 PST
(In reply to comment #4)
> Created an attachment (id=76810) [details]
> testcase

This seems to work correctly in FireFox, by the way.
Comment 6 Justin Garcia 2010-12-17 13:56:47 PST
The new radar is <rdar://problem/8784036>.