Bug 4944 - offsetTop values incorrect for tr elements
Summary: offsetTop values incorrect for tr elements
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Beth Dakin
URL: http://www.trachtenberg.com/patches/s...
Keywords: InRadar
Depends on:
Blocks: 6628
  Show dependency treegraph
 
Reported: 2005-09-11 21:57 PDT by Adam Trachtenberg
Modified: 2006-09-13 06:36 PDT (History)
7 users (show)

See Also:


Attachments
Another Testcase (1.47 KB, text/html)
2006-02-02 04:02 PST, Sjoerd Mulder
no flags Details
JavaScript displaying this bug (1.46 KB, text/html)
2006-02-23 20:55 PST, Quinn Taylor
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Trachtenberg 2005-09-11 21:57:30 PDT
Safari reports broken offsetTop values for tr elements.

It can compute them for the parent table and child td elements (and other elements, such as p), but 
tr.offsetTop is set to either 0 or 1 (depending if the table is inside a div).

I can't point at a spec as backup, but this is computed as I expect in Firefox 1.0.6.
Comment 1 Mark Rowe (bdash) 2005-09-11 23:05:33 PDT
Confirmed with WebKit 412.7 and ToT WebKit.  The behaviour I am seeing is slightly different from the 
original description: tr.offsetTop is always shown as 0, even when inside a DIV.
Comment 2 Dave Hyatt 2005-09-11 23:24:24 PDT
Table rows and sections dont get positioned right now. :(
Comment 3 Eric Seidel (no email) 2005-12-27 15:17:11 PST
Sounds like a Table, render tree bug.  Beth's area of speciality :)
Comment 4 Sjoerd Mulder 2006-02-02 04:02:21 PST
Created attachment 6205 [details]
Another Testcase
Comment 5 Sjoerd Mulder 2006-02-02 04:03:03 PST
I think this bug should get a higher priority
Comment 6 Sjoerd Mulder 2006-02-03 00:32:20 PST
This bug is also in Radar: <rdar://4432155>
Comment 7 Quinn Taylor 2006-02-23 20:55:33 PST
Created attachment 6692 [details]
JavaScript displaying this bug

Example code that exhibits the bug, drawn from user difficulties with Roundcube email scrolling due to use of this property.
Comment 8 Lutz Schwarz 2006-03-16 01:57:02 PST
clientHeight is always 0 for TR elements. This hopefully gets fixed together with the offsetTop bug.
Comment 9 David Kilzer (:ddkilzer) 2006-06-06 04:20:35 PDT
(In reply to comment #8)
> clientHeight is always 0 for TR elements. This hopefully gets fixed together
> with the offsetTop bug.

See Bug 9325.
Comment 10 Dave Hyatt 2006-09-12 23:39:38 PDT
This has been fixed.
Comment 11 David Kilzer (:ddkilzer) 2006-09-13 06:36:34 PDT
(In reply to comment #10)
> This has been fixed.

For potential fixes see Bug 9943 (r15471), Bug 9314 (r14847), Bug 8227 (r13726), Bug 8085 (r13656).