mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 20:59:16 +00:00
LibHTML: Make the Element::computed_style() return NonnullRefPtr
Because Element::computed_style() can never retrun null we can return NonnullRefPtr instead of RefPtr.
This commit is contained in:
parent
99cf8e36b1
commit
0d402a074b
Notes:
sideshowbarker
2024-07-19 10:20:00 +09:00
Author: https://github.com/Matrix89
Commit: 0d402a074b
Pull-request: https://github.com/SerenityOS/serenity/pull/1006
Reviewed-by: https://github.com/awesomekling
1 changed files with 1 additions and 1 deletions
|
@ -163,7 +163,7 @@ void Element::recompute_style()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
RefPtr<StyleProperties> Element::computed_style()
|
NonnullRefPtr<StyleProperties> Element::computed_style()
|
||||||
{
|
{
|
||||||
auto properties = m_resolved_style->clone();
|
auto properties = m_resolved_style->clone();
|
||||||
if (layout_node() && layout_node()->has_style()) {
|
if (layout_node() && layout_node()->has_style()) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue