1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 08:44:58 +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

@ -94,6 +94,11 @@ public:
};
ErrorOr<void> take_screenshot(ScreenshotType);
void set_user_style_sheet(String source);
// Load Native.css as the User style sheet, which attempts to make WebView content look as close to
// native GUI widgets as possible.
void use_native_user_style_sheet();
Function<void(Gfx::IntSize)> on_did_layout;
Function<void()> on_ready_to_paint;
Function<String(Web::HTML::ActivateTab)> on_new_tab;