зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 5a6100bac239 (bug 1383205) for failing browser_selectpopup_colors.js, at least on Windows. r=backout
This commit is contained in:
Родитель
7405f88773
Коммит
215e8013ba
|
@ -130,7 +130,7 @@ const SELECT_STYLE_OF_OPTION_CHANGES_AFTER_FOCUS_EVENT =
|
|||
" select.addEventListener('focus', () => select.style.color = 'red');" +
|
||||
"</script></html>";
|
||||
|
||||
const SELECT_COLOR_OF_OPTION_CHANGES_AFTER_TRANSITIONEND =
|
||||
const SELECT_STYLE_OF_OPTION_CHANGES_AFTER_TRANSITIONEND =
|
||||
"<html><head><style>" +
|
||||
" select { transition: all .1s; }" +
|
||||
" select:focus { background-color: orange; }" +
|
||||
|
@ -139,15 +139,6 @@ const SELECT_COLOR_OF_OPTION_CHANGES_AFTER_TRANSITIONEND =
|
|||
' <option selected="true">{"end": "true"}</option>' +
|
||||
"</select></body></html>";
|
||||
|
||||
const SELECT_TEXTSHADOW_OF_OPTION_CHANGES_AFTER_TRANSITIONEND =
|
||||
"<html><head><style>" +
|
||||
" select { transition: all .1s; }" +
|
||||
" select:focus { text-shadow: 0 0 0 #303030; }" +
|
||||
"</style></head><body><select id='one'>" +
|
||||
' <option>{"text-shadow": "none"}</option>' +
|
||||
' <option selected="true">{"end": "true"}</option>' +
|
||||
"</select></body></html>";
|
||||
|
||||
const SELECT_TRANSPARENT_COLOR_WITH_TEXT_SHADOW =
|
||||
"<html><head><style>" +
|
||||
" select { color: transparent; text-shadow: 0 0 0 #303030; }" +
|
||||
|
@ -415,7 +406,7 @@ add_task(async function test_style_of_options_is_dependent_on_focus_of_select_af
|
|||
await testSelectColors(SELECT_STYLE_OF_OPTION_CHANGES_AFTER_FOCUS_EVENT, 2, options);
|
||||
});
|
||||
|
||||
add_task(async function test_color_of_options_is_dependent_on_transitionend() {
|
||||
add_task(async function test_style_of_options_is_dependent_on_transitionend() {
|
||||
let options = {
|
||||
selectColor: "rgb(0, 0, 0)",
|
||||
selectBgColor: "rgb(255, 165, 0)",
|
||||
|
@ -425,19 +416,7 @@ add_task(async function test_color_of_options_is_dependent_on_transitionend() {
|
|||
}
|
||||
};
|
||||
|
||||
await testSelectColors(SELECT_COLOR_OF_OPTION_CHANGES_AFTER_TRANSITIONEND, 2, options);
|
||||
});
|
||||
|
||||
add_task(async function test_textshadow_of_options_is_dependent_on_transitionend() {
|
||||
let options = {
|
||||
skipSelectColorTest: true,
|
||||
waitForComputedStyle: {
|
||||
property: "text-shadow",
|
||||
value: "rgb(48, 48, 48) 0px 0px 0px"
|
||||
}
|
||||
};
|
||||
|
||||
await testSelectColors(SELECT_TEXTSHADOW_OF_OPTION_CHANGES_AFTER_TRANSITIONEND, 2, options);
|
||||
await testSelectColors(SELECT_STYLE_OF_OPTION_CHANGES_AFTER_TRANSITIONEND, 2, options);
|
||||
});
|
||||
|
||||
add_task(async function test_transparent_color_with_text_shadow() {
|
||||
|
|
|
@ -20,12 +20,6 @@ XPCOMUtils.defineLazyModuleGetter(this, "DeferredTask",
|
|||
const kStateActive = 0x00000001; // NS_EVENT_STATE_ACTIVE
|
||||
const kStateHover = 0x00000004; // NS_EVENT_STATE_HOVER
|
||||
|
||||
const SUPPORTED_PROPERTIES = [
|
||||
"color",
|
||||
"background-color",
|
||||
"text-shadow",
|
||||
];
|
||||
|
||||
// A process global state for whether or not content thinks
|
||||
// that a <select> dropdown is open or not. This is managed
|
||||
// entirely within this module, and is read-only accessible
|
||||
|
@ -365,9 +359,7 @@ this.SelectContentHelper.prototype = {
|
|||
}
|
||||
break;
|
||||
case "transitionend":
|
||||
if (SUPPORTED_PROPERTIES.includes(event.propertyName)) {
|
||||
this._updateTimer.arm();
|
||||
}
|
||||
this._update();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -398,10 +390,6 @@ function buildOptionListForChildren(node) {
|
|||
|
||||
let cs = getComputedStyles(child);
|
||||
|
||||
// Note: If you add any more CSS properties support here,
|
||||
// please add the property name to the SUPPORTED_PROPERTIES
|
||||
// list so that the menu can be correctly updated when CSS
|
||||
// transitions are used.
|
||||
let info = {
|
||||
index: child.index,
|
||||
tagName,
|
||||
|
|
Загрузка…
Ссылка в новой задаче