Skip to content

Commit

Permalink
Bug 1834519 - Don't throw when popovers/dialogs are in requested stat…
Browse files Browse the repository at this point in the history
…e. r=emilio

Update to be in line with spec discussions at
whatwg/html#9142

Differential Revision: https://phabricator.services.mozilla.com/D178782

UltraBlame original commit: 39007d3d4f3eee8382115fb59e595de006ceca70
  • Loading branch information
marco-c committed May 31, 2023
1 parent cd71c63 commit d198a18
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 42 deletions.
73 changes: 58 additions & 15 deletions dom/html/HTMLDialogElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -538,9 +538,38 @@ Open
)
)
{
if
(
!
IsInTopLayer
(
)
)
{
return
;
}
return
aError
.
ThrowInvalidStateError
(
"
Cannot
call
show
(
)
on
an
open
modal
dialog
.
"
)
;
}
if
(
IsPopoverOpen
Expand Down Expand Up @@ -758,30 +787,48 @@ aError
{
if
(
!
IsInComposedDoc
Open
(
)
)
{
if
(
IsInTopLayer
(
)
)
{
return
;
}
return
aError
.
ThrowInvalidStateError
(
"
Dialog
element
is
not
connected
Cannot
call
showModal
(
)
on
an
open
non
-
modal
dialog
.
"
)
;
}
if
(
Open
!
IsInComposedDoc
(
)
)
Expand All @@ -794,13 +841,9 @@ ThrowInvalidStateError
"
Dialog
element
already
has
an
'
open
'
attribute
is
not
connected
"
)
;
Expand Down

This file was deleted.

0 comments on commit d198a18

Please sign in to comment.