LibWeb: Remove unneeded Web namespace usage in TraversableNavigable.cpp

This commit is contained in:
Aliaksandr Kalenik 2024-07-01 15:46:55 +02:00 committed by Alexander Kalenik
parent 3f97f73316
commit eba33b964e

View File

@ -34,7 +34,7 @@ TraversableNavigable::TraversableNavigable(JS::NonnullGCPtr<Page> page)
{
#ifdef AK_OS_MACOS
m_metal_context = Core::get_metal_context();
m_skia_backend_context = Web::Painting::DisplayListPlayerSkia::create_metal_context(*m_metal_context);
m_skia_backend_context = Painting::DisplayListPlayerSkia::create_metal_context(*m_metal_context);
#endif
}
@ -1177,16 +1177,16 @@ JS::GCPtr<DOM::Node> TraversableNavigable::currently_focused_area()
return candidate;
}
void TraversableNavigable::paint(Web::DevicePixelRect const& content_rect, Painting::BackingStore& target, Web::PaintOptions paint_options)
void TraversableNavigable::paint(DevicePixelRect const& content_rect, Painting::BackingStore& target, PaintOptions paint_options)
{
Painting::DisplayList display_list;
Painting::DisplayListRecorder display_list_recorder(display_list);
Gfx::IntRect bitmap_rect { {}, content_rect.size().to_type<int>() };
display_list_recorder.fill_rect(bitmap_rect, Web::CSS::SystemColor::canvas());
display_list_recorder.fill_rect(bitmap_rect, CSS::SystemColor::canvas());
Web::HTML::Navigable::PaintConfig paint_config;
paint_config.paint_overlay = paint_options.paint_overlay == Web::PaintOptions::PaintOverlay::Yes;
HTML::Navigable::PaintConfig paint_config;
paint_config.paint_overlay = paint_options.paint_overlay == PaintOptions::PaintOverlay::Yes;
paint_config.should_show_line_box_borders = paint_options.should_show_line_box_borders;
paint_config.has_focus = paint_options.has_focus;
record_display_list(display_list_recorder, paint_config);
@ -1194,7 +1194,7 @@ void TraversableNavigable::paint(Web::DevicePixelRect const& content_rect, Paint
auto display_list_player_type = page().client().display_list_player_type();
if (display_list_player_type == DisplayListPlayerType::GPU) {
#ifdef HAS_ACCELERATED_GRAPHICS
Web::Painting::DisplayListPlayerGPU player(*paint_options.accelerated_graphics_context, target.bitmap());
Painting::DisplayListPlayerGPU player(*paint_options.accelerated_graphics_context, target.bitmap());
display_list.execute(player);
#else
static bool has_warned_about_configuration = false;
@ -1214,10 +1214,10 @@ void TraversableNavigable::paint(Web::DevicePixelRect const& content_rect, Paint
return;
}
#endif
Web::Painting::DisplayListPlayerSkia player(target.bitmap());
Painting::DisplayListPlayerSkia player(target.bitmap());
display_list.execute(player);
} else {
Web::Painting::DisplayListPlayerCPU player(target.bitmap());
Painting::DisplayListPlayerCPU player(target.bitmap());
display_list.execute(player);
}
}