mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 19:59:17 +00:00
HTML: Add const qualified form_associated_element_to_html_element
Put the const cast in a common location to make the helper more convenient to use.
This commit is contained in:
parent
ad32227c83
commit
28ed8e5d0f
Notes:
github-actions[bot]
2024-08-01 10:18:02 +00:00
Author: https://github.com/shannonbooth
Commit: 28ed8e5d0f
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/876
2 changed files with 2 additions and 1 deletions
|
@ -29,7 +29,7 @@ void FormAssociatedElement::set_form(HTMLFormElement* form)
|
|||
bool FormAssociatedElement::enabled() const
|
||||
{
|
||||
// https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#concept-fe-disabled
|
||||
auto const& html_element = const_cast<FormAssociatedElement&>(*this).form_associated_element_to_html_element();
|
||||
auto const& html_element = form_associated_element_to_html_element();
|
||||
|
||||
// A form control is disabled if any of the following conditions are met:
|
||||
// 1. The element is a button, input, select, textarea, or form-associated custom element, and the disabled attribute is specified on this element (regardless of its value).
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue