Bug 103658 - Range.getClientRects() returns rectangles for children of a selected parent
Summary: Range.getClientRects() returns rectangles for children of a selected parent
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL: http://dvcs.w3.org/hg/csswg/raw-file/...
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-29 12:11 PST by Mats Palmgren
Modified: 2012-12-01 16:32 PST (History)
1 user (show)

See Also:


Attachments
Testcase #1 (1.58 KB, text/html)
2012-11-29 12:11 PST, Mats Palmgren
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mats Palmgren 2012-11-29 12:11:52 PST
Created attachment 176780 [details]
Testcase #1

Range.getClientRects() returns rectangles for children of a selected parent.

This doesn't comply with the CSSOM spec that says:
"whose parent is not selected by the range"
http://dvcs.w3.org/hg/csswg/raw-file/tip/cssom-view/Overview.html#extensions-to-the-range-interface

See the attached test - the correct result is:
range.getClientRects()[0] = 0,0,14,54
range.getBoundingClientRect() = 0,0,14,54

(Fwiw, Firefox and Opera implements this correctly)

Google Chrome "25.0.1323.1 dev" on Linux64 gives this result:
range.getClientRects()[0] = 0,0,14,54
range.getClientRects()[1] = 2,2,179,18
range.getClientRects()[2] = 2,21,179,18
range.getClientRects()[3] = 2,40,179,18
range.getClientRects()[4] = 2,59,179,18
range.getClientRects()[5] = 2,78,179,18
range.getClientRects()[6] = 2,97,179,18
range.getClientRects()[7] = 2,116,179,18
range.getClientRects()[8] = 2,135,179,18
range.getClientRects()[9] = 2,154,179,18
range.getClientRects()[10] = 2,173,179,18
range.getClientRects()[11] = 2,192,179,18
range.getBoundingClientRect() = 0,0,181,210
Comment 1 Mats Palmgren 2012-11-29 12:18:32 PST
This bug is probably related bug 76839, but that bug seems to be more
about partly selected elements.
Comment 2 Daniel Trebbien 2012-11-29 15:37:15 PST
*** Bug 103150 has been marked as a duplicate of this bug. ***
Comment 3 Daniel Trebbien 2012-11-29 15:37:55 PST
*** Bug 103430 has been marked as a duplicate of this bug. ***
Comment 4 Mats Palmgren 2012-12-01 16:32:52 PST
Actually, I think I've misread the spec, and that webkit's result
for the given test is the correct one.  I still think webkit does
not implement the spec correctly for other cases, but I will
file a new bug on that.