WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
19149
A position fixed node's offsetParent should return null
https://bugs.webkit.org/show_bug.cgi?id=19149
Summary
A position fixed node's offsetParent should return null
Gérard Talbot (no longer involved)
Reported
2008-05-20 12:11:22 PDT
CSSOM View Module, offsetParent attribute clearly states that offsetParent of nodeA when nodeA is a position: fixed element should return null. " If any of the following holds true return null and stop this algorithm: (...) The computed value of the position property for element A is fixed. "
http://www.w3.org/TR/cssom-view/#offset-attributes
Steps to reproduce: 1- Load provided URL 2- Click the [return document.getElementById("PositionFixedElem").offsetParent] button Actual results in Safari 3.1.1 build 525.17.0 under XP Pro SP3: document.getElementById("PositionFixedElem").offsetParent = [object HTMLBodyElement] Expected results: document.getElementById("PositionFixedElem").offsetParent = null Notes: - Internet Explorer 7, Internet Explorer 8 beta 1 and Opera 9.50 will return null. - I have filed a similar bug at
https://bugzilla.mozilla.org/show_bug.cgi?id=434678
I have searched for a duplicate and did not find one. I have not checked the testcase with a webkit trunk nightly build (526+).
Attachments
Fix for offsetParent, offsetTop, and offsetLeft
(6.14 KB, patch)
2009-01-17 17:08 PST
,
Matt Pennig
pennig
: review-
Details
Formatted Diff
Diff
Fix for offsetParent, offsetTop, and offsetLeft
(6.12 KB, patch)
2009-01-18 09:47 PST
,
Matt Pennig
pennig
: review-
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
steven.moore
Comment 1
2009-01-14 10:48:43 PST
I'm seeing this too. WebKit nightly from 13 Jan 2009, OS X 10.5.6.
Matt Pennig
Comment 2
2009-01-15 07:44:24 PST
<
rdar://problem/6497927
>
Matt Pennig
Comment 3
2009-01-17 17:08:35 PST
Created
attachment 26829
[details]
Fix for offsetParent, offsetTop, and offsetLeft
Matt Pennig
Comment 4
2009-01-18 09:47:46 PST
Created
attachment 26834
[details]
Fix for offsetParent, offsetTop, and offsetLeft
Anthony Ricaud
Comment 5
2009-02-23 14:26:10 PST
The testcase is working on my nightly (
r41121
). I've bisected it between
r40738
and
r40771
.
http://trac.webkit.org/changeset/40769
may be the revision responsible (I don't understand the patch but it has offsetParent in the summary).
Bug 24097
was fixed as a regression because of this change. One of them is therefore invalid.
Matt Pennig
Comment 6
2009-02-27 12:05:47 PST
This bug was fixed in changeset
http://trac.webkit.org/changeset/40769
but there were no tests to make sure that offsetParent of a fixed element was null.
Bug 24107
fixes a related issue caused by the above changeset. In the included patch, there are a number of tests which have coverage on this bug.
Gérard Talbot (no longer involved)
Comment 7
2009-06-14 11:56:51 PDT
When I try the provided testcase with latest stable release Safari 4.0 build 530.17, I get expected results. Resolving as FIXED Thank you Matt! regards, Gérard
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug