summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/CSS/StyleProperties.cpp
diff options
context:
space:
mode:
authorSam Atkins <atkinssj@serenityos.org>2021-09-16 19:20:20 +0100
committerAndreas Kling <kling@serenityos.org>2021-09-17 23:06:45 +0200
commit86f78bff2a8d88ce5aa92f4146542cb482e8c1a5 (patch)
treed6cab6f90708a720278dfc69cf602d9ba135340a /Userland/Libraries/LibWeb/CSS/StyleProperties.cpp
parent86571481946ce3a60a354d0072a204ed958651cd (diff)
downloadserenity-86f78bff2a8d88ce5aa92f4146542cb482e8c1a5.zip
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`.
Diffstat (limited to 'Userland/Libraries/LibWeb/CSS/StyleProperties.cpp')
-rw-r--r--Userland/Libraries/LibWeb/CSS/StyleProperties.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibWeb/CSS/StyleProperties.cpp b/Userland/Libraries/LibWeb/CSS/StyleProperties.cpp
index 189c48ae10..e51111fd85 100644
--- a/Userland/Libraries/LibWeb/CSS/StyleProperties.cpp
+++ b/Userland/Libraries/LibWeb/CSS/StyleProperties.cpp
@@ -105,12 +105,12 @@ LengthBox StyleProperties::length_box(CSS::PropertyID left_id, CSS::PropertyID t
return box;
}
-Color StyleProperties::color_or_fallback(CSS::PropertyID id, const DOM::Document& document, Color fallback) const
+Color StyleProperties::color_or_fallback(CSS::PropertyID id, Layout::NodeWithStyle const& node, Color fallback) const
{
auto value = property(id);
if (!value.has_value())
return fallback;
- return value.value()->to_color(document);
+ return value.value()->to_color(node);
}
void StyleProperties::load_font(Layout::Node const& node) const