summaryrefslogtreecommitdiff
path: root/Libraries/LibWeb
diff options
context:
space:
mode:
Diffstat (limited to 'Libraries/LibWeb')
-rw-r--r--Libraries/LibWeb/PageView.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/Libraries/LibWeb/PageView.cpp b/Libraries/LibWeb/PageView.cpp
index bdd5eeba01..e1c9a74a4d 100644
--- a/Libraries/LibWeb/PageView.cpp
+++ b/Libraries/LibWeb/PageView.cpp
@@ -319,6 +319,8 @@ Gfx::Point PageView::to_screen_position(const Web::Frame& frame, const Gfx::Poin
{
Gfx::Point offset;
for (auto* f = &frame; f; f = f->parent()) {
+ if (f->is_main_frame())
+ break;
auto f_position = f->host_element()->layout_node()->box_type_agnostic_position().to_int_point();
offset.move_by(f_position);
}