Bug 928891 part 2 - Add input[type=color] to forms.css. r=dholbert

This commit is contained in:
Arnaud Bienner 2013-10-27 01:16:42 +02:00
Родитель e011b41277
Коммит 722d4bbb4f
6 изменённых файлов: 15 добавлений и 40 удалений

Просмотреть файл

@ -1,6 +1,5 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='testcase-style.css'>
<style>
input[type="color"] {
-moz-appearance: button;

Просмотреть файл

@ -1,6 +1,5 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='testcase-style.css'>
<body>
<input type="color" />
<input type="color" value="#000000" />

Просмотреть файл

@ -1,21 +1,9 @@
button.input-color {
/* For now, input[type="color"] is styled like a textfield, because it takes
the default 'input' styles in forms.css. Once we're ready to enable it by
default, that will change (and so should these styles here). */
-moz-appearance: textfield;
padding: 1px 0px 1px 0px;
}
button.input-color::-moz-focus-inner {
padding: 0;
border: 0;
}
div.input-color-swatch {
/* This should match the styling for ::-moz-color-swatch in forms.css. */
width: 100%;
height: 100%;
min-width: 50px;
min-height: 1em;
min-width: 40px;
min-height: 15px;
display: block;
background-color:#000000; /* default color for input type color */
}

Просмотреть файл

@ -1,17 +0,0 @@
input[type=color] {
/* This matches the "padding" declaration for 'input' in forms.css, but we
need to specify it here as well in order for the testcases to match the
reference cases' renderings on Windows. This is because
nsNativeThemeWin.cpp checks HasAuthorSpecifiedRules() when deciding
whether to apply some bonus theme-dependent widget padding. (And that
function only considers *author* style rules - not forms.css.) So, to make
sure the testcase and reference case get equivalent amounts of bonus
padding, we need to specify an *author*-level declaration for "padding"
for any testcase whose reference case has such a declaration.
Ultimately, when we pref on input[type="color"] by default, we can just
ensure that it uses the same padding as <button> in forms.css, at which
point we can drop the "padding" declaration from the testcases and the
reference cases (and probably drop this file altogether). */
padding: 1px 0px 1px 0px;
}

Просмотреть файл

@ -1,6 +1,5 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='testcase-style.css'>
<style>
input[type=color]:nth-child(1) { -moz-transform: matrix(1, -0.2, 0, 1, 0, 0); }
input[type=color]:nth-child(2) { -moz-transform: translateX(15em) matrix(1, 0, 0.6, 1, 0, 0); }

Просмотреть файл

@ -456,8 +456,8 @@ input[type="file"] > button[type="button"] {
input[type="color"]::-moz-color-swatch {
width: 100%;
height: 100%;
min-width: 50px;
min-height: 1em;
min-width: 40px;
min-height: 15px;
margin-left: auto;
margin-right: auto;
display: block;
@ -540,10 +540,11 @@ input[type="radio"]:hover:active {
/* Non text-related properties for buttons: these ones are shared with
input[type="color"] */
button,
button,
input[type="color"],
input[type="reset"],
input[type="button"],
input[type="submit"] {
input[type="submit"] {
-moz-appearance: button;
/* The sum of border-top, border-bottom, padding-top, padding-bottom
must be the same here, for text inputs, and for <select>. For
@ -559,10 +560,10 @@ input[type="submit"] {
/* Text-related properties for buttons: these ones are not shared with
input[type="color"] */
button,
button,
input[type="reset"],
input[type="button"],
input[type="submit"] {
input[type="submit"] {
color: ButtonText;
font: -moz-button;
line-height: normal;
@ -584,6 +585,7 @@ button {
}
button:hover,
input[type="color"]:hover,
input[type="reset"]:hover,
input[type="button"]:hover,
input[type="submit"]:hover {
@ -598,6 +600,7 @@ input[type="submit"]:hover {
}
button:active:hover,
input[type="color"]:active:hover,
input[type="reset"]:active:hover,
input[type="button"]:active:hover,
input[type="submit"]:active:hover {
@ -614,6 +617,7 @@ input[type="submit"]:active:hover {
}
button::-moz-focus-inner,
input[type="color"]::-moz-focus-inner,
input[type="reset"]::-moz-focus-inner,
input[type="button"]::-moz-focus-inner,
input[type="submit"]::-moz-focus-inner,
@ -623,6 +627,7 @@ input[type="file"] > button[type="button"]::-moz-focus-inner {
}
button:-moz-focusring::-moz-focus-inner,
input[type="color"]:-moz-focusring::-moz-focus-inner,
input[type="reset"]:-moz-focusring::-moz-focus-inner,
input[type="button"]:-moz-focusring::-moz-focus-inner,
input[type="submit"]:-moz-focusring::-moz-focus-inner,
@ -631,6 +636,8 @@ input[type="file"] > button[type="button"]:-moz-focusring::-moz-focus-inner {
}
button:disabled:active, button:disabled,
input[type="color"]:disabled:active,
input[type="color"]:disabled,
input[type="reset"]:disabled:active,
input[type="reset"]:disabled,
input[type="button"]:disabled:active,