mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-11 03:56:16 +00:00
LibWeb: Make ARIAMixin::to_element return a reference
Let's avoid confusion on whether this method can return null. It can't. This also adds a non-const override, as that will be needed soon.
This commit is contained in:
parent
88b41d4d76
commit
a7b1f2c800
Notes:
github-actions[bot]
2025-04-25 00:21:34 +00:00
Author: https://github.com/trflynn89
Commit: a7b1f2c800
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4460
Reviewed-by: https://github.com/tcl3 ✅
3 changed files with 18 additions and 16 deletions
|
@ -28,7 +28,8 @@ public:
|
|||
// https://www.w3.org/TR/html-aria/#docconformance
|
||||
virtual Optional<Role> default_role() const { return {}; }
|
||||
|
||||
virtual DOM::Element const* to_element() const { return {}; }
|
||||
virtual DOM::Element& to_element() = 0;
|
||||
virtual DOM::Element const& to_element() const = 0;
|
||||
|
||||
Optional<Role> role_from_role_attribute_value() const;
|
||||
Optional<Role> role_or_default() const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue