Bug 49358 - Empty spans after a line break are incorrectly positioned at the top left hand corner of their containing block
Summary: Empty spans after a line break are incorrectly positioned at the top left han...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2010-11-10 19:12 PST by Justin Garcia
Modified: 2010-12-17 14:00 PST (History)
5 users (show)

See Also:


Attachments
testcase (569 bytes, text/html)
2010-11-10 19:12 PST, Justin Garcia
no flags Details
testcase (608 bytes, text/html)
2010-12-16 13:24 PST, Justin Garcia
no flags Details
testcase (391 bytes, text/html)
2010-12-16 13:45 PST, Justin Garcia
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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>.