mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 09:51:57 -05:00
LibWeb: Unbreak <a title> tooltips in the main frame
The main frame doesn't have a host element, so we can't go trying to offset things by the host element's layout rect.
This commit is contained in:
parent
61ac1d3ffa
commit
767daf1c12
1 changed files with 2 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue