1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 02:57:42 +00:00

LibWeb: Rename CSS::StyleResolver => StyleComputer

Resolved style is a spec concept that refers to the weird mix of
computed style and used style reflected by getComputedStyle().

The purpose of this class is to produce the *computed* style for a given
element, so let's call it StyleComputer.
This commit is contained in:
Andreas Kling 2021-09-24 13:49:57 +02:00
parent 3dc6f0bc47
commit f8dd3e14ba
22 changed files with 59 additions and 59 deletions

View file

@ -103,7 +103,7 @@ bool Element::has_class(const FlyString& class_name, CaseSensitivity case_sensit
RefPtr<Layout::Node> Element::create_layout_node()
{
auto style = document().style_resolver().resolve_style(*this);
auto style = document().style_computer().compute_style(*this);
const_cast<Element&>(*this).m_specified_css_values = style;
auto display = style->display();
@ -203,7 +203,7 @@ void Element::recompute_style()
set_needs_style_update(false);
VERIFY(parent());
auto old_specified_css_values = m_specified_css_values;
auto new_specified_css_values = document().style_resolver().resolve_style(*this);
auto new_specified_css_values = document().style_computer().compute_style(*this);
m_specified_css_values = new_specified_css_values;
if (!layout_node()) {
if (new_specified_css_values->display() == CSS::Display::None)