mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:18:12 +00:00
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`.
This commit is contained in:
parent
8657148194
commit
86f78bff2a
6 changed files with 18 additions and 17 deletions
|
@ -31,8 +31,9 @@ String IdentifierStyleValue::to_string() const
|
|||
return CSS::string_from_value_id(m_id);
|
||||
}
|
||||
|
||||
Color IdentifierStyleValue::to_color(const DOM::Document& document) const
|
||||
Color IdentifierStyleValue::to_color(Layout::NodeWithStyle const& node) const
|
||||
{
|
||||
auto& document = node.document();
|
||||
if (id() == CSS::ValueID::LibwebLink)
|
||||
return document.link_color();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue