mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-14 23:22:52 +00:00
LibWeb: Always use Navigable to translate CSS positions to top-level
This commit is contained in:
parent
3aee787539
commit
b6fc29ca21
Notes:
sideshowbarker
2024-07-17 01:11:48 +09:00
Author: https://github.com/ADKaster
Commit: b6fc29ca21
Pull-request: https://github.com/SerenityOS/serenity/pull/23063
2 changed files with 10 additions and 7 deletions
|
@ -299,8 +299,8 @@ void HTMLSelectElement::activation_behavior(DOM::Event const&)
|
|||
// Request select dropdown
|
||||
auto weak_element = make_weak_ptr<HTMLSelectElement>();
|
||||
auto rect = get_bounding_client_rect();
|
||||
auto position = document().browsing_context()->to_top_level_position(Web::CSSPixelPoint { rect->x(), rect->y() });
|
||||
document().browsing_context()->top_level_browsing_context()->page().did_request_select_dropdown(weak_element, position, CSSPixels(rect->width()), items);
|
||||
auto position = document().navigable()->to_top_level_position(Web::CSSPixelPoint { rect->x(), rect->y() });
|
||||
document().page().did_request_select_dropdown(weak_element, position, CSSPixels(rect->width()), items);
|
||||
set_is_open(true);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue