Bug 24097

Summary: Regression : a fixed element has no parent offset
Product: WebKit Reporter: Frank DENIS <webkit>
Component: DOMAssignee: Nobody <webkit-unassigned>
Status: RESOLVED INVALID    
Severity: Normal CC: pennig, rik
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
URL: http://download.pureftpd.org/misc/bugs/webkit/fixed-element-has-no-offsetparent.html

Description Frank DENIS 2009-02-23 09:19:09 PST
With recent nightly builds, elements having position:fixed have a null offsetParent property.

The following snippet should return the body node :

<!doctype html>
<html>
<body onload="alert(document.getElementById('hop').offsetParent);">
  <div id="hop" style="position:fixed">Test</div>
</body>
</html>
Comment 1 Anthony Ricaud 2009-02-23 13:40:02 PST
This bug depends on bug 19149 . One of them is invalid.
Comment 2 Matt Pennig 2009-02-23 14:40:45 PST
According to W3C specs[1], this is correct behavior. This is actually a progression, not a regression, if the spec is treated as canon.

[1] http://www.w3.org/TR/cssom-view/#offset-attributes