diff options
author | Andreas Kling <kling@serenityos.org> | 2020-02-06 14:35:54 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-02-06 14:35:54 +0100 |
commit | 8bb75084fd2956ae431789742c4fe6d0ed0679bd (patch) | |
tree | f9bef8dc69cf8ec55283f71cdc13087ea67c6dde | |
parent | 5c2028db24943332f7707fc7f2d026fe027d957e (diff) | |
download | serenity-8bb75084fd2956ae431789742c4fe6d0ed0679bd.zip |
LibGfx: Unpublish FloatPoint from the global namespace
-rw-r--r-- | Libraries/LibGfx/FloatPoint.h | 2 | ||||
-rw-r--r-- | Libraries/LibHTML/Layout/LayoutBox.cpp | 2 | ||||
-rw-r--r-- | Libraries/LibHTML/Layout/LayoutBox.h | 2 | ||||
-rw-r--r-- | Libraries/LibHTML/Layout/LayoutNode.cpp | 4 | ||||
-rw-r--r-- | Libraries/LibHTML/Layout/LayoutNode.h | 2 |
5 files changed, 5 insertions, 7 deletions
diff --git a/Libraries/LibGfx/FloatPoint.h b/Libraries/LibGfx/FloatPoint.h index 03a685dd19..40d7636df4 100644 --- a/Libraries/LibGfx/FloatPoint.h +++ b/Libraries/LibGfx/FloatPoint.h @@ -145,5 +145,3 @@ inline const LogStream& operator<<(const LogStream& stream, const FloatPoint& va } } - -using Gfx::FloatPoint; diff --git a/Libraries/LibHTML/Layout/LayoutBox.cpp b/Libraries/LibHTML/Layout/LayoutBox.cpp index ccd5149439..95811c9fdd 100644 --- a/Libraries/LibHTML/Layout/LayoutBox.cpp +++ b/Libraries/LibHTML/Layout/LayoutBox.cpp @@ -212,7 +212,7 @@ HitTestResult LayoutBox::hit_test(const Gfx::Point& position) const // FIXME: It would be nice if we could confidently skip over hit testing // parts of the layout tree, but currently we can't just check // m_rect.contains() since inline text rects can't be trusted.. - HitTestResult result { m_rect.contains(FloatPoint(position.x(), position.y())) ? this : nullptr }; + HitTestResult result { m_rect.contains(position.x(), position.y()) ? this : nullptr }; for_each_child([&](auto& child) { auto child_result = child.hit_test(position); if (child_result.layout_node) diff --git a/Libraries/LibHTML/Layout/LayoutBox.h b/Libraries/LibHTML/Layout/LayoutBox.h index 78d617f859..5c9a226faf 100644 --- a/Libraries/LibHTML/Layout/LayoutBox.h +++ b/Libraries/LibHTML/Layout/LayoutBox.h @@ -40,7 +40,7 @@ public: float width() const { return rect().width(); } float height() const { return rect().height(); } Gfx::FloatSize size() const { return rect().size(); } - FloatPoint position() const { return rect().location(); } + Gfx::FloatPoint position() const { return rect().location(); } virtual HitTestResult hit_test(const Gfx::Point& position) const override; virtual void set_needs_display() override; diff --git a/Libraries/LibHTML/Layout/LayoutNode.cpp b/Libraries/LibHTML/Layout/LayoutNode.cpp index 59207164fc..5ca86a9200 100644 --- a/Libraries/LibHTML/Layout/LayoutNode.cpp +++ b/Libraries/LibHTML/Layout/LayoutNode.cpp @@ -135,12 +135,12 @@ void LayoutNode::set_needs_display() } } -FloatPoint LayoutNode::box_type_agnostic_position() const +Gfx::FloatPoint LayoutNode::box_type_agnostic_position() const { if (is_box()) return to<LayoutBox>(*this).position(); ASSERT(is_inline()); - FloatPoint position; + Gfx::FloatPoint position; if (auto* block = containing_block()) { block->for_each_fragment([&](auto& fragment) { if (&fragment.layout_node() == this || is_ancestor_of(fragment.layout_node())) { diff --git a/Libraries/LibHTML/Layout/LayoutNode.h b/Libraries/LibHTML/Layout/LayoutNode.h index 2f41c70df4..6f218ae644 100644 --- a/Libraries/LibHTML/Layout/LayoutNode.h +++ b/Libraries/LibHTML/Layout/LayoutNode.h @@ -137,7 +137,7 @@ public: template<typename T> T* first_ancestor_of_type(); - FloatPoint box_type_agnostic_position() const; + Gfx::FloatPoint box_type_agnostic_position() const; protected: explicit LayoutNode(const Node*); |