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