mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-27 14:58:46 +00:00
LibWeb: Make request_select_dropdown more similar to context menu api
This commit is contained in:
parent
aee8b39c65
commit
cbb660c756
Notes:
sideshowbarker
2024-07-17 03:03:44 +09:00
Author: https://github.com/bplaat
Commit: cbb660c756
Pull-request: https://github.com/SerenityOS/serenity/pull/22270
7 changed files with 10 additions and 9 deletions
|
@ -298,7 +298,8 @@ void HTMLSelectElement::activation_behavior(DOM::Event const&)
|
|||
// Request select dropdown
|
||||
auto weak_element = make_weak_ptr<HTMLSelectElement>();
|
||||
auto rect = get_bounding_client_rect();
|
||||
document().browsing_context()->top_level_browsing_context()->page().did_request_select_dropdown(weak_element, Gfx::IntPoint { rect->x(), rect->y() }, rect->width(), items);
|
||||
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);
|
||||
set_is_open(true);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue