mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-07 21:59:54 +00:00
LibWeb: Use WindowProxy instead of Window in UI Events IDL
I believe this is an error in the UI Events spec, and it should be
updated to match the HTML spec (which uses WindowProxy everywhere).
This fixes a bunch of issues already covered by existing WPT tests.
Spec bug: https://github.com/w3c/uievents/issues/388
Note that WebKit has been using WindowProxy instead of Window in
UI Events IDL since 2018:
816158b4aa
This commit is contained in:
parent
5bcba896c2
commit
3e8c8b185e
Notes:
github-actions[bot]
2024-11-17 23:00:48 +00:00
Author: https://github.com/awesomekling
Commit: 3e8c8b185e
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2406
20 changed files with 32 additions and 32 deletions
|
|
@ -13,7 +13,7 @@
|
|||
namespace Web::UIEvents {
|
||||
|
||||
struct UIEventInit : public DOM::EventInit {
|
||||
GC::Ptr<HTML::Window> view;
|
||||
GC::Ptr<HTML::WindowProxy> view;
|
||||
int detail { 0 };
|
||||
};
|
||||
|
||||
|
|
@ -27,11 +27,11 @@ public:
|
|||
|
||||
virtual ~UIEvent() override;
|
||||
|
||||
HTML::Window const* view() const { return m_view.ptr(); }
|
||||
GC::Ptr<HTML::WindowProxy> const view() const { return m_view; }
|
||||
int detail() const { return m_detail; }
|
||||
virtual u32 which() const { return 0; }
|
||||
|
||||
void init_ui_event(String const& type, bool bubbles, bool cancelable, HTML::Window* view, int detail)
|
||||
void init_ui_event(String const& type, bool bubbles, bool cancelable, GC::Ptr<HTML::WindowProxy> view, int detail)
|
||||
{
|
||||
// Initializes attributes of an UIEvent object. This method has the same behavior as initEvent().
|
||||
|
||||
|
|
@ -54,7 +54,7 @@ protected:
|
|||
virtual void initialize(JS::Realm&) override;
|
||||
virtual void visit_edges(Cell::Visitor&) override;
|
||||
|
||||
GC::Ptr<HTML::Window> m_view;
|
||||
GC::Ptr<HTML::WindowProxy> m_view;
|
||||
int m_detail { 0 };
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue