mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:17:45 +00:00
LibWeb: Use system colors in more places
This commit is contained in:
parent
cd273f2312
commit
84a5c67d6b
3 changed files with 10 additions and 13 deletions
|
@ -20,6 +20,7 @@
|
|||
#include <LibWeb/CSS/MediaQueryList.h>
|
||||
#include <LibWeb/CSS/MediaQueryListEvent.h>
|
||||
#include <LibWeb/CSS/StyleComputer.h>
|
||||
#include <LibWeb/CSS/SystemColor.h>
|
||||
#include <LibWeb/CSS/VisualViewport.h>
|
||||
#include <LibWeb/Cookie/ParsedCookie.h>
|
||||
#include <LibWeb/DOM/Attr.h>
|
||||
|
@ -1296,27 +1297,21 @@ Color Document::link_color() const
|
|||
{
|
||||
if (m_link_color.has_value())
|
||||
return m_link_color.value();
|
||||
if (!page())
|
||||
return Color::Blue;
|
||||
return page()->palette().link();
|
||||
return CSS::SystemColor::link_text();
|
||||
}
|
||||
|
||||
Color Document::active_link_color() const
|
||||
{
|
||||
if (m_active_link_color.has_value())
|
||||
return m_active_link_color.value();
|
||||
if (!page())
|
||||
return Color::Red;
|
||||
return page()->palette().active_link();
|
||||
return CSS::SystemColor::active_text();
|
||||
}
|
||||
|
||||
Color Document::visited_link_color() const
|
||||
{
|
||||
if (m_visited_link_color.has_value())
|
||||
return m_visited_link_color.value();
|
||||
if (!page())
|
||||
return Color::Magenta;
|
||||
return page()->palette().visited_link();
|
||||
return CSS::SystemColor::visited_text();
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/webappapis.html#relevant-settings-object
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue