Title: [288233] trunk
- Revision
- 288233
- Author
- [email protected]
- Date
- 2022-01-19 12:42:12 -0800 (Wed, 19 Jan 2022)
Log Message
Add visibility: visible to modal dialogs in UA sheet
https://bugs.webkit.org/show_bug.cgi?id=235369
Reviewed by Brent Fulgham.
LayoutTests/imported/w3c:
* web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-visibility-hidden-expected.txt: Added.
* web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-visibility-hidden.html: Added.
Source/WebCore:
Test: imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-visibility-hidden.html
* css/dialog.css:
(dialog:-internal-modal-dialog):
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (288232 => 288233)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2022-01-19 20:38:21 UTC (rev 288232)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2022-01-19 20:42:12 UTC (rev 288233)
@@ -1,3 +1,13 @@
+2022-01-19 Tim Nguyen <[email protected]>
+
+ Add visibility: visible to modal dialogs in UA sheet
+ https://bugs.webkit.org/show_bug.cgi?id=235369
+
+ Reviewed by Brent Fulgham.
+
+ * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-visibility-hidden-expected.txt: Added.
+ * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-visibility-hidden.html: Added.
+
2022-01-19 Robert Jenner <[email protected]>
Unreviewed, reverting r288197.
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-visibility-hidden-expected.txt (0 => 288233)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-visibility-hidden-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-visibility-hidden-expected.txt 2022-01-19 20:42:12 UTC (rev 288233)
@@ -0,0 +1,5 @@
+
+PASS Non-modal dialog should let parent visibility inherit
+PASS Modal dialog should have visibility: visible by default in UA sheet
+PASS Modal dialog visibility should be overridable
+
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-visibility-hidden.html (0 => 288233)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-visibility-hidden.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-visibility-hidden.html 2022-01-19 20:42:12 UTC (rev 288233)
@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<html>
+<title>Test that modal dialogs have visibility: visible set from the UA sheet</title>
+<meta charset="utf-8">
+<link rel="author" title="Tim Nguyen" href=""
+<link rel="help" href=""
+<script src=""
+<script src=""
+
+<div style="visibility: hidden">
+ <dialog>This is a dialog</dialog>
+</div>
+
+<script>
+let dialog = document.querySelector("dialog");
+
+test(t => {
+ dialog.show();
+ t.add_cleanup(() => dialog.close());
+ assert_equals(getComputedStyle(dialog).visibility, "hidden");
+}, "Non-modal dialog should let parent visibility inherit");
+
+test(t => {
+ dialog.showModal();
+ t.add_cleanup(() => dialog.close());
+ assert_equals(getComputedStyle(dialog).visibility, "visible");
+}, "Modal dialog should have visibility: visible by default in UA sheet");
+
+test(t => {
+ dialog.style.visibility = "hidden";
+ dialog.showModal();
+ t.add_cleanup(() => {
+ dialog.style.removeProperty("visibility");
+ dialog.close();
+ });
+ assert_equals(getComputedStyle(dialog).visibility, "hidden");
+}, "Modal dialog visibility should be overridable");
+</script>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (288232 => 288233)
--- trunk/Source/WebCore/ChangeLog 2022-01-19 20:38:21 UTC (rev 288232)
+++ trunk/Source/WebCore/ChangeLog 2022-01-19 20:42:12 UTC (rev 288233)
@@ -1,3 +1,15 @@
+2022-01-19 Tim Nguyen <[email protected]>
+
+ Add visibility: visible to modal dialogs in UA sheet
+ https://bugs.webkit.org/show_bug.cgi?id=235369
+
+ Reviewed by Brent Fulgham.
+
+ Test: imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-visibility-hidden.html
+
+ * css/dialog.css:
+ (dialog:-internal-modal-dialog):
+
2022-01-19 Robert Jenner <[email protected]>
Unreviewed, reverting r288197.
Modified: trunk/Source/WebCore/css/dialog.css (288232 => 288233)
--- trunk/Source/WebCore/css/dialog.css 2022-01-19 20:38:21 UTC (rev 288232)
+++ trunk/Source/WebCore/css/dialog.css 2022-01-19 20:42:12 UTC (rev 288233)
@@ -23,6 +23,7 @@
inset-block-end: 0;
max-width: calc(100% - 6px - 2em);
max-height: calc(100% - 6px - 2em);
+ visibility: visible;
}
dialog::backdrop {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes