From 86f78bff2a8d88ce5aa92f4146542cb482e8c1a5 Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Thu, 16 Sep 2021 19:20:20 +0100 Subject: LibWeb: Make StyleValue::to_color() take a Node instead of the Document This is in preparation for the `currentcolor` value, which needs to know what Node it's on so it can check the `color`. --- Userland/Libraries/LibWeb/CSS/StyleValue.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Userland/Libraries/LibWeb/CSS/StyleValue.h') diff --git a/Userland/Libraries/LibWeb/CSS/StyleValue.h b/Userland/Libraries/LibWeb/CSS/StyleValue.h index 9d17b400d1..ac02a17d94 100644 --- a/Userland/Libraries/LibWeb/CSS/StyleValue.h +++ b/Userland/Libraries/LibWeb/CSS/StyleValue.h @@ -286,7 +286,7 @@ public: virtual String to_string() const = 0; virtual Length to_length() const { return {}; } - virtual Color to_color(const DOM::Document&) const { return {}; } + virtual Color to_color(Layout::NodeWithStyle const&) const { return {}; } CSS::ValueID to_identifier() const; @@ -607,7 +607,7 @@ public: Color color() const { return m_color; } String to_string() const override { return m_color.to_string(); } - Color to_color(const DOM::Document&) const override { return m_color; } + Color to_color(Layout::NodeWithStyle const&) const override { return m_color; } virtual bool equals(const StyleValue& other) const override { @@ -637,7 +637,7 @@ public: CSS::ValueID id() const { return m_id; } virtual String to_string() const override; - virtual Color to_color(const DOM::Document&) const override; + virtual Color to_color(Layout::NodeWithStyle const& node) const override; virtual bool equals(const StyleValue& other) const override { -- cgit v1.2.3