Bug 1406631: Remove the color-picker-available system metric. r=xidorn

All our widgets support it with a constant true.

MozReview-Commit-ID: JMEItUsxYWq

--HG--
extra : rebase_source : e7e0a3f83001813239338bc5b3895252e1fb3ea6
This commit is contained in:
Emilio Cobos Álvarez 2017-10-07 14:06:44 +02:00
Родитель 461c0cca48
Коммит e808575ca4
12 изменённых файлов: 13 добавлений и 53 удалений

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

@ -2256,7 +2256,6 @@ GK_ATOM(forcemessagemanager, "forcemessagemanager")
GK_ATOM(isPreloadBrowser, "isPreloadBrowser")
// Names for system metrics
GK_ATOM(color_picker_available, "color-picker-available")
GK_ATOM(scrollbar_start_backward, "scrollbar-start-backward")
GK_ATOM(scrollbar_start_forward, "scrollbar-start-forward")
GK_ATOM(scrollbar_end_backward, "scrollbar-end-backward")
@ -2286,7 +2285,6 @@ GK_ATOM(windows_theme_zune, "windows-theme-zune")
GK_ATOM(windows_theme_generic, "windows-theme-generic")
// And the same again, as media query keywords.
GK_ATOM(_moz_color_picker_available, "-moz-color-picker-available")
GK_ATOM(_moz_scrollbar_start_backward, "-moz-scrollbar-start-backward")
GK_ATOM(_moz_scrollbar_start_forward, "-moz-scrollbar-start-forward")
GK_ATOM(_moz_scrollbar_end_backward, "-moz-scrollbar-end-backward")

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

