From b3df222e52fc437287272984c72dc723d3779c5b Mon Sep 17 00:00:00 2001 From: sin-ack Date: Tue, 15 Mar 2022 00:50:19 +0000 Subject: [PATCH] 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. :^) --- Userland/Libraries/LibWeb/HTML/HTMLElement.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Userland/Libraries/LibWeb/HTML/HTMLElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLElement.cpp index 23c3f7fe9a..33e7e83b09 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLElement.cpp +++ b/Userland/Libraries/LibWeb/HTML/HTMLElement.cpp @@ -4,7 +4,6 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#include "AK/ReverseIterator.h" #include #include #include @@ -25,6 +24,7 @@ #include #include #include +#include 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);