Closed Bug 475197 Opened 16 years ago Closed 16 years ago

-moz-box-shadow does not work on <button> and some <input> types

Categories

(Core :: Layout: Form Controls, defect, P3)

defect

Tracking

()

VERIFIED FIXED
mozilla1.9.2a1

People

(Reporter: eisa01, Assigned: ventnor.bugzilla)

References

Details

(Keywords: verified1.9.1)

Attachments

(8 files)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2a1pre) Gecko/20090124 Minefield/3.2a1pre Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2a1pre) Gecko/20090124 Minefield/3.2a1pre The -moz-box-shadow property does not work on input elements. It does work in Safari 3.2.1 Reproducible: Always See attached file. I have made the button using a div so you can see how it should look. Also included the -webkit-box-shadow property, so you can see it render in webkit.
Attached file test case (deleted) —
Flags: wanted1.9.1?
Version: unspecified → 1.9.1 Branch
Attached file testcase 2 (deleted) —
Same problem with <button>
Blocks: 212633
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: -moz-box-shadow does not work on input elements → -moz-box-shadow does not work on <button> and some <input> types
Yep. Buttons don't call nsFrame::DisplayBorderBackgroundOutline; they do special border/background/outline painting. See nsHTMLButtonControlFrame::BuildDisplayList. Michael, want to fix this?
Version: 1.9.1 Branch → Trunk
Attached patch [checked-in] Patch (deleted) — Splinter Review
I also fixed things for fieldset considering it uses its own callers as well.
Assignee: nobody → ventnor.bugzilla
Status: NEW → ASSIGNED
Attachment #358976 - Flags: superreview?(roc)
Attachment #358976 - Flags: review?(roc)
Is there a way to reftest this? At least a != test with the same but without text/shadow... With buttons you might be able to use divs as the reference.
Attached patch [checked-in] Reftest (deleted) — Splinter Review
Attachment #358976 - Flags: superreview?(roc)
Attachment #358976 - Flags: superreview+
Attachment #358976 - Flags: review?(roc)
Attachment #358976 - Flags: review+
Keywords: checkin-needed
Whiteboard: [needs landing]
Flags: wanted1.9.1? → blocking1.9.1+
Priority: -- → P3
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Whiteboard: [needs landing] → [needs 191 landing]
Should the box-shadow apply when the form-control is otherwise unstyled (aka native) ? The native widgets in attachment (id=358660) look pretty ugly on OS X. WebKit/Safari (on OS X 10.5.6 at least) drops the box-shadow unless the author has styled the widget (border, background etc).
Attached image screenshot testcase 3 (deleted) —
attachment (id=358660) in WebKit (left) and Minefield (20090128 build).
> WebKit/Safari (on OS X 10.5.6 at least) drops the box-shadow I suspect that's an artifact of their rendering codepaths, just like this bug was an artifact of ours. Per current spec, there should certainly be a box-shadow there...
Yeah, that's just a Webkit bug. If we wanted to do something here, we would treat box-shadow as author style and drop the native look for widgets with shadows.
(In reply to comment #9) > WebKit/Safari (on OS X 10.5.6 at least) drops the box-shadow Safari and Chrome draw the shadow on Win XP, except for "radio" and "checkbox".
(In reply to comment #13) > (In reply to comment #9) > > WebKit/Safari (on OS X 10.5.6 at least) drops the box-shadow > > Safari and Chrome draw the shadow on Win XP, except for "radio" and "checkbox". Ah, thanks, I hadn't tested on Windows. (In reply to comment #12) > If we wanted to do something here, we would treat box-shadow as author style > and drop the native look for widgets with shadows. That is what I actually would have expected. And it is what I suspect WebKit Mac actually does, and I didn't find any bug in their database unless it is in rdar. Note, I doubt authors would actually use box-shadow without any other styling on form controls.
Alright, please file a followup bug for that. You can assign it to Michael.
Sorry but the shadows for buttons aren't entirely there. I still miss the shadow for the browse button of the <input type=file> elements. There is no shadow drawn. Tested with Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2a1pre) Gecko/20090129 Minefield/3.2a1pre ID:20090129020336
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Can you file a new bug for that? We probably need -moz-box-shadow:inherit on the anonymous button and textbox for file inputs.
Attached patch Also fix file uploaders (deleted) — Splinter Review
This is all we really can do considering we do some kind fo clipping on the file control frame...
Attachment #359624 - Flags: superreview?(roc)
Attachment #359624 - Flags: review?(roc)
Attachment #359624 - Flags: superreview?(roc)
Attachment #359624 - Flags: superreview+
Attachment #359624 - Flags: review?(roc)
Attachment #359624 - Flags: review+
Attached patch Reftest for file upload control (deleted) — Splinter Review
Reftests: roc loves them, I have to make them :/
Whiteboard: [needs 191 landing] → [needs 191 landing] [2nd set of patches need m-c landing]
Attachment #358976 - Attachment description: Patch → [checked-in] Patch
Attachment #358982 - Attachment description: Reftest → [checked-in] Reftest
Depends on: 476062
Pushed file upload control patch to trunk: http://hg.mozilla.org/mozilla-central/rev/00f74e51fe52
Status: REOPENED → RESOLVED
Closed: 16 years ago16 years ago
Resolution: --- → FIXED
Whiteboard: [needs 191 landing] [2nd set of patches need m-c landing] → [needs 191 landing]
Flags: wanted1.9.1+
Flags: blocking1.9.1-
Flags: blocking1.9.1+
Comment on attachment 359624 [details] [diff] [review] Also fix file uploaders Simple fix for a bug in a new feature
Comment on attachment 358976 [details] [diff] [review] [checked-in] Patch Simple fix for a bug in a new feature
Attachment #358976 - Flags: approval1.9.1+
Depends on: 476308
This caused bug 476308. Please don't land on 1.9.1 until that's resolved?
Keywords: checkin-needed
(In reply to comment #10) > Created an attachment (id=359253) [details] > screenshot testcase 3 Roc, why we still have this ugly white backgrounds for buttons which can also be seen in this screenshot? Shouldn't this be fixed too?
Yes, can you please file a new bug for comment #12?
(In reply to comment #26) > Yes, can you please file a new bug for comment #12? that is bug 476062, right ?
Ah, missed that bug. Sorry. Ok, otherwise that looks good. Verified fixed with builds on OS X and Windows: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2a1pre) Gecko/20090227 Minefield/3.2a1pre Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b3pre) Gecko/20090227 Shiretoko/3.1b3pre ID:20090227020413
Status: RESOLVED → VERIFIED
Target Milestone: --- → mozilla1.9.2a1
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: