mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-02 15:46:33 +00:00
LibWeb: Add HTML::EventNames and UIEvents::EventNames
This commit is contained in:
parent
e68348298f
commit
9950270808
Notes:
sideshowbarker
2024-07-19 01:18:34 +09:00
Author: https://github.com/Lubrsi
Commit: 9950270808
Pull-request: https://github.com/SerenityOS/serenity/pull/4131
Reviewed-by: https://github.com/awesomekling
15 changed files with 271 additions and 19 deletions
|
@ -24,6 +24,8 @@
|
|||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <LibWeb/HTML/EventNames.h>
|
||||
#include <LibWeb/UIEvents/EventNames.h>
|
||||
#include <LibWeb/UIEvents/MouseEvent.h>
|
||||
|
||||
namespace Web::UIEvents {
|
||||
|
@ -42,7 +44,7 @@ MouseEvent::~MouseEvent()
|
|||
|
||||
void MouseEvent::set_event_characteristics()
|
||||
{
|
||||
if (type() == "mousedown" || type() == "mousemove" || type() == "mouseout" || type() == "mouseover" || type() == "mouseup" || type() == "click") {
|
||||
if (type().is_one_of(EventNames::mousedown, EventNames::mousemove, EventNames::mouseout, EventNames::mouseover, EventNames::mouseup, HTML::EventNames::click)) {
|
||||
set_bubbles(true);
|
||||
set_cancelable(true);
|
||||
set_composed(true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue