зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1448082 [wpt PR 10146] - Don't skip display:none options finding selectable options., a=testonly
Automatic update from web-platform-testsDon't skip display:none options finding selectable options. This means we can also assume a null ComputedStyle on options means they are display:none. That is a pre-requisite for fixing issue 822581. Bug: 824754 Change-Id: Ia8a400ec8eed9ecb9a85d2c93c354841ad721492 Reviewed-on: https://chromium-review.googlesource.com/975604 Commit-Queue: Rune Lillesveen <futhark@chromium.org> Reviewed-by: Kent Tamura <tkent@chromium.org> Cr-Commit-Position: refs/heads/master@{#545443} wpt-commits: 2d1fd9e9f49a4bd8884535447282f8fd52d8fd48 wpt-pr: 10146 wpt-commits: 2d1fd9e9f49a4bd8884535447282f8fd52d8fd48 wpt-pr: 10146
This commit is contained in:
Родитель
0bfda7b74a
Коммит
daf31e776b
|
@ -567795,7 +567795,7 @@
|
|||
"testharness"
|
||||
],
|
||||
"html/semantics/forms/the-select-element/selected-index.html": [
|
||||
"3dbf338e9065f7f4ad2abfbaa55cf50329768cc2",
|
||||
"98b59224f658d97a782623a054e5c3c5611945a2",
|
||||
"testharness"
|
||||
],
|
||||
"html/semantics/forms/the-textarea-element/.gitkeep": [
|
||||
|
|
|
@ -25,6 +25,11 @@
|
|||
<option></option>
|
||||
<option selected></option>
|
||||
</select>
|
||||
|
||||
<select id=display-none>
|
||||
<option style="display:none"></option>
|
||||
<option></option>
|
||||
</select>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
|
@ -100,4 +105,19 @@ test(function () {
|
|||
form.reset();
|
||||
assertSelectedIndex(select, 1);
|
||||
}, "set and reset (HTMLOptionsCollection)");
|
||||
|
||||
test(function () {
|
||||
var select = document.getElementById('display-none');
|
||||
assertSelectedIndex(select, 0);
|
||||
}, "get display:none");
|
||||
|
||||
test(function () {
|
||||
var select = document.getElementById('display-none');
|
||||
select.offsetTop; // force rendering
|
||||
assertSelectedIndex(select, 0);
|
||||
select.options[1].selected = true;
|
||||
assertSelectedIndex(select, 1);
|
||||
select.options[1].selected = false;
|
||||
assertSelectedIndex(select, 0);
|
||||
}, "reset to display:none");
|
||||
</script>
|
||||
|
|
Загрузка…
Ссылка в новой задаче