Open
Bug 486745
Opened 17 years ago
Updated 3 years ago
non-native form controls have abnormal border colors in standards mode for no apparent reason
Categories
(Core :: Layout: Form Controls, defect)
Tracking
()
NEW
People
(Reporter: zwol, Unassigned)
Details
Attachments
(2 files)
Consider this document:
<!doctype html>
<html><head><style>
* { margin: 3px }
div { width: 9px; height: 9px; border: 2px inset ThreeDFace; }
input { -moz-appearance: none }
</style><head><body>
<div></div>
<input type="checkbox">
</body></html>
The border style declared here for the DIV is exactly the same as the border style that forms.css declares for non-native checkboxes (actually non-native form controls in general). But they are not drawn with the same colors! For me, the DIV is drawn with #adadac (top,left) / #fafafa (bottom, right) and the checkbox is drawn with #888887 / #fcfcfc.
This effect vanishes if you delete the <!doctype html>, i.e. if you put the document in *quirks* mode (!) If anything I would have expected it to be the other way around. More baffling, I can't find any code at all that looks like it could be responsible for this.
Comment 1•17 years ago
|
||
Comment 2•17 years ago
|
||
Comment 3•17 years ago
|
||
One obvious quirks-vs-strict issue here is how FindNonTransparentBackground is called from PaintBorder. In standards mode, for the input we find the input's background. For the div, and for the input in quirks mode, we find no non-transparent backgrounds. The background color affects border color computations; certainly for inset/outset.
Should FindNonTransparentBackground somehow do something useful with the canvas default background if no other backgrounds are specified, perhaps?
| Reporter | ||
Comment 4•17 years ago
|
||
> One obvious quirks-vs-strict issue here is how FindNonTransparentBackground is
> called from PaintBorder.
Thank you, I would never have thought of that.
> Should FindNonTransparentBackground somehow do something useful with the canvas
> default background if no other backgrounds are specified, perhaps?
Makes sense to me, although I'd like to hear what dbaron thinks of the idea. I'm also wondering if we could kill off this particular quirk entirely -- it's not mentioned on https://developer.mozilla.org/En/Mozilla_Quirks_Mode_Behavior and it seems like its only effect would be this sort of subtle color rendering variation. (But I'm grumpy right now 'cos I've wasted a lot of time on this.)
Comment 5•17 years ago
|
||
Heck, I didn't remember that quirk either; I just recalled that inset border colors depended on backgrounds and tried messing with the background... ;)
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•