diff options
author | Andreas Kling <kling@serenityos.org> | 2020-07-26 17:16:18 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-07-26 17:51:00 +0200 |
commit | 71556e39a461e045015fa28a984c1649c9d15b83 (patch) | |
tree | 26669f0d6ab67b859680930df2ccca9875fe9f69 /Libraries/LibWeb/Layout/LayoutBox.cpp | |
parent | fe6474e69273a033a22f7961228b75a9eb967ab7 (diff) | |
download | serenity-71556e39a461e045015fa28a984c1649c9d15b83.zip |
LibWeb: Switch to using AK::is and AK::downcast
Diffstat (limited to 'Libraries/LibWeb/Layout/LayoutBox.cpp')
-rw-r--r-- | Libraries/LibWeb/Layout/LayoutBox.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Libraries/LibWeb/Layout/LayoutBox.cpp b/Libraries/LibWeb/Layout/LayoutBox.cpp index 25c6c34e57..128f0e1fca 100644 --- a/Libraries/LibWeb/Layout/LayoutBox.cpp +++ b/Libraries/LibWeb/Layout/LayoutBox.cpp @@ -231,7 +231,7 @@ HitTestResult LayoutBox::hit_test(const Gfx::IntPoint& position) const // m_rect.contains() since inline text rects can't be trusted.. HitTestResult result { absolute_rect().contains(position.x(), position.y()) ? this : nullptr }; for_each_child([&](auto& child) { - if (is<LayoutBox>(child) && to<LayoutBox>(child).stacking_context()) + if (is<LayoutBox>(child) && downcast<LayoutBox>(child).stacking_context()) return; auto child_result = child.hit_test(position); if (child_result.layout_node) @@ -297,7 +297,7 @@ StackingContext* LayoutBox::enclosing_stacking_context() for (auto* ancestor = parent(); ancestor; ancestor = ancestor->parent()) { if (!ancestor->is_box()) continue; - auto& ancestor_box = to<LayoutBox>(*ancestor); + auto& ancestor_box = downcast<LayoutBox>(*ancestor); if (!ancestor_box.establishes_stacking_context()) continue; ASSERT(ancestor_box.stacking_context()); |