mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-16 14:02:00 +00:00
LibWeb: Make Node::parent_element return GC::Ptr
This is useful for people like myself who run with debug mode to more reliably get stacktraces without spinning up a debugger.
This commit is contained in:
parent
a14481ee05
commit
3e17b1c9ae
Notes:
github-actions[bot]
2025-04-18 09:08:36 +00:00
Author: https://github.com/shannonbooth
Commit: 3e17b1c9ae
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4393
18 changed files with 48 additions and 54 deletions
|
@ -32,8 +32,8 @@ HTMLFormElement* HTMLLegendElement::form()
|
|||
{
|
||||
// The form IDL attribute's behavior depends on whether the legend element is in a fieldset element or not.
|
||||
// If the legend has a fieldset element as its parent, then the form IDL attribute must return the same value as the form IDL attribute on that fieldset element.
|
||||
if (is<HTML::HTMLFieldSetElement>(parent_element())) {
|
||||
return as<HTML::HTMLFieldSetElement>(parent_element())->form();
|
||||
if (auto* field_set = as_if<HTML::HTMLFieldSetElement>(parent_element().ptr())) {
|
||||
return field_set->form();
|
||||
}
|
||||
|
||||
// Otherwise, it must return null.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue