Closed
Bug 271776
Opened 20 years ago
Closed 15 years ago
{inc}mozilla doesn't redraw absolutely positioned DIVs' padding and margin after font resizing (in em) by resizing whole window
Categories
(Core :: Layout: Positioned, defect)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: wiki, Assigned: sharparrow1)
References
()
Details
(Keywords: testcase, Whiteboard: [reflow-refactor])
Attachments
(6 files, 2 obsolete files)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.3) Gecko/20040910
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.3) Gecko/20040910
whole sizes of divs is in em. i create function to resize font size of parent
div by client window size. and child div with position absolute, don't redraw
his padding and margin in EM with changed parent font size in PT after resizing
window. that div redraw his font size, border width, left and top position and
more, but not padding and margin. after reload it is ok.
Reproducible: Always
Steps to Reproduce:
1.resize window to width 1000 px
2.reload
3.resize window to width 800 px
4.see blue box wrap down
5.reload
6.blue box is in line with others (red, green, yellow)
Expected Results:
resize margins and padding with fotn size and others, like (i'm sad that i must
write this} IE
Comment 1•20 years ago
|
||
Bug also occurs with Mozilla trunk 2004-11-22-06 on Linux.
Assignee: general → nobody
Status: UNCONFIRMED → NEW
Component: General → Layout: R & A Pos
Ever confirmed: true
OS: Windows XP → All
Product: Mozilla Application Suite → Core
QA Contact: general → core.layout.r-and-a-pos
Version: unspecified → 1.0 Branch
Updated•20 years ago
|
Version: 1.0 Branch → Trunk
Comment 2•20 years ago
|
||
Comment 3•20 years ago
|
||
Updated•20 years ago
|
Summary: mozilla don't redraw absolutely positioned DIVs' padding and margin after font resizing (in em) by resizing whole window → mozilla doesn't redraw absolutely positioned DIVs' padding and margin after font resizing (in em) by resizing whole window
Comment 4•20 years ago
|
||
Comment 5•20 years ago
|
||
So is all that stuff needed? The left margin on the abs pos div, the rel pos
container, etc, etc? A minimal testcase would be nice here...
Comment 6•19 years ago
|
||
*** Bug 310439 has been marked as a duplicate of this bug. ***
Comment 7•19 years ago
|
||
I also found another bug...not sure if it's related. I'll make another
attachment.
Comment 8•19 years ago
|
||
This is the same as the previous testcase except the top and left properties
aren't specified, i.e. only position: absolute is specified.
Resize to a really small size to the point where the text wraps into multiple
lines. Then resize back to a large size so that the text fits on a single line.
The text will resize but it won't stop wrapping, i.e. there will still be
multiple lines even if there is space for just one line. Apparently the
dimensions of the layout box isn't updated yet.
However, if you resize it again, the text reverts to a single line, without any
of the overlapping element/text issues. So it looks like the first resize will
call onresize and change the font-size but won't update the box dimensions.
Like I said before, I'm not sure if this is related to this bug.
Comment 9•19 years ago
|
||
That looks like a different bug. Please file it separately?
Summary: mozilla doesn't redraw absolutely positioned DIVs' padding and margin after font resizing (in em) by resizing whole window → {inc}mozilla doesn't redraw absolutely positioned DIVs' padding and margin after font resizing (in em) by resizing whole window
Whiteboard: [reflow-refactor]
Updated•19 years ago
|
Attachment #197850 -
Attachment is obsolete: true
Comment 10•19 years ago
|
||
Narrowed it down some more. This actually is completely unrelated to window
resizing. Simply changing font-size to a larger value triggers the bug.
Updated•19 years ago
|
Attachment #197846 -
Attachment is obsolete: true
Comment 11•19 years ago
|
||
Not sure why I obseleted the 1st minimal testcase... Well I filed a separate bug
for the 2nd minimal testcase: bug 310451.
Comment 12•19 years ago
|
||
Wrapping the div inside another div with position: relative gets rid of the
bug. Heh, IE-style hack saves the day.
Comment 13•18 years ago
|
||
Dup of bug 199035?
Assignee | ||
Comment 14•18 years ago
|
||
The issue here is that we're not marking the abs. pos. frame dirty when the style change happens. This isn't really the right fix, but it shows what's going on.
Assignee | ||
Comment 15•17 years ago
|
||
dbaron, any suggestions for the correct way to approach this?
Assignee: nobody → sharparrow1
Assignee | ||
Comment 16•17 years ago
|
||
Comment on attachment 265664 [details] [diff] [review]
Proof-of-concept
This patch appears to completely solve this issue; is there some better way to do this?
Attachment #265664 -
Flags: review?(dbaron)
Comment 17•17 years ago
|
||
So is there a general rule for who's responsible for reflowing an out-of-flow frame? I think we reflow floats through their placeholder's position, but reflow absolutely positioned elements through their containing block. Or something like that.
I don't see why you'd even need to call FrameNeedsReflow (rather than just pushing onto the stack) when you wouldn't need to also mark intrinsic widths dirty on ancestors. It depends on what the rules for reflowing out-of-flows are (for any given position of containing block, really).
(Is there a danger with absolute containing blocks crossing reflow root boundaries? Do we make SVG foreign objects absolute containing blocks?)
Updated•17 years ago
|
Attachment #265664 -
Flags: review?(dbaron) → review-
Comment 18•15 years ago
|
||
WFM (along with bug 310451 and bug 199035, both mentioned above).
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.3a1pre) Gecko/20090823 Minefield/3.7a1pre
I don't know whether dbaron's concerns in comment 17 were addressed.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•