Closed Bug 78066 Opened 23 years ago Closed 20 years ago

empty 'vertical-align: bottom' input has extra space below on first reflow

Categories

(Core :: Layout: Block and Inline, defect, P4)

x86
Linux
defect

Tracking

()

RESOLVED WORKSFORME
Future

People

(Reporter: dbaron, Assigned: dbaron)

References

()

Details

(Keywords: testcase)

Attachments

(2 files, 1 obsolete file)

DESCRIPTION:  An empty text input alone in a table cell but followed by
whitespace in quirks has extra space below it until one types in the input box,
and then the space is reduced.

STEPS TO REPRODUCE:
 * load testcase (or load http://my.netscape.com/ and go to "Login")
 * Type in text input

ACTUAL RESULTS:
 * text below it moves up

EXPECTED RESULTS:
 * no movement outside the box
*** Bug 82114 has been marked as a duplicate of this bug. ***
Status: NEW → ASSIGNED
Priority: -- → P2
Target Milestone: --- → mozilla0.9.2
*** Bug 82731 has been marked as a duplicate of this bug. ***
*** Bug 84437 has been marked as a duplicate of this bug. ***
*** Bug 85056 has been marked as a duplicate of this bug. ***
*** Bug 85268 has been marked as a duplicate of this bug. ***
Target Milestone: mozilla0.9.2 → mozilla0.9.3
I investigated this a bit (since I originally thought it was a bug in line 
layout), and I'm beginning to get an idea what's going on here.  Here's what 
I'm seeing:

 * the text input, according to forms.css, has 'vertical-align: bottom'.  I 
filed bug 87981 on this issue alone.

 * When we have whitespace after the text input, this whitespace gets its 
zeroEffectiveSpanBox flag set in line layout, since it's an "empty" text 
frame.  This means it is set to have a height of zero and ascent and descent of 
0 for purposes of vertical alignment.  (See bug 5821 and bug 24186.)

 * Tables expand themselves for inline content that overflows its line box, 
which I think is incorrect (bug 87982).

The combination of the zeroEffectiveSpanBox being set and the 'vertical-align: 
bottom' means that the bottom of the text input is aligned with the bottom of 
the otherwise zero-height line so that the descenders of the text overflow the 
bottom of the line.

So my theory is that the code that determines what overflow the table is seeing 
is counting the empty text node that line layout gave zero height as 
overflowing the bottom of its block and therefore expanding the table cell to 
contain it.  What I don't understand yet is why this space goes away after 
typing.
One reason this might happen only when the input is empty is that the code to
implement bug 87982 might itself be buggy.  I should find that code...
*** Bug 88606 has been marked as a duplicate of this bug. ***
*** Bug 86322 has been marked as a duplicate of this bug. ***
Checked in fix for bug 87981 to trunk on 2001-07-12 22:19 PDT.  That change
should cover up this problem and is good in itself, although the other bugs
needed to cause the problem still exist.
Moving off since it's not a major problem anymore.
Priority: P2 → P3
Summary: empty input has extra space below on first reflow → empty 'vertical-align: bottom' input has extra space below on first reflow
Target Milestone: mozilla0.9.3 → mozilla1.0.1
Target Milestone: mozilla1.0.1 → Future
Keywords: testcase
Attachment #40244 - Attachment is obsolete: true
Component: Layout → Layout: Block & Inline
Depends on: 87982
dbaron:
In comment #9 you mentioned several bugs causing this as a combined result.
All of them are fixed now (thereby fixing this bug as reported), except for bug
87982. But that one also looks like WFM, so there seems to be nothing left for
this report to be resolved.
The testcase needs to be changed for at least two reasons:
 * inputs are now reflow roots
 * explicit 'vertical-align: bottom' is required

The underlying bug may still exist.
The weird initial alignment when 'vertical-align: bottom' was present went away
between 1.0.2 and 1.1.
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: