mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 19:59:17 +00: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
Notes:
github-actions[bot]
2025-06-17 09:56:36 +00:00
Author: https://github.com/gmta
Commit: 046d1169de
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5104
1 changed files with 1 additions and 1 deletions
|
@ -888,8 +888,8 @@ void PaintableWithLines::paint(PaintContext& context, PaintPhase phase) const
|
|||
|
||||
for (auto const& fragment : m_fragments) {
|
||||
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()) {
|
||||
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_line(
|
||||
context.rounded_device_point(fragment_absolute_rect.top_left().translated(0, fragment.baseline())).to_type<int>(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue