mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-08 05:27:14 +09:00
LibWeb: Remove reference counting for CSS::StyleProperties
`AK::CopyOnWrite` already does reference counting, so there is no need to do it again.
This commit is contained in:
parent
e636f3976d
commit
07cd7d479f
Notes:
github-actions[bot]
2024-10-27 12:27:19 +00:00
Author: https://github.com/yyny
Commit: 07cd7d479f
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1980
125 changed files with 207 additions and 216 deletions
|
@ -98,7 +98,7 @@ JS::NonnullGCPtr<ValidityState const> HTMLInputElement::validity() const
|
|||
return vm.heap().allocate<ValidityState>(realm, realm);
|
||||
}
|
||||
|
||||
JS::GCPtr<Layout::Node> HTMLInputElement::create_layout_node(NonnullRefPtr<CSS::StyleProperties> style)
|
||||
JS::GCPtr<Layout::Node> HTMLInputElement::create_layout_node(CSS::StyleProperties style)
|
||||
{
|
||||
if (type_state() == TypeAttributeState::Hidden)
|
||||
return nullptr;
|
||||
|
@ -113,8 +113,8 @@ JS::GCPtr<Layout::Node> HTMLInputElement::create_layout_node(NonnullRefPtr<CSS::
|
|||
// This specification introduces the appearance property to provide some control over this behavior.
|
||||
// In particular, using appearance: none allows authors to suppress the native appearance of widgets,
|
||||
// giving them a primitive appearance where CSS can be used to restyle them.
|
||||
if (style->appearance() == CSS::Appearance::None) {
|
||||
return Element::create_layout_node_for_display_type(document(), style->display(), style, this);
|
||||
if (style.appearance() == CSS::Appearance::None) {
|
||||
return Element::create_layout_node_for_display_type(document(), style.display(), style, this);
|
||||
}
|
||||
|
||||
if (type_state() == TypeAttributeState::SubmitButton || type_state() == TypeAttributeState::Button || type_state() == TypeAttributeState::ResetButton)
|
||||
|
@ -126,7 +126,7 @@ JS::GCPtr<Layout::Node> HTMLInputElement::create_layout_node(NonnullRefPtr<CSS::
|
|||
if (type_state() == TypeAttributeState::RadioButton)
|
||||
return heap().allocate_without_realm<Layout::RadioButton>(document(), *this, move(style));
|
||||
|
||||
return Element::create_layout_node_for_display_type(document(), style->display(), style, this);
|
||||
return Element::create_layout_node_for_display_type(document(), style.display(), style, this);
|
||||
}
|
||||
|
||||
void HTMLInputElement::adjust_computed_style(CSS::StyleProperties& style)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue