Closed
Bug 172816
Opened 22 years ago
Closed 22 years ago
Illegal empty <span> changes layout on clicking button
Categories
(Core :: Layout: Block and Inline, defect)
Core
Layout: Block and Inline
Tracking
()
VERIFIED
FIXED
People
(Reporter: harunaga, Assigned: dbaron)
References
()
Details
(Keywords: testcase, Whiteboard: [patch])
Attachments
(1 file)
309 bytes,
text/html
|
Details |
Illegal empty <span></span> which is just before <form> in strict document changes layout when you click button. Steps: 1. Load URL above. 2. Click the button. Actulal: The contents after the illegal <span> shift upward. Expected: Layout should not be changed. Confirming with 2002100208-trunk/FreeBSD and 2002100308-trunk/MacOS 9.2.
Comment 1•22 years ago
|
||
At a guess, what's happening here is that margins collapse in the incremental reflow but not in the initial reflow...
Assignee | ||
Comment 2•22 years ago
|
||
Assignee | ||
Updated•22 years ago
|
Attachment #101864 -
Attachment description: simpler testcaes → simpler testcase
Assignee | ||
Comment 3•22 years ago
|
||
I wrote IsEmpty while assuming that we gave empty inlines size in standards mode. We don't seem to. The patch would be trivial, but is it correct? Ian?
Assignee: attinasi → dbaron
Status: UNCONFIRMED → NEW
Ever confirmed: true
Assignee | ||
Comment 4•22 years ago
|
||
(The patch would be to remove the first 4 lines of nsInlineFrame::IsEmpty, I think.)
Assignee | ||
Updated•22 years ago
|
Whiteboard: [patch]
Comment 5•22 years ago
|
||
If the question is "do we want the 3em margin", the answer is yes, because the anonymous block around the inline has 0 top margin, which collapses with the 3em bottom margin on the block, leaving a 3em gap.
Assignee | ||
Comment 6•22 years ago
|
||
But why does the span not give the block the height of the normal 'line-height' and thus make it non-empty?
Comment 7•22 years ago
|
||
The following markup: <div style="margin-bottom: 3em;">Test</div> <div style="display: inline"></div> <div><input type="button" value="Click here"></div> ...becomes: <block> <block> <inline> Test </inline> </block> | block has 3em bottom margin <block> <inline> </inline> </block> | empty inline <block> <inline> <input/> </inline> </block> | replaced inline element </block> ...which should render as, including construction lines: .-------------------------------. | .---------------------------. | | | Test | | the block | `---------------------------' | | | | | 3em of margin | | | . | | | | the empty inline | ' | | .---------------------------. | | | [Click Here] | | the second block | `---------------------------' | `-------------------------------' So, from the block to the inline, you get a 3em gap.
Assignee | ||
Updated•22 years ago
|
Component: Layout → Layout: Block & Inline
Reporter | ||
Comment 8•22 years ago
|
||
2002112608 has this problem, but 2002120103 doesn't. fixed by Bug 44242?
Assignee | ||
Comment 10•22 years ago
|
||
*** Bug 183062 has been marked as a duplicate of this bug. ***
You need to log in
before you can comment on or make changes to this bug.
Description
•