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/Frame/Frame.cpp | |
parent | fe6474e69273a033a22f7961228b75a9eb967ab7 (diff) | |
download | serenity-71556e39a461e045015fa28a984c1649c9d15b83.zip |
LibWeb: Switch to using AK::is and AK::downcast
Diffstat (limited to 'Libraries/LibWeb/Frame/Frame.cpp')
-rw-r--r-- | Libraries/LibWeb/Frame/Frame.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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<HTMLAnchorElement>(*candidate)) { - element = to<HTMLAnchorElement>(candidate); + element = downcast<HTMLAnchorElement>(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<LayoutBox>(layout_node)) { - auto& layout_box = to<LayoutBox>(layout_node); + auto& layout_box = downcast<LayoutBox>(layout_node); auto padding_box = layout_box.box_model().padding_box(layout_box); float_rect.move_by(-padding_box.left, -padding_box.top); } |