Bug 7095 - Removing positioning from an element does not relayout properly
: Removing positioning from an element does not relayout properly
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering
: 420+
: Macintosh Mac OS X 10.4
: P2 Normal
Assigned To: Nobody
Depends on:
Blocks: 9610
  Show dependency treegraph
Reported: 2006-02-05 19:50 PST by Maciej Stachowiak
Modified: 2006-12-23 04:17 PST (History)
2 users (show)

See Also:

test case (647 bytes, text/html)
2006-02-05 19:50 PST, Maciej Stachowiak
no flags Details
Proposed patch (6.29 KB, patch)
2006-02-06 08:08 PST, mitz@webkit.org
hyatt: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Maciej Stachowiak 2006-02-05 19:50:10 PST
Sometimes, removing positioning from an element after layout fails to update properly. In the attached test case, the red box inside the yellow one is initially positioned but the positioning is removed. However it does not reset to its normal position until you resize the window.
Comment 1 Maciej Stachowiak 2006-02-05 19:50:41 PST
Created attachment 6277 [details]
test case
Comment 2 mitz@webkit.org 2006-02-06 07:56:40 PST
I'm going to attach a patch.
Comment 3 mitz@webkit.org 2006-02-06 08:08:38 PST
Created attachment 6289 [details]
Proposed patch
Comment 4 Dave Hyatt 2006-02-06 13:15:17 PST
Comment on attachment 6289 [details]
Proposed patch

Comment 5 Timothy Hatcher 2006-02-08 21:14:06 PST
Darin landed this in r12682.
Comment 6 David Kilzer (:ddkilzer) 2006-12-23 04:17:17 PST
This is a Quirksmode bug:

Element retains position: absolute after class change
Reported on 3 October 2006

When changing a parent element's class via JavaScript/DOM, an initial position:absolute declaration sticks. The problem is corrected by applying a position:relative declaration to the parent element's children.

Test page: http://indorgs.virginia.edu/betech/bugs/safari-stickyposition.html