[Webkit-unassigned] [Bug 34239] New: Implement CSSOM Range.getClientRects for collapsed selections
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Jan 27 20:09:46 PST 2010
https://bugs.webkit.org/show_bug.cgi?id=34239
Summary: Implement CSSOM Range.getClientRects for collapsed
selections
Product: WebKit
Version: 528+ (Nightly build)
Platform: PC
OS/Version: Mac OS X 10.5
Status: NEW
Severity: Normal
Priority: P2
Component: HTML DOM
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: jparent at google.com
CC: sam at webkit.org
The spec used to say to return null when the endpoints were the same, but now
has been updated to handle this case. See
http://www.w3.org/TR/2009/WD-cssom-view-20090804/#extensions-to-the-range-interface
for full details.
Example:
http://www.plexode.com/cgi-bin/eval3.py#ht=%3Cdiv%20contentEditable%3E%3Cdiv%20id%3D'bar'%3Efooo%3C%2Fdiv%3E%3C%2Fdiv%3E&ohh=1&ohj=1&jt=var%20bar%20%3D%20gebi('bar')%3B%0Avar%20range%20%3D%20document.createRange()%3B%0Arange.setStart(bar.firstChild%2C%200)%3B%0Arange.setEnd(bar.firstChild%2C%200)%3B%0A%0Avar%20rects%20%3D%20range.getClientRects()%3B%0Avar%20rect%20%3D%20rects.item(0)%3B%0A%0Aalert('top%3A%20'%20%2B%20rect.top%20%2B%20'%20bottom%3A%20'%20%2Brect.bottom%20%2B%20'%20left%3A%20'%20%2B%20rect.left%20%2B%20'%20right%3A%20'%20%2B%20rect.right%20%2B%20'%20width%3A%20'%20%2Brect.width%20%2B%20'%20height%3A%20'%20%2B%20rect.height)%3B&ojh=1&ojj=0&ms=100&oth=0&otj=0&cex=1
WebKit returns null, Firefox 3.7a returns a rect with width = 0 and height =
line height (and appropriate top, left, right, bottom values as well).
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list