Closed Bug 410146 Opened 17 years ago Closed 17 years ago

Input is wider that its parent width

Categories

(Core :: Layout: Form Controls, defect)

x86
Windows Server 2003
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: kes-kes, Unassigned)

References

Details

(Keywords: regression, testcase)

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9b3pre) Gecko/2007122405 Minefield/3.0b3pre
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9b3pre) Gecko/2007122405 Minefield/3.0b3pre

When input is inside absolute positioned span it do not reduce its width as in FFv2.0 have done

Reproducible: Always

Steps to Reproduce:
<span style="border-style: solid; border-width: 0pt; bottom: 0pt; position: absolute; width: 100px; height: 20px; cursor: default;" class=""><div align="center" style="display: none;" valign="center"/><input type="text" style="border: 1px solid black; left: 0pt; top: 0pt; right: 0pt; position: absolute; height: 20px; cursor: default;" class=""/></span>


Expected Results:  
input must have width not more as its contained block
Attached file test case
This regressed between 7 and 14 Dec 2006, so it could have been caused by bug 300030.
Component: General → Layout: Form Controls
Keywords: regression, testcase
Product: Firefox → Core
QA Contact: general → layout.form-controls
Version: unspecified → Trunk
A text control is a replaced element, so the rendering is correct.  The old rendering was actually buggy.

See bug 307102 for links to the spec section that applies to this case, and so forth.
Status: UNCONFIRMED → RESOLVED
Closed: 17 years ago
Resolution: --- → INVALID
Please point algorithm that will be used in my case:
WWW: http://www.w3.org/TR/CSS21/visudet.html#inline-replaced-width
10.3.2 Inline, replaced elements
A computed value of 'auto' for 'margin-left' or 'margin-right' becomes a used value of '0'.

If 'height' and 'width' both have computed values of 'auto' and the element also has an intrinsic width, then that intrinsic width is the used value of 'width'.

If 'height' and 'width' both have computed values of 'auto' and the element has no intrinsic width, but does have an intrinsic height and intrinsic ratio; or if 'width' has a computed value of 'auto', 'height' has some other computed value, and the element does have an intrinsic ratio; then the used value of 'width' is:

    (used height) * (intrinsic ratio)

If 'height' and 'width' both have computed values of 'auto' and the element has an intrinsic ratio but no intrinsic height or width and the containing block's width doesn't itself depend on the replaced element's width, then the used value of 'width' is calculated from the constraint equation used for block-level, non-replaced elements in normal flow.

Otherwise, if 'width' has a computed value of 'auto', but none of the conditions above are met, then the used value of 'width' becomes 300px. If 300px is too wide to fit the device, UAs should use the width of the largest rectangle that has a 2:1 ratio and fits the device instead.

Percentage intrinsic widths are first evaluated with respect to the containing block's width, if that width doesn't itself depend on the replaced element's width. If it does, then a percentage intrinsic width on that element can't be resolved and the element is assumed to have no intrinsic width. 
i don't get it.  What does it mean?  It doesn't seem to make sense (especially 10.3.8).  I never got understanding through this page.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: