Closed Bug 244058 Opened 21 years ago Closed 21 years ago

BUTTON elements forced to native look even with CSS unsupported by native theme (e.g. background)

Categories

(Camino Graveyard :: HTML Form Controls, defect)

PowerPC
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Camino0.8

People

(Reporter: stuart.morgan+bugzilla, Assigned: stuart.morgan+bugzilla)

References

()

Details

(Keywords: fixed1.7)

Attachments

(1 file, 2 obsolete files)

<button> elements are always drawn native, but the consensus seems to be that we should revert to gfx for styled <buttons> since they can be way more complex than a simple <input> button. This will let us support background images and colors for <button>s so buttons with light text colors are still readable (see travelocity link). I'll hopefully have a fix soon to add NS_BUTTON_BEVEL support to IsWidgetStyled.
CCing pinkerton and bryner, since they'll have to approve it at some point.
Status: NEW → ASSIGNED
Attached patch Disables <button> theme support (obsolete) — Splinter Review
After messing around with this and considering, my opinion is that we should always use gfx-style <button>s. They can contain arbitrary HTML, so there's no good way of knowing if styled buttons make sense. If we use IsWidgetStyled, we'll get weird, inconsisntant results. Example: <button style="background-color:red; color:blue"><div>Click</div></button> <button><div style="background-color:red; color:blue">Click</div></button> These should look basically the same, but any use of styling detection for theming will give us one themed button and one unthemed. Since there's no good way to tell, and I think we should have both consistency and stylability, I vote for gfx-buttons (especially since I don't think most people would use a <button> over an <input> if they weren't doing semi-complex things with them).
Nominating for 0.8, since I really think we need to do *something* to make sure we aren't allowing foreground w/o background on <button>s. Otherwise, sites with such buttons (like travelocity) are unusable.
Target Milestone: --- → Camino0.8
Attachment #149109 - Flags: review?(pinkerton)
Comment on attachment 149109 [details] [diff] [review] Disables <button> theme support r=pink.
Attachment #149109 - Flags: superreview?(bryner)
Attachment #149109 - Flags: review?(pinkerton)
Attachment #149109 - Flags: review+
Attached patch better patch (obsolete) — Splinter Review
instead of removing all code for bevel buttons in the theme code, just don't use -moz-appearance in css for <button> tag
Attachment #149109 - Attachment is obsolete: true
Attachment #149109 - Flags: superreview?(bryner)
Attachment #149239 - Flags: superreview?(bryner)
Attachment #149239 - Flags: superreview?(bryner) → superreview+
Hm... I thought I tried that and it made <button>s use NS_THEME_BUTTON instead of BUTTON_BEVEL, and thus get themed sometimes.
Yeah, I just double-checked. Pink's patch will make <button>s into NS_THEME_BUTTONs, and will thus be themed if unstyled (and will in fact go from themed when enabled to gfx when disabled, which is extra bad).
The better and working patch is to replace -moz-appearance: button-bevel; margin: 5px 2px 0px 2px; padding: 0px; border-width: 2px 4px 4px 4px; With -moz-appearance: none; I don't think we want to get rid of the line for moz-focus-inner, 'cause that's just ugly. We still get feedback from the button-push. No source tree handy at the moment, so I can't attach a new patch, but I tested this and it works.
Always makes <button> un-themed, adds the moz-focus-ring back in for <button>s
Attachment #149239 - Attachment is obsolete: true
Comment on attachment 149584 [details] [diff] [review] working better patch We presumably need an a= for the 1.7 branch as well, so please request that from the appropriate person.
Attachment #149584 - Flags: superreview?(bryner)
Attachment #149584 - Flags: review?(pinkerton)
Attachment #149584 - Flags: superreview?(bryner) → superreview+
Comment on attachment 149584 [details] [diff] [review] working better patch a=asa (on behalf of drivers) for checkin to 1.7
Attachment #149584 - Flags: approval1.7+
Comment on attachment 149584 [details] [diff] [review] working better patch r=pink
Attachment #149584 - Flags: review?(pinkerton) → review+
landed on trunk and branch
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Keywords: fixed1.7
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: