mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 20:29:18 +00:00
LibWeb+WebContent+WebWorker: Add an option to skip painting the overlay
This will allow the Inspector to take a screenshot of a DOM node without the overlay which renders the inspected node outline / box data.
This commit is contained in:
parent
bea11f6d99
commit
a7b98a9761
Notes:
sideshowbarker
2024-07-18 08:59:31 +09:00
Author: https://github.com/trflynn89
Commit: a7b98a9761
Pull-request: https://github.com/SerenityOS/serenity/pull/22186
8 changed files with 26 additions and 8 deletions
|
@ -140,7 +140,7 @@ Gfx::Color PageClient::background_color() const
|
|||
return document->background_color();
|
||||
}
|
||||
|
||||
void PageClient::paint(Web::DevicePixelRect const& content_rect, Gfx::Bitmap& target)
|
||||
void PageClient::paint(Web::DevicePixelRect const& content_rect, Gfx::Bitmap& target, Web::PaintOptions paint_options)
|
||||
{
|
||||
Gfx::IntRect bitmap_rect { {}, content_rect.size().to_type<int>() };
|
||||
|
||||
|
@ -162,6 +162,7 @@ void PageClient::paint(Web::DevicePixelRect const& content_rect, Gfx::Bitmap& ta
|
|||
return;
|
||||
|
||||
context.set_should_show_line_box_borders(m_should_show_line_box_borders);
|
||||
context.set_should_paint_overlay(paint_options.paint_overlay == Web::PaintOptions::PaintOverlay::Yes);
|
||||
context.set_device_viewport_rect(content_rect);
|
||||
context.set_has_focus(m_has_focus);
|
||||
document->paintable()->paint_all_phases(context);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue