diff --git a/Userland/Libraries/LibWeb/HTML/HTMLPreElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLPreElement.cpp index 5bfbb0691b4..bb5e3696713 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLPreElement.cpp +++ b/Userland/Libraries/LibWeb/HTML/HTMLPreElement.cpp @@ -38,20 +38,4 @@ void HTMLPreElement::apply_presentational_hints(CSS::StyleProperties& style) con }); } -// https://html.spec.whatwg.org/multipage/obsolete.html#dom-pre-width -WebIDL::Long HTMLPreElement::width() const -{ - // The width IDL attribute of the pre element must reflect the content attribute of the same name. - if (auto width_string = get_attribute(HTML::AttributeNames::width); width_string.has_value()) { - if (auto width = parse_integer(*width_string); width.has_value()) - return *width; - } - return 0; -} - -WebIDL::ExceptionOr HTMLPreElement::set_width(WebIDL::Long width) -{ - return set_attribute(HTML::AttributeNames::width, MUST(String::number(width))); -} - } diff --git a/Userland/Libraries/LibWeb/HTML/HTMLPreElement.h b/Userland/Libraries/LibWeb/HTML/HTMLPreElement.h index 8d07a56b892..17b3162707c 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLPreElement.h +++ b/Userland/Libraries/LibWeb/HTML/HTMLPreElement.h @@ -22,9 +22,6 @@ public: // https://www.w3.org/TR/html-aria/#el-pre virtual Optional default_role() const override { return ARIA::Role::generic; } - WebIDL::Long width() const; - WebIDL::ExceptionOr set_width(WebIDL::Long); - private: HTMLPreElement(DOM::Document&, DOM::QualifiedName); diff --git a/Userland/Libraries/LibWeb/HTML/HTMLPreElement.idl b/Userland/Libraries/LibWeb/HTML/HTMLPreElement.idl index 774c6362e9e..edec24a199a 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLPreElement.idl +++ b/Userland/Libraries/LibWeb/HTML/HTMLPreElement.idl @@ -7,6 +7,6 @@ interface HTMLPreElement : HTMLElement { [HTMLConstructor] constructor(); // Obsolete - [CEReactions] attribute long width; + [CEReactions, Reflect] attribute long width; };