Skip to content

Commit

Permalink
Fix modal-dialog-in-table-column.html & modal-dialog-in-replaced-rend…
Browse files Browse the repository at this point in the history
…erer.html to match Gecko & WebKit behavior

Gecko & WebKit do not generate boxes for modal dialogs in replaced renderers, and nothing in the spec really says this is the wanted behavior.

Blink follows the 'reparent in box tree' logic, but it can be argued that since no box is generated in the first place (like for display: none),
there is nothing to reparent, hence no box should be displayed.

This is the consensus of a CSSWG meeting: w3c/csswg-drafts#6939 (comment)
  • Loading branch information
nt1m committed Feb 22, 2022
1 parent 468c684 commit 4c4e96e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,7 @@
</style>
</head>
<body>
<p>Bug <a href="http://webkit.org/b/103477">103477</a>: Make
NodeRenderingContext::parentRenderer and nextRenderer top layer aware
<p>The test passes if you see a green square near the top and green rectangle in the center of the viewport.
<p>The test passes if you see a green square near the top of the viewport.
<div></div>
<dialog id="dialog"></dialog>
<script>
document.getElementById('dialog').showModal();
</script>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<title>Modal dialog inside replaced renderer should not generate box</title>
<link rel="match" href="modal-dialog-in-replaced-renderer-ref.html">
<link rel="help" href="https://fullscreen.spec.whatwg.org/#new-stacking-layer">
<style>
Expand All @@ -14,9 +15,7 @@
</style>
</head>
<body>
<p>Bug <a href="http://webkit.org/b/103477">103477</a>: Make
NodeRenderingContext::parentRenderer and nextRenderer top layer aware
<p>The test passes if you see a green square near the top and green rectangle in the center of the viewport.
<p>The test passes if you see a green square near the top of the viewport.
<div>
<dialog id="dialog"></dialog>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,6 @@
</style>
</head>
<body>
<p>Bug <a href="http://webkit.org/b/103477">103477</a>: Make
NodeRenderingContext::parentRenderer and nextRenderer top layer aware
<p>The test passes if you see a green rectangle in the center of the viewport.
<dialog id="dialog"></dialog>
<script>
document.getElementById('dialog').showModal();
</script>
<p>The test passes if you see no green rectangle.
</body>
</html>
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<title>Modal dialog inside display: table-column should not generate box</title>
<link rel="match" href="modal-dialog-in-table-column-ref.html">
<link rel="help" href="https://fullscreen.spec.whatwg.org/#new-stacking-layer">
<style>
Expand All @@ -14,9 +15,7 @@
</style>
</head>
<body>
<p>Bug <a href="http://webkit.org/b/103477">103477</a>: Make
NodeRenderingContext::parentRenderer and nextRenderer top layer aware
<p>The test passes if you see a green rectangle in the center of the viewport.
<p>The test passes if you see no green rectangle.
<div>
<dialog id="dialog"></dialog>
</div>
Expand Down

0 comments on commit 4c4e96e

Please sign in to comment.