diff options
author | Luke <luke.wilde@live.co.uk> | 2020-11-12 04:16:41 +0000 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-11-12 10:38:26 +0100 |
commit | 3f73b0f896f57957f1bfedf5ee674f8fd8c9224f (patch) | |
tree | 27c1690774b9ad385cd4cc93f3a2a0ce3636c9f1 /Libraries | |
parent | 1643fa22237e418b896e45c7a8bec10f826dc177 (diff) | |
download | serenity-3f73b0f896f57957f1bfedf5ee674f8fd8c9224f.zip |
LibWeb: Add almost all obsolete but required IDL attributes
As according to https://html.spec.whatwg.org/multipage/obsolete.html
Section 16.3 "Requirements for implementations"
Not all of these attributes are included due to requiring a bit more
functionality.
Diffstat (limited to 'Libraries')
43 files changed, 264 insertions, 18 deletions
diff --git a/Libraries/LibWeb/Bindings/NodeWrapperFactory.cpp b/Libraries/LibWeb/Bindings/NodeWrapperFactory.cpp index fe9acca6ff..f78491d33a 100644 --- a/Libraries/LibWeb/Bindings/NodeWrapperFactory.cpp +++ b/Libraries/LibWeb/Bindings/NodeWrapperFactory.cpp @@ -43,10 +43,12 @@ #include <LibWeb/Bindings/HTMLDataListElementWrapper.h> #include <LibWeb/Bindings/HTMLDetailsElementWrapper.h> #include <LibWeb/Bindings/HTMLDialogElementWrapper.h> +#include <LibWeb/Bindings/HTMLDirectoryElementWrapper.h> #include <LibWeb/Bindings/HTMLDivElementWrapper.h> #include <LibWeb/Bindings/HTMLElementWrapper.h> #include <LibWeb/Bindings/HTMLEmbedElementWrapper.h> #include <LibWeb/Bindings/HTMLFieldSetElementWrapper.h> +#include <LibWeb/Bindings/HTMLFontElementWrapper.h> #include <LibWeb/Bindings/HTMLFormElementWrapper.h> #include <LibWeb/Bindings/HTMLFrameElementWrapper.h> #include <LibWeb/Bindings/HTMLFrameSetElementWrapper.h> @@ -118,9 +120,11 @@ #include <LibWeb/HTML/HTMLDataListElement.h> #include <LibWeb/HTML/HTMLDetailsElement.h> #include <LibWeb/HTML/HTMLDialogElement.h> +#include <LibWeb/HTML/HTMLDirectoryElement.h> #include <LibWeb/HTML/HTMLDivElement.h> #include <LibWeb/HTML/HTMLEmbedElement.h> #include <LibWeb/HTML/HTMLFieldSetElement.h> +#include <LibWeb/HTML/HTMLFontElement.h> #include <LibWeb/HTML/HTMLFormElement.h> #include <LibWeb/HTML/HTMLFrameElement.h> #include <LibWeb/HTML/HTMLFrameSetElement.h> @@ -207,6 +211,8 @@ NodeWrapper* wrap(JS::GlobalObject& global_object, DOM::Node& node) return static_cast<NodeWrapper*>(wrap_impl(global_object, downcast<HTML::HTMLDetailsElement>(node))); if (is<HTML::HTMLDialogElement>(node)) return static_cast<NodeWrapper*>(wrap_impl(global_object, downcast<HTML::HTMLDialogElement>(node))); + if (is<HTML::HTMLDirectoryElement>(node)) + return static_cast<NodeWrapper*>(wrap_impl(global_object, downcast<HTML::HTMLDirectoryElement>(node))); if (is<HTML::HTMLDivElement>(node)) return static_cast<NodeWrapper*>(wrap_impl(global_object, downcast<HTML::HTMLDivElement>(node))); if (is<HTML::HTMLDListElement>(node)) @@ -215,6 +221,8 @@ NodeWrapper* wrap(JS::GlobalObject& global_object, DOM::Node& node) return static_cast<NodeWrapper*>(wrap_impl(global_object, downcast<HTML::HTMLEmbedElement>(node))); if (is<HTML::HTMLFieldSetElement>(node)) return static_cast<NodeWrapper*>(wrap_impl(global_object, downcast<HTML::HTMLFieldSetElement>(node))); + if (is<HTML::HTMLFontElement>(node)) + return static_cast<NodeWrapper*>(wrap_impl(global_object, downcast<HTML::HTMLFontElement>(node))); if (is<HTML::HTMLFormElement>(node)) return static_cast<NodeWrapper*>(wrap_impl(global_object, downcast<HTML::HTMLFormElement>(node))); if (is<HTML::HTMLFrameElement>(node)) diff --git a/Libraries/LibWeb/CMakeLists.txt b/Libraries/LibWeb/CMakeLists.txt index 2e7f4aa40a..5bef2b934f 100644 --- a/Libraries/LibWeb/CMakeLists.txt +++ b/Libraries/LibWeb/CMakeLists.txt @@ -65,6 +65,7 @@ set(SOURCES HTML/HTMLDataListElement.cpp HTML/HTMLDetailsElement.cpp HTML/HTMLDialogElement.cpp + HTML/HTMLDirectoryElement.cpp HTML/HTMLDivElement.cpp HTML/HTMLElement.cpp HTML/HTMLEmbedElement.cpp @@ -245,11 +246,13 @@ libweb_js_wrapper(HTML/HTMLDataElement) libweb_js_wrapper(HTML/HTMLDataListElement) libweb_js_wrapper(HTML/HTMLDetailsElement) libweb_js_wrapper(HTML/HTMLDialogElement) +libweb_js_wrapper(HTML/HTMLDirectoryElement) libweb_js_wrapper(HTML/HTMLDivElement) libweb_js_wrapper(HTML/HTMLDListElement) libweb_js_wrapper(HTML/HTMLElement) libweb_js_wrapper(HTML/HTMLEmbedElement) libweb_js_wrapper(HTML/HTMLFieldSetElement) +libweb_js_wrapper(HTML/HTMLFontElement) libweb_js_wrapper(HTML/HTMLFormElement) libweb_js_wrapper(HTML/HTMLFrameElement) libweb_js_wrapper(HTML/HTMLFrameSetElement) diff --git a/Libraries/LibWeb/CodeGenerators/WrapperGenerator.cpp b/Libraries/LibWeb/CodeGenerators/WrapperGenerator.cpp index e18bcf7c47..2d3257160f 100644 --- a/Libraries/LibWeb/CodeGenerators/WrapperGenerator.cpp +++ b/Libraries/LibWeb/CodeGenerators/WrapperGenerator.cpp @@ -55,7 +55,7 @@ static String snake_name(const StringView& title_name) static String make_input_acceptable_cpp(const String& input) { - if (input == "class" || input == "template" || input == "for" || input == "default") { + if (input.is_one_of("class", "template", "for", "default", "char")) { StringBuilder builder; builder.append(input); builder.append('_'); @@ -227,6 +227,7 @@ static OwnPtr<Interface> parse_interface(const StringView& input) } else { extended_attributes.set(name, {}); } + lexer.consume_specific(','); } consume_whitespace(); return extended_attributes; diff --git a/Libraries/LibWeb/DOM/ElementFactory.cpp b/Libraries/LibWeb/DOM/ElementFactory.cpp index b50cd0550b..810d82efdc 100644 --- a/Libraries/LibWeb/DOM/ElementFactory.cpp +++ b/Libraries/LibWeb/DOM/ElementFactory.cpp @@ -40,6 +40,7 @@ #include <LibWeb/HTML/HTMLDataListElement.h> #include <LibWeb/HTML/HTMLDetailsElement.h> #include <LibWeb/HTML/HTMLDialogElement.h> +#include <LibWeb/HTML/HTMLDirectoryElement.h> #include <LibWeb/HTML/HTMLDivElement.h> #include <LibWeb/HTML/HTMLEmbedElement.h> #include <LibWeb/HTML/HTMLFieldSetElement.h> @@ -132,6 +133,8 @@ NonnullRefPtr<Element> create_element(Document& document, const FlyString& tag_n return adopt(*new HTML::HTMLDetailsElement(document, qualified_name)); if (lowercase_tag_name == HTML::TagNames::dialog) return adopt(*new HTML::HTMLDialogElement(document, qualified_name)); + if (lowercase_tag_name == HTML::TagNames::dir) + return adopt(*new HTML::HTMLDirectoryElement(document, qualified_name)); if (lowercase_tag_name == HTML::TagNames::div) return adopt(*new HTML::HTMLDivElement(document, qualified_name)); if (lowercase_tag_name == HTML::TagNames::dl) diff --git a/Libraries/LibWeb/Forward.h b/Libraries/LibWeb/Forward.h index 4384d5f65e..d791837546 100644 --- a/Libraries/LibWeb/Forward.h +++ b/Libraries/LibWeb/Forward.h @@ -70,6 +70,7 @@ class HTMLDataElement; class HTMLDataListElement; class HTMLDetailsElement; class HTMLDialogElement; +class HTMLDirectoryElement; class HTMLDivElement; class HTMLDListElement; class HTMLDocumentParser; @@ -194,11 +195,13 @@ class HTMLDataElementWrapper; class HTMLDataListElementWrapper; class HTMLDetailsElementWrapper; class HTMLDialogElementWrapper; +class HTMLDirectoryElementWrapper; class HTMLDivElementWrapper; class HTMLDListElementWrapper; class HTMLElementWrapper; class HTMLEmbedElementWrapper; class HTMLFieldSetElementWrapper; +class HTMLFontElementWrapper; class HTMLFormElementWrapper; class HTMLFrameElementWrapper; class HTMLFrameSetElementWrapper; diff --git a/Libraries/LibWeb/HTML/AttributeNames.cpp b/Libraries/LibWeb/HTML/AttributeNames.cpp index 2964e06b1f..5c091170c1 100644 --- a/Libraries/LibWeb/HTML/AttributeNames.cpp +++ b/Libraries/LibWeb/HTML/AttributeNames.cpp @@ -48,10 +48,11 @@ ENUMERATE_HTML_ATTRIBUTES ENUMERATE_HTML_ATTRIBUTES #undef __ENUMERATE_HTML_ATTRIBUTE - // NOTE: Special case for the class and for attributes since they're C++ keywords. + // NOTE: Special cases for C++ keywords. class_ = "class"; for_ = "for"; default_ = "default"; + char_ = "char"; // NOTE: Special cases for attributes with dashes in them. accept_charset = "accept-charset"; diff --git a/Libraries/LibWeb/HTML/AttributeNames.h b/Libraries/LibWeb/HTML/AttributeNames.h index 0ff091f0bc..670ec9bdb4 100644 --- a/Libraries/LibWeb/HTML/AttributeNames.h +++ b/Libraries/LibWeb/HTML/AttributeNames.h @@ -38,34 +38,52 @@ namespace AttributeNames { __ENUMERATE_HTML_ATTRIBUTE(accept_charset) \ __ENUMERATE_HTML_ATTRIBUTE(action) \ __ENUMERATE_HTML_ATTRIBUTE(align) \ + __ENUMERATE_HTML_ATTRIBUTE(alink) \ __ENUMERATE_HTML_ATTRIBUTE(allow) \ __ENUMERATE_HTML_ATTRIBUTE(allowfullscreen) \ __ENUMERATE_HTML_ATTRIBUTE(alt) \ + __ENUMERATE_HTML_ATTRIBUTE(archive) \ __ENUMERATE_HTML_ATTRIBUTE(async) \ __ENUMERATE_HTML_ATTRIBUTE(autoplay) \ + __ENUMERATE_HTML_ATTRIBUTE(axis) \ + __ENUMERATE_HTML_ATTRIBUTE(background) \ __ENUMERATE_HTML_ATTRIBUTE(behaviour) \ __ENUMERATE_HTML_ATTRIBUTE(bgcolor) \ + __ENUMERATE_HTML_ATTRIBUTE(border) \ + __ENUMERATE_HTML_ATTRIBUTE(cellpadding) \ + __ENUMERATE_HTML_ATTRIBUTE(cellspacing) \ + __ENUMERATE_HTML_ATTRIBUTE(char_) \ + __ENUMERATE_HTML_ATTRIBUTE(charoff) \ + __ENUMERATE_HTML_ATTRIBUTE(charset) \ __ENUMERATE_HTML_ATTRIBUTE(checked) \ __ENUMERATE_HTML_ATTRIBUTE(cite) \ __ENUMERATE_HTML_ATTRIBUTE(class_) \ + __ENUMERATE_HTML_ATTRIBUTE(clear) \ + __ENUMERATE_HTML_ATTRIBUTE(code) \ + __ENUMERATE_HTML_ATTRIBUTE(codetype) \ __ENUMERATE_HTML_ATTRIBUTE(color) \ __ENUMERATE_HTML_ATTRIBUTE(cols) \ __ENUMERATE_HTML_ATTRIBUTE(colspan) \ + __ENUMERATE_HTML_ATTRIBUTE(compact) \ __ENUMERATE_HTML_ATTRIBUTE(content) \ __ENUMERATE_HTML_ATTRIBUTE(contenteditable) \ __ENUMERATE_HTML_ATTRIBUTE(controls) \ + __ENUMERATE_HTML_ATTRIBUTE(coords) \ __ENUMERATE_HTML_ATTRIBUTE(data) \ __ENUMERATE_HTML_ATTRIBUTE(datetime) \ + __ENUMERATE_HTML_ATTRIBUTE(declare) \ __ENUMERATE_HTML_ATTRIBUTE(default_) \ __ENUMERATE_HTML_ATTRIBUTE(defer) \ __ENUMERATE_HTML_ATTRIBUTE(disabled) \ __ENUMERATE_HTML_ATTRIBUTE(download) \ __ENUMERATE_HTML_ATTRIBUTE(direction) \ __ENUMERATE_HTML_ATTRIBUTE(dirname) \ + __ENUMERATE_HTML_ATTRIBUTE(event) \ __ENUMERATE_HTML_ATTRIBUTE(face) \ __ENUMERATE_HTML_ATTRIBUTE(for_) \ __ENUMERATE_HTML_ATTRIBUTE(formnovalidate) \ __ENUMERATE_HTML_ATTRIBUTE(formtarget) \ + __ENUMERATE_HTML_ATTRIBUTE(frame) \ __ENUMERATE_HTML_ATTRIBUTE(frameborder) \ __ENUMERATE_HTML_ATTRIBUTE(headers) \ __ENUMERATE_HTML_ATTRIBUTE(height) \ @@ -80,16 +98,22 @@ namespace AttributeNames { __ENUMERATE_HTML_ATTRIBUTE(ismap) \ __ENUMERATE_HTML_ATTRIBUTE(label) \ __ENUMERATE_HTML_ATTRIBUTE(lang) \ + __ENUMERATE_HTML_ATTRIBUTE(link) \ __ENUMERATE_HTML_ATTRIBUTE(longdesc) \ __ENUMERATE_HTML_ATTRIBUTE(loop) \ __ENUMERATE_HTML_ATTRIBUTE(max) \ + __ENUMERATE_HTML_ATTRIBUTE(marginheight) \ + __ENUMERATE_HTML_ATTRIBUTE(marginwidth) \ __ENUMERATE_HTML_ATTRIBUTE(media) \ __ENUMERATE_HTML_ATTRIBUTE(method) \ __ENUMERATE_HTML_ATTRIBUTE(min) \ __ENUMERATE_HTML_ATTRIBUTE(multiple) \ __ENUMERATE_HTML_ATTRIBUTE(name) \ + __ENUMERATE_HTML_ATTRIBUTE(nohref) \ __ENUMERATE_HTML_ATTRIBUTE(nomodule) \ + __ENUMERATE_HTML_ATTRIBUTE(noshade) \ __ENUMERATE_HTML_ATTRIBUTE(novalidate) \ + __ENUMERATE_HTML_ATTRIBUTE(nowrap) \ __ENUMERATE_HTML_ATTRIBUTE(open) \ __ENUMERATE_HTML_ATTRIBUTE(pattern) \ __ENUMERATE_HTML_ATTRIBUTE(ping) \ @@ -99,23 +123,34 @@ namespace AttributeNames { __ENUMERATE_HTML_ATTRIBUTE(readonly) \ __ENUMERATE_HTML_ATTRIBUTE(rel) \ __ENUMERATE_HTML_ATTRIBUTE(required) \ + __ENUMERATE_HTML_ATTRIBUTE(rev) \ __ENUMERATE_HTML_ATTRIBUTE(reversed) \ __ENUMERATE_HTML_ATTRIBUTE(rows) \ + __ENUMERATE_HTML_ATTRIBUTE(rules) \ + __ENUMERATE_HTML_ATTRIBUTE(scheme) \ __ENUMERATE_HTML_ATTRIBUTE(scrolling) \ __ENUMERATE_HTML_ATTRIBUTE(selected) \ + __ENUMERATE_HTML_ATTRIBUTE(shape) \ __ENUMERATE_HTML_ATTRIBUTE(size) \ __ENUMERATE_HTML_ATTRIBUTE(sizes) \ __ENUMERATE_HTML_ATTRIBUTE(src) \ __ENUMERATE_HTML_ATTRIBUTE(srcdoc) \ __ENUMERATE_HTML_ATTRIBUTE(srclang) \ __ENUMERATE_HTML_ATTRIBUTE(srcset) \ + __ENUMERATE_HTML_ATTRIBUTE(standby) \ __ENUMERATE_HTML_ATTRIBUTE(step) \ __ENUMERATE_HTML_ATTRIBUTE(style) \ + __ENUMERATE_HTML_ATTRIBUTE(summary) \ __ENUMERATE_HTML_ATTRIBUTE(target) \ + __ENUMERATE_HTML_ATTRIBUTE(text) \ __ENUMERATE_HTML_ATTRIBUTE(title) \ __ENUMERATE_HTML_ATTRIBUTE(type) \ __ENUMERATE_HTML_ATTRIBUTE(usemap) \ __ENUMERATE_HTML_ATTRIBUTE(value) \ + __ENUMERATE_HTML_ATTRIBUTE(valuetype) \ + __ENUMERATE_HTML_ATTRIBUTE(valign) \ + __ENUMERATE_HTML_ATTRIBUTE(version) \ + __ENUMERATE_HTML_ATTRIBUTE(vlink) \ __ENUMERATE_HTML_ATTRIBUTE(width) \ __ENUMERATE_HTML_ATTRIBUTE(wrap) diff --git a/Libraries/LibWeb/HTML/HTMLAnchorElement.idl b/Libraries/LibWeb/HTML/HTMLAnchorElement.idl index db905a0d67..907d59f068 100644 --- a/Libraries/LibWeb/HTML/HTMLAnchorElement.idl +++ b/Libraries/LibWeb/HTML/HTMLAnchorElement.idl @@ -7,4 +7,10 @@ interface HTMLAnchorElement : HTMLElement { [Reflect] attribute DOMString hreflang; [Reflect] attribute DOMString type; + [Reflect] attribute DOMString coords; + [Reflect] attribute DOMString charset; + [Reflect] attribute DOMString name; + [Reflect] attribute DOMString rev; + [Reflect] attribute DOMString shape; + } diff --git a/Libraries/LibWeb/HTML/HTMLAreaElement.idl b/Libraries/LibWeb/HTML/HTMLAreaElement.idl index 53458b6849..7485428141 100644 --- a/Libraries/LibWeb/HTML/HTMLAreaElement.idl +++ b/Libraries/LibWeb/HTML/HTMLAreaElement.idl @@ -1,5 +1,5 @@ interface HTMLAreaElement : HTMLElement { - + [Reflect=nohref] attribute boolean noHref; } diff --git a/Libraries/LibWeb/HTML/HTMLBRElement.idl b/Libraries/LibWeb/HTML/HTMLBRElement.idl index e8c475d909..c8ee3e7e38 100644 --- a/Libraries/LibWeb/HTML/HTMLBRElement.idl +++ b/Libraries/LibWeb/HTML/HTMLBRElement.idl @@ -1,5 +1,5 @@ interface HTMLBRElement : HTMLElement { - + [Reflect] attribute DOMString clear; } diff --git a/Libraries/LibWeb/HTML/HTMLBodyElement.idl b/Libraries/LibWeb/HTML/HTMLBodyElement.idl index 7d249cff24..21ffecc9d7 100644 --- a/Libraries/LibWeb/HTML/HTMLBodyElement.idl +++ b/Libraries/LibWeb/HTML/HTMLBodyElement.idl @@ -1,5 +1,10 @@ interface HTMLBodyElement : HTMLElement { - + [LegacyNullToEmptyString, Reflect] attribute DOMString text; + [LegacyNullToEmptyString, Reflect] attribute DOMString link; + [LegacyNullToEmptyString, Reflect=vlink] attribute DOMString vLink; + [LegacyNullToEmptyString, Reflect=alink] attribute DOMString aLink; + [LegacyNullToEmptyString, Reflect=bgcolor] attribute DOMString bgColor; + [Reflect] attribute DOMString background; } diff --git a/Libraries/LibWeb/HTML/HTMLDListElement.idl b/Libraries/LibWeb/HTML/HTMLDListElement.idl index 66ec446350..ab48b7cccb 100644 --- a/Libraries/LibWeb/HTML/HTMLDListElement.idl +++ b/Libraries/LibWeb/HTML/HTMLDListElement.idl @@ -1,5 +1,5 @@ interface HTMLDListElement : HTMLElement { - + [Reflect] attribute boolean compact; } diff --git a/Libraries/LibWeb/HTML/HTMLDirectoryElement.cpp b/Libraries/LibWeb/HTML/HTMLDirectoryElement.cpp new file mode 100644 index 0000000000..53fee8b14a --- /dev/null +++ b/Libraries/LibWeb/HTML/HTMLDirectoryElement.cpp @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2020, The SerenityOS developers. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include <LibWeb/HTML/HTMLDirectoryElement.h> + +namespace Web::HTML { + +HTMLDirectoryElement::HTMLDirectoryElement(DOM::Document& document, const QualifiedName& qualified_name) + : HTMLElement(document, qualified_name) +{ +} + +HTMLDirectoryElement::~HTMLDirectoryElement() +{ +} + +} diff --git a/Libraries/LibWeb/HTML/HTMLDirectoryElement.h b/Libraries/LibWeb/HTML/HTMLDirectoryElement.h new file mode 100644 index 0000000000..f7335e8093 --- /dev/null +++ b/Libraries/LibWeb/HTML/HTMLDirectoryElement.h @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2020, The SerenityOS developers. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#pragma once + +#include <LibWeb/HTML/HTMLElement.h> + +namespace Web::HTML { + +// NOTE: This element is marked as obsolete, but is still listed as required by the specification. +class HTMLDirectoryElement final : public HTMLElement { +public: + using WrapperType = Bindings::HTMLDirectoryElementWrapper; + + HTMLDirectoryElement(DOM::Document&, const QualifiedName& qualified_name); + virtual ~HTMLDirectoryElement() override; +}; + +} + +AK_BEGIN_TYPE_TRAITS(Web::HTML::HTMLDirectoryElement) +static bool is_type(const Web::DOM::Node& node) { return node.is_html_element() && downcast<Web::HTML::HTMLElement>(node).local_name() == Web::HTML::TagNames::dir; } +AK_END_TYPE_TRAITS() diff --git a/Libraries/LibWeb/HTML/HTMLDirectoryElement.idl b/Libraries/LibWeb/HTML/HTMLDirectoryElement.idl new file mode 100644 index 0000000000..16af7bfa85 --- /dev/null +++ b/Libraries/LibWeb/HTML/HTMLDirectoryElement.idl @@ -0,0 +1,5 @@ +interface HTMLDirectoryElement : HTMLElement { + + [Reflect] attribute boolean compact; + +} diff --git a/Libraries/LibWeb/HTML/HTMLDivElement.idl b/Libraries/LibWeb/HTML/HTMLDivElement.idl index 8cdf43435b..860c63a145 100644 --- a/Libraries/LibWeb/HTML/HTMLDivElement.idl +++ b/Libraries/LibWeb/HTML/HTMLDivElement.idl @@ -1,5 +1,5 @@ interface HTMLDivElement : HTMLElement { - + [Reflect] attribute DOMString align; } diff --git a/Libraries/LibWeb/HTML/HTMLEmbedElement.idl b/Libraries/LibWeb/HTML/HTMLEmbedElement.idl index 29f1061a64..dccc5a3d0b 100644 --- a/Libraries/LibWeb/HTML/HTMLEmbedElement.idl +++ b/Libraries/LibWeb/HTML/HTMLEmbedElement.idl @@ -5,4 +5,7 @@ interface HTMLEmbedElement : HTMLElement { [Reflect] attribute DOMString width; [Reflect] attribute DOMString height; + [Reflect] attribute DOMString align; + [Reflect] attribute DOMString name; + } diff --git a/Libraries/LibWeb/HTML/HTMLFontElement.h b/Libraries/LibWeb/HTML/HTMLFontElement.h index f611eabe17..2051cef7c8 100644 --- a/Libraries/LibWeb/HTML/HTMLFontElement.h +++ b/Libraries/LibWeb/HTML/HTMLFontElement.h @@ -32,6 +32,8 @@ namespace Web::HTML { class HTMLFontElement final : public HTMLElement { public: + using WrapperType = Bindings::HTMLFontElementWrapper; + HTMLFontElement(DOM::Document&, const QualifiedName& qualified_name); virtual ~HTMLFontElement() override; diff --git a/Libraries/LibWeb/HTML/HTMLFontElement.idl b/Libraries/LibWeb/HTML/HTMLFontElement.idl new file mode 100644 index 0000000000..5a9feb6934 --- /dev/null +++ b/Libraries/LibWeb/HTML/HTMLFontElement.idl @@ -0,0 +1,7 @@ +interface HTMLFontElement : HTMLElement { + + [LegacyNullToEmptyString, Reflect] attribute DOMString color; + [Reflect] attribute DOMString face; + [Reflect] attribute DOMString size; + +} diff --git a/Libraries/LibWeb/HTML/HTMLHRElement.idl b/Libraries/LibWeb/HTML/HTMLHRElement.idl index 25a7e57878..71e078b43c 100644 --- a/Libraries/LibWeb/HTML/HTMLHRElement.idl +++ b/Libraries/LibWeb/HTML/HTMLHRElement.idl @@ -1,5 +1,9 @@ interface HTMLHRElement : HTMLElement { - + [Reflect] attribute DOMString align; + [Reflect] attribute DOMString color; + [Reflect=noshade] attribute boolean noShade; + [Reflect] attribute DOMString size; + [Reflect] attribute DOMString width; } diff --git a/Libraries/LibWeb/HTML/HTMLHeadingElement.idl b/Libraries/LibWeb/HTML/HTMLHeadingElement.idl index 961f6d4dd1..94b0be2380 100644 --- a/Libraries/LibWeb/HTML/HTMLHeadingElement.idl +++ b/Libraries/LibWeb/HTML/HTMLHeadingElement.idl @@ -1,5 +1,5 @@ interface HTMLHeadingElement : HTMLElement { - + [Reflect] attribute DOMString align; } diff --git a/Libraries/LibWeb/HTML/HTMLHtmlElement.idl b/Libraries/LibWeb/HTML/HTMLHtmlElement.idl index 9e882145ca..2e0eafe293 100644 --- a/Libraries/LibWeb/HTML/HTMLHtmlElement.idl +++ b/Libraries/LibWeb/HTML/HTMLHtmlElement.idl @@ -1,5 +1,5 @@ interface HTMLHtmlElement : HTMLElement { - + [Reflect] attribute DOMString version; } diff --git a/Libraries/LibWeb/HTML/HTMLIFrameElement.idl b/Libraries/LibWeb/HTML/HTMLIFrameElement.idl index 74d572ee30..b3b3fe7aa4 100644 --- a/Libraries/LibWeb/HTML/HTMLIFrameElement.idl +++ b/Libraries/LibWeb/HTML/HTMLIFrameElement.idl @@ -9,4 +9,11 @@ interface HTMLIFrameElement : HTMLElement { [Reflect=allowfullscreen] attribute boolean allowFullscreen; [ReturnNullIfCrossOrigin] readonly attribute Document? contentDocument; + + [Reflect] attribute DOMString align; + [Reflect] attribute DOMString scrolling; + [Reflect=frameborder] attribute DOMString frameBorder; + + [LegacyNullToEmptyString, Reflect=marginheight] attribute DOMString marginHeight; + [LegacyNullToEmptyString, Reflect=marginwidth] attribute DOMString marginWidth; } diff --git a/Libraries/LibWeb/HTML/HTMLImageElement.idl b/Libraries/LibWeb/HTML/HTMLImageElement.idl index 6de12db118..2772d6006d 100644 --- a/Libraries/LibWeb/HTML/HTMLImageElement.idl +++ b/Libraries/LibWeb/HTML/HTMLImageElement.idl @@ -7,4 +7,8 @@ interface HTMLImageElement : HTMLElement { [Reflect=usemap] attribute DOMString useMap; [Reflect=ismap] attribute boolean isMap; + [Reflect] attribute DOMString name; + [Reflect] attribute DOMString align; + [LegacyNullToEmptyString, Reflect] attribute DOMString border; + } diff --git a/Libraries/LibWeb/HTML/HTMLInputElement.idl b/Libraries/LibWeb/HTML/HTMLInputElement.idl index b62010f7e7..ad693cc977 100644 --- a/Libraries/LibWeb/HTML/HTMLInputElement.idl +++ b/Libraries/LibWeb/HTML/HTMLInputElement.idl @@ -21,4 +21,7 @@ interface HTMLInputElement : HTMLElement { [Reflect=readonly] attribute boolean readOnly; [Reflect] attribute boolean required; + [Reflect] attribute DOMString align; + [Reflect=usemap] attribute DOMString useMap; + } diff --git a/Libraries/LibWeb/HTML/HTMLLIElement.idl b/Libraries/LibWeb/HTML/HTMLLIElement.idl index 9a35a189d8..0317a45787 100644 --- a/Libraries/LibWeb/HTML/HTMLLIElement.idl +++ b/Libraries/LibWeb/HTML/HTMLLIElement.idl @@ -1,5 +1,5 @@ interface HTMLLIElement : HTMLElement { - + [Reflect] attribute DOMString type; } diff --git a/Libraries/LibWeb/HTML/HTMLLegendElement.idl b/Libraries/LibWeb/HTML/HTMLLegendElement.idl index ab83787449..df7ad77875 100644 --- a/Libraries/LibWeb/HTML/HTMLLegendElement.idl +++ b/Libraries/LibWeb/HTML/HTMLLegendElement.idl @@ -1,5 +1,5 @@ interface HTMLLegendElement : HTMLElement { - + [Reflect] attribute DOMString align; } diff --git a/Libraries/LibWeb/HTML/HTMLLinkElement.idl b/Libraries/LibWeb/HTML/HTMLLinkElement.idl index 0299f36c04..670ca17d18 100644 --- a/Libraries/LibWeb/HTML/HTMLLinkElement.idl +++ b/Libraries/LibWeb/HTML/HTMLLinkElement.idl @@ -10,4 +10,8 @@ interface HTMLLinkElement : HTMLElement { [Reflect=imagesizes] attribute DOMString imageSizes; [Reflect] attribute boolean disabled; + [Reflect] attribute DOMString charset; + [Reflect] attribute DOMString rev; + [Reflect] attribute DOMString target; + } diff --git a/Libraries/LibWeb/HTML/HTMLMenuElement.idl b/Libraries/LibWeb/HTML/HTMLMenuElement.idl index 2a6bf917b4..e69e46cf1d 100644 --- a/Libraries/LibWeb/HTML/HTMLMenuElement.idl +++ b/Libraries/LibWeb/HTML/HTMLMenuElement.idl @@ -1,5 +1,5 @@ interface HTMLMenuElement : HTMLElement { - + [Reflect] attribute boolean compact; } diff --git a/Libraries/LibWeb/HTML/HTMLMetaElement.idl b/Libraries/LibWeb/HTML/HTMLMetaElement.idl index 96ce93b65d..6d9779eba0 100644 --- a/Libraries/LibWeb/HTML/HTMLMetaElement.idl +++ b/Libraries/LibWeb/HTML/HTMLMetaElement.idl @@ -4,4 +4,6 @@ interface HTMLMetaElement : HTMLElement { [Reflect] attribute DOMString content; [Reflect=http-equiv] attribute DOMString httpEquiv; + [Reflect] attribute DOMString scheme; + } diff --git a/Libraries/LibWeb/HTML/HTMLOListElement.idl b/Libraries/LibWeb/HTML/HTMLOListElement.idl index d5fa081ebf..b3fac590e7 100644 --- a/Libraries/LibWeb/HTML/HTMLOListElement.idl +++ b/Libraries/LibWeb/HTML/HTMLOListElement.idl @@ -3,4 +3,6 @@ interface HTMLOListElement : HTMLElement { [Reflect] attribute boolean reversed; [Reflect] attribute DOMString type; + [Reflect] attribute boolean compact; + } diff --git a/Libraries/LibWeb/HTML/HTMLObjectElement.idl b/Libraries/LibWeb/HTML/HTMLObjectElement.idl index 944abcfec1..bb8253320c 100644 --- a/Libraries/LibWeb/HTML/HTMLObjectElement.idl +++ b/Libraries/LibWeb/HTML/HTMLObjectElement.idl @@ -7,4 +7,13 @@ interface HTMLObjectElement : HTMLElement { [Reflect] attribute DOMString width; [Reflect] attribute DOMString height; + [Reflect] attribute DOMString align; + [Reflect] attribute DOMString archive; + [Reflect] attribute DOMString code; + [Reflect] attribute boolean declare; + [Reflect] attribute DOMString standby; + [Reflect=codetype] attribute DOMString codeType; + + [LegacyNullToEmptyString, Reflect] attribute DOMString border; + } diff --git a/Libraries/LibWeb/HTML/HTMLParagraphElement.idl b/Libraries/LibWeb/HTML/HTMLParagraphElement.idl index 07596b5c01..20cd710753 100644 --- a/Libraries/LibWeb/HTML/HTMLParagraphElement.idl +++ b/Libraries/LibWeb/HTML/HTMLParagraphElement.idl @@ -1,5 +1,5 @@ interface HTMLParagraphElement : HTMLElement { - + [Reflect] attribute DOMString align; } diff --git a/Libraries/LibWeb/HTML/HTMLParamElement.idl b/Libraries/LibWeb/HTML/HTMLParamElement.idl index 0600832fe9..3d5ab3bff5 100644 --- a/Libraries/LibWeb/HTML/HTMLParamElement.idl +++ b/Libraries/LibWeb/HTML/HTMLParamElement.idl @@ -3,4 +3,7 @@ interface HTMLParamElement : HTMLElement { [Reflect] attribute DOMString name; [Reflect] attribute DOMString value; + [Reflect] attribute DOMString type; + [Reflect=valuetype] attribute DOMString valueType; + } diff --git a/Libraries/LibWeb/HTML/HTMLScriptElement.idl b/Libraries/LibWeb/HTML/HTMLScriptElement.idl index b82d8d0aa4..3cfbaf5e4c 100644 --- a/Libraries/LibWeb/HTML/HTMLScriptElement.idl +++ b/Libraries/LibWeb/HTML/HTMLScriptElement.idl @@ -6,4 +6,8 @@ interface HTMLScriptElement : HTMLElement { [Reflect] attribute boolean defer; [Reflect] attribute DOMString integrity; + [Reflect] attribute DOMString charset; + [Reflect] attribute DOMString event; + [Reflect=for] attribute DOMString htmlFor; + } diff --git a/Libraries/LibWeb/HTML/HTMLStyleElement.idl b/Libraries/LibWeb/HTML/HTMLStyleElement.idl index 71450d086c..6a18bf8824 100644 --- a/Libraries/LibWeb/HTML/HTMLStyleElement.idl +++ b/Libraries/LibWeb/HTML/HTMLStyleElement.idl @@ -2,4 +2,6 @@ interface HTMLStyleElement : HTMLElement { [Reflect] attribute DOMString media; + [Reflect] attribute DOMString type; + } diff --git a/Libraries/LibWeb/HTML/HTMLTableCaptionElement.idl b/Libraries/LibWeb/HTML/HTMLTableCaptionElement.idl index bb26a90011..0eb0490fc7 100644 --- a/Libraries/LibWeb/HTML/HTMLTableCaptionElement.idl +++ b/Libraries/LibWeb/HTML/HTMLTableCaptionElement.idl @@ -1,5 +1,5 @@ interface HTMLTableCaptionElement : HTMLElement { - + [Reflect] attribute DOMString align; } diff --git a/Libraries/LibWeb/HTML/HTMLTableCellElement.idl b/Libraries/LibWeb/HTML/HTMLTableCellElement.idl index 077fe037b9..758a4bc7d5 100644 --- a/Libraries/LibWeb/HTML/HTMLTableCellElement.idl +++ b/Libraries/LibWeb/HTML/HTMLTableCellElement.idl @@ -3,4 +3,16 @@ interface HTMLTableCellElement : HTMLElement { [Reflect] attribute DOMString headers; [Reflect] attribute DOMString abbr; + [Reflect] attribute DOMString align; + [Reflect] attribute DOMString axis; + [Reflect] attribute DOMString height; + [Reflect] attribute DOMString width; + + [Reflect=char] attribute DOMString ch; + [Reflect=charoff] attribute DOMString chOff; + [Reflect=nowrap] attribute boolean noWrap; + [Reflect=valign] attribute DOMString vAlign; + + [LegacyNullToEmptyString, Reflect=bgcolor] attribute DOMString bgColor; + } diff --git a/Libraries/LibWeb/HTML/HTMLTableColElement.idl b/Libraries/LibWeb/HTML/HTMLTableColElement.idl index 8c16228fc2..0b38e25061 100644 --- a/Libraries/LibWeb/HTML/HTMLTableColElement.idl +++ b/Libraries/LibWeb/HTML/HTMLTableColElement.idl @@ -1,5 +1,9 @@ interface HTMLTableColElement : HTMLElement { - + [Reflect] attribute DOMString align; + [Reflect=char] attribute DOMString ch; + [Reflect=charoff] attribute DOMString chOff; + [Reflect=valign] attribute DOMString vAlign; + [Reflect] attribute DOMString width; } diff --git a/Libraries/LibWeb/HTML/HTMLTableElement.idl b/Libraries/LibWeb/HTML/HTMLTableElement.idl index 4e4120ad8f..74a9c0c829 100644 --- a/Libraries/LibWeb/HTML/HTMLTableElement.idl +++ b/Libraries/LibWeb/HTML/HTMLTableElement.idl @@ -1,5 +1,14 @@ interface HTMLTableElement : HTMLElement { + [Reflect] attribute DOMString align; + [Reflect] attribute DOMString border; + [Reflect] attribute DOMString frame; + [Reflect] attribute DOMString rules; + [Reflect] attribute DOMString summary; + [Reflect] attribute DOMString width; + [LegacyNullToEmptyString, Reflect=bgcolor] attribute DOMString bgColor; + [LegacyNullToEmptyString, Reflect=cellpadding] attribute DOMString cellPadding; + [LegacyNullToEmptyString, Reflect=cellspacing] attribute DOMString cellSpacing; } diff --git a/Libraries/LibWeb/HTML/HTMLTableRowElement.idl b/Libraries/LibWeb/HTML/HTMLTableRowElement.idl index ced8c32162..a1d19caee5 100644 --- a/Libraries/LibWeb/HTML/HTMLTableRowElement.idl +++ b/Libraries/LibWeb/HTML/HTMLTableRowElement.idl @@ -1,5 +1,10 @@ interface HTMLTableRowElement : HTMLElement { + [Reflect] attribute DOMString align; + [Reflect=char] attribute DOMString ch; + [Reflect=charoff] attribute DOMString chOff; + [Reflect=valign] attribute DOMString vAlign; + [LegacyNullToEmptyString, Reflect=bgcolor] attribute DOMString bgColor; } diff --git a/Libraries/LibWeb/HTML/HTMLTableSectionElement.idl b/Libraries/LibWeb/HTML/HTMLTableSectionElement.idl index 625c44f326..475f1151b1 100644 --- a/Libraries/LibWeb/HTML/HTMLTableSectionElement.idl +++ b/Libraries/LibWeb/HTML/HTMLTableSectionElement.idl @@ -1,5 +1,8 @@ interface HTMLTableSectionElement : HTMLElement { - + [Reflect] attribute DOMString align; + [Reflect=char] attribute DOMString ch; + [Reflect=charoff] attribute DOMString chOff; + [Reflect=valign] attribute DOMString vAlign; } diff --git a/Libraries/LibWeb/HTML/HTMLUListElement.idl b/Libraries/LibWeb/HTML/HTMLUListElement.idl index 5681560efe..bd431b2806 100644 --- a/Libraries/LibWeb/HTML/HTMLUListElement.idl +++ b/Libraries/LibWeb/HTML/HTMLUListElement.idl @@ -1,5 +1,6 @@ interface HTMLUListElement : HTMLElement { - + [Reflect] attribute boolean compact; + [Reflect] attribute DOMString type; } |