Title: [253880] trunk
Revision
253880
Author
[email protected]
Date
2019-12-22 19:51:49 -0800 (Sun, 22 Dec 2019)

Log Message

LayoutTests/imported/w3c:
Very basic <dialog> show/close support
https://bugs.webkit.org/show_bug.cgi?id=205543

Reviewed by Antti Koivisto.

New results, some new passes.

* web-platform-tests/html/rendering/non-replaced-elements/flow-content-0/dialog-display-expected.txt:
* web-platform-tests/html/rendering/non-replaced-elements/flow-content-0/dialog-expected.txt:
* web-platform-tests/html/semantics/interactive-elements/the-dialog-element/abspos-dialog-layout-expected.txt:
* web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-autofocus-expected.txt:
* web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-autofocus-just-once-expected.txt:
* web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-autofocus-multiple-times-expected.txt:
* web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-close-expected.txt:
* web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-open-expected.txt:
* web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-return-value-expected.txt:
* web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-showModal-expected.txt:
* web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-showModal-remove-expected.txt:
* web-platform-tests/html/semantics/interactive-elements/the-dialog-element/inert-node-is-unfocusable-expected.txt:
* web-platform-tests/html/semantics/interactive-elements/the-dialog-element/show-modal-focusing-steps-expected.txt:
* web-platform-tests/html/semantics/selectors/pseudo-classes/default-expected.txt:

Source/WebCore:
Very basic <dialog> show/close support
https://bugs.webkit.org/show_bug.cgi?id=205543

Reviewed by Antti Koivisto.

Fix HTMLDialogElement.idl for attribute reflection, and showModal() possibly throwing.

Have show/showModal() and close() toggle the "open" attribute. Implement parseAttribute()
to initialize m_isOpen from the attribute value.

Add dialog.css, which is appended to the UA stylesheets if the feature is enabled. Have
it set the display value.

Tested by web-platform-tests.

* CMakeLists.txt:
* DerivedSources-input.xcfilelist:
* DerivedSources.make:
* WebCore.xcodeproj/project.pbxproj:
* css/dialog.css: Added.
(dialog):
(dialog[open]):
* html/HTMLDialogElement.cpp:
(WebCore::HTMLDialogElement::isOpen const):
(WebCore::HTMLDialogElement::show):
(WebCore::HTMLDialogElement::showModal):
(WebCore::HTMLDialogElement::close):
(WebCore::HTMLDialogElement::parseAttribute):
(WebCore::HTMLDialogElement::toggleOpen):
(WebCore::HTMLDialogElement::open): Deleted.
(WebCore::HTMLDialogElement::setOpen): Deleted.
* html/HTMLDialogElement.h:
* html/HTMLDialogElement.idl:
* style/InspectorCSSOMWrappers.cpp:
(WebCore::Style::InspectorCSSOMWrappers::collectDocumentWrappers):
* style/UserAgentStyle.cpp:
(WebCore::Style::UserAgentStyle::ensureDefaultStyleSheetsForElement):
* style/UserAgentStyle.h:

Source/WebKit:
Make support for <dialog> an internal feature, off by default
https://bugs.webkit.org/show_bug.cgi?id=205542

Reviewed by Antti Koivisto.

Make DialogElementEnabled an internal feature so it shows up in the menus and
can be toggled on for experimentation.

* Shared/WebPreferences.yaml:

LayoutTests:
Very basic <dialog> show/close support
https://bugs.webkit.org/show_bug.cgi?id=205543

Reviewed by Antti Koivisto.

* imported/blink/dialog/element-removed-from-top-layer-has-original-position-expected.html: Removed.
* imported/blink/dialog/element-removed-from-top-layer-has-original-position.html: Removed. The changes tested by this patch (added in r140075) were later removed,
then this test got re-imported from blink.
* platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/documents/dom-tree-accessors/document.getElementsByName/document.getElementsByName-newelements-expected.txt:
* platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/documents/dom-tree-accessors/document.getElementsByName/document.getElementsByName-newelements-xhtml-expected.txt:
* platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/reflection-misc-expected.txt:

Modified Paths

Added Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (253879 => 253880)


--- trunk/LayoutTests/ChangeLog	2019-12-23 03:51:39 UTC (rev 253879)
+++ trunk/LayoutTests/ChangeLog	2019-12-23 03:51:49 UTC (rev 253880)
@@ -1,3 +1,17 @@
+2019-12-22  Simon Fraser  <[email protected]>
+
+        Very basic <dialog> show/close support
+        https://bugs.webkit.org/show_bug.cgi?id=205543
+
+        Reviewed by Antti Koivisto.
+
+        * imported/blink/dialog/element-removed-from-top-layer-has-original-position-expected.html: Removed.
+        * imported/blink/dialog/element-removed-from-top-layer-has-original-position.html: Removed. The changes tested by this patch (added in r140075) were later removed,
+        then this test got re-imported from blink.
+        * platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/documents/dom-tree-accessors/document.getElementsByName/document.getElementsByName-newelements-expected.txt:
+        * platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/documents/dom-tree-accessors/document.getElementsByName/document.getElementsByName-newelements-xhtml-expected.txt:
+        * platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/reflection-misc-expected.txt:
+
 2019-12-22  Wenson Hsieh  <[email protected]>
 
         [macCatalyst] Mouse clicks dispatch duplicate pointerup and pointerdown events

Deleted: trunk/LayoutTests/imported/blink/dialog/element-removed-from-top-layer-has-original-position-expected.html (253879 => 253880)


--- trunk/LayoutTests/imported/blink/dialog/element-removed-from-top-layer-has-original-position-expected.html	2019-12-23 03:51:39 UTC (rev 253879)
+++ trunk/LayoutTests/imported/blink/dialog/element-removed-from-top-layer-has-original-position-expected.html	2019-12-23 03:51:49 UTC (rev 253880)
@@ -1,18 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<style>
-.green {
-    color: green;
-}
-</style>
-</head>
-<body>
-<p>Bug <a href="" Top layer fails for inline elements</p>
-<p>This tests that position 'static' no longer computes to 'absolute' for an
-element that has been removed from the top layer. The test passes if you see
-a single line of text.</p>
-<span class="green">This is the span.</span>
-<span class="green">This is the dialog following it.</span>
-</body>
-</html>

Deleted: trunk/LayoutTests/imported/blink/dialog/element-removed-from-top-layer-has-original-position.html (253879 => 253880)


--- trunk/LayoutTests/imported/blink/dialog/element-removed-from-top-layer-has-original-position.html	2019-12-23 03:51:39 UTC (rev 253879)
+++ trunk/LayoutTests/imported/blink/dialog/element-removed-from-top-layer-has-original-position.html	2019-12-23 03:51:49 UTC (rev 253880)
@@ -1,31 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<style>
-.green {
-    color: green;
-}
-
-#right-dialog {
-    position: static;
-    border: none;
-    padding: 0;
-    margin: 0;
-}
-</style>
-</head>
-<body>
-<p>Bug <a href="" Top layer fails for inline elements</p>
-<p>This tests that position 'static' no longer computes to 'absolute' for an
-element that has been removed from the top layer. The test passes if you see
-a single line of text.</p>
-<span class="green">This is the span.</span>
-<dialog class="green" id="right-dialog">This is the dialog following it.</dialog>
-<script>
-var dialog = document.getElementById('right-dialog');
-dialog.showModal();
-dialog.close();
-dialog.show();
-</script>
-</body>
-</html>

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (253879 => 253880)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2019-12-23 03:51:39 UTC (rev 253879)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2019-12-23 03:51:49 UTC (rev 253880)
@@ -1,3 +1,27 @@
+2019-12-22  Simon Fraser  <[email protected]>
+
+        Very basic <dialog> show/close support
+        https://bugs.webkit.org/show_bug.cgi?id=205543
+
+        Reviewed by Antti Koivisto.
+
+        New results, some new passes.
+
+        * web-platform-tests/html/rendering/non-replaced-elements/flow-content-0/dialog-display-expected.txt:
+        * web-platform-tests/html/rendering/non-replaced-elements/flow-content-0/dialog-expected.txt:
+        * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/abspos-dialog-layout-expected.txt:
+        * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-autofocus-expected.txt:
+        * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-autofocus-just-once-expected.txt:
+        * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-autofocus-multiple-times-expected.txt:
+        * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-close-expected.txt:
+        * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-open-expected.txt:
+        * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-return-value-expected.txt:
+        * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-showModal-expected.txt:
+        * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-showModal-remove-expected.txt:
+        * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/inert-node-is-unfocusable-expected.txt:
+        * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/show-modal-focusing-steps-expected.txt:
+        * web-platform-tests/html/semantics/selectors/pseudo-classes/default-expected.txt:
+
 2019-12-20  Megan Gardner  <[email protected]>
 
         Paint highlights specified in CSS Highlight API

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/documents/dom-tree-accessors/document.getElementsByName/document.getElementsByName-newelements-expected.txt (253879 => 253880)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/documents/dom-tree-accessors/document.getElementsByName/document.getElementsByName-newelements-expected.txt	2019-12-23 03:51:39 UTC (rev 253879)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/documents/dom-tree-accessors/document.getElementsByName/document.getElementsByName-newelements-expected.txt	2019-12-23 03:51:49 UTC (rev 253880)
@@ -26,5 +26,5 @@
 PASS getElementsByName("rt") 
 PASS getElementsByName("rp") 
 PASS getElementsByName("source") 
-    
+   
  

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/documents/dom-tree-accessors/document.getElementsByName/document.getElementsByName-newelements-xhtml-expected.txt (253879 => 253880)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/documents/dom-tree-accessors/document.getElementsByName/document.getElementsByName-newelements-xhtml-expected.txt	2019-12-23 03:51:39 UTC (rev 253879)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/documents/dom-tree-accessors/document.getElementsByName/document.getElementsByName-newelements-xhtml-expected.txt	2019-12-23 03:51:49 UTC (rev 253880)
@@ -1,4 +1,4 @@
 
 PASS getElementsByName and newly introduced HTML elements 
-    
+   
  

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/reflection-misc-expected.txt (253879 => 253880)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/reflection-misc-expected.txt	2019-12-23 03:51:39 UTC (rev 253879)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/reflection-misc-expected.txt	2019-12-23 03:51:49 UTC (rev 253880)
@@ -4297,29 +4297,29 @@
 PASS dialog.tabIndex: IDL set to -2147483648 
 PASS dialog.open: typeof IDL attribute 
 PASS dialog.open: IDL get with DOM attribute unset 
-FAIL dialog.open: setAttribute() to "" assert_equals: IDL get expected true but got false
-FAIL dialog.open: setAttribute() to " foo " assert_equals: IDL get expected true but got false
-FAIL dialog.open: setAttribute() to undefined assert_equals: IDL get expected true but got false
-FAIL dialog.open: setAttribute() to null assert_equals: IDL get expected true but got false
-FAIL dialog.open: setAttribute() to 7 assert_equals: IDL get expected true but got false
-FAIL dialog.open: setAttribute() to 1.5 assert_equals: IDL get expected true but got false
-FAIL dialog.open: setAttribute() to "5%" assert_equals: IDL get expected true but got false
-FAIL dialog.open: setAttribute() to "+100" assert_equals: IDL get expected true but got false
-FAIL dialog.open: setAttribute() to ".5" assert_equals: IDL get expected true but got false
-FAIL dialog.open: setAttribute() to true assert_equals: IDL get expected true but got false
-FAIL dialog.open: setAttribute() to false assert_equals: IDL get expected true but got false
-FAIL dialog.open: setAttribute() to object "[object Object]" assert_equals: IDL get expected true but got false
-FAIL dialog.open: setAttribute() to NaN assert_equals: IDL get expected true but got false
-FAIL dialog.open: setAttribute() to Infinity assert_equals: IDL get expected true but got false
-FAIL dialog.open: setAttribute() to -Infinity assert_equals: IDL get expected true but got false
-FAIL dialog.open: setAttribute() to "\0" assert_equals: IDL get expected true but got false
-FAIL dialog.open: setAttribute() to object "test-toString" assert_equals: IDL get expected true but got false
-FAIL dialog.open: setAttribute() to object "test-valueOf" assert_equals: IDL get expected true but got false
-FAIL dialog.open: setAttribute() to "open" assert_equals: IDL get expected true but got false
-FAIL dialog.open: IDL set to "" assert_equals: hasAttribute() expected false but got true
+PASS dialog.open: setAttribute() to "" 
+PASS dialog.open: setAttribute() to " foo " 
+PASS dialog.open: setAttribute() to undefined 
+PASS dialog.open: setAttribute() to null 
+PASS dialog.open: setAttribute() to 7 
+PASS dialog.open: setAttribute() to 1.5 
+PASS dialog.open: setAttribute() to "5%" 
+PASS dialog.open: setAttribute() to "+100" 
+PASS dialog.open: setAttribute() to ".5" 
+PASS dialog.open: setAttribute() to true 
+PASS dialog.open: setAttribute() to false 
+PASS dialog.open: setAttribute() to object "[object Object]" 
+PASS dialog.open: setAttribute() to NaN 
+PASS dialog.open: setAttribute() to Infinity 
+PASS dialog.open: setAttribute() to -Infinity 
+PASS dialog.open: setAttribute() to "\0" 
+PASS dialog.open: setAttribute() to object "test-toString" 
+PASS dialog.open: setAttribute() to object "test-valueOf" 
+PASS dialog.open: setAttribute() to "open" 
+PASS dialog.open: IDL set to "" 
 PASS dialog.open: IDL set to " foo " 
-FAIL dialog.open: IDL set to undefined assert_equals: hasAttribute() expected false but got true
-FAIL dialog.open: IDL set to null assert_equals: hasAttribute() expected false but got true
+PASS dialog.open: IDL set to undefined 
+PASS dialog.open: IDL set to null 
 PASS dialog.open: IDL set to 7 
 PASS dialog.open: IDL set to 1.5 
 PASS dialog.open: IDL set to "5%" 
@@ -4326,9 +4326,9 @@
 PASS dialog.open: IDL set to "+100" 
 PASS dialog.open: IDL set to ".5" 
 PASS dialog.open: IDL set to true 
-FAIL dialog.open: IDL set to false assert_equals: hasAttribute() expected false but got true
+PASS dialog.open: IDL set to false 
 PASS dialog.open: IDL set to object "[object Object]" 
-FAIL dialog.open: IDL set to NaN assert_equals: hasAttribute() expected false but got true
+PASS dialog.open: IDL set to NaN 
 PASS dialog.open: IDL set to Infinity 
 PASS dialog.open: IDL set to -Infinity 
 PASS dialog.open: IDL set to "\0" 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/flow-content-0/dialog-display-expected.txt (253879 => 253880)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/flow-content-0/dialog-display-expected.txt	2019-12-23 03:51:39 UTC (rev 253879)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/flow-content-0/dialog-display-expected.txt	2019-12-23 03:51:49 UTC (rev 253880)
@@ -1,3 +1,3 @@
 
-FAIL dialog: display assert_equals: expected "block" but got "inline"
+PASS dialog: display 
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/flow-content-0/dialog-expected.txt (253879 => 253880)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/flow-content-0/dialog-expected.txt	2019-12-23 03:51:39 UTC (rev 253879)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/flow-content-0/dialog-expected.txt	2019-12-23 03:51:49 UTC (rev 253880)
@@ -1,10 +1,10 @@
 
 
 
-FAIL Closed dialog in width: 540px iframe assert_equals: display expected "none" but got "inline"
-FAIL Open dialog in width: 540px iframe assert_equals: display expected "block" but got "inline"
-FAIL Modal dialog in width: 540px iframe assert_equals: display expected "block" but got "inline"
-FAIL Closed dialog in width: 538px iframe assert_equals: display expected "none" but got "inline"
-FAIL Open dialog in width: 538px iframe assert_equals: display expected "block" but got "inline"
-FAIL Modal dialog in width: 538px iframe assert_equals: display expected "block" but got "inline"
+FAIL Closed dialog in width: 540px iframe assert_equals: right expected "0px" but got "auto"
+FAIL Open dialog in width: 540px iframe assert_equals: top expected "8px" but got "auto"
+FAIL Modal dialog in width: 540px iframe assert_equals: top expected "56px" but got "auto"
+FAIL Closed dialog in width: 538px iframe assert_equals: right expected "0px" but got "auto"
+FAIL Open dialog in width: 538px iframe assert_equals: top expected "8px" but got "auto"
+FAIL Modal dialog in width: 538px iframe assert_equals: top expected "56px" but got "auto"
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/abspos-dialog-layout-expected.txt (253879 => 253880)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/abspos-dialog-layout-expected.txt	2019-12-23 03:51:39 UTC (rev 253879)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/abspos-dialog-layout-expected.txt	2019-12-23 03:51:49 UTC (rev 253880)
@@ -1,17 +1,16 @@
-It is my dialog.
 
 FAIL showModal() should center in the viewport assert_equals: expected 291 but got -500
 FAIL The dialog is a positioned element, so the top and bottom should not have style auto. assert_not_equals: got disallowed value "auto"
-FAIL Dialog should be recentered if showModal() is called after close() assert_equals: expected 291 but got -1000
+FAIL Dialog should be recentered if showModal() is called after close() assert_equals: expected 290 but got -1000
 PASS Dialog should not recenter on relayout. 
 FAIL A tall dialog should be positioned at the top of the viewport. assert_equals: expected 0 but got -500
-FAIL The dialog should be centered regardless of the presence of a horizontal scrollbar. assert_equals: expected 291 but got -500
-FAIL Centering should work when dialog is inside positioned containers. assert_equals: expected 291 but got 330
+FAIL The dialog should be centered regardless of the presence of a horizontal scrollbar. assert_equals: expected -9700 but got -500
+FAIL Centering should work when dialog is inside positioned containers. assert_equals: expected -9700 but got 330
 PASS A centered dialog's position should survive becoming display:none temporarily. 
 FAIL Dialog should lose centering when removed from the document. assert_not_equals: got disallowed value 320
 PASS Dialog's specified position should survive after close() and showModal(). 
-FAIL Dialog should be recentered if showModal() is called after removing 'open'. assert_equals: expected 291 but got -1000
+FAIL Dialog should be recentered if showModal() is called after removing 'open'. assert_equals: expected -9700 but got -1000
 FAIL Dialog should not be centered if showModal() was called when an ancestor had display 'none'. assert_equals: expected 9500 but got 330
 FAIL A dialog with specified 'top' should be positioned as usual assert_equals: expected 50 but got 0
-FAIL A dialog with specified 'bottom' should be positioned as usual assert_equals: expected 550 but got 18
+FAIL A dialog with specified 'bottom' should be positioned as usual assert_equals: expected 550 but got 20000
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-autofocus-expected.txt (253879 => 253880)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-autofocus-expected.txt	2019-12-23 03:51:39 UTC (rev 253879)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-autofocus-expected.txt	2019-12-23 03:51:49 UTC (rev 253880)
@@ -1,6 +1,7 @@
-      
+
+  
  
 
 
-FAIL autofocus when a modal dialog is opened assert_equals: expected Element node <button id="outer-button" autofocus=""></button> but got Element node <button id="another-button" autofocus=""></button>
+FAIL autofocus when a modal dialog is opened assert_equals: expected Element node <button id="autofocus-button" autofocus=""></button> but got Element node <button id="outer-button" autofocus=""></button>
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-autofocus-just-once-expected.txt (253879 => 253880)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-autofocus-just-once-expected.txt	2019-12-23 03:51:39 UTC (rev 253879)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-autofocus-just-once-expected.txt	2019-12-23 03:51:49 UTC (rev 253880)
@@ -1,9 +1,8 @@
-  
+ 
 
 FAIL An autofocus element in a dialog element should not try to get focus twice. assert_equals: dialog.show() should set focus on a descendant element with an autofocus attribute. expected Element node <input autofocus=""></input> but got Element node <body>
-<dialog>
+<dialog open="">
 <input>
 <input autofocus="">
-</dialog>
-<s...
+</di...
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-autofocus-multiple-times-expected.txt (253879 => 253880)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-autofocus-multiple-times-expected.txt	2019-12-23 03:51:39 UTC (rev 253879)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-autofocus-multiple-times-expected.txt	2019-12-23 03:51:49 UTC (rev 253880)
@@ -1,4 +1,5 @@
-      
 
-FAIL autofocus is run every time a dialog is opened assert_equals: expected Element node <button id="outer-button" autofocus=""></button> but got Element node <input id="input2" autofocus=""></input>
+    
 
+FAIL autofocus is run every time a dialog is opened assert_equals: expected Element node <input id="input2" autofocus=""></input> but got Element node <button id="outer-button" autofocus=""></button>
+

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-close-expected.txt (253879 => 253880)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-close-expected.txt	2019-12-23 03:51:39 UTC (rev 253879)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-close-expected.txt	2019-12-23 03:51:49 UTC (rev 253880)
@@ -3,21 +3,7 @@
 
 TIMEOUT close() fires a close event Test timed out
 PASS close() on a <dialog> that doesn't have an open attribute aborts the steps 
-FAIL close() removes the open attribute and set the returnValue to the first argument assert_true: expected true got false
-FAIL close() without argument removes the open attribute and there's no returnValue assert_true: expected true got false
+PASS close() removes the open attribute and set the returnValue to the first argument 
+PASS close() without argument removes the open attribute and there's no returnValue 
 PASS close() should set the returnValue IDL attribute but not the JS property 
-foobar
 
-OK
-foobar
-
-OK
-foobar
-
-OK
-foobar
-
-OK
-foobar
-
-OK

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-open-expected.txt (253879 => 253880)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-open-expected.txt	2019-12-23 03:51:39 UTC (rev 253879)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-open-expected.txt	2019-12-23 03:51:49 UTC (rev 253880)
@@ -1,10 +1,7 @@
 foobar
 
 OK
-foobar
 
-OK
+PASS On getting, the IDL open attribute must return true if the content open attribute is set, and false if it is absent. 
+PASS On setting, the content open attribute must be removed if the IDL open attribute is set to false, and must be present if the IDL open attribute is set to true. 
 
-FAIL On getting, the IDL open attribute must return true if the content open attribute is set, and false if it is absent. assert_true: expected true got false
-FAIL On setting, the content open attribute must be removed if the IDL open attribute is set to false, and must be present if the IDL open attribute is set to true. assert_true: expected true got false
-

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-return-value-expected.txt (253879 => 253880)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-return-value-expected.txt	2019-12-23 03:51:39 UTC (rev 253879)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-return-value-expected.txt	2019-12-23 03:51:49 UTC (rev 253880)
@@ -1,3 +1,3 @@
 
-FAIL Tests dialog.returnValue is settable and returns the last value set. assert_equals: expected "Return value set from close()" but got "7"
+PASS Tests dialog.returnValue is settable and returns the last value set. 
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-showModal-expected.txt (253879 => 253880)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-showModal-expected.txt	2019-12-23 03:51:39 UTC (rev 253879)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-showModal-expected.txt	2019-12-23 03:51:49 UTC (rev 253880)
@@ -1,32 +1,20 @@
 
-FAIL dialog element: showModal() assert_true: expected true got false
-FAIL showModal() on a <dialog> that already has an open attribute throws an InvalidStateError exception assert_throws: function "function () {
-      d2.showModal();
-    }" did not throw
-FAIL showModal() on a <dialog> after initial showModal() and removing the open attribute assert_true: expected true got false
-FAIL showModal() on a <dialog> not in a Document throws an InvalidStateError exception assert_throws: function "function () {
-      d.showModal();
-    }" did not throw
-FAIL when opening multiple dialogs, only the newest one is non-inert assert_true: expected true got false
-FAIL opening dialog without focusable children assert_true: expected true got false
-FAIL opening dialog with multiple focusable children assert_true: expected true got false
-FAIL opening dialog with multiple focusable children, one having the autofocus attribute assert_true: expected true got false
-FAIL when opening multiple dialogs, the most recently opened is rendered on top assert_equals: expected Element node <dialog id="d11"></dialog> but got Element node <body><div id="log"></div>
+FAIL dialog element: showModal() assert_equals: expected Element node <button id="b1">OK</button> but got Element node <body><div id="log"></div>
 <button id="b0">OK</button>
 <d...
+PASS showModal() on a <dialog> that already has an open attribute throws an InvalidStateError exception 
+PASS showModal() on a <dialog> after initial showModal() and removing the open attribute 
+PASS showModal() on a <dialog> not in a Document throws an InvalidStateError exception 
+PASS when opening multiple dialogs, only the newest one is non-inert 
+FAIL opening dialog without focusable children assert_equals: expected Element node <dialog id="d6" open=""></dialog> but got Element node <body><div id="log"></div>
+<button id="b0">OK</button>
+<d...
+FAIL opening dialog with multiple focusable children assert_equals: expected Element node <input id="i71" value="foobar"></input> but got Element node <body><div id="log"></div>
+<button id="b0">OK</button>
+<d...
+FAIL opening dialog with multiple focusable children, one having the autofocus attribute assert_equals: expected Element node <input id="i82" value="foobar" autofocus=""></input> but got Element node <body><div id="log"></div>
+<button id="b0">OK</button>
+<d...
+FAIL when opening multiple dialogs, the most recently opened is rendered on top assert_equals: expected Element node <dialog id="d11" open=""></dialog> but got Element node <html><head><meta charset="utf-8">
+<title>dialog element:...
 OK
-foobar
-
-OK
-foobar
-
-OK
-foobar
-
-OK
-foobar
-
-OK
-foobar
-
-OK      OK      OK

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-showModal-remove-expected.txt (253879 => 253880)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-showModal-remove-expected.txt	2019-12-23 03:51:39 UTC (rev 253879)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-showModal-remove-expected.txt	2019-12-23 03:51:49 UTC (rev 253880)
@@ -1,3 +1,3 @@
 
-FAIL dialog element: removing from document after showModal() assert_true: expected true got false
+PASS dialog element: removing from document after showModal() 
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/inert-node-is-unfocusable-expected.txt (253879 => 253880)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/inert-node-is-unfocusable-expected.txt	2019-12-23 03:51:39 UTC (rev 253879)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/inert-node-is-unfocusable-expected.txt	2019-12-23 03:51:49 UTC (rev 253880)
@@ -1,4 +1,5 @@
-I get focus I don't get focus.
+I get focus
+I don't get focus.
       
 I'm editable
 I'm tabindexed.

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/show-modal-focusing-steps-expected.txt (253879 => 253880)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/show-modal-focusing-steps-expected.txt	2019-12-23 03:51:39 UTC (rev 253879)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/show-modal-focusing-steps-expected.txt	2019-12-23 03:51:49 UTC (rev 253880)
@@ -1,6 +1,6 @@
-      
- 
 
 
-FAIL focus when a modal dialog is opened assert_equals: expected Element node <button id="outer-button" autofocus=""></button> but got Element node <button id="autofocus-button" autofocus=""></button>
+FAIL focus when a modal dialog is opened assert_equals: expected Element node <body>
+<button id="outer-button" autofocus=""></button>
+<... but got Element node <button id="outer-button" autofocus=""></button>
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/selectors/pseudo-classes/default-expected.txt (253879 => 253880)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/selectors/pseudo-classes/default-expected.txt	2019-12-23 03:51:39 UTC (rev 253879)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/selectors/pseudo-classes/default-expected.txt	2019-12-23 03:51:49 UTC (rev 253880)
@@ -9,6 +9,6 @@
   
   
 
-        
+      
 button6  button7
 button8  button9

Modified: trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/html/dom/documents/dom-tree-accessors/document.getElementsByName/document.getElementsByName-newelements-xhtml-expected.txt (253879 => 253880)


--- trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/html/dom/documents/dom-tree-accessors/document.getElementsByName/document.getElementsByName-newelements-xhtml-expected.txt	2019-12-23 03:51:39 UTC (rev 253879)
+++ trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/html/dom/documents/dom-tree-accessors/document.getElementsByName/document.getElementsByName-newelements-xhtml-expected.txt	2019-12-23 03:51:49 UTC (rev 253880)
@@ -1,4 +1,4 @@
 
 PASS getElementsByName and newly introduced HTML elements 
-    
+   
  

Modified: trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/html/dom/reflection-misc-expected.txt (253879 => 253880)


--- trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/html/dom/reflection-misc-expected.txt	2019-12-23 03:51:39 UTC (rev 253879)
+++ trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/html/dom/reflection-misc-expected.txt	2019-12-23 03:51:49 UTC (rev 253880)
@@ -4297,29 +4297,29 @@
 PASS dialog.tabIndex: IDL set to -2147483648 
 PASS dialog.open: typeof IDL attribute 
 PASS dialog.open: IDL get with DOM attribute unset 
-FAIL dialog.open: setAttribute() to "" assert_equals: IDL get expected true but got false
-FAIL dialog.open: setAttribute() to " foo " assert_equals: IDL get expected true but got false
-FAIL dialog.open: setAttribute() to undefined assert_equals: IDL get expected true but got false
-FAIL dialog.open: setAttribute() to null assert_equals: IDL get expected true but got false
-FAIL dialog.open: setAttribute() to 7 assert_equals: IDL get expected true but got false
-FAIL dialog.open: setAttribute() to 1.5 assert_equals: IDL get expected true but got false
-FAIL dialog.open: setAttribute() to "5%" assert_equals: IDL get expected true but got false
-FAIL dialog.open: setAttribute() to "+100" assert_equals: IDL get expected true but got false
-FAIL dialog.open: setAttribute() to ".5" assert_equals: IDL get expected true but got false
-FAIL dialog.open: setAttribute() to true assert_equals: IDL get expected true but got false
-FAIL dialog.open: setAttribute() to false assert_equals: IDL get expected true but got false
-FAIL dialog.open: setAttribute() to object "[object Object]" assert_equals: IDL get expected true but got false
-FAIL dialog.open: setAttribute() to NaN assert_equals: IDL get expected true but got false
-FAIL dialog.open: setAttribute() to Infinity assert_equals: IDL get expected true but got false
-FAIL dialog.open: setAttribute() to -Infinity assert_equals: IDL get expected true but got false
-FAIL dialog.open: setAttribute() to "\0" assert_equals: IDL get expected true but got false
-FAIL dialog.open: setAttribute() to object "test-toString" assert_equals: IDL get expected true but got false
-FAIL dialog.open: setAttribute() to object "test-valueOf" assert_equals: IDL get expected true but got false
-FAIL dialog.open: setAttribute() to "open" assert_equals: IDL get expected true but got false
-FAIL dialog.open: IDL set to "" assert_equals: hasAttribute() expected false but got true
+PASS dialog.open: setAttribute() to "" 
+PASS dialog.open: setAttribute() to " foo " 
+PASS dialog.open: setAttribute() to undefined 
+PASS dialog.open: setAttribute() to null 
+PASS dialog.open: setAttribute() to 7 
+PASS dialog.open: setAttribute() to 1.5 
+PASS dialog.open: setAttribute() to "5%" 
+PASS dialog.open: setAttribute() to "+100" 
+PASS dialog.open: setAttribute() to ".5" 
+PASS dialog.open: setAttribute() to true 
+PASS dialog.open: setAttribute() to false 
+PASS dialog.open: setAttribute() to object "[object Object]" 
+PASS dialog.open: setAttribute() to NaN 
+PASS dialog.open: setAttribute() to Infinity 
+PASS dialog.open: setAttribute() to -Infinity 
+PASS dialog.open: setAttribute() to "\0" 
+PASS dialog.open: setAttribute() to object "test-toString" 
+PASS dialog.open: setAttribute() to object "test-valueOf" 
+PASS dialog.open: setAttribute() to "open" 
+PASS dialog.open: IDL set to "" 
 PASS dialog.open: IDL set to " foo " 
-FAIL dialog.open: IDL set to undefined assert_equals: hasAttribute() expected false but got true
-FAIL dialog.open: IDL set to null assert_equals: hasAttribute() expected false but got true
+PASS dialog.open: IDL set to undefined 
+PASS dialog.open: IDL set to null 
 PASS dialog.open: IDL set to 7 
 PASS dialog.open: IDL set to 1.5 
 PASS dialog.open: IDL set to "5%" 
@@ -4326,9 +4326,9 @@
 PASS dialog.open: IDL set to "+100" 
 PASS dialog.open: IDL set to ".5" 
 PASS dialog.open: IDL set to true 
-FAIL dialog.open: IDL set to false assert_equals: hasAttribute() expected false but got true
+PASS dialog.open: IDL set to false 
 PASS dialog.open: IDL set to object "[object Object]" 
-FAIL dialog.open: IDL set to NaN assert_equals: hasAttribute() expected false but got true
+PASS dialog.open: IDL set to NaN 
 PASS dialog.open: IDL set to Infinity 
 PASS dialog.open: IDL set to -Infinity 
 PASS dialog.open: IDL set to "\0" 

Modified: trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/abspos-dialog-layout-expected.txt (253879 => 253880)


--- trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/abspos-dialog-layout-expected.txt	2019-12-23 03:51:39 UTC (rev 253879)
+++ trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/abspos-dialog-layout-expected.txt	2019-12-23 03:51:49 UTC (rev 253880)
@@ -1,17 +1,16 @@
-It is my dialog.
 
-FAIL showModal() should center in the viewport assert_equals: expected 290.5 but got -500
+FAIL showModal() should center in the viewport assert_equals: expected 290 but got -500
 FAIL The dialog is a positioned element, so the top and bottom should not have style auto. assert_not_equals: got disallowed value "auto"
-FAIL Dialog should be recentered if showModal() is called after close() assert_equals: expected 290.5 but got -1000
+FAIL Dialog should be recentered if showModal() is called after close() assert_equals: expected 290 but got -1000
 PASS Dialog should not recenter on relayout. 
 FAIL A tall dialog should be positioned at the top of the viewport. assert_equals: expected 0 but got -500
-FAIL The dialog should be centered regardless of the presence of a horizontal scrollbar. assert_equals: expected 290.5 but got -500
-FAIL Centering should work when dialog is inside positioned containers. assert_equals: expected 290.5 but got 330
+FAIL The dialog should be centered regardless of the presence of a horizontal scrollbar. assert_equals: expected -9700 but got -500
+FAIL Centering should work when dialog is inside positioned containers. assert_equals: expected -9700 but got 330
 PASS A centered dialog's position should survive becoming display:none temporarily. 
 FAIL Dialog should lose centering when removed from the document. assert_not_equals: got disallowed value 320
 PASS Dialog's specified position should survive after close() and showModal(). 
-FAIL Dialog should be recentered if showModal() is called after removing 'open'. assert_equals: expected 290.5 but got -1000
+FAIL Dialog should be recentered if showModal() is called after removing 'open'. assert_equals: expected -9700 but got -1000
 FAIL Dialog should not be centered if showModal() was called when an ancestor had display 'none'. assert_equals: expected 9500 but got 330
 FAIL A dialog with specified 'top' should be positioned as usual assert_equals: expected 50 but got 0
-FAIL A dialog with specified 'bottom' should be positioned as usual assert_equals: expected 550 but got 19
+FAIL A dialog with specified 'bottom' should be positioned as usual assert_equals: expected 550 but got 20000
 

Modified: trunk/LayoutTests/platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/documents/dom-tree-accessors/document.getElementsByName/document.getElementsByName-newelements-expected.txt (253879 => 253880)


--- trunk/LayoutTests/platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/documents/dom-tree-accessors/document.getElementsByName/document.getElementsByName-newelements-expected.txt	2019-12-23 03:51:39 UTC (rev 253879)
+++ trunk/LayoutTests/platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/documents/dom-tree-accessors/document.getElementsByName/document.getElementsByName-newelements-expected.txt	2019-12-23 03:51:49 UTC (rev 253880)
@@ -26,5 +26,5 @@
 PASS getElementsByName("rt") 
 PASS getElementsByName("rp") 
 PASS getElementsByName("source") 
-    
+   
  

Modified: trunk/LayoutTests/platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/documents/dom-tree-accessors/document.getElementsByName/document.getElementsByName-newelements-xhtml-expected.txt (253879 => 253880)


--- trunk/LayoutTests/platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/documents/dom-tree-accessors/document.getElementsByName/document.getElementsByName-newelements-xhtml-expected.txt	2019-12-23 03:51:39 UTC (rev 253879)
+++ trunk/LayoutTests/platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/documents/dom-tree-accessors/document.getElementsByName/document.getElementsByName-newelements-xhtml-expected.txt	2019-12-23 03:51:49 UTC (rev 253880)
@@ -1,4 +1,4 @@
 
 PASS getElementsByName and newly introduced HTML elements 
-    
+   
  

Modified: trunk/LayoutTests/platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/reflection-misc-expected.txt (253879 => 253880)


--- trunk/LayoutTests/platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/reflection-misc-expected.txt	2019-12-23 03:51:39 UTC (rev 253879)
+++ trunk/LayoutTests/platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/reflection-misc-expected.txt	2019-12-23 03:51:49 UTC (rev 253880)
@@ -4297,29 +4297,29 @@
 PASS dialog.tabIndex: IDL set to -2147483648 
 PASS dialog.open: typeof IDL attribute 
 PASS dialog.open: IDL get with DOM attribute unset 
-FAIL dialog.open: setAttribute() to "" assert_equals: IDL get expected true but got false
-FAIL dialog.open: setAttribute() to " foo " assert_equals: IDL get expected true but got false
-FAIL dialog.open: setAttribute() to undefined assert_equals: IDL get expected true but got false
-FAIL dialog.open: setAttribute() to null assert_equals: IDL get expected true but got false
-FAIL dialog.open: setAttribute() to 7 assert_equals: IDL get expected true but got false
-FAIL dialog.open: setAttribute() to 1.5 assert_equals: IDL get expected true but got false
-FAIL dialog.open: setAttribute() to "5%" assert_equals: IDL get expected true but got false
-FAIL dialog.open: setAttribute() to "+100" assert_equals: IDL get expected true but got false
-FAIL dialog.open: setAttribute() to ".5" assert_equals: IDL get expected true but got false
-FAIL dialog.open: setAttribute() to true assert_equals: IDL get expected true but got false
-FAIL dialog.open: setAttribute() to false assert_equals: IDL get expected true but got false
-FAIL dialog.open: setAttribute() to object "[object Object]" assert_equals: IDL get expected true but got false
-FAIL dialog.open: setAttribute() to NaN assert_equals: IDL get expected true but got false
-FAIL dialog.open: setAttribute() to Infinity assert_equals: IDL get expected true but got false
-FAIL dialog.open: setAttribute() to -Infinity assert_equals: IDL get expected true but got false
-FAIL dialog.open: setAttribute() to "\0" assert_equals: IDL get expected true but got false
-FAIL dialog.open: setAttribute() to object "test-toString" assert_equals: IDL get expected true but got false
-FAIL dialog.open: setAttribute() to object "test-valueOf" assert_equals: IDL get expected true but got false
-FAIL dialog.open: setAttribute() to "open" assert_equals: IDL get expected true but got false
-FAIL dialog.open: IDL set to "" assert_equals: hasAttribute() expected false but got true
+PASS dialog.open: setAttribute() to "" 
+PASS dialog.open: setAttribute() to " foo " 
+PASS dialog.open: setAttribute() to undefined 
+PASS dialog.open: setAttribute() to null 
+PASS dialog.open: setAttribute() to 7 
+PASS dialog.open: setAttribute() to 1.5 
+PASS dialog.open: setAttribute() to "5%" 
+PASS dialog.open: setAttribute() to "+100" 
+PASS dialog.open: setAttribute() to ".5" 
+PASS dialog.open: setAttribute() to true 
+PASS dialog.open: setAttribute() to false 
+PASS dialog.open: setAttribute() to object "[object Object]" 
+PASS dialog.open: setAttribute() to NaN 
+PASS dialog.open: setAttribute() to Infinity 
+PASS dialog.open: setAttribute() to -Infinity 
+PASS dialog.open: setAttribute() to "\0" 
+PASS dialog.open: setAttribute() to object "test-toString" 
+PASS dialog.open: setAttribute() to object "test-valueOf" 
+PASS dialog.open: setAttribute() to "open" 
+PASS dialog.open: IDL set to "" 
 PASS dialog.open: IDL set to " foo " 
-FAIL dialog.open: IDL set to undefined assert_equals: hasAttribute() expected false but got true
-FAIL dialog.open: IDL set to null assert_equals: hasAttribute() expected false but got true
+PASS dialog.open: IDL set to undefined 
+PASS dialog.open: IDL set to null 
 PASS dialog.open: IDL set to 7 
 PASS dialog.open: IDL set to 1.5 
 PASS dialog.open: IDL set to "5%" 
@@ -4326,9 +4326,9 @@
 PASS dialog.open: IDL set to "+100" 
 PASS dialog.open: IDL set to ".5" 
 PASS dialog.open: IDL set to true 
-FAIL dialog.open: IDL set to false assert_equals: hasAttribute() expected false but got true
+PASS dialog.open: IDL set to false 
 PASS dialog.open: IDL set to object "[object Object]" 
-FAIL dialog.open: IDL set to NaN assert_equals: hasAttribute() expected false but got true
+PASS dialog.open: IDL set to NaN 
 PASS dialog.open: IDL set to Infinity 
 PASS dialog.open: IDL set to -Infinity 
 PASS dialog.open: IDL set to "\0" 

Modified: trunk/Source/WebCore/CMakeLists.txt (253879 => 253880)


--- trunk/Source/WebCore/CMakeLists.txt	2019-12-23 03:51:39 UTC (rev 253879)
+++ trunk/Source/WebCore/CMakeLists.txt	2019-12-23 03:51:49 UTC (rev 253880)
@@ -1215,6 +1215,7 @@
 )
 
 set(WebCore_USER_AGENT_STYLE_SHEETS
+    ${WEBCORE_DIR}/css/dialog.css
     ${WEBCORE_DIR}/css/fullscreen.css
     ${WEBCORE_DIR}/css/html.css
     ${WEBCORE_DIR}/css/mathml.css

Modified: trunk/Source/WebCore/ChangeLog (253879 => 253880)


--- trunk/Source/WebCore/ChangeLog	2019-12-23 03:51:39 UTC (rev 253879)
+++ trunk/Source/WebCore/ChangeLog	2019-12-23 03:51:49 UTC (rev 253880)
@@ -1,3 +1,44 @@
+2019-12-22  Simon Fraser  <[email protected]>
+
+        Very basic <dialog> show/close support
+        https://bugs.webkit.org/show_bug.cgi?id=205543
+
+        Reviewed by Antti Koivisto.
+        
+        Fix HTMLDialogElement.idl for attribute reflection, and showModal() possibly throwing.
+        
+        Have show/showModal() and close() toggle the "open" attribute. Implement parseAttribute()
+        to initialize m_isOpen from the attribute value.
+        
+        Add dialog.css, which is appended to the UA stylesheets if the feature is enabled. Have
+        it set the display value.
+
+        Tested by web-platform-tests.
+
+        * CMakeLists.txt:
+        * DerivedSources-input.xcfilelist:
+        * DerivedSources.make:
+        * WebCore.xcodeproj/project.pbxproj:
+        * css/dialog.css: Added.
+        (dialog):
+        (dialog[open]):
+        * html/HTMLDialogElement.cpp:
+        (WebCore::HTMLDialogElement::isOpen const):
+        (WebCore::HTMLDialogElement::show):
+        (WebCore::HTMLDialogElement::showModal):
+        (WebCore::HTMLDialogElement::close):
+        (WebCore::HTMLDialogElement::parseAttribute):
+        (WebCore::HTMLDialogElement::toggleOpen):
+        (WebCore::HTMLDialogElement::open): Deleted.
+        (WebCore::HTMLDialogElement::setOpen): Deleted.
+        * html/HTMLDialogElement.h:
+        * html/HTMLDialogElement.idl:
+        * style/InspectorCSSOMWrappers.cpp:
+        (WebCore::Style::InspectorCSSOMWrappers::collectDocumentWrappers):
+        * style/UserAgentStyle.cpp:
+        (WebCore::Style::UserAgentStyle::ensureDefaultStyleSheetsForElement):
+        * style/UserAgentStyle.h:
+
 2019-12-22  Wenson Hsieh  <[email protected]>
 
         [macCatalyst] Mouse clicks dispatch duplicate pointerup and pointerdown events

Modified: trunk/Source/WebCore/DerivedSources-input.xcfilelist (253879 => 253880)


--- trunk/Source/WebCore/DerivedSources-input.xcfilelist	2019-12-23 03:51:39 UTC (rev 253879)
+++ trunk/Source/WebCore/DerivedSources-input.xcfilelist	2019-12-23 03:51:49 UTC (rev 253880)
@@ -537,6 +537,7 @@
 $(PROJECT_DIR)/css/WebKitCSSMatrix.idl
 $(PROJECT_DIR)/css/WebKitCSSViewportRule.idl
 $(PROJECT_DIR)/css/WebKitFontFamilyNames.in
+$(PROJECT_DIR)/css/dialog.css
 $(PROJECT_DIR)/css/fullscreen.css
 $(PROJECT_DIR)/css/html.css
 $(PROJECT_DIR)/css/make-css-file-arrays.pl

Modified: trunk/Source/WebCore/DerivedSources.make (253879 => 253880)


--- trunk/Source/WebCore/DerivedSources.make	2019-12-23 03:51:39 UTC (rev 253879)
+++ trunk/Source/WebCore/DerivedSources.make	2019-12-23 03:51:49 UTC (rev 253880)
@@ -1443,7 +1443,7 @@
 
 # user agent style sheets
 
-USER_AGENT_STYLE_SHEETS = $(WebCore)/css/html.css $(WebCore)/css/quirks.css $(WebCore)/css/plugIns.css $(WebCore)/css/svg.css
+USER_AGENT_STYLE_SHEETS = $(WebCore)/css/html.css $(WebCore)/css/dialog.css $(WebCore)/css/quirks.css $(WebCore)/css/plugIns.css $(WebCore)/css/svg.css
 
 ifeq ($(findstring ENABLE_MATHML,$(FEATURE_DEFINES)), ENABLE_MATHML)
     USER_AGENT_STYLE_SHEETS += $(WebCore)/css/mathml.css

Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (253879 => 253880)


--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2019-12-23 03:51:39 UTC (rev 253879)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2019-12-23 03:51:49 UTC (rev 253880)
@@ -5792,6 +5792,7 @@
 		0F9DAA0C1FD1C6630079C5B2 /* DOMGCOutputConstraint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DOMGCOutputConstraint.cpp; sourceTree = "<group>"; };
 		0F9DAA0E1FD1C6640079C5B2 /* DOMGCOutputConstraint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMGCOutputConstraint.h; sourceTree = "<group>"; };
 		0FA0852B1E6FB55A00975FDD /* CSSProperties.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = CSSProperties.json; sourceTree = "<group>"; };
+		0FA0A0E523AEAA35000EEB94 /* dialog.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; path = dialog.css; sourceTree = "<group>"; };
 		0FA24D77162DF91900A3F4C0 /* GraphicsLayerUpdater.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GraphicsLayerUpdater.cpp; sourceTree = "<group>"; };
 		0FA24D78162DF91900A3F4C0 /* GraphicsLayerUpdater.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GraphicsLayerUpdater.h; sourceTree = "<group>"; };
 		0FB6252C18DE1B1500A07C05 /* GeometryUtilities.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GeometryUtilities.cpp; sourceTree = "<group>"; };
@@ -27511,6 +27512,7 @@
 				9479492D1E04578D00018D85 /* DeprecatedCSSOMValueList.cpp */,
 				947949271E03132000018D85 /* DeprecatedCSSOMValueList.h */,
 				A8D0651C0A23C1FE005E7203 /* DeprecatedCSSOMValueList.idl */,
+				0FA0A0E523AEAA35000EEB94 /* dialog.css */,
 				4BDA3FF82151B6F200FD6604 /* DOMCSSCustomPropertyDescriptor.h */,
 				4BDA3FFA2151B6F300FD6604 /* DOMCSSCustomPropertyDescriptor.idl */,
 				FD677735195CAB200072E0D3 /* DOMCSSNamespace.cpp */,

Added: trunk/Source/WebCore/css/dialog.css (0 => 253880)


--- trunk/Source/WebCore/css/dialog.css	                        (rev 0)
+++ trunk/Source/WebCore/css/dialog.css	2019-12-23 03:51:49 UTC (rev 253880)
@@ -0,0 +1,7 @@
+dialog {
+    display: none;
+}
+
+dialog[open] {
+    display: block;
+}

Modified: trunk/Source/WebCore/html/HTMLDialogElement.cpp (253879 => 253880)


--- trunk/Source/WebCore/html/HTMLDialogElement.cpp	2019-12-23 03:51:39 UTC (rev 253879)
+++ trunk/Source/WebCore/html/HTMLDialogElement.cpp	2019-12-23 03:51:49 UTC (rev 253880)
@@ -26,6 +26,7 @@
 #include "config.h"
 #include "HTMLDialogElement.h"
 
+#include "HTMLNames.h"
 #include <wtf/IsoMallocInlines.h>
 
 namespace WebCore {
@@ -37,16 +38,11 @@
 {
 }
 
-bool HTMLDialogElement::open()
+bool HTMLDialogElement::isOpen() const
 {
-    return m_open;
+    return m_isOpen;
 }
 
-void HTMLDialogElement::setOpen(bool open)
-{
-    m_open = open;
-}
-
 const String& HTMLDialogElement::returnValue()
 {
     return m_returnValue;
@@ -59,14 +55,51 @@
 
 void HTMLDialogElement::show()
 {
+    // If the element already has an open attribute, then return.
+    if (isOpen())
+        return;
+    
+    toggleOpen();
 }
 
-void HTMLDialogElement::showModal()
+ExceptionOr<void> HTMLDialogElement::showModal()
 {
+    // If subject already has an open attribute, then throw an "InvalidStateError" DOMException.
+    if (isOpen())
+        return Exception { InvalidStateError };
+
+    // If subject is not connected, then throw an "InvalidStateError" DOMException.
+    if (!isConnected())
+        return Exception { InvalidStateError };
+
+    toggleOpen();
+    return { };
 }
 
-void HTMLDialogElement::close(const String&)
+void HTMLDialogElement::close(const String& returnValue)
 {
+    if (!isOpen())
+        return;
+    
+    toggleOpen();
+    if (!returnValue.isNull())
+        m_returnValue = returnValue;
 }
 
+void HTMLDialogElement::parseAttribute(const QualifiedName& name, const AtomString& value)
+{
+    if (name == openAttr) {
+        m_isOpen = !value.isNull();
+        return;
+    }
+    
+    HTMLElement::parseAttribute(name, value);
 }
+
+void HTMLDialogElement::toggleOpen()
+{
+    m_isOpen = !m_isOpen;
+    setAttributeWithoutSynchronization(openAttr, m_isOpen ? emptyAtom() : nullAtom());
+}
+
+}

Modified: trunk/Source/WebCore/html/HTMLDialogElement.h (253879 => 253880)


--- trunk/Source/WebCore/html/HTMLDialogElement.h	2019-12-23 03:51:39 UTC (rev 253879)
+++ trunk/Source/WebCore/html/HTMLDialogElement.h	2019-12-23 03:51:49 UTC (rev 253880)
@@ -34,21 +34,24 @@
 public:
     template<typename... Args> static Ref<HTMLDialogElement> create(Args&&... args) { return adoptRef(*new HTMLDialogElement(std::forward<Args>(args)...)); }
     
-    bool open();
-    void setOpen(bool);
+    bool isOpen() const;
 
     const String& returnValue();
     void setReturnValue(String&&);
 
     void show();
-    void showModal();
+    ExceptionOr<void> showModal();
     void close(const String&);
 
 private:
     HTMLDialogElement(const QualifiedName&, Document&);
-    
-    bool m_open { false };
+
+    void parseAttribute(const QualifiedName&, const AtomString&) final;
+
+    void toggleOpen();
+
     String m_returnValue;
+    bool m_isOpen { false };
 };
 
 } // namespace WebCore

