Pārlūkot izejas kodu

LibWeb: Port HTMLObjectElement interface from DeprecatedString to String

Shannon Booth 1 gadu atpakaļ
vecāks
revīzija
63aa93aaf4

+ 2 - 2
Userland/Libraries/LibWeb/HTML/HTMLObjectElement.cpp

@@ -67,10 +67,10 @@ void HTMLObjectElement::attribute_changed(DeprecatedFlyString const& name, Depre
 }
 }
 
 
 // https://html.spec.whatwg.org/multipage/iframe-embed-object.html#attr-object-data
 // https://html.spec.whatwg.org/multipage/iframe-embed-object.html#attr-object-data
-DeprecatedString HTMLObjectElement::data() const
+String HTMLObjectElement::data() const
 {
 {
     auto data = deprecated_attribute(HTML::AttributeNames::data);
     auto data = deprecated_attribute(HTML::AttributeNames::data);
-    return document().parse_url(data).to_deprecated_string();
+    return MUST(document().parse_url(data).to_string());
 }
 }
 
 
 JS::GCPtr<Layout::Node> HTMLObjectElement::create_layout_node(NonnullRefPtr<CSS::StyleProperties> style)
 JS::GCPtr<Layout::Node> HTMLObjectElement::create_layout_node(NonnullRefPtr<CSS::StyleProperties> style)

+ 2 - 2
Userland/Libraries/LibWeb/HTML/HTMLObjectElement.h

@@ -36,8 +36,8 @@ public:
 
 
     virtual void attribute_changed(DeprecatedFlyString const& name, DeprecatedString const& value) override;
     virtual void attribute_changed(DeprecatedFlyString const& name, DeprecatedString const& value) override;
 
 
-    DeprecatedString data() const;
-    void set_data(DeprecatedString const& data) { MUST(set_attribute(HTML::AttributeNames::data, data)); }
+    String data() const;
+    void set_data(String const& data) { MUST(set_attribute(HTML::AttributeNames::data, data)); }
 
 
     DeprecatedString type() const { return deprecated_attribute(HTML::AttributeNames::type); }
     DeprecatedString type() const { return deprecated_attribute(HTML::AttributeNames::type); }
 
 

+ 1 - 1
Userland/Libraries/LibWeb/HTML/HTMLObjectElement.idl

@@ -2,7 +2,7 @@
 #import <HTML/HTMLElement.idl>
 #import <HTML/HTMLElement.idl>
 
 
 // https://html.spec.whatwg.org/multipage/iframe-embed-object.html#htmlobjectelement
 // https://html.spec.whatwg.org/multipage/iframe-embed-object.html#htmlobjectelement
-[Exposed=Window, UseDeprecatedAKString]
+[Exposed=Window]
 interface HTMLObjectElement : HTMLElement {
 interface HTMLObjectElement : HTMLElement {
 
 
     [HTMLConstructor] constructor();
     [HTMLConstructor] constructor();