Source/WebCore/ChangeLog

 12019-12-21 Simon Fraser <simon.fraser@apple.com>
 2
 3 Very basic <dialog> show/close support
 4 https://bugs.webkit.org/show_bug.cgi?id=205543
 5
 6 Reviewed by NOBODY (OOPS!).
 7
 8 Fix HTMLDialogElement.idl for attribute reflection, and showModal() possibly throwing.
 9
 10 Have show/showModal() and close() toggle the "open" attribute. Implement parseAttribute()
 11 to initialize m_isOpen from the attribute value.
 12
 13 Add dialog.css, which is appended to the UA stylesheets if the feature is enabled. Have
 14 it set the display value.
 15
 16 Tested by web-platform-tests.
 17
 18 * CMakeLists.txt:
 19 * DerivedSources-input.xcfilelist:
 20 * DerivedSources.make:
 21 * WebCore.xcodeproj/project.pbxproj:
 22 * css/dialog.css: Added.
 23 (dialog):
 24 (dialog[open]):
 25 * html/HTMLDialogElement.cpp:
 26 (WebCore::HTMLDialogElement::isOpen const):
 27 (WebCore::HTMLDialogElement::show):
 28 (WebCore::HTMLDialogElement::showModal):
 29 (WebCore::HTMLDialogElement::close):
 30 (WebCore::HTMLDialogElement::parseAttribute):
 31 (WebCore::HTMLDialogElement::toggleOpen):
 32 (WebCore::HTMLDialogElement::open): Deleted.
 33 (WebCore::HTMLDialogElement::setOpen): Deleted.
 34 * html/HTMLDialogElement.h:
 35 * html/HTMLDialogElement.idl:
 36 * style/InspectorCSSOMWrappers.cpp:
 37 (WebCore::Style::InspectorCSSOMWrappers::collectDocumentWrappers):
 38 * style/UserAgentStyle.cpp:
 39 (WebCore::Style::UserAgentStyle::ensureDefaultStyleSheetsForElement):
 40 * style/UserAgentStyle.h:
 41
1422019-12-21 Antti Koivisto <antti@apple.com>
243
344 Move Vector HashTraits to HashTraits.h to fix GCC build

Source/WebKit/ChangeLog

 12019-12-21 Simon Fraser <simon.fraser@apple.com>
 2
 3 Make support for <dialog> an internal feature, off by default
 4 https://bugs.webkit.org/show_bug.cgi?id=205542
 5
 6 Reviewed by NOBODY (OOPS!).
 7
 8 Make DialogElementEnabled an internal feature so it shows up in the menus and
 9 can be toggled on for experimentation.
 10
 11 * Shared/WebPreferences.yaml:
 12
1132019-12-21 Kate Cheney <katherine_cheney@apple.com>
214
315 Add timeStamp to ITP database

Source/WebCore/CMakeLists.txt