@ -6,14 +6,14 @@
.ltr, .rtl, .v-rl { border: 1px solid blue; }
.a { -moz-appearance: none; }
.ltr input[type="color"]:-moz-system-metric(color-picker-available),
.rtl input[type="color"]:-moz-system-metric(color-picker-available) {
.ltr input[type="color"],
.rtl input[type="color"] {
width: 64px;
height: 23px;
padding: 0px 8px;
}
.v-rl input[type="color"]:-moz-system-metric(color-picker-available) {
.v-rl input[type="color"] {
height: 64px;
width: 23px;
padding: 8px 0px;

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

@ -1144,11 +1144,6 @@ nsCSSRuleProcessor::InitSystemMetrics()
sSystemMetrics->AppendElement(nsGkAtoms::windows_glass);
}
rv = LookAndFeel::GetInt(LookAndFeel::eIntID_ColorPickerAvailable, &metricResult);
if (NS_SUCCEEDED(rv) && metricResult) {
sSystemMetrics->AppendElement(nsGkAtoms::color_picker_available);
}
rv = LookAndFeel::GetInt(LookAndFeel::eIntID_WindowsClassic, &metricResult);
if (NS_SUCCEEDED(rv) && metricResult) {
sSystemMetrics->AppendElement(nsGkAtoms::windows_classic);

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

@ -633,14 +633,6 @@ nsMediaFeatures::features[] = {
{ nullptr },
GetIsResourceDocument
},
{
&nsGkAtoms::_moz_color_picker_available,
nsMediaFeature::eMinMaxNotAllowed,
nsMediaFeature::eBoolInteger,
nsMediaFeature::eNoRequirements,
{ &nsGkAtoms::color_picker_available },
GetSystemMetric
},
{
&nsGkAtoms::_moz_scrollbar_start_backward,
nsMediaFeature::eMinMaxNotAllowed,

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

@ -519,7 +519,7 @@ input[type="file"] > button[type="button"] {
}
/* colored part of the color selector button */
input[type="color"]:-moz-system-metric(color-picker-available)::-moz-color-swatch {
input[type="color"]::-moz-color-swatch {
width: 100%;
height: 100%;
min-width: 3px;
@ -606,7 +606,7 @@ input[type="search"] {
/* Non text-related properties for buttons: these ones are shared with
input[type="color"] */
button,
input[type="color"]:-moz-system-metric(color-picker-available),
input[type="color"],
input[type="reset"],
input[type="button"],
input[type="submit"] {
@ -641,7 +641,7 @@ input[type="submit"] {
overflow-clip-box: padding-box;
}
input[type="color"]:-moz-system-metric(color-picker-available) {
input[type="color"] {
inline-size: 64px;
block-size: 23px;
}
@ -689,7 +689,7 @@ button {
}
button:hover,
input[type="color"]:-moz-system-metric(color-picker-available):hover,
input[type="color"]:hover,
input[type="reset"]:hover,
input[type="button"]:hover,
input[type="submit"]:hover {
@ -704,7 +704,7 @@ input[type="submit"]:hover {
}
button:active:hover,
input[type="color"]:-moz-system-metric(color-picker-available):active:hover,
input[type="color"]:active:hover,
input[type="reset"]:active:hover,
input[type="button"]:active:hover,
input[type="submit"]:active:hover {
@ -726,7 +726,7 @@ input[type="submit"]:active:hover {
}
button::-moz-focus-inner,
input[type="color"]:-moz-system-metric(color-picker-available)::-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,
@ -740,7 +740,7 @@ input[type="file"] > button[type="button"]::-moz-focus-inner {
}
button:-moz-focusring::-moz-focus-inner,
input[type="color"]:-moz-system-metric(color-picker-available):-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,
@ -749,8 +749,8 @@ input[type="file"] > button[type="button"]:-moz-focusring::-moz-focus-inner {
}
button:disabled:active, button:disabled,
input[type="color"]:-moz-system-metric(color-picker-available):disabled:active,
input[type="color"]:-moz-system-metric(color-picker-available):disabled,
input[type="color"]:disabled:active,
input[type="color"]:disabled,
input[type="reset"]:disabled:active,
input[type="reset"]:disabled,
input[type="button"]:disabled:active,

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

@ -288,7 +288,7 @@ xul|menulist:active {
}
button:active:hover,
input[type="color"]:-moz-system-metric(color-picker-available):active:hover,
input[type="color"]:active:hover,
input[type="reset"]:active:hover,
input[type="button"]:active:hover,
input[type="submit"]:active:hover {

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

@ -388,15 +388,6 @@ public:
*/
eIntID_SwipeAnimationEnabled,
/*
* A Boolean value to determine whether we have a color picker available
* for <input type="color"> to hook into.
*
* This lets us selectively enable the style for <input type="color">
* based on whether it's functional or not.
*/
eIntID_ColorPickerAvailable,
/*
* A boolean value indicating whether or not the device has a hardware
* home button. Used on gaia to determine whether a home button

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

@ -397,10 +397,6 @@ nsLookAndFeel::GetIntImpl(IntID aID, int32_t &aResult)
aResult = 1;
break;
case eIntID_ColorPickerAvailable:
aResult = 1;
break;
case eIntID_WindowsDefaultTheme:
case eIntID_WindowsThemeIdentifier:
case eIntID_OperatingSystemVersionIdentifier:

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

@ -481,9 +481,6 @@ nsLookAndFeel::GetIntImpl(IntID aID, int32_t &aResult)
aResult = [NSEvent isSwipeTrackingFromScrollEventsEnabled] ? 1 : 0;
}
break;
case eIntID_ColorPickerAvailable:
aResult = 1;
break;
case eIntID_ContextMenuOffsetVertical:
aResult = -6;
break;

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

@ -635,9 +635,6 @@ nsLookAndFeel::GetIntImpl(IntID aID, int32_t &aResult)
case eIntID_SwipeAnimationEnabled:
aResult = 0;
break;
case eIntID_ColorPickerAvailable:
aResult = 1;
break;
case eIntID_ContextMenuOffsetVertical:
case eIntID_ContextMenuOffsetHorizontal:
aResult = 2;

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

@ -263,9 +263,6 @@ HeadlessLookAndFeel::GetIntImpl(IntID aID, int32_t &aResult)
case eIntID_SwipeAnimationEnabled:
aResult = 0;
break;
case eIntID_ColorPickerAvailable:
aResult = 1;
break;
case eIntID_PhysicalHomeButton:
aResult = 0;
break;

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

@ -531,9 +531,6 @@ nsLookAndFeel::GetIntImpl(IntID aID, int32_t &aResult)
case eIntID_SwipeAnimationEnabled:
aResult = 0;
break;
case eIntID_ColorPickerAvailable:
aResult = true;
break;
case eIntID_UseOverlayScrollbars:
aResult = false;
break;