mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 05:39:11 +00:00
LibWeb: Remove unnecessary ErrorOr<> from StyleComputer
All of this error propogation came from a single call to HashMap::try_ensure_capacity! As part of the ongoing effort to ignore small allocation failures, lets just assert this works. This has the nice side-effect of propogating out to a few other classes.
This commit is contained in:
parent
a511f1ef85
commit
1ca31e0dc1
Notes:
sideshowbarker
2024-07-16 21:39:23 +09:00
Author: https://github.com/mattco98
Commit: 1ca31e0dc1
Pull-request: https://github.com/SerenityOS/serenity/pull/23486
Issue: https://github.com/SerenityOS/serenity/issues/23471
Issue: https://github.com/SerenityOS/serenity/issues/23473
Reviewed-by: https://github.com/awesomekling
7 changed files with 45 additions and 65 deletions
|
@ -534,12 +534,7 @@ Optional<StyleProperty> ResolvedCSSStyleDeclaration::property(PropertyID propert
|
|||
}
|
||||
|
||||
if (!m_element->layout_node()) {
|
||||
auto style_or_error = m_element->document().style_computer().compute_style(const_cast<DOM::Element&>(*m_element));
|
||||
if (style_or_error.is_error()) {
|
||||
dbgln("ResolvedCSSStyleDeclaration::property style computer failed");
|
||||
return {};
|
||||
}
|
||||
auto style = style_or_error.release_value();
|
||||
auto style = m_element->document().style_computer().compute_style(const_cast<DOM::Element&>(*m_element));
|
||||
|
||||
// FIXME: This is a stopgap until we implement shorthand -> longhand conversion.
|
||||
auto value = style->maybe_null_property(property_id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue