mirror of
https://github.com/SerenityOS/serenity
synced 2024-10-15 12:23:15 +00:00
LibWeb: Respect the document's link_color for Linktext identifiers
This commit is contained in:
parent
ec190baa55
commit
7a766bdb83
4
Tests/LibWeb/Ref/body-link-attribute.html
Normal file
4
Tests/LibWeb/Ref/body-link-attribute.html
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
<!doctype html>
|
||||||
|
<link rel="match" href="reference/body-link-attribute-ref.html" />
|
||||||
|
<body link="#FF0000">
|
||||||
|
<a href="about:blank">link
|
8
Tests/LibWeb/Ref/reference/body-link-attribute-ref.html
Normal file
8
Tests/LibWeb/Ref/reference/body-link-attribute-ref.html
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
<!doctype html>
|
||||||
|
<link rel="match" href="reference/body-link-attribute.html-ref" />
|
||||||
|
<style>
|
||||||
|
a {
|
||||||
|
color: #FF0000;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<a href="about:blank">link
|
|
@ -194,8 +194,6 @@ Color IdentifierStyleValue::to_color(Optional<Layout::NodeWithStyle const&> node
|
||||||
return SystemColor::highlight();
|
return SystemColor::highlight();
|
||||||
case ValueID::Highlighttext:
|
case ValueID::Highlighttext:
|
||||||
return SystemColor::highlight_text();
|
return SystemColor::highlight_text();
|
||||||
case ValueID::Linktext:
|
|
||||||
return SystemColor::link_text();
|
|
||||||
case ValueID::Mark:
|
case ValueID::Mark:
|
||||||
return SystemColor::mark();
|
return SystemColor::mark();
|
||||||
case ValueID::Marktext:
|
case ValueID::Marktext:
|
||||||
|
@ -216,7 +214,7 @@ Color IdentifierStyleValue::to_color(Optional<Layout::NodeWithStyle const&> node
|
||||||
}
|
}
|
||||||
|
|
||||||
auto& document = node->document();
|
auto& document = node->document();
|
||||||
if (id() == CSS::ValueID::LibwebLink)
|
if (id() == CSS::ValueID::LibwebLink || id() == ValueID::Linktext)
|
||||||
return document.link_color();
|
return document.link_color();
|
||||||
|
|
||||||
if (!document.page())
|
if (!document.page())
|
||||||
|
|
Loading…
Reference in a new issue