Closed Bug 409587 Opened 17 years ago Closed 17 years ago

input[type="file"] cropped when narrow width specified

Categories

(Core :: Layout, defect)

defect
Not set
major

Tracking

()

VERIFIED FIXED
mozilla1.9beta3

People

(Reporter: phiw2, Assigned: kinetik)

References

Details

(Keywords: regression, testcase)

Attachments

(3 files, 1 obsolete file)

Attached file test case
When a width of less than 250px is specified (on the widget), the button part of the widget is cropped.
e.g input[type="file"] {width:200px;}

regressed (tested: OS X 10.4.11):
Fails
Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O 10.4; en-US; rv:1.9b2pre) Gecko/2007112702 Minefield/3.0b2pre
Camino Version 2007112701 (2.0a1pre)

Works
Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O 10.4; en-US; rv:1.9b2pre) Gecko/2007112604 Minefield/3.0b2pre

http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=all&branch=HEAD&branchtype=match&dir=&file=&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=explicit&mindate=2007-11-26+04%3A00%3A00&maxdate=2007-11-27+00%3A00%3A00&cvsroot=%2Fcvsroot

regression from bug 363696, most likely
Flags: blocking1.9?
Indeed.... We want to hide overflow in the vertical direction, but not in the horizontal direction here...

roc, do we have a sane way of doing that? 
We could change the clip rect passed to OverflowClip to extend further out horizontally to include all child rects. Pretty easy... Matthew, can you handle this one?
Assignee: nobody → kinetik
Attached patch patch v1 (obsolete) — Splinter Review
Set the width of the clip rect to NS_UNCONSTRAINEDSIZE so that we only clip the height.  Reftest included.
Attachment #295717 - Flags: superreview?
Attachment #295717 - Flags: review?(bzbarsky)
Attachment #295717 - Flags: superreview? → superreview?(roc)
I'm really not qualified to review this (esp since I'm not sure what the display list code does with that rect).  I hope we never pass it to a gfx Clip() call, right?

In any case, I think roc can just r+sr this.
Attached patch patch v2Splinter Review
Use the overflow rect's maximum width rather than NS_UNCONSTRAINED.
Attachment #295717 - Attachment is obsolete: true
Attachment #295723 - Flags: superreview?(roc)
Attachment #295723 - Flags: review?(roc)
Attachment #295717 - Flags: superreview?(roc)
Attachment #295717 - Flags: review?(bzbarsky)
Attachment #295723 - Flags: superreview?(roc)
Attachment #295723 - Flags: superreview+
Attachment #295723 - Flags: review?(roc)
Attachment #295723 - Flags: review+
Comment on attachment 295723 [details] [diff] [review]
patch v2

Requesting approval.  Simple low risk fix for a recent regression.
Attachment #295723 - Flags: approval1.9?
Comment on attachment 295723 [details] [diff] [review]
patch v2

a=beltzner for 1.9
Attachment #295723 - Flags: approval1.9? → approval1.9+
Keywords: checkin-needed
Checking in layout/forms/nsFileControlFrame.cpp;
/cvsroot/mozilla/layout/forms/nsFileControlFrame.cpp,v  <--  nsFileControlFrame.cpp
new revision: 3.222; previous revision: 3.221
done
Checking in layout/reftests/reftest.list;
/cvsroot/mozilla/layout/reftests/reftest.list,v  <--  reftest.list
new revision: 1.94; previous revision: 1.93
done
RCS file: /cvsroot/mozilla/layout/reftests/forms/input-file-width-clip-1.html,v
done
Checking in layout/reftests/forms/input-file-width-clip-1.html;
/cvsroot/mozilla/layout/reftests/forms/input-file-width-clip-1.html,v  <--  input-file-width-clip-1.html
initial revision: 1.1
done
RCS file: /cvsroot/mozilla/layout/reftests/forms/input-file-width-clip-ref.html,v
done
Checking in layout/reftests/forms/input-file-width-clip-ref.html;
/cvsroot/mozilla/layout/reftests/forms/input-file-width-clip-ref.html,v  <--  input-file-width-clip-ref.html
initial revision: 1.1
done
RCS file: /cvsroot/mozilla/layout/reftests/forms/reftest.list,v
done
Checking in layout/reftests/forms/reftest.list;
/cvsroot/mozilla/layout/reftests/forms/reftest.list,v  <--  reftest.list
initial revision: 1.1
done
Status: NEW → RESOLVED
Closed: 17 years ago
Keywords: checkin-needed
OS: Mac OS X → All
Hardware: Macintosh → All
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9 M11
verified with
Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.4; en-US; rv:1.9b3pre) Gecko/2008010720 Minefield/3.0b3pr
Status: RESOLVED → VERIFIED
Flags: blocking1.9?
Flags: in-litmus?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: