mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-11 18:50:50 +00:00
LibWeb: Begin implementing the WebDriver Input State and Input Source
These concepts are rather tightly coupled. This implements the types and AOs needed to handle the Perform Actions endoint.
This commit is contained in:
parent
94c243acd6
commit
0c98c7637e
Notes:
github-actions[bot]
2024-10-01 09:03:37 +00:00
Author: https://github.com/trflynn89
Commit: 0c98c7637e
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1566
6 changed files with 379 additions and 0 deletions
35
Userland/Libraries/LibWeb/WebDriver/InputState.h
Normal file
35
Userland/Libraries/LibWeb/WebDriver/InputState.h
Normal file
|
@ -0,0 +1,35 @@
|
|||
/*
|
||||
* Copyright (c) 2024, Tim Flynn <trflynn89@ladybird.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <AK/HashMap.h>
|
||||
#include <AK/String.h>
|
||||
#include <AK/Vector.h>
|
||||
#include <LibWeb/Forward.h>
|
||||
#include <LibWeb/WebDriver/InputSource.h>
|
||||
|
||||
namespace Web::WebDriver {
|
||||
|
||||
// https://w3c.github.io/webdriver/#dfn-input-state
|
||||
struct InputState {
|
||||
InputState();
|
||||
~InputState();
|
||||
|
||||
// https://w3c.github.io/webdriver/#dfn-input-state-map
|
||||
HashMap<String, InputSource> input_state_map;
|
||||
|
||||
// https://w3c.github.io/webdriver/#dfn-input-cancel-list
|
||||
Vector<ActionObject> input_cancel_list;
|
||||
|
||||
// https://w3c.github.io/webdriver/#dfn-actions-queue
|
||||
Vector<String> actions_queue;
|
||||
};
|
||||
|
||||
InputState& get_input_state(HTML::BrowsingContext&);
|
||||
void reset_input_state(HTML::BrowsingContext&);
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue