summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2022-03-10 11:26:01 +0100
committerAndreas Kling <kling@serenityos.org>2022-03-11 00:21:49 +0100
commitf6497b64ac52674e99564d83c4fad6229d06b1ef (patch)
tree31d77bafef93f8daaca7ba38f80c874831cf7efc
parent7af03df4c3aa50acb5d73fbc69b1181cfbbed536 (diff)
downloadserenity-f6497b64ac52674e99564d83c4fad6229d06b1ef.zip
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.
-rw-r--r--Userland/Libraries/LibWeb/CMakeLists.txt2
-rw-r--r--Userland/Libraries/LibWeb/DOM/Element.cpp2
-rw-r--r--Userland/Libraries/LibWeb/DOM/Node.cpp2
-rw-r--r--Userland/Libraries/LibWeb/DOM/Node.h2
-rw-r--r--Userland/Libraries/LibWeb/Dump.cpp2
-rw-r--r--Userland/Libraries/LibWeb/Forward.h4
-rw-r--r--Userland/Libraries/LibWeb/HTML/HTMLElement.cpp2
-rw-r--r--Userland/Libraries/LibWeb/HTML/HTMLImageElement.cpp2
-rw-r--r--Userland/Libraries/LibWeb/InProcessWebView.cpp2
-rw-r--r--Userland/Libraries/LibWeb/Layout/BlockContainer.cpp6
-rw-r--r--Userland/Libraries/LibWeb/Layout/BlockContainer.h2
-rw-r--r--Userland/Libraries/LibWeb/Layout/Box.cpp4
-rw-r--r--Userland/Libraries/LibWeb/Layout/Box.h6
-rw-r--r--Userland/Libraries/LibWeb/Layout/ButtonBox.cpp2
-rw-r--r--Userland/Libraries/LibWeb/Layout/CanvasBox.cpp2
-rw-r--r--Userland/Libraries/LibWeb/Layout/CheckBox.cpp2
-rw-r--r--Userland/Libraries/LibWeb/Layout/FormattingState.cpp8
-rw-r--r--Userland/Libraries/LibWeb/Layout/FormattingState.h8
-rw-r--r--Userland/Libraries/LibWeb/Layout/FrameBox.cpp2
-rw-r--r--Userland/Libraries/LibWeb/Layout/ImageBox.cpp2
-rw-r--r--Userland/Libraries/LibWeb/Layout/InitialContainingBlock.cpp2
-rw-r--r--Userland/Libraries/LibWeb/Layout/Label.cpp2
-rw-r--r--Userland/Libraries/LibWeb/Layout/ListItemMarkerBox.cpp2
-rw-r--r--Userland/Libraries/LibWeb/Layout/Progress.cpp2
-rw-r--r--Userland/Libraries/LibWeb/Layout/RadioButton.cpp2
-rw-r--r--Userland/Libraries/LibWeb/Layout/SVGGeometryBox.cpp2
-rw-r--r--Userland/Libraries/LibWeb/Layout/SVGSVGBox.cpp2
-rw-r--r--Userland/Libraries/LibWeb/Painting/Paintable.cpp (renamed from Userland/Libraries/LibWeb/Painting/Box.cpp)24
-rw-r--r--Userland/Libraries/LibWeb/Painting/Paintable.h (renamed from Userland/Libraries/LibWeb/Painting/Box.h)20
-rw-r--r--Userland/Libraries/LibWeb/Painting/StackingContext.cpp2
-rw-r--r--Userland/Services/WebContent/ConnectionFromClient.cpp2
-rw-r--r--Userland/Services/WebContent/PageHost.cpp2
32 files changed, 64 insertions, 64 deletions
diff --git a/Userland/Libraries/LibWeb/CMakeLists.txt b/Userland/Libraries/LibWeb/CMakeLists.txt
index 6a039688df..81838b4502 100644
--- a/Userland/Libraries/LibWeb/CMakeLists.txt
+++ b/Userland/Libraries/LibWeb/CMakeLists.txt
@@ -284,7 +284,7 @@ set(SOURCES
Page/Page.cpp
Painting/BackgroundPainting.cpp
Painting/BorderPainting.cpp
- Painting/Box.cpp
+ Painting/Paintable.cpp
Painting/PaintContext.cpp
Painting/ShadowPainting.cpp
Painting/StackingContext.cpp
diff --git a/Userland/Libraries/LibWeb/DOM/Element.cpp b/Userland/Libraries/LibWeb/DOM/Element.cpp
index 9ffa0a28eb..4c807235d9 100644
--- a/Userland/Libraries/LibWeb/DOM/Element.cpp
+++ b/Userland/Libraries/LibWeb/DOM/Element.cpp
@@ -35,7 +35,7 @@
#include <LibWeb/Layout/TableRowGroupBox.h>
#include <LibWeb/Layout/TreeBuilder.h>
#include <LibWeb/Namespace.h>
-#include <LibWeb/Painting/Box.h>
+#include <LibWeb/Painting/Paintable.h>
namespace Web::DOM {
diff --git a/Userland/Libraries/LibWeb/DOM/Node.cpp b/Userland/Libraries/LibWeb/DOM/Node.cpp
index 874aa48dc6..1cd380a71d 100644
--- a/Userland/Libraries/LibWeb/DOM/Node.cpp
+++ b/Userland/Libraries/LibWeb/DOM/Node.cpp
@@ -1010,7 +1010,7 @@ size_t Node::length() const
return child_count();
}
-Painting::Box const* Node::paint_box() const
+Painting::Paintable const* Node::paint_box() const
{
if (!layout_node())
return nullptr;
diff --git a/Userland/Libraries/LibWeb/DOM/Node.h b/Userland/Libraries/LibWeb/DOM/Node.h
index 695b75ff89..ad3af3129b 100644
--- a/Userland/Libraries/LibWeb/DOM/Node.h
+++ b/Userland/Libraries/LibWeb/DOM/Node.h
@@ -158,7 +158,7 @@ public:
const Layout::Node* layout_node() const { return m_layout_node; }
Layout::Node* layout_node() { return m_layout_node; }
- Painting::Box const* paint_box() const;
+ Painting::Paintable const* paint_box() const;
void set_layout_node(Badge<Layout::Node>, Layout::Node*) const;
diff --git a/Userland/Libraries/LibWeb/Dump.cpp b/Userland/Libraries/LibWeb/Dump.cpp
index 805c54266e..f4d1043907 100644
--- a/Userland/Libraries/LibWeb/Dump.cpp
+++ b/Userland/Libraries/LibWeb/Dump.cpp
@@ -26,7 +26,7 @@
#include <LibWeb/Layout/Node.h>
#include <LibWeb/Layout/SVGBox.h>
#include <LibWeb/Layout/TextNode.h>
-#include <LibWeb/Painting/Box.h>
+#include <LibWeb/Painting/Paintable.h>
#include <stdio.h>
namespace Web {
diff --git a/Userland/Libraries/LibWeb/Forward.h b/Userland/Libraries/LibWeb/Forward.h
index 4e45ae278c..ccbd40db8a 100644
--- a/Userland/Libraries/LibWeb/Forward.h
+++ b/Userland/Libraries/LibWeb/Forward.h
@@ -265,8 +265,8 @@ class PerformanceTiming;
namespace Web::Painting {
enum class PaintPhase;
-class Box;
-class BoxWithLines;
+class Paintable;
+class PaintableWithLines;
}
namespace Web::RequestIdleCallback {
diff --git a/Userland/Libraries/LibWeb/HTML/HTMLElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLElement.cpp
index 30b9f505ed..cc88e2d38d 100644
--- a/Userland/Libraries/LibWeb/HTML/HTMLElement.cpp
+++ b/Userland/Libraries/LibWeb/HTML/HTMLElement.cpp
@@ -22,7 +22,7 @@
#include <LibWeb/Layout/Box.h>
#include <LibWeb/Layout/BreakNode.h>
#include <LibWeb/Layout/TextNode.h>
-#include <LibWeb/Painting/Box.h>
+#include <LibWeb/Painting/Paintable.h>
#include <LibWeb/UIEvents/EventNames.h>
#include <LibWeb/UIEvents/FocusEvent.h>
diff --git a/Userland/Libraries/LibWeb/HTML/HTMLImageElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLImageElement.cpp
index 3dba508a0d..bc45f8a9fc 100644
--- a/Userland/Libraries/LibWeb/HTML/HTMLImageElement.cpp
+++ b/Userland/Libraries/LibWeb/HTML/HTMLImageElement.cpp
@@ -13,7 +13,7 @@
#include <LibWeb/HTML/HTMLImageElement.h>
#include <LibWeb/Layout/ImageBox.h>
#include <LibWeb/Loader/ResourceLoader.h>
-#include <LibWeb/Painting/Box.h>
+#include <LibWeb/Painting/Paintable.h>
namespace Web::HTML {
diff --git a/Userland/Libraries/LibWeb/InProcessWebView.cpp b/Userland/Libraries/LibWeb/InProcessWebView.cpp
index 33751c025c..1280b264fa 100644
--- a/Userland/Libraries/LibWeb/InProcessWebView.cpp
+++ b/Userland/Libraries/LibWeb/InProcessWebView.cpp
@@ -21,8 +21,8 @@
#include <LibWeb/Layout/TextNode.h>
#include <LibWeb/Loader/ResourceLoader.h>
#include <LibWeb/Page/EventHandler.h>
-#include <LibWeb/Painting/Box.h>
#include <LibWeb/Painting/PaintContext.h>
+#include <LibWeb/Painting/Paintable.h>
#include <LibWeb/UIEvents/MouseEvent.h>
REGISTER_WIDGET(Web, InProcessWebView)
diff --git a/Userland/Libraries/LibWeb/Layout/BlockContainer.cpp b/Userland/Libraries/LibWeb/Layout/BlockContainer.cpp
index 9fef64e440..d3ce8d6d16 100644
--- a/Userland/Libraries/LibWeb/Layout/BlockContainer.cpp
+++ b/Userland/Libraries/LibWeb/Layout/BlockContainer.cpp
@@ -11,7 +11,7 @@
#include <LibWeb/Layout/InlineFormattingContext.h>
#include <LibWeb/Layout/ReplacedBox.h>
#include <LibWeb/Layout/TextNode.h>
-#include <LibWeb/Painting/Box.h>
+#include <LibWeb/Painting/Paintable.h>
namespace Web::Layout {
@@ -131,9 +131,9 @@ bool BlockContainer::handle_mousewheel(Badge<EventHandler>, const Gfx::IntPoint&
return true;
}
-Painting::BoxWithLines const* BlockContainer::paint_box() const
+Painting::PaintableWithLines const* BlockContainer::paint_box() const
{
- return static_cast<Painting::BoxWithLines const*>(Box::paint_box());
+ return static_cast<Painting::PaintableWithLines const*>(Box::paint_box());
}
}
diff --git a/Userland/Libraries/LibWeb/Layout/BlockContainer.h b/Userland/Libraries/LibWeb/Layout/BlockContainer.h
index 5d96774b8c..6b5b547a19 100644
--- a/Userland/Libraries/LibWeb/Layout/BlockContainer.h
+++ b/Userland/Libraries/LibWeb/Layout/BlockContainer.h
@@ -31,7 +31,7 @@ public:
const Gfx::FloatPoint& scroll_offset() const { return m_scroll_offset; }
void set_scroll_offset(const Gfx::FloatPoint&);
- Painting::BoxWithLines const* paint_box() const;
+ Painting::PaintableWithLines const* paint_box() const;
private:
virtual bool is_block_container() const final { return true; }
diff --git a/Userland/Libraries/LibWeb/Layout/Box.cpp b/Userland/Libraries/LibWeb/Layout/Box.cpp
index 8a5a49fe1e..2f7bff7904 100644
--- a/Userland/Libraries/LibWeb/Layout/Box.cpp
+++ b/Userland/Libraries/LibWeb/Layout/Box.cpp
@@ -15,7 +15,7 @@
#include <LibWeb/Layout/FormattingContext.h>
#include <LibWeb/Painting/BackgroundPainting.h>
#include <LibWeb/Painting/BorderPainting.h>
-#include <LibWeb/Painting/Box.h>
+#include <LibWeb/Painting/Paintable.h>
#include <LibWeb/Painting/ShadowPainting.h>
namespace Web::Layout {
@@ -34,7 +34,7 @@ Box::~Box()
{
}
-void Box::set_paint_box(OwnPtr<Painting::Box> paint_box)
+void Box::set_paint_box(OwnPtr<Painting::Paintable> paint_box)
{
m_paint_box = move(paint_box);
}
diff --git a/Userland/Libraries/LibWeb/Layout/Box.h b/Userland/Libraries/LibWeb/Layout/Box.h
index b4764704e9..03c4f13565 100644
--- a/Userland/Libraries/LibWeb/Layout/Box.h
+++ b/Userland/Libraries/LibWeb/Layout/Box.h
@@ -20,10 +20,10 @@ struct LineBoxFragmentCoordinate {
class Box : public NodeWithStyleAndBoxModelMetrics {
public:
- Painting::Box const* paint_box() const { return m_paint_box.ptr(); }
- void set_paint_box(OwnPtr<Painting::Box>);
+ Painting::Paintable const* paint_box() const { return m_paint_box.ptr(); }
+ void set_paint_box(OwnPtr<Painting::Paintable>);
- OwnPtr<Painting::Box> m_paint_box;
+ OwnPtr<Painting::Paintable> m_paint_box;
bool is_out_of_flow(FormattingContext const&) const;
diff --git a/Userland/Libraries/LibWeb/Layout/ButtonBox.cpp b/Userland/Libraries/LibWeb/Layout/ButtonBox.cpp
index ec59cfa77f..11b64eec2b 100644
--- a/Userland/Libraries/LibWeb/Layout/ButtonBox.cpp
+++ b/Userland/Libraries/LibWeb/Layout/ButtonBox.cpp
@@ -12,7 +12,7 @@
#include <LibWeb/HTML/BrowsingContext.h>
#include <LibWeb/Layout/ButtonBox.h>
#include <LibWeb/Layout/Label.h>
-#include <LibWeb/Painting/Box.h>
+#include <LibWeb/Painting/Paintable.h>
namespace Web::Layout {
diff --git a/Userland/Libraries/LibWeb/Layout/CanvasBox.cpp b/Userland/Libraries/LibWeb/Layout/CanvasBox.cpp
index df0364e063..433e4d52cd 100644
--- a/Userland/Libraries/LibWeb/Layout/CanvasBox.cpp
+++ b/Userland/Libraries/LibWeb/Layout/CanvasBox.cpp
@@ -6,7 +6,7 @@
#include <LibGfx/Painter.h>
#include <LibWeb/Layout/CanvasBox.h>
-#include <LibWeb/Painting/Box.h>
+#include <LibWeb/Painting/Paintable.h>
namespace Web::Layout {
diff --git a/Userland/Libraries/LibWeb/Layout/CheckBox.cpp b/Userland/Libraries/LibWeb/Layout/CheckBox.cpp
index bd33cbc357..03c5f4eebb 100644
--- a/Userland/Libraries/LibWeb/Layout/CheckBox.cpp
+++ b/Userland/Libraries/LibWeb/Layout/CheckBox.cpp
@@ -12,7 +12,7 @@
#include <LibWeb/HTML/HTMLInputElement.h>
#include <LibWeb/Layout/CheckBox.h>
#include <LibWeb/Layout/Label.h>
-#include <LibWeb/Painting/Box.h>
+#include <LibWeb/Painting/Paintable.h>
namespace Web::Layout {
diff --git a/Userland/Libraries/LibWeb/Layout/FormattingState.cpp b/Userland/Libraries/LibWeb/Layout/FormattingState.cpp
index 6f0970faac..913456f19f 100644
--- a/Userland/Libraries/LibWeb/Layout/FormattingState.cpp
+++ b/Userland/Libraries/LibWeb/Layout/FormattingState.cpp
@@ -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));
}
}
}
diff --git a/Userland/Libraries/LibWeb/Layout/FormattingState.h b/Userland/Libraries/LibWeb/Layout/FormattingState.h
index 97c38a290c..f1a802f6de 100644
--- a/Userland/Libraries/LibWeb/Layout/FormattingState.h
+++ b/Userland/Libraries/LibWeb/Layout/FormattingState.h
@@ -10,7 +10,7 @@
#include <LibGfx/Point.h>
#include <LibWeb/Layout/Box.h>
#include <LibWeb/Layout/LineBox.h>
-#include <LibWeb/Painting/Box.h>
+#include <LibWeb/Painting/Paintable.h>
namespace Web::Layout {
@@ -55,12 +55,12 @@ struct FormattingState {
float border_box_width() const { return border_box_left() + content_width + border_box_right(); }
float border_box_height() const { return border_box_top() + content_height + border_box_bottom(); }
- Optional<Painting::Box::OverflowData> overflow_data;
+ Optional<Painting::Paintable::OverflowData> overflow_data;
- Painting::Box::OverflowData& ensure_overflow_data()
+ Painting::Paintable::OverflowData& ensure_overflow_data()
{
if (!overflow_data.has_value())
- overflow_data = Painting::Box::OverflowData {};
+ overflow_data = Painting::Paintable::OverflowData {};
return *overflow_data;
}
diff --git a/Userland/Libraries/LibWeb/Layout/FrameBox.cpp b/Userland/Libraries/LibWeb/Layout/FrameBox.cpp
index 21809bc6c8..55184564bf 100644
--- a/Userland/Libraries/LibWeb/Layout/FrameBox.cpp
+++ b/Userland/Libraries/LibWeb/Layout/FrameBox.cpp
@@ -10,7 +10,7 @@
#include <LibWeb/HTML/BrowsingContext.h>
#include <LibWeb/Layout/FrameBox.h>
#include <LibWeb/Layout/InitialContainingBlock.h>
-#include <LibWeb/Painting/Box.h>
+#include <LibWeb/Painting/Paintable.h>
namespace Web::Layout {
diff --git a/Userland/Libraries/LibWeb/Layout/ImageBox.cpp b/Userland/Libraries/LibWeb/Layout/ImageBox.cpp
index e568355f80..f74b995a02 100644
--- a/Userland/Libraries/LibWeb/Layout/ImageBox.cpp
+++ b/Userland/Libraries/LibWeb/Layout/ImageBox.cpp
@@ -11,7 +11,7 @@
#include <LibWeb/CSS/ValueID.h>
#include <LibWeb/HTML/BrowsingContext.h>
#include <LibWeb/Layout/ImageBox.h>
-#include <LibWeb/Painting/Box.h>
+#include <LibWeb/Painting/Paintable.h>
namespace Web::Layout {
diff --git a/Userland/Libraries/LibWeb/Layout/InitialContainingBlock.cpp b/Userland/Libraries/LibWeb/Layout/InitialContainingBlock.cpp
index 5a9937e640..d1ea0dd63b 100644
--- a/Userland/Libraries/LibWeb/Layout/InitialContainingBlock.cpp
+++ b/Userland/Libraries/LibWeb/Layout/InitialContainingBlock.cpp
@@ -8,7 +8,7 @@
#include <LibWeb/Dump.h>
#include <LibWeb/HTML/BrowsingContext.h>
#include <LibWeb/Layout/InitialContainingBlock.h>
-#include <LibWeb/Painting/Box.h>
+#include <LibWeb/Painting/Paintable.h>
#include <LibWeb/Painting/StackingContext.h>
namespace Web::Layout {
diff --git a/Userland/Libraries/LibWeb/Layout/Label.cpp b/Userland/Libraries/LibWeb/Layout/Label.cpp
index b58c1c8f8f..ff8467dab8 100644
--- a/Userland/Libraries/LibWeb/Layout/Label.cpp
+++ b/Userland/Libraries/LibWeb/Layout/Label.cpp
@@ -14,7 +14,7 @@
#include <LibWeb/Layout/Label.h>
#include <LibWeb/Layout/LabelableNode.h>
#include <LibWeb/Layout/TextNode.h>
-#include <LibWeb/Painting/Box.h>
+#include <LibWeb/Painting/Paintable.h>
namespace Web::Layout {
diff --git a/Userland/Libraries/LibWeb/Layout/ListItemMarkerBox.cpp b/Userland/Libraries/LibWeb/Layout/ListItemMarkerBox.cpp
index 5c7970c630..73aa694952 100644
--- a/Userland/Libraries/LibWeb/Layout/ListItemMarkerBox.cpp
+++ b/Userland/Libraries/LibWeb/Layout/ListItemMarkerBox.cpp
@@ -8,7 +8,7 @@
#include <AK/StringBuilder.h>
#include <LibGfx/Painter.h>
#include <LibWeb/Layout/ListItemMarkerBox.h>
-#include <LibWeb/Painting/Box.h>
+#include <LibWeb/Painting/Paintable.h>
namespace Web::Layout {
diff --git a/Userland/Libraries/LibWeb/Layout/Progress.cpp b/Userland/Libraries/LibWeb/Layout/Progress.cpp
index 1a54d3bb5f..ec737a49ad 100644
--- a/Userland/Libraries/LibWeb/Layout/Progress.cpp
+++ b/Userland/Libraries/LibWeb/Layout/Progress.cpp
@@ -7,7 +7,7 @@
#include <LibGfx/Painter.h>
#include <LibGfx/StylePainter.h>
#include <LibWeb/Layout/Progress.h>
-#include <LibWeb/Painting/Box.h>
+#include <LibWeb/Painting/Paintable.h>
namespace Web::Layout {
diff --git a/Userland/Libraries/LibWeb/Layout/RadioButton.cpp b/Userland/Libraries/LibWeb/Layout/RadioButton.cpp
index f70e7ff806..36447c2c20 100644
--- a/Userland/Libraries/LibWeb/Layout/RadioButton.cpp
+++ b/Userland/Libraries/LibWeb/Layout/RadioButton.cpp
@@ -11,7 +11,7 @@
#include <LibWeb/HTML/BrowsingContext.h>
#include <LibWeb/Layout/Label.h>
#include <LibWeb/Layout/RadioButton.h>
-#include <LibWeb/Painting/Box.h>
+#include <LibWeb/Painting/Paintable.h>
namespace Web::Layout {
diff --git a/Userland/Libraries/LibWeb/Layout/SVGGeometryBox.cpp b/Userland/Libraries/LibWeb/Layout/SVGGeometryBox.cpp
index 549cdfdd3f..c3166b82bc 100644
--- a/Userland/Libraries/LibWeb/Layout/SVGGeometryBox.cpp
+++ b/Userland/Libraries/LibWeb/Layout/SVGGeometryBox.cpp
@@ -8,7 +8,7 @@
#include <LibGfx/AntiAliasingPainter.h>
#include <LibGfx/Painter.h>
#include <LibWeb/Layout/SVGGeometryBox.h>
-#include <LibWeb/Painting/Box.h>
+#include <LibWeb/Painting/Paintable.h>
#include <LibWeb/SVG/SVGPathElement.h>
#include <LibWeb/SVG/SVGSVGElement.h>
diff --git a/Userland/Libraries/LibWeb/Layout/SVGSVGBox.cpp b/Userland/Libraries/LibWeb/Layout/SVGSVGBox.cpp
index 39077e3430..599be692f9 100644
--- a/Userland/Libraries/LibWeb/Layout/SVGSVGBox.cpp
+++ b/Userland/Libraries/LibWeb/Layout/SVGSVGBox.cpp
@@ -5,7 +5,7 @@
*/
#include <LibWeb/Layout/SVGSVGBox.h>
-#include <LibWeb/Painting/Box.h>
+#include <LibWeb/Painting/Paintable.h>
namespace Web::Layout {
diff --git a/Userland/Libraries/LibWeb/Painting/Box.cpp b/Userland/Libraries/LibWeb/Painting/Paintable.cpp
index a191eb9368..faeb943b45 100644
--- a/Userland/Libraries/LibWeb/Painting/Box.cpp
+++ b/Userland/Libraries/LibWeb/Painting/Paintable.cpp
@@ -5,29 +5,29 @@
*/
#include <LibWeb/Layout/BlockContainer.h>
-#include <LibWeb/Painting/Box.h>
+#include <LibWeb/Painting/Paintable.h>
namespace Web::Painting {
-Box::Box(Layout::Box const& layout_box)
+Paintable::Paintable(Layout::Box const& layout_box)
: m_layout_box(layout_box)
{
}
-Box::~Box()
+Paintable::~Paintable()
{
}
-BoxWithLines::BoxWithLines(Layout::BlockContainer const& layout_box)
- : Box(layout_box)
+PaintableWithLines::PaintableWithLines(Layout::BlockContainer const& layout_box)
+ : Paintable(layout_box)
{
}
-BoxWithLines::~BoxWithLines()
+PaintableWithLines::~PaintableWithLines()
{
}
-void Box::set_offset(const Gfx::FloatPoint& offset)
+void Paintable::set_offset(const Gfx::FloatPoint& offset)
{
if (m_offset == offset)
return;
@@ -36,7 +36,7 @@ void Box::set_offset(const Gfx::FloatPoint& offset)
const_cast<Layout::Box&>(m_layout_box).did_set_rect();
}
-void Box::set_content_size(Gfx::FloatSize const& size)
+void Paintable::set_content_size(Gfx::FloatSize const& size)
{
if (m_content_size == size)
return;
@@ -45,7 +45,7 @@ void Box::set_content_size(Gfx::FloatSize const& size)
const_cast<Layout::Box&>(m_layout_box).did_set_rect();
}
-Gfx::FloatPoint Box::effective_offset() const
+Gfx::FloatPoint Paintable::effective_offset() const
{
if (m_containing_line_box_fragment.has_value()) {
auto const& fragment = m_layout_box.containing_block()->paint_box()->line_boxes()[m_containing_line_box_fragment->line_box_index].fragments()[m_containing_line_box_fragment->fragment_index];
@@ -54,7 +54,7 @@ Gfx::FloatPoint Box::effective_offset() const
return m_offset;
}
-Gfx::FloatRect Box::absolute_rect() const
+Gfx::FloatRect Paintable::absolute_rect() const
{
Gfx::FloatRect rect { effective_offset(), content_size() };
for (auto* block = m_layout_box.containing_block(); block; block = block->containing_block())
@@ -62,12 +62,12 @@ Gfx::FloatRect Box::absolute_rect() const
return rect;
}
-void Box::set_containing_line_box_fragment(Optional<Layout::LineBoxFragmentCoordinate> fragment_coordinate)
+void Paintable::set_containing_line_box_fragment(Optional<Layout::LineBoxFragmentCoordinate> fragment_coordinate)
{
m_containing_line_box_fragment = fragment_coordinate;
}
-Painting::StackingContext* Box::enclosing_stacking_context()
+Painting::StackingContext* Paintable::enclosing_stacking_context()
{
for (auto* ancestor = m_layout_box.parent(); ancestor; ancestor = ancestor->parent()) {
if (!is<Layout::Box>(ancestor))
diff --git a/Userland/Libraries/LibWeb/Painting/Box.h b/Userland/Libraries/LibWeb/Painting/Paintable.h
index 90a14e2251..43c013c12e 100644
--- a/Userland/Libraries/LibWeb/Painting/Box.h
+++ b/Userland/Libraries/LibWeb/Painting/Paintable.h
@@ -13,14 +13,14 @@
namespace Web::Painting {
-class Box {
+class Paintable {
public:
- static NonnullOwnPtr<Box> create(Layout::Box const& layout_box)
+ static NonnullOwnPtr<Paintable> create(Layout::Box const& layout_box)
{
- return adopt_own(*new Box(layout_box));
+ return adopt_own(*new Paintable(layout_box));
}
- virtual ~Box();
+ virtual ~Paintable();
Layout::Box const& m_layout_box;
@@ -110,19 +110,19 @@ public:
StackingContext* enclosing_stacking_context();
protected:
- explicit Box(Layout::Box const&);
+ explicit Paintable(Layout::Box const&);
private:
OwnPtr<Painting::StackingContext> m_stacking_context;
};
-class BoxWithLines : public Box {
+class PaintableWithLines : public Paintable {
public:
- static NonnullOwnPtr<BoxWithLines> create(Layout::BlockContainer const& block_container)
+ static NonnullOwnPtr<PaintableWithLines> create(Layout::BlockContainer const& block_container)
{
- return adopt_own(*new BoxWithLines(block_container));
+ return adopt_own(*new PaintableWithLines(block_container));
}
- virtual ~BoxWithLines() override;
+ virtual ~PaintableWithLines() override;
Vector<Layout::LineBox> const& line_boxes() const { return m_line_boxes; }
void set_line_boxes(Vector<Layout::LineBox>&& line_boxes) { m_line_boxes = move(line_boxes); }
@@ -139,7 +139,7 @@ public:
}
private:
- BoxWithLines(Layout::BlockContainer const&);
+ PaintableWithLines(Layout::BlockContainer const&);
Vector<Layout::LineBox> m_line_boxes;
};
diff --git a/Userland/Libraries/LibWeb/Painting/StackingContext.cpp b/Userland/Libraries/LibWeb/Painting/StackingContext.cpp
index a74086508a..ee9603e610 100644
--- a/Userland/Libraries/LibWeb/Painting/StackingContext.cpp
+++ b/Userland/Libraries/LibWeb/Painting/StackingContext.cpp
@@ -10,7 +10,7 @@
#include <LibWeb/Layout/Box.h>
#include <LibWeb/Layout/InitialContainingBlock.h>
#include <LibWeb/Layout/ReplacedBox.h>
-#include <LibWeb/Painting/Box.h>
+#include <LibWeb/Painting/Paintable.h>
#include <LibWeb/Painting/StackingContext.h>
namespace Web::Painting {
diff --git a/Userland/Services/WebContent/ConnectionFromClient.cpp b/Userland/Services/WebContent/ConnectionFromClient.cpp
index fa3386f260..bb592fbd41 100644
--- a/Userland/Services/WebContent/ConnectionFromClient.cpp
+++ b/Userland/Services/WebContent/ConnectionFromClient.cpp
@@ -25,7 +25,7 @@
#include <LibWeb/Layout/InitialContainingBlock.h>
#include <LibWeb/Loader/ContentFilter.h>
#include <LibWeb/Loader/ResourceLoader.h>
-#include <LibWeb/Painting/Box.h>
+#include <LibWeb/Painting/Paintable.h>
#include <WebContent/ConnectionFromClient.h>
#include <WebContent/PageHost.h>
#include <WebContent/WebContentClientEndpoint.h>
diff --git a/Userland/Services/WebContent/PageHost.cpp b/Userland/Services/WebContent/PageHost.cpp
index a80294ed4a..8182d75e77 100644
--- a/Userland/Services/WebContent/PageHost.cpp
+++ b/Userland/Services/WebContent/PageHost.cpp
@@ -12,7 +12,7 @@
#include <LibWeb/Cookie/ParsedCookie.h>
#include <LibWeb/HTML/BrowsingContext.h>
#include <LibWeb/Layout/InitialContainingBlock.h>
-#include <LibWeb/Painting/Box.h>
+#include <LibWeb/Painting/Paintable.h>
#include <WebContent/WebContentClientEndpoint.h>
namespace WebContent {