blob: 77ee2f9c58822269a78cfe53996a6c9f88c6dda6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#include <LibHTML/CSS/StyleValue.h>
#include <LibHTML/DOM/Document.h>
StyleValue::StyleValue(Type type)
: m_type(type)
{
}
StyleValue::~StyleValue()
{
}
String IdentifierStyleValue::to_string() const
{
switch (id()) {
case CSS::ValueID::Invalid:
return "(invalid)";
case CSS::ValueID::VendorSpecificLink:
return "-libhtml-link";
default:
ASSERT_NOT_REACHED();
}
}
Color IdentifierStyleValue::to_color(const Document& document) const
{
if (id() == CSS::ValueID::VendorSpecificLink)
return document.link_color();
return {};
}
|