mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 00:19:53 +01:00
LibWeb: Only calculate enclosing rect for fragments if we use it
This would show up in profiles for pages with lots of fragments. No functional changes.
This commit is contained in:
parent
7dc8062283
commit
046d1169de
|
|
@ -888,8 +888,8 @@ void PaintableWithLines::paint(PaintContext& context, PaintPhase phase) const
|
||||||
|
|
||||||
for (auto const& fragment : m_fragments) {
|
for (auto const& fragment : m_fragments) {
|
||||||
auto fragment_absolute_rect = fragment.absolute_rect();
|
auto fragment_absolute_rect = fragment.absolute_rect();
|
||||||
auto fragment_absolute_device_rect = context.enclosing_device_rect(fragment_absolute_rect);
|
|
||||||
if (context.should_show_line_box_borders()) {
|
if (context.should_show_line_box_borders()) {
|
||||||
|
auto fragment_absolute_device_rect = context.enclosing_device_rect(fragment_absolute_rect);
|
||||||
context.display_list_recorder().draw_rect(fragment_absolute_device_rect.to_type<int>(), Color::Green);
|
context.display_list_recorder().draw_rect(fragment_absolute_device_rect.to_type<int>(), Color::Green);
|
||||||
context.display_list_recorder().draw_line(
|
context.display_list_recorder().draw_line(
|
||||||
context.rounded_device_point(fragment_absolute_rect.top_left().translated(0, fragment.baseline())).to_type<int>(),
|
context.rounded_device_point(fragment_absolute_rect.top_left().translated(0, fragment.baseline())).to_type<int>(),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user