Bug 7095 - Removing positioning from an element does not relayout properly
: Removing positioning from an element does not relayout properly
Status: RESOLVED FIXED
: WebKit
Layout and Rendering
: 420+
: Macintosh Mac OS X 10.4
: P2 Normal
Assigned To:
:
:
:
: 9610
  Show dependency treegraph
 
Reported: 2006-02-05 19:50 PST by
Modified: 2006-12-23 04:17 PST (History)


Attachments
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+
Review Patch | Details | Formatted Diff | Diff


Note

You need to log in before you can comment on or make changes to this bug.


Description From 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 From 2006-02-05 19:50:41 PST -------
Created an attachment (id=6277) [details]
test case
------- Comment #2 From 2006-02-06 07:56:40 PST -------
I'm going to attach a patch.
------- Comment #3 From 2006-02-06 08:08:38 PST -------
Created an attachment (id=6289) [details]
Proposed patch
------- Comment #4 From 2006-02-06 13:15:17 PST -------
(From update of attachment 6289 [details])
r=me
------- Comment #5 From 2006-02-08 21:14:06 PST -------
Darin landed this in r12682.
------- Comment #6 From 2006-12-23 04:17:17 PST -------
This is a Quirksmode bug:

Element retains position: absolute after class change
Reported on 3 October 2006
http://www.quirksmode.org/bugreports/archives/2006/10/Parent_Element_Sticky_Position.html

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