Closed Bug 491180 Opened 15 years ago Closed 15 years ago

button elements clip their contents, but should not

Categories

(Core :: Layout: Form Controls, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: jet1972, Assigned: bzbarsky)

References

()

Details

(Keywords: regression)

Attachments

(3 files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b5pre) Gecko/20090502 Shiretoko/3.5b5pre (.NET CLR 3.5.30729)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b5pre) Gecko/20090502 Shiretoko/3.5b5pre (.NET CLR 3.5.30729)

The logos on this page are only shown partly.

Reproducible: Always
Version: unspecified → 3.5 Branch
Confirmed on Windows XP. Regression range is: http://bonsai.mozilla.org/cvsquery.cgi?module=PhoenixTinderbox&date=explicit&mindate=2006-01-25+16%3A00&maxdate=2006-01-26+10%3A00
Blocks: 317375
Component: General → Layout: Images
Keywords: regression
Product: Firefox → Core
QA Contact: general → layout.images
Version: 3.5 Branch → Trunk
Flags: blocking1.9.2?
marking new
Status: UNCONFIRMED → NEW
Ever confirmed: true
Confirmed on Mac OS X 10.5.6 (nl_NL) / Firefox 3.5b4.

I've done a little poking around using Firebug, but indeed this looks like a Firefox bug. When I look at the size of one of the IMG elements in the page, its size is sufficient to show the whole picture, but it does not.

Then when I look at the IMG source file:
https://eservice.nordeafinance.com/P6248/Images/sampologo.gif
I do get the complete picture.

Alternatively, this may be a CSS-related error in the website.
Flags: wanted1.9.1?
Flags: wanted1.9.0.x?
Cancelling request until we have enough data to show it's a real bug.
Flags: wanted1.9.1?
The problem is that button elements are clipping their contents; they don't seem to do so in WebKit, and I'm guessing they didn't before frame display lists landed.
The expected results in the testcase are that the entire 32x32 white square with a black border should be visible; currently the bottom (which sticks outside the fuchsia button) is being cut off.
Summary: Images shown only partly → button elements clip their contents, but should not
Component: Layout: Images → Layout: Form Controls
QA Contact: layout.images → layout.form-controls
Not sure if the position:relative matters; worth checking.
See also bug 503289.

My testing shows that:

1)  Opera clips the non-rel-pos content, but doesn't clip the rel pos content.
2)  Safari doesn't clip period, including this testcase:

  data:text/html,<button style="width:0px">aaaaaaaaaaa</button>

3)  Safari does clip this:

  data:text/html,<input value="aaaaaaaaa" type="button" style="width:0px">

I think the <input> behavior is needed for web compat.  I'd support switching to the safari behavior for <button>. That means conditioning the OverflowClip in nsHTMLButtonControlFrame::BuildDisplayList on what content node we have.  That doesn't seem too terrible to me.
Blocks: 503289
Oh, and the Firefox 2 behavior (so from before display lists) was like Opera's.  It was an obvious artifact of rel pos frames having views.
No longer blocks: 503289
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Attachment #390088 - Flags: review?(roc)
Pushed http://hg.mozilla.org/mozilla-central/rev/12728e187734
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Flags: blocking1.9.2? → wanted1.9.2+
Flags: wanted1.9.0.x?
Depends on: 578786
Depends on: 1011385
Issue is Resolved - removing QA-Wanted Keywords - QA-Wanted query clean-up task
Keywords: qawanted
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: