If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

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

VERIFIED FIXED in mozilla1.9.2a1

Status

()

Core
Layout: Form Controls
P3
normal
VERIFIED FIXED
9 years ago
9 years ago

People

(Reporter: eisa01, Assigned: Michael Ventnor)

Tracking

({verified1.9.1})

Trunk
mozilla1.9.2a1
verified1.9.1
Points:
---
Dependency tree / graph
Bug Flags:
blocking1.9.1 -
wanted1.9.1 +
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(8 attachments)

(Reporter)

Description

9 years ago
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.
(Reporter)

Comment 1

9 years ago
Created attachment 358651 [details]
test case
(Reporter)

Updated

9 years ago
Flags: wanted1.9.1?
Version: unspecified → 1.9.1 Branch

Comment 2

9 years ago
Created attachment 358660 [details]
testcase 2

Same problem with <button>

Updated

9 years ago
Blocks: 212633
Status: UNCONFIRMED → NEW
Ever confirmed: true

Updated

9 years ago
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

Comment 4

9 years ago
Created attachment 358788 [details]
testcase 3 (styled buttons; IE-compatible)
(Assignee)

Comment 5

9 years ago
Created attachment 358976 [details] [diff] [review]
[checked-in] Patch

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.
(Assignee)

Comment 7

9 years ago
Created attachment 358982 [details] [diff] [review]
[checked-in] Reftest
Attachment #358976 - Flags: superreview?(roc)
Attachment #358976 - Flags: superreview+
Attachment #358976 - Flags: review?(roc)
Attachment #358976 - Flags: review+
(Assignee)

Updated

9 years ago
Keywords: checkin-needed
Whiteboard: [needs landing]
Flags: wanted1.9.1? → blocking1.9.1+
Priority: -- → P3
Pushed http://hg.mozilla.org/mozilla-central/rev/777f55d55ccc and http://hg.mozilla.org/mozilla-central/rev/daca86bf5d85.
Status: ASSIGNED → RESOLVED
Last Resolved: 9 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Whiteboard: [needs landing] → [needs 191 landing]

Comment 9

9 years ago
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).
Created attachment 359253 [details]
screenshot testcase 3

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.

Comment 13

9 years ago
(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.
(Assignee)

Comment 18

9 years ago
Created attachment 359624 [details] [diff] [review]
Also fix file uploaders

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+
(Assignee)

Comment 19

9 years ago
Created attachment 359632 [details] [diff] [review]
Reftest for file upload control

Reftests: roc loves them, I have to make them :/
(Assignee)

Updated

9 years ago
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

Updated

9 years ago
Depends on: 476062
Pushed file upload control patch to trunk: http://hg.mozilla.org/mozilla-central/rev/00f74e51fe52
Status: REOPENED → RESOLVED
Last Resolved: 9 years ago9 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+
Attachment #359624 - Flags: approval1.9.1+
Comment on attachment 359624 [details] [diff] [review]
Also fix file uploaders

Simple fix for a bug in a new feature
Attachment #359632 - Flags: approval1.9.1+
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+
Attachment #358982 - Flags: approval1.9.1+

Updated

9 years ago
Depends on: 476308
This caused bug 476308.  Please don't land on 1.9.1 until that's resolved?

Updated

9 years ago
Keywords: checkin-needed
http://hg.mozilla.org/releases/mozilla-1.9.1/rev/8be6f1f1bb3c
http://hg.mozilla.org/releases/mozilla-1.9.1/rev/80a57a22c967
http://hg.mozilla.org/releases/mozilla-1.9.1/rev/23adc0bc597d

I forgot to land 476308 at the same time, but that fix is ready to land and should be pushed to 1.9.1 ASAP.
Keywords: fixed1.9.1
Whiteboard: [needs 191 landing]
(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 ?
Yes thanks!
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
Keywords: fixed1.9.1 → verified1.9.1
Target Milestone: --- → mozilla1.9.2a1
You need to log in before you can comment on or make changes to this bug.