mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-03 13:02:09 +02:00
LibWeb: Store the input image button's selected coordinates as integers
The spec has prose which states, e.g., "The x-component must be a valid integer".
This commit is contained in:
committed by
Andreas Kling
parent
3f3db34587
commit
7bee1c9897
Notes:
sideshowbarker
2024-07-17 07:43:44 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/SerenityOS/serenity/commit/7bee1c9897 Pull-request: https://github.com/SerenityOS/serenity/pull/23256
@@ -310,7 +310,11 @@ WebIDL::ExceptionOr<void> HTMLInputElement::run_input_activation_behavior(DOM::E
|
||||
// coordinate to that coordinate.
|
||||
if (event.is_trusted() && is<UIEvents::MouseEvent>(event)) {
|
||||
auto const& mouse_event = static_cast<UIEvents::MouseEvent const&>(event);
|
||||
m_selected_coordinate = { mouse_event.offset_x(), mouse_event.offset_y() };
|
||||
|
||||
CSSPixels x { mouse_event.offset_x() };
|
||||
CSSPixels y { mouse_event.offset_y() };
|
||||
|
||||
m_selected_coordinate = { x.to_int(), y.to_int() };
|
||||
}
|
||||
|
||||
// 4. Submit the element's form owner from the element with userInvolvement set to event's user navigation involvement.
|
||||
|
||||
Reference in New Issue
Block a user