Modified: trunk/Source/WebCore/html/HTMLDialogElement.idl (253879 => 253880)


--- trunk/Source/WebCore/html/HTMLDialogElement.idl	2019-12-23 03:51:39 UTC (rev 253879)
+++ trunk/Source/WebCore/html/HTMLDialogElement.idl	2019-12-23 03:51:49 UTC (rev 253880)
@@ -27,9 +27,9 @@
     Exposed=Window,
     EnabledAtRuntime=DialogElement,
 ] interface HTMLDialogElement : HTMLElement {
-    [CEReactions] attribute boolean open;
+    [CEReactions, Reflect] attribute boolean open;
     attribute DOMString returnValue;
     [CEReactions] void show();
-    [CEReactions] void showModal();
+    [CEReactions, MayThrowException] void showModal();
     [CEReactions] void close(optional DOMString returnValue);
 };

Modified: trunk/Source/WebCore/style/InspectorCSSOMWrappers.cpp (253879 => 253880)


--- trunk/Source/WebCore/style/InspectorCSSOMWrappers.cpp	2019-12-23 03:51:39 UTC (rev 253879)
+++ trunk/Source/WebCore/style/InspectorCSSOMWrappers.cpp	2019-12-23 03:51:49 UTC (rev 253880)
@@ -107,6 +107,7 @@
         collectFromStyleSheetContents(UserAgentStyle::simpleDefaultStyleSheet);
         collectFromStyleSheetContents(UserAgentStyle::defaultStyleSheet);
         collectFromStyleSheetContents(UserAgentStyle::quirksStyleSheet);
+        collectFromStyleSheetContents(UserAgentStyle::dialogStyleSheet);
         collectFromStyleSheetContents(UserAgentStyle::svgStyleSheet);
         collectFromStyleSheetContents(UserAgentStyle::mathMLStyleSheet);
         collectFromStyleSheetContents(UserAgentStyle::mediaControlsStyleSheet);

Modified: trunk/Source/WebCore/style/UserAgentStyle.cpp (253879 => 253880)


--- trunk/Source/WebCore/style/UserAgentStyle.cpp	2019-12-23 03:51:39 UTC (rev 253879)
+++ trunk/Source/WebCore/style/UserAgentStyle.cpp	2019-12-23 03:51:49 UTC (rev 253880)
@@ -36,6 +36,7 @@
 #include "HTMLBRElement.h"
 #include "HTMLBodyElement.h"
 #include "HTMLDataListElement.h"
+#include "HTMLDialogElement.h"
 #include "HTMLDivElement.h"
 #include "HTMLEmbedElement.h"
 #include "HTMLHeadElement.h"
@@ -68,6 +69,7 @@
 StyleSheetContents* UserAgentStyle::simpleDefaultStyleSheet;
 StyleSheetContents* UserAgentStyle::defaultStyleSheet;
 StyleSheetContents* UserAgentStyle::quirksStyleSheet;
+StyleSheetContents* UserAgentStyle::dialogStyleSheet;
 StyleSheetContents* UserAgentStyle::svgStyleSheet;
 StyleSheetContents* UserAgentStyle::mathMLStyleSheet;
 StyleSheetContents* UserAgentStyle::mediaControlsStyleSheet;
@@ -227,6 +229,12 @@
                 addToDefaultStyle(*plugInsStyleSheet);
             }
         }
+        else if (is<HTMLDialogElement>(element) && RuntimeEnabledFeatures::sharedFeatures().dialogElementEnabled()) {
+            if (!dialogStyleSheet) {
+                dialogStyleSheet = parseUASheet(dialogUserAgentStyleSheet, sizeof(dialogUserAgentStyleSheet));
+                addToDefaultStyle(*dialogStyleSheet);
+            }
+        }
 #if ENABLE(VIDEO)
         else if (is<HTMLMediaElement>(element)) {
             if (!mediaControlsStyleSheet) {

Modified: trunk/Source/WebCore/style/UserAgentStyle.h (253879 => 253880)


--- trunk/Source/WebCore/style/UserAgentStyle.h	2019-12-23 03:51:39 UTC (rev 253879)
+++ trunk/Source/WebCore/style/UserAgentStyle.h	2019-12-23 03:51:49 UTC (rev 253880)
@@ -41,6 +41,7 @@
     static StyleSheetContents* simpleDefaultStyleSheet;
     static StyleSheetContents* defaultStyleSheet;
     static StyleSheetContents* quirksStyleSheet;
+    static StyleSheetContents* dialogStyleSheet;
     static StyleSheetContents* svgStyleSheet;
     static StyleSheetContents* mathMLStyleSheet;
     static StyleSheetContents* mediaControlsStyleSheet;

Modified: trunk/Source/WebKit/ChangeLog (253879 => 253880)


--- trunk/Source/WebKit/ChangeLog	2019-12-23 03:51:39 UTC (rev 253879)
+++ trunk/Source/WebKit/ChangeLog	2019-12-23 03:51:49 UTC (rev 253880)
@@ -1,3 +1,15 @@
+2019-12-22  Simon Fraser  <[email protected]>
+
+        Make support for <dialog> an internal feature, off by default
+        https://bugs.webkit.org/show_bug.cgi?id=205542
+
+        Reviewed by Antti Koivisto.
+
+        Make DialogElementEnabled an internal feature so it shows up in the menus and
+        can be toggled on for experimentation.
+
+        * Shared/WebPreferences.yaml:
+
 2019-12-21  Simon Fraser  <[email protected]>
 
         Make support for <dialog> an experimental feature, off by default
@@ -9,6 +21,17 @@
 
         * Shared/WebPreferences.yaml:
 
+2019-12-21  Simon Fraser  <[email protected]>
+
+        Make support for <dialog> an experimental feature, off by default
+        https://bugs.webkit.org/show_bug.cgi?id=205542
+
+        Reviewed by Dean Jackson.
+
+        Make DialogElementEnabled an experimental feature (off by default).
+
+        * Shared/WebPreferences.yaml:
+
 2019-12-22  Eric Carlson  <[email protected]>
 
         [Media in GPU process] Add remote media player proxy configuration
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to