Title: [289287] branches/safari-613-branch
Revision
289287
Author
[email protected]
Date
2022-02-07 18:54:12 -0800 (Mon, 07 Feb 2022)

Log Message

Cherry-pick r288233. rdar://problem/87781796

    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):

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@288233 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Added Paths

Diff

Modified: branches/safari-613-branch/LayoutTests/imported/w3c/ChangeLog (289286 => 289287)


--- branches/safari-613-branch/LayoutTests/imported/w3c/ChangeLog	2022-02-08 02:54:08 UTC (rev 289286)
+++ branches/safari-613-branch/LayoutTests/imported/w3c/ChangeLog	2022-02-08 02:54:12 UTC (rev 289287)
@@ -1,5 +1,39 @@
 2022-02-07  Russell Epstein  <[email protected]>
 
+        Cherry-pick r288233. rdar://problem/87781796
+
+    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):
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@288233 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    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-02-07  Russell Epstein  <[email protected]>
+
         Cherry-pick r288196. rdar://problem/87768936
 
     [:has() pseudo-class] Compute specificity correctly

Added: branches/safari-613-branch/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-visibility-hidden-expected.txt (0 => 289287)


--- branches/safari-613-branch/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-visibility-hidden-expected.txt	                        (rev 0)
+++ branches/safari-613-branch/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-visibility-hidden-expected.txt	2022-02-08 02:54:12 UTC (rev 289287)
@@ -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: branches/safari-613-branch/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-visibility-hidden.html (0 => 289287)


--- branches/safari-613-branch/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-visibility-hidden.html	                        (rev 0)
+++ branches/safari-613-branch/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-visibility-hidden.html	2022-02-08 02:54:12 UTC (rev 289287)
@@ -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: branches/safari-613-branch/Source/WebCore/ChangeLog (289286 => 289287)


--- branches/safari-613-branch/Source/WebCore/ChangeLog	2022-02-08 02:54:08 UTC (rev 289286)
+++ branches/safari-613-branch/Source/WebCore/ChangeLog	2022-02-08 02:54:12 UTC (rev 289287)
@@ -1,5 +1,41 @@
 2022-02-07  Russell Epstein  <[email protected]>
 
+        Cherry-pick r288233. rdar://problem/87781796
+
+    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):
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@288233 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    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-02-07  Russell Epstein  <[email protected]>
+
         Cherry-pick r288223. rdar://problem/87741289
 
     Assertion is not acquired in network process when setting database journal mode

Modified: branches/safari-613-branch/Source/WebCore/css/dialog.css (289286 => 289287)


--- branches/safari-613-branch/Source/WebCore/css/dialog.css	2022-02-08 02:54:08 UTC (rev 289286)
+++ branches/safari-613-branch/Source/WebCore/css/dialog.css	2022-02-08 02:54:12 UTC (rev 289287)
@@ -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

Reply via email to