@@set(WebCore_CSS_VALUE_KEYWORDS
12151215)
12161216
12171217set(WebCore_USER_AGENT_STYLE_SHEETS
 1218 ${WEBCORE_DIR}/css/dialog.css
12181219 ${WEBCORE_DIR}/css/fullscreen.css
12191220 ${WEBCORE_DIR}/css/html.css
12201221 ${WEBCORE_DIR}/css/mathml.css

Source/WebCore/DerivedSources-input.xcfilelist

@@$(PROJECT_DIR)/css/StyleSheetList.idl
537537$(PROJECT_DIR)/css/WebKitCSSMatrix.idl
538538$(PROJECT_DIR)/css/WebKitCSSViewportRule.idl
539539$(PROJECT_DIR)/css/WebKitFontFamilyNames.in
 540$(PROJECT_DIR)/css/dialog.css
540541$(PROJECT_DIR)/css/fullscreen.css
541542$(PROJECT_DIR)/css/html.css
542543$(PROJECT_DIR)/css/make-css-file-arrays.pl

Source/WebCore/DerivedSources.make

@@ColorData.cpp : platform/ColorData.gperf $(WebCore)/make-hash-tools.pl
14431443
14441444# user agent style sheets
14451445
1446 USER_AGENT_STYLE_SHEETS = $(WebCore)/css/html.css $(WebCore)/css/quirks.css $(WebCore)/css/plugIns.css $(WebCore)/css/svg.css
 1446USER_AGENT_STYLE_SHEETS = $(WebCore)/css/html.css $(WebCore)/css/dialog.css $(WebCore)/css/quirks.css $(WebCore)/css/plugIns.css $(WebCore)/css/svg.css
14471447
14481448ifeq ($(findstring ENABLE_MATHML,$(FEATURE_DEFINES)), ENABLE_MATHML)
14491449 USER_AGENT_STYLE_SHEETS += $(WebCore)/css/mathml.css

Source/WebCore/WebCore.xcodeproj/project.pbxproj

57915791 0F9DAA0C1FD1C6630079C5B2 /* DOMGCOutputConstraint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DOMGCOutputConstraint.cpp; sourceTree = "<group>"; };
57925792 0F9DAA0E1FD1C6640079C5B2 /* DOMGCOutputConstraint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMGCOutputConstraint.h; sourceTree = "<group>"; };
57935793 0FA0852B1E6FB55A00975FDD /* CSSProperties.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = CSSProperties.json; sourceTree = "<group>"; };
 5794 0FA0A0E523AEAA35000EEB94 /* dialog.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; path = dialog.css; sourceTree = "<group>"; };
57945795 0FA24D77162DF91900A3F4C0 /* GraphicsLayerUpdater.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GraphicsLayerUpdater.cpp; sourceTree = "<group>"; };
57955796 0FA24D78162DF91900A3F4C0 /* GraphicsLayerUpdater.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GraphicsLayerUpdater.h; sourceTree = "<group>"; };
57965797 0FB6252C18DE1B1500A07C05 /* GeometryUtilities.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GeometryUtilities.cpp; sourceTree = "<group>"; };

2750827509 9479492D1E04578D00018D85 /* DeprecatedCSSOMValueList.cpp */,
2750927510 947949271E03132000018D85 /* DeprecatedCSSOMValueList.h */,
2751027511 A8D0651C0A23C1FE005E7203 /* DeprecatedCSSOMValueList.idl */,
 27512 0FA0A0E523AEAA35000EEB94 /* dialog.css */,
2751127513 4BDA3FF82151B6F200FD6604 /* DOMCSSCustomPropertyDescriptor.h */,
2751227514 4BDA3FFA2151B6F300FD6604 /* DOMCSSCustomPropertyDescriptor.idl */,
2751327515 FD677735195CAB200072E0D3 /* DOMCSSNamespace.cpp */,

Source/WebCore/css/dialog.css

 1dialog {
 2 display: none;
 3}
 4
 5dialog[open] {
 6 display: block;
 7}

Source/WebCore/html/HTMLDialogElement.cpp

2626#include "config.h"
2727#include "HTMLDialogElement.h"
2828
 29#include "HTMLNames.h"
2930#include <wtf/IsoMallocInlines.h>
3031
3132namespace WebCore {

@@HTMLDialogElement::HTMLDialogElement(const QualifiedName& tagName, Document& doc
3738{
3839}
3940
40 bool HTMLDialogElement::open()
 41bool HTMLDialogElement::isOpen() const
4142{
42  return m_open;
43 }
44 
45 void HTMLDialogElement::setOpen(bool open)
46 {
47  m_open = open;
 43 return m_isOpen;
4844}
4945
5046const String& HTMLDialogElement::returnValue()

@@void HTMLDialogElement::setReturnValue(String&& returnValue)
5955
6056void HTMLDialogElement::show()
6157{
 58 // If the element already has an open attribute, then return.
 59 if (isOpen())
 60 return;
 61
 62 toggleOpen();
 63}
 64
 65ExceptionOr<void> HTMLDialogElement::showModal()
 66{
 67 // If subject already has an open attribute, then throw an "InvalidStateError" DOMException.
 68 if (isOpen())
 69 return Exception { InvalidStateError };
 70
 71 // If subject is not connected, then throw an "InvalidStateError" DOMException.
 72 if (!isConnected())
 73 return Exception { InvalidStateError };
 74
 75 toggleOpen();
 76 return { };
 77}
 78
 79void HTMLDialogElement::close(const String& returnValue)
 80{
 81 if (!isOpen())
 82 return;
 83
 84 toggleOpen();
 85 if (!returnValue.isNull())
 86 m_returnValue = returnValue;
6287}
6388
64 void HTMLDialogElement::showModal()
 89void HTMLDialogElement::parseAttribute(const QualifiedName& name, const AtomString& value)
6590{
 91 if (name == openAttr) {
 92 m_isOpen = !value.isNull();
 93 return;
 94 }
 95
 96 HTMLElement::parseAttribute(name, value);
6697}
6798
68 void HTMLDialogElement::close(const String&)
 99void HTMLDialogElement::toggleOpen()
69100{
 101 m_isOpen = !m_isOpen;
 102 setAttributeWithoutSynchronization(openAttr, m_isOpen ? emptyAtom() : nullAtom());
70103}
71104
72105}

Source/WebCore/html/HTMLDialogElement.h

@@class HTMLDialogElement final : public HTMLElement {
3434public:
3535 template<typename... Args> static Ref<HTMLDialogElement> create(Args&&... args) { return adoptRef(*new HTMLDialogElement(std::forward<Args>(args)...)); }
3636
37  bool open();
38  void setOpen(bool);
 37 bool isOpen() const;
3938
4039 const String& returnValue();
4140 void setReturnValue(String&&);
4241
4342 void show();
44  void showModal();
 43 ExceptionOr<void> showModal();
4544 void close(const String&);
4645
4746private:
4847 HTMLDialogElement(const QualifiedName&, Document&);
49 
50  bool m_open { false };
 48
 49 void parseAttribute(const QualifiedName&, const AtomString&) final;
 50
 51 void toggleOpen();
 52
5153 String m_returnValue;
 54 bool m_isOpen { false };
5255};
5356
5457} // namespace WebCore

Source/WebCore/html/HTMLDialogElement.idl

2727 Exposed=Window,
2828 EnabledAtRuntime=DialogElement,
2929] interface HTMLDialogElement : HTMLElement {
30  [CEReactions] attribute boolean open;
 30 [CEReactions, Reflect] attribute boolean open;
3131 attribute DOMString returnValue;
3232 [CEReactions] void show();
33  [CEReactions] void showModal();
 33 [CEReactions, MayThrowException] void showModal();
3434 [CEReactions] void close(optional DOMString returnValue);
3535};

Source/WebCore/style/InspectorCSSOMWrappers.cpp

@@void InspectorCSSOMWrappers::collectDocumentWrappers(ExtensionStyleSheets& exten
107107 collectFromStyleSheetContents(UserAgentStyle::simpleDefaultStyleSheet);
108108 collectFromStyleSheetContents(UserAgentStyle::defaultStyleSheet);
109109 collectFromStyleSheetContents(UserAgentStyle::quirksStyleSheet);
 110 collectFromStyleSheetContents(UserAgentStyle::dialogStyleSheet);
110111 collectFromStyleSheetContents(UserAgentStyle::svgStyleSheet);
111112 collectFromStyleSheetContents(UserAgentStyle::mathMLStyleSheet);
112113 collectFromStyleSheetContents(UserAgentStyle::mediaControlsStyleSheet);

Source/WebCore/style/UserAgentStyle.cpp

3636#include "HTMLBRElement.h"
3737#include "HTMLBodyElement.h"
3838#include "HTMLDataListElement.h"
 39#include "HTMLDialogElement.h"
3940#include "HTMLDivElement.h"
4041#include "HTMLEmbedElement.h"
4142#include "HTMLHeadElement.h"

@@unsigned UserAgentStyle::defaultStyleVersion;
6869StyleSheetContents* UserAgentStyle::simpleDefaultStyleSheet;
6970StyleSheetContents* UserAgentStyle::defaultStyleSheet;
7071StyleSheetContents* UserAgentStyle::quirksStyleSheet;
 72StyleSheetContents* UserAgentStyle::dialogStyleSheet;
7173StyleSheetContents* UserAgentStyle::svgStyleSheet;
7274StyleSheetContents* UserAgentStyle::mathMLStyleSheet;
7375StyleSheetContents* UserAgentStyle::mediaControlsStyleSheet;

@@void UserAgentStyle::ensureDefaultStyleSheetsForElement(const Element& element)
227229 addToDefaultStyle(*plugInsStyleSheet);
228230 }
229231 }
 232 else if (is<HTMLDialogElement>(element) && RuntimeEnabledFeatures::sharedFeatures().dialogElementEnabled()) {
 233 if (!dialogStyleSheet) {
 234 dialogStyleSheet = parseUASheet(dialogUserAgentStyleSheet, sizeof(dialogUserAgentStyleSheet));
 235 addToDefaultStyle(*dialogStyleSheet);
 236 }
 237 }
230238#if ENABLE(VIDEO)
231239 else if (is<HTMLMediaElement>(element)) {
232240 if (!mediaControlsStyleSheet) {

Source/WebCore/style/UserAgentStyle.h

@@public:
4141 static StyleSheetContents* simpleDefaultStyleSheet;
4242 static StyleSheetContents* defaultStyleSheet;
4343 static StyleSheetContents* quirksStyleSheet;
 44 static StyleSheetContents* dialogStyleSheet;
4445 static StyleSheetContents* svgStyleSheet;
4546 static StyleSheetContents* mathMLStyleSheet;
4647 static StyleSheetContents* mediaControlsStyleSheet;

Source/WebKit/Shared/WebPreferences.yaml

@@SourceBufferChangeTypeEnabled:
12071207 defaultValue: true
12081208 condition: ENABLE(MEDIA_SOURCE)
12091209
1210 DialogElementEnabled:
1211  type: bool
1212  defaultValue: false
1213  webcoreBinding: RuntimeEnabledFeatures
1214 
12151210KeygenElementEnabled:
12161211 type: bool
12171212 defaultValue: false

@@IsInAppBrowserPrivacyEnabled:
18851880 webcoreBinding: RuntimeEnabledFeatures
18861881 category: internal
18871882
 1883DialogElementEnabled:
 1884 type: bool
 1885 defaultValue: false
 1886 humanReadableName: "Dialog Element"
 1887 humanReadableDescription: "Enable the Dialog Element"
 1888 webcoreBinding: RuntimeEnabledFeatures
 1889 category: internal
 1890
18881891# Deprecated
18891892
18901893ICECandidateFilteringEnabled:

LayoutTests/ChangeLog

 12019-12-21 Simon Fraser <simon.fraser@apple.com>
 2
 3 Very basic <dialog> show/close support
 4 https://bugs.webkit.org/show_bug.cgi?id=205543
 5
 6 Reviewed by NOBODY (OOPS!).
 7
 8 * imported/blink/dialog/element-removed-from-top-layer-has-original-position-expected.html: Removed.
 9 * 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,
 10 then this test got re-imported from blink.
 11 * platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/documents/dom-tree-accessors/document.getElementsByName/document.getElementsByName-newelements-expected.txt:
 12 * platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/documents/dom-tree-accessors/document.getElementsByName/document.getElementsByName-newelements-xhtml-expected.txt:
 13 * platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/reflection-misc-expected.txt:
 14
1152019-12-21 Kate Cheney <katherine_cheney@apple.com>
216
317 Add timeStamp to ITP database

LayoutTests/imported/w3c/ChangeLog

 12019-12-21 Simon Fraser <simon.fraser@apple.com>
 2
 3 Very basic <dialog> show/close support
 4 https://bugs.webkit.org/show_bug.cgi?id=205543
 5
 6 Reviewed by NOBODY (OOPS!).
 7
 8 New results, some new passes.
 9
 10 * web-platform-tests/html/rendering/non-replaced-elements/flow-content-0/dialog-display-expected.txt:
 11 * web-platform-tests/html/rendering/non-replaced-elements/flow-content-0/dialog-expected.txt:
 12 * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/abspos-dialog-layout-expected.txt:
 13 * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-autofocus-expected.txt:
 14 * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-autofocus-just-once-expected.txt:
 15 * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-autofocus-multiple-times-expected.txt:
 16 * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-close-expected.txt:
 17 * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-open-expected.txt:
 18 * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-return-value-expected.txt:
 19 * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-showModal-expected.txt:
 20 * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-showModal-remove-expected.txt:
 21 * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/inert-node-is-unfocusable-expected.txt:
 22 * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/show-modal-focusing-steps-expected.txt:
 23 * web-platform-tests/html/semantics/selectors/pseudo-classes/default-expected.txt:
 24
1252019-12-20 Megan Gardner <megan_gardner@apple.com>
226
327 Paint highlights specified in CSS Highlight API

LayoutTests/imported/blink/dialog/element-removed-from-top-layer-has-original-position-expected.html

1 <!DOCTYPE html>
2 <html>
3 <head>
4 <style>
5 .green {
6  color: green;
7 }
8 </style>
9 </head>
10 <body>
11 <p>Bug <a href="http://webkit.org/b/106538">106538</a>: Top layer fails for inline elements</p>
12 <p>This tests that position 'static' no longer computes to 'absolute' for an
13 element that has been removed from the top layer. The test passes if you see
14 a single line of text.</p>
15 <span class="green">This is the span.</span>
16 <span class="green">This is the dialog following it.</span>
17 </body>
18 </html>

LayoutTests/imported/blink/dialog/element-removed-from-top-layer-has-original-position.html

1 <!DOCTYPE html>
2 <html>
3 <head>
4 <style>
5 .green {
6  color: green;
7 }
8 
9 #right-dialog {
10  position: static;
11  border: none;
12  padding: 0;
13  margin: 0;
14 }
15 </style>
16 </head>
17 <body>
18 <p>Bug <a href="http://webkit.org/b/106538">106538</a>: Top layer fails for inline elements</p>
19 <p>This tests that position 'static' no longer computes to 'absolute' for an
20 element that has been removed from the top layer. The test passes if you see
21 a single line of text.</p>
22 <span class="green">This is the span.</span>
23 <dialog class="green" id="right-dialog">This is the dialog following it.</dialog>
24 <script>
25 var dialog = document.getElementById('right-dialog');
26 dialog.showModal();
27 dialog.close();
28 dialog.show();
29 </script>
30 </body>
31 </html>

LayoutTests/imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/flow-content-0/dialog-display-expected.txt

11
2 FAIL dialog: display assert_equals: expected "block" but got "inline"
 2PASS dialog: display
33

LayoutTests/imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/flow-content-0/dialog-expected.txt

11
22
33
4 FAIL Closed dialog in width: 540px iframe assert_equals: display expected "none" but got "inline"
5 FAIL Open dialog in width: 540px iframe assert_equals: display expected "block" but got "inline"
6 FAIL Modal dialog in width: 540px iframe assert_equals: display expected "block" but got "inline"
7 FAIL Closed dialog in width: 538px iframe assert_equals: display expected "none" but got "inline"
8 FAIL Open dialog in width: 538px iframe assert_equals: display expected "block" but got "inline"
9 FAIL Modal dialog in width: 538px iframe assert_equals: display expected "block" but got "inline"
 4FAIL Closed dialog in width: 540px iframe assert_equals: right expected "0px" but got "auto"
 5FAIL Open dialog in width: 540px iframe assert_equals: top expected "8px" but got "auto"
 6FAIL Modal dialog in width: 540px iframe assert_equals: top expected "56px" but got "auto"
 7FAIL Closed dialog in width: 538px iframe assert_equals: right expected "0px" but got "auto"
 8FAIL Open dialog in width: 538px iframe assert_equals: top expected "8px" but got "auto"
 9FAIL Modal dialog in width: 538px iframe assert_equals: top expected "56px" but got "auto"
1010

LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/abspos-dialog-layout-expected.txt

1 It is my dialog.
21
32FAIL showModal() should center in the viewport assert_equals: expected 291 but got -500
43FAIL The dialog is a positioned element, so the top and bottom should not have style auto. assert_not_equals: got disallowed value "auto"
5 FAIL Dialog should be recentered if showModal() is called after close() assert_equals: expected 291 but got -1000
 4FAIL Dialog should be recentered if showModal() is called after close() assert_equals: expected 290 but got -1000
65PASS Dialog should not recenter on relayout.
76FAIL A tall dialog should be positioned at the top of the viewport. assert_equals: expected 0 but got -500
8 FAIL The dialog should be centered regardless of the presence of a horizontal scrollbar. assert_equals: expected 291 but got -500
9 FAIL Centering should work when dialog is inside positioned containers. assert_equals: expected 291 but got 330
 7FAIL The dialog should be centered regardless of the presence of a horizontal scrollbar. assert_equals: expected -9700 but got -500
 8FAIL Centering should work when dialog is inside positioned containers. assert_equals: expected -9700 but got 330
109PASS A centered dialog's position should survive becoming display:none temporarily.
1110FAIL Dialog should lose centering when removed from the document. assert_not_equals: got disallowed value 320
1211PASS Dialog's specified position should survive after close() and showModal().
13 FAIL Dialog should be recentered if showModal() is called after removing 'open'. assert_equals: expected 291 but got -1000
 12FAIL Dialog should be recentered if showModal() is called after removing 'open'. assert_equals: expected -9700 but got -1000
1413FAIL Dialog should not be centered if showModal() was called when an ancestor had display 'none'. assert_equals: expected 9500 but got 330
1514FAIL A dialog with specified 'top' should be positioned as usual assert_equals: expected 50 but got 0
16 FAIL A dialog with specified 'bottom' should be positioned as usual assert_equals: expected 550 but got 18
 15FAIL A dialog with specified 'bottom' should be positioned as usual assert_equals: expected 550 but got 20000
1716

LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-autofocus-expected.txt

1 
 1
 2
23
34
45
5 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>
 6FAIL 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>
67

LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-autofocus-just-once-expected.txt

1 
 1
22
33FAIL 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>
4 <dialog>
 4<dialog open="">
55<input>
66<input autofocus="">
7 </dialog>
8 <s...
 7</di...
98

LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-autofocus-multiple-times-expected.txt

1 
21
3 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>
 2
 3
 4FAIL 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>
45

LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-close-expected.txt

@@Harness Error (TIMEOUT), message = null
33
44TIMEOUT close() fires a close event Test timed out
55PASS close() on a <dialog> that doesn't have an open attribute aborts the steps
6 FAIL close() removes the open attribute and set the returnValue to the first argument assert_true: expected true got false
7 FAIL close() without argument removes the open attribute and there's no returnValue assert_true: expected true got false
 6PASS close() removes the open attribute and set the returnValue to the first argument
 7PASS close() without argument removes the open attribute and there's no returnValue
88PASS close() should set the returnValue IDL attribute but not the JS property
9 foobar
109
11 OK
12 foobar
13 
14 OK
15 foobar
16 
17 OK
18 foobar
19 
20 OK
21 foobar
22 
23 OK

LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-open-expected.txt

11foobar
22
3 OK
4 foobar
5 
63OK
74
8 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
9 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
 5PASS On getting, the IDL open attribute must return true if the content open attribute is set, and false if it is absent.
 6PASS 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.
107

LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-return-value-expected.txt

11
2 FAIL Tests dialog.returnValue is settable and returns the last value set. assert_equals: expected "Return value set from close()" but got "7"
 2PASS Tests dialog.returnValue is settable and returns the last value set.
33

LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-showModal-expected.txt

11
2 FAIL dialog element: showModal() assert_true: expected true got false
3 FAIL showModal() on a <dialog> that already has an open attribute throws an InvalidStateError exception assert_throws: function "function () {
4  d2.showModal();
5  }" did not throw
6 FAIL showModal() on a <dialog> after initial showModal() and removing the open attribute assert_true: expected true got false
7 FAIL showModal() on a <dialog> not in a Document throws an InvalidStateError exception assert_throws: function "function () {
8  d.showModal();
9  }" did not throw
10 FAIL when opening multiple dialogs, only the newest one is non-inert assert_true: expected true got false
11 FAIL opening dialog without focusable children assert_true: expected true got false
12 FAIL opening dialog with multiple focusable children assert_true: expected true got false
13 FAIL opening dialog with multiple focusable children, one having the autofocus attribute assert_true: expected true got false
14 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>
 2FAIL dialog element: showModal() assert_equals: expected Element node <button id="b1">OK</button> but got Element node <body><div id="log"></div>
153<button id="b0">OK</button>
164<d...
 5PASS showModal() on a <dialog> that already has an open attribute throws an InvalidStateError exception
 6PASS showModal() on a <dialog> after initial showModal() and removing the open attribute
 7PASS showModal() on a <dialog> not in a Document throws an InvalidStateError exception
 8PASS when opening multiple dialogs, only the newest one is non-inert
 9FAIL opening dialog without focusable children assert_equals: expected Element node <dialog id="d6" open=""></dialog> but got Element node <body><div id="log"></div>
 10<button id="b0">OK</button>
 11<d...
 12FAIL 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>
 13<button id="b0">OK</button>
 14<d...
 15FAIL 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>
 16<button id="b0">OK</button>
 17<d...
 18FAIL 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">
 19<title>dialog element:...
1720OK
18 foobar
19 
20 OK
21 foobar
22 
23 OK
24 foobar
25 
26 OK
27 foobar
28 
29 OK
30 foobar
31 
32 OK OK OK

LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-showModal-remove-expected.txt

11
2 FAIL dialog element: removing from document after showModal() assert_true: expected true got false
 2PASS dialog element: removing from document after showModal()
33

LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/inert-node-is-unfocusable-expected.txt

1 I get focus I don't get focus.
 1I get focus
 2I don't get focus.
23
34I'm editable
45I'm tabindexed.

LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/show-modal-focusing-steps-expected.txt

1 
2 
31
42
5 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>
 3FAIL focus when a modal dialog is opened assert_equals: expected Element node <body>
 4<button id="outer-button" autofocus=""></button>
 5<... but got Element node <button id="outer-button" autofocus=""></button>
66

LayoutTests/imported/w3c/web-platform-tests/html/semantics/selectors/pseudo-classes/default-expected.txt

@@button5
99
1010
1111
12 
 12
1313button6 button7
1414button8 button9

LayoutTests/platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/documents/dom-tree-accessors/document.getElementsByName/document.getElementsByName-newelements-expected.txt

@@PASS getElementsByName("ruby")
2626PASS getElementsByName("rt")
2727PASS getElementsByName("rp")
2828PASS getElementsByName("source")
29 
 29
3030

LayoutTests/platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/documents/dom-tree-accessors/document.getElementsByName/document.getElementsByName-newelements-xhtml-expected.txt

11
22PASS getElementsByName and newly introduced HTML elements
3 
 3
44

LayoutTests/platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/reflection-misc-expected.txt

@@PASS dialog.tabIndex: IDL set to 2147483647
42974297PASS dialog.tabIndex: IDL set to -2147483648
42984298PASS dialog.open: typeof IDL attribute
42994299PASS dialog.open: IDL get with DOM attribute unset
4300 FAIL dialog.open: setAttribute() to "" assert_equals: IDL get expected true but got false
4301 FAIL dialog.open: setAttribute() to " foo " assert_equals: IDL get expected true but got false
4302 FAIL dialog.open: setAttribute() to undefined assert_equals: IDL get expected true but got false
4303 FAIL dialog.open: setAttribute() to null assert_equals: IDL get expected true but got false
4304 FAIL dialog.open: setAttribute() to 7 assert_equals: IDL get expected true but got false
4305 FAIL dialog.open: setAttribute() to 1.5 assert_equals: IDL get expected true but got false
4306 FAIL dialog.open: setAttribute() to "5%" assert_equals: IDL get expected true but got false
4307 FAIL dialog.open: setAttribute() to "+100" assert_equals: IDL get expected true but got false
4308 FAIL dialog.open: setAttribute() to ".5" assert_equals: IDL get expected true but got false
4309 FAIL dialog.open: setAttribute() to true assert_equals: IDL get expected true but got false
4310 FAIL dialog.open: setAttribute() to false assert_equals: IDL get expected true but got false
4311 FAIL dialog.open: setAttribute() to object "[object Object]" assert_equals: IDL get expected true but got false
4312 FAIL dialog.open: setAttribute() to NaN assert_equals: IDL get expected true but got false
4313 FAIL dialog.open: setAttribute() to Infinity assert_equals: IDL get expected true but got false
4314 FAIL dialog.open: setAttribute() to -Infinity assert_equals: IDL get expected true but got false
4315 FAIL dialog.open: setAttribute() to "\0" assert_equals: IDL get expected true but got false
4316 FAIL dialog.open: setAttribute() to object "test-toString" assert_equals: IDL get expected true but got false
4317 FAIL dialog.open: setAttribute() to object "test-valueOf" assert_equals: IDL get expected true but got false
4318 FAIL dialog.open: setAttribute() to "open" assert_equals: IDL get expected true but got false
4319 FAIL dialog.open: IDL set to "" assert_equals: hasAttribute() expected false but got true
 4300PASS dialog.open: setAttribute() to ""
 4301PASS dialog.open: setAttribute() to " foo "
 4302PASS dialog.open: setAttribute() to undefined
 4303PASS dialog.open: setAttribute() to null
 4304PASS dialog.open: setAttribute() to 7
 4305PASS dialog.open: setAttribute() to 1.5
 4306PASS dialog.open: setAttribute() to "5%"
 4307PASS dialog.open: setAttribute() to "+100"
 4308PASS dialog.open: setAttribute() to ".5"
 4309PASS dialog.open: setAttribute() to true
 4310PASS dialog.open: setAttribute() to false
 4311PASS dialog.open: setAttribute() to object "[object Object]"
 4312PASS dialog.open: setAttribute() to NaN
 4313PASS dialog.open: setAttribute() to Infinity
 4314PASS dialog.open: setAttribute() to -Infinity
 4315PASS dialog.open: setAttribute() to "\0"
 4316PASS dialog.open: setAttribute() to object "test-toString"
 4317PASS dialog.open: setAttribute() to object "test-valueOf"
 4318PASS dialog.open: setAttribute() to "open"
 4319PASS dialog.open: IDL set to ""
43204320PASS dialog.open: IDL set to " foo "
4321 FAIL dialog.open: IDL set to undefined assert_equals: hasAttribute() expected false but got true
4322 FAIL dialog.open: IDL set to null assert_equals: hasAttribute() expected false but got true
 4321PASS dialog.open: IDL set to undefined
 4322PASS dialog.open: IDL set to null
43234323PASS dialog.open: IDL set to 7
43244324PASS dialog.open: IDL set to 1.5
43254325PASS dialog.open: IDL set to "5%"
43264326PASS dialog.open: IDL set to "+100"
43274327PASS dialog.open: IDL set to ".5"
43284328PASS dialog.open: IDL set to true
4329 FAIL dialog.open: IDL set to false assert_equals: hasAttribute() expected false but got true
 4329PASS dialog.open: IDL set to false
43304330PASS dialog.open: IDL set to object "[object Object]"
4331 FAIL dialog.open: IDL set to NaN assert_equals: hasAttribute() expected false but got true
 4331PASS dialog.open: IDL set to NaN
43324332PASS dialog.open: IDL set to Infinity
43334333PASS dialog.open: IDL set to -Infinity
43344334PASS dialog.open: IDL set to "\0"