diff options
author | Linus Groh <mail@linusgroh.de> | 2023-04-20 16:00:42 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2023-04-20 20:43:30 +0200 |
commit | 754e458d0a0680b0b8388e68ec3856b2c5bda03b (patch) | |
tree | 5aa565ba3ea6121d398e3950cfcaf7e8e5b44838 /Userland/Libraries/LibWeb/Painting/PaintableBox.cpp | |
parent | ec37b557773ed46ab5ab38878c304de8c48a53a1 (diff) | |
download | serenity-754e458d0a0680b0b8388e68ec3856b2c5bda03b.zip |
LibWeb/Layout: Rename Box::{paint => paintable}_box()
It returns a PaintableBox, not a 'PaintBox'.
Diffstat (limited to 'Userland/Libraries/LibWeb/Painting/PaintableBox.cpp')
-rw-r--r-- | Userland/Libraries/LibWeb/Painting/PaintableBox.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Userland/Libraries/LibWeb/Painting/PaintableBox.cpp b/Userland/Libraries/LibWeb/Painting/PaintableBox.cpp index 2dc955f41b..54ea6831fd 100644 --- a/Userland/Libraries/LibWeb/Painting/PaintableBox.cpp +++ b/Userland/Libraries/LibWeb/Painting/PaintableBox.cpp @@ -76,7 +76,7 @@ CSSPixelPoint PaintableBox::effective_offset() const { CSSPixelPoint offset; if (containing_block() && m_containing_line_box_fragment.has_value()) { - auto& paintable_with_lines = *verify_cast<PaintableWithLines>(containing_block()->paint_box()); + auto& paintable_with_lines = *verify_cast<PaintableWithLines>(containing_block()->paintable_box()); auto const& fragment = paintable_with_lines.line_boxes()[m_containing_line_box_fragment->line_box_index].fragments()[m_containing_line_box_fragment->fragment_index]; offset = fragment.offset(); } else { @@ -93,7 +93,7 @@ CSSPixelRect PaintableBox::compute_absolute_rect() const { CSSPixelRect rect { effective_offset(), content_size() }; for (auto const* block = containing_block(); block && block->paintable(); block = block->paintable()->containing_block()) - rect.translate_by(block->paint_box()->effective_offset()); + rect.translate_by(block->paintable_box()->effective_offset()); return rect; } @@ -137,8 +137,8 @@ Painting::StackingContext* PaintableBox::enclosing_stacking_context() if (!is<Layout::Box>(ancestor)) continue; auto& ancestor_box = static_cast<Layout::Box&>(const_cast<Layout::NodeWithStyle&>(*ancestor)); - if (auto* ancestor_paint_box = ancestor_box.paint_box(); ancestor_paint_box && ancestor_paint_box->stacking_context()) - return const_cast<StackingContext*>(ancestor_paint_box->stacking_context()); + if (auto* ancestor_paintable_box = ancestor_box.paintable_box(); ancestor_paintable_box && ancestor_paintable_box->stacking_context()) + return const_cast<StackingContext*>(ancestor_paintable_box->stacking_context()); } // We should always reach the Layout::Viewport stacking context. VERIFY_NOT_REACHED(); @@ -321,8 +321,8 @@ Optional<CSSPixelRect> PaintableBox::calculate_overflow_clipped_rect() const // transforms doesn't make sense // TODO: figure out if there are cases when stacking context should be // crossed to calculate correct clip rect - if (!stacking_context() && containing_block() && containing_block()->paint_box()) { - m_clip_rect = containing_block()->paint_box()->calculate_overflow_clipped_rect(); + if (!stacking_context() && containing_block() && containing_block()->paintable_box()) { + m_clip_rect = containing_block()->paintable_box()->calculate_overflow_clipped_rect(); } auto overflow_x = computed_values().overflow_x(); @@ -702,7 +702,7 @@ Optional<HitTestResult> PaintableWithLines::hit_test(CSSPixelPoint position, Hit Optional<HitTestResult> last_good_candidate; for (auto& line_box : m_line_boxes) { for (auto& fragment : line_box.fragments()) { - if (is<Layout::Box>(fragment.layout_node()) && static_cast<Layout::Box const&>(fragment.layout_node()).paint_box()->stacking_context()) + if (is<Layout::Box>(fragment.layout_node()) && static_cast<Layout::Box const&>(fragment.layout_node()).paintable_box()->stacking_context()) continue; if (!fragment.layout_node().containing_block()) { dbgln("FIXME: PaintableWithLines::hit_test(): Missing containing block on {}", fragment.layout_node().debug_description()); |