Bug 349259. Allow pages to override line-height on form controls, except for <select>. r=dbaron

This commit is contained in:
Boris Zbarsky 2011-05-05 12:26:32 -04:00
parent 21d5563d9b
commit 3c2cc88e2d
2 changed files with 11 additions and 11 deletions

View File

@ -97,13 +97,7 @@ input {
color: -moz-FieldText;
font: -moz-field;
text-rendering: optimizeLegibility;
/*
* Note that the "UA !important" tests in
* layout/style/test/test_animations.html depend on this rule, because
* they need some UA !important rule to test. If this changes, use a
* different one there.
*/
line-height: normal !important;
line-height: normal;
text-align: start;
text-transform: none;
word-spacing: normal;
@ -219,6 +213,12 @@ select {
background-color: -moz-Combobox;
color: -moz-ComboboxText;
font: -moz-list;
/*
* Note that the "UA !important" tests in
* layout/style/test/test_animations.html depend on this rule, because
* they need some UA !important rule to test. If this changes, use a
* different one there.
*/
line-height: normal !important;
white-space: nowrap !important;
word-wrap: normal !important;
@ -537,7 +537,7 @@ input[type="submit"] {
background-color: ButtonFace;
color: ButtonText;
font: -moz-button;
line-height: normal !important;
line-height: normal;
white-space: pre;
cursor: default;
-moz-box-sizing: border-box;

View File

@ -1203,12 +1203,12 @@ done_div();
// Test that UA !important rules override animations.
// This test depends on forms.css having a rule
// input { line-height: !important }
// select { line-height: !important }
// If that rule changes, we should rewrite it to depend on a different rule.
new_element("input", "");
new_element("select", "");
var default_line_height = cs.lineHeight;
done_div();
new_element("input", "-moz-animation: uaoverride 2s linear infinite");
new_element("select", "-moz-animation: uaoverride 2s linear infinite");
is(cs.lineHeight, default_line_height,
"animations should not override UA !important at 0ms");
is(cs.marginTop, "20px",