зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1835464
- Check dialog is modal flag instead of open attribute in 'check popover validity' algorithm. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D181089
This commit is contained in:
Родитель
e6d575b5d9
Коммит
96a16d3cad
|
@ -78,11 +78,6 @@ void HTMLDialogElement::Show(ErrorResult& aError) {
|
|||
"Cannot call show() on an open modal dialog.");
|
||||
}
|
||||
|
||||
if (IsPopoverOpen()) {
|
||||
return aError.ThrowInvalidStateError(
|
||||
"Dialog element is already an open popover.");
|
||||
}
|
||||
|
||||
SetOpen(true, IgnoreErrors());
|
||||
|
||||
StorePreviouslyFocusedElement();
|
||||
|
|
|
@ -3276,10 +3276,12 @@ bool nsGenericHTMLElement::CheckPopoverValidity(
|
|||
return false;
|
||||
}
|
||||
|
||||
if (IsHTMLElement(nsGkAtoms::dialog) && HasAttr(nsGkAtoms::open)) {
|
||||
aRv.ThrowInvalidStateError("Element is an open <dialog> element");
|
||||
if (auto* dialog = HTMLDialogElement::FromNode(this)) {
|
||||
if (dialog->IsInTopLayer()) {
|
||||
aRv.ThrowInvalidStateError("Element is a modal <dialog> element");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (State().HasState(ElementState::FULLSCREEN)) {
|
||||
aRv.ThrowInvalidStateError("Element is fullscreen");
|
||||
|
|
|
@ -1,16 +1,4 @@
|
|||
[popover-top-layer-combinations.html]
|
||||
[Popover combination: Popover Dialog]
|
||||
expected: FAIL
|
||||
|
||||
[Popover combination: Open Non-modal Popover Dialog]
|
||||
expected: FAIL
|
||||
|
||||
[Popover combination: Fullscreen Popover]
|
||||
expected:
|
||||
if os == "linux": FAIL
|
||||
|
||||
[Popover combination: Fullscreen Popover Dialog]
|
||||
expected: FAIL
|
||||
|
||||
[Popover combination: Fullscreen Open Non-modal Popover Dialog]
|
||||
expected: FAIL
|
||||
|
|
Загрузка…
Ссылка в новой задаче