mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:07:34 +00:00
LibWeb: Rename Painting::Box => Paintable
Calling this "Box" made it very confusing to look at code that used both Layout::Box and Painting::Box. Let's try calling it Paintable instead.
This commit is contained in:
parent
7af03df4c3
commit
f6497b64ac
32 changed files with 64 additions and 64 deletions
|
@ -41,10 +41,10 @@ void FormattingState::commit()
|
|||
// For boxes, transfer all the state needed for painting.
|
||||
if (is<Layout::Box>(node)) {
|
||||
auto& box = static_cast<Layout::Box&>(node);
|
||||
box.set_paint_box([](Layout::Box const& layout_box) -> OwnPtr<Painting::Box> {
|
||||
box.set_paint_box([](Layout::Box const& layout_box) -> OwnPtr<Painting::Paintable> {
|
||||
if (is<Layout::BlockContainer>(layout_box))
|
||||
return Painting::BoxWithLines::create(static_cast<Layout::BlockContainer const&>(layout_box));
|
||||
return Painting::Box::create(static_cast<Layout::Box const&>(layout_box));
|
||||
return Painting::PaintableWithLines::create(static_cast<Layout::BlockContainer const&>(layout_box));
|
||||
return Painting::Paintable::create(static_cast<Layout::Box const&>(layout_box));
|
||||
}(box));
|
||||
box.m_paint_box->set_offset(node_state.offset);
|
||||
box.m_paint_box->set_content_size(node_state.content_width, node_state.content_height);
|
||||
|
@ -52,7 +52,7 @@ void FormattingState::commit()
|
|||
box.m_paint_box->set_containing_line_box_fragment(node_state.containing_line_box_fragment);
|
||||
|
||||
if (is<Layout::BlockContainer>(box))
|
||||
static_cast<Painting::BoxWithLines&>(*box.m_paint_box).set_line_boxes(move(node_state.line_boxes));
|
||||
static_cast<Painting::PaintableWithLines&>(*box.m_paint_box).set_line_boxes(move(node_state.line_boxes));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue