1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 04:58:13 +00:00

LibWebView: Allow using native/user style sheets on Lagom

Move the methods to set the native/user style sheets to the base
ViewImplementation class. We must also generate the native style sheet
explicitly for now, as LibWebView on Lagom isn't able to include the
main LibWebView CMakeLists.txt file yet.
This commit is contained in:
Timothy Flynn 2023-08-26 13:34:59 -04:00 committed by Tim Flynn
parent 7df48756d6
commit 3f122b7335
5 changed files with 25 additions and 16 deletions

View file

@ -359,4 +359,15 @@ ErrorOr<void> ViewImplementation::take_screenshot(ScreenshotType type)
return {};
}
void ViewImplementation::set_user_style_sheet(String source)
{
client().async_set_user_style(move(source));
}
void ViewImplementation::use_native_user_style_sheet()
{
extern StringView native_stylesheet_source;
set_user_style_sheet(MUST(String::from_utf8(native_stylesheet_source)));
}
}