1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 14:07:45 +00:00

LibWeb: Port CSSStyleSheet interface from DeprecatedString to String

This commit is contained in:
Shannon Booth 2023-09-03 14:19:49 +12:00 committed by Tim Flynn
parent d93e916d0c
commit da637a527d
5 changed files with 22 additions and 16 deletions

View file

@ -19,20 +19,20 @@ class StyleSheet : public Bindings::PlatformObject {
public:
virtual ~StyleSheet() = default;
virtual DeprecatedString type() const = 0;
virtual String type() const = 0;
DOM::Element* owner_node() { return m_owner_node; }
void set_owner_node(DOM::Element*);
DeprecatedString href() const { return m_location; }
Optional<String> href() const { return m_location; }
DeprecatedString location() const { return m_location; }
void set_location(DeprecatedString location) { m_location = move(location); }
Optional<String> location() const { return m_location; }
void set_location(Optional<String> location) { m_location = move(location); }
DeprecatedString title() const { return m_title; }
void set_title(DeprecatedString title) { m_title = move(title); }
Optional<String> title() const { return m_title; }
void set_title(Optional<String> title) { m_title = move(title); }
void set_type(DeprecatedString type) { m_type_string = move(type); }
void set_type(String type) { m_type_string = move(type); }
MediaList* media() const
{
@ -65,9 +65,9 @@ private:
JS::GCPtr<DOM::Element> m_owner_node;
JS::GCPtr<CSSStyleSheet> m_parent_style_sheet;
DeprecatedString m_location;
DeprecatedString m_title;
DeprecatedString m_type_string;
Optional<String> m_location;
Optional<String> m_title;
String m_type_string;
bool m_disabled { false };
bool m_alternate { false };