mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 20:59:16 +00:00
LibWeb: Fire a UIEvents::MouseEvent for HTMLElement.click()
This still is not perfectly correct but it's enough to trigger the activation behavior of elements and gain us a point on Acid3. :^)
This commit is contained in:
parent
29583104d2
commit
b3df222e52
Notes:
sideshowbarker
2024-07-17 17:20:45 +09:00
Author: https://github.com/sin-ack
Commit: b3df222e52
Pull-request: https://github.com/SerenityOS/serenity/pull/13052
Reviewed-by: https://github.com/Lubrsi
Reviewed-by: https://github.com/awesomekling
Reviewed-by: https://github.com/linusg ✅
Reviewed-by: https://github.com/trflynn89
1 changed files with 2 additions and 2 deletions
|
@ -4,7 +4,6 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include "AK/ReverseIterator.h"
|
||||
#include <AK/StringBuilder.h>
|
||||
#include <LibJS/Interpreter.h>
|
||||
#include <LibJS/Parser.h>
|
||||
|
@ -25,6 +24,7 @@
|
|||
#include <LibWeb/Painting/PaintableBox.h>
|
||||
#include <LibWeb/UIEvents/EventNames.h>
|
||||
#include <LibWeb/UIEvents/FocusEvent.h>
|
||||
#include <LibWeb/UIEvents/MouseEvent.h>
|
||||
|
||||
namespace Web::HTML {
|
||||
|
||||
|
@ -396,7 +396,7 @@ bool HTMLElement::fire_a_synthetic_pointer_event(FlyString const& type, DOM::Ele
|
|||
// 1. Let event be the result of creating an event using PointerEvent.
|
||||
// 2. Initialize event's type attribute to e.
|
||||
// FIXME: Actually create a PointerEvent!
|
||||
auto event = DOM::Event::create(type);
|
||||
auto event = UIEvents::MouseEvent::create(type, 0.0, 0.0, 0.0, 0.0);
|
||||
|
||||
// 3. Initialize event's bubbles and cancelable attributes to true.
|
||||
event->set_bubbles(true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue