mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 20:59:16 +00:00
LibWeb: Add Contrast preference
This commit is contained in:
parent
7ac6fd2746
commit
ee64684565
Notes:
sideshowbarker
2024-07-17 16:42:19 +09:00
Author: https://github.com/lukewarlow 🔰
Commit: ee64684565
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/146
Reviewed-by: https://github.com/AtkinsSJ
26 changed files with 274 additions and 13 deletions
|
@ -155,6 +155,13 @@ void PageClient::set_preferred_color_scheme(Web::CSS::PreferredColorScheme color
|
|||
document->invalidate_style();
|
||||
}
|
||||
|
||||
void PageClient::set_preferred_contrast(Web::CSS::PreferredContrast contrast)
|
||||
{
|
||||
m_preferred_contrast = contrast;
|
||||
if (auto* document = page().top_level_browsing_context().active_document())
|
||||
document->invalidate_style();
|
||||
}
|
||||
|
||||
void PageClient::set_is_scripting_enabled(bool is_scripting_enabled)
|
||||
{
|
||||
page().set_is_scripting_enabled(is_scripting_enabled);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue