From 71556e39a461e045015fa28a984c1649c9d15b83 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 26 Jul 2020 17:16:18 +0200 Subject: LibWeb: Switch to using AK::is and AK::downcast --- Libraries/LibWeb/Frame/Frame.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Libraries/LibWeb/Frame/Frame.cpp') diff --git a/Libraries/LibWeb/Frame/Frame.cpp b/Libraries/LibWeb/Frame/Frame.cpp index 4faef43d49..0631a20595 100644 --- a/Libraries/LibWeb/Frame/Frame.cpp +++ b/Libraries/LibWeb/Frame/Frame.cpp @@ -125,7 +125,7 @@ void Frame::scroll_to_anchor(const String& fragment) auto candidates = document()->get_elements_by_name(fragment); for (auto* candidate : candidates) { if (is(*candidate)) { - element = to(candidate); + element = downcast(candidate); break; } } @@ -138,7 +138,7 @@ void Frame::scroll_to_anchor(const String& fragment) Gfx::FloatRect float_rect { layout_node.box_type_agnostic_position(), { (float)viewport_rect().width(), (float)viewport_rect().height() } }; if (is(layout_node)) { - auto& layout_box = to(layout_node); + auto& layout_box = downcast(layout_node); auto padding_box = layout_box.box_model().padding_box(layout_box); float_rect.move_by(-padding_box.left, -padding_box.top); } -- cgit v1.2.3