mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-13 14:42:51 +00:00
LibWeb: Implement HTMLInputElement's selected coordinates
When an <input type=image> button is clicked, we now send the (x,y) coordinates of the click event (relative to the image) along with the form submission data. Regarding the text test, we can currently only test this feature with dialogs. The headless-browser test infrastructure cannot yet handle the resulting navigation that would occur if we were to test with normal form submission.
This commit is contained in:
parent
36302388a3
commit
94c67c364d
Notes:
sideshowbarker
2024-07-17 02:39:10 +09:00
Author: https://github.com/trflynn89
Commit: 94c67c364d
Pull-request: https://github.com/SerenityOS/serenity/pull/23254
Issue: https://github.com/SerenityOS/serenity/issues/23239
6 changed files with 89 additions and 13 deletions
|
@ -104,6 +104,12 @@ public:
|
|||
unsigned size() const;
|
||||
WebIDL::ExceptionOr<void> set_size(unsigned value);
|
||||
|
||||
struct SelectedCoordinate {
|
||||
double x { 0.0 };
|
||||
double y { 0.0 };
|
||||
};
|
||||
SelectedCoordinate selected_coordinate() const { return m_selected_coordinate; }
|
||||
|
||||
JS::Object* value_as_date() const;
|
||||
WebIDL::ExceptionOr<void> set_value_as_date(Optional<JS::Handle<JS::Object>> const&);
|
||||
|
||||
|
@ -252,6 +258,7 @@ private:
|
|||
|
||||
JS::GCPtr<DecodedImageData> image_data() const;
|
||||
JS::GCPtr<SharedImageRequest> m_image_request;
|
||||
SelectedCoordinate m_selected_coordinate;
|
||||
|
||||
Optional<DOM::DocumentLoadEventDelayer> m_load_event_delayer;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue