mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 05:18:12 +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
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