1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 05:47:34 +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

@ -18,7 +18,7 @@ SVGGElement::SVGGElement(DOM::Document& document, QualifiedName qualified_name)
RefPtr<Layout::Node> SVGGElement::create_layout_node()
{
auto style = document().style_resolver().resolve_style(*this);
auto style = document().style_computer().compute_style(*this);
if (style->display() == CSS::Display::None)
return nullptr;
return adopt_ref(*new Layout::SVGGraphicsBox(document(), *this, move(style)));

View file

@ -445,7 +445,7 @@ SVGPathElement::SVGPathElement(DOM::Document& document, QualifiedName qualified_
RefPtr<Layout::Node> SVGPathElement::create_layout_node()
{
auto style = document().style_resolver().resolve_style(*this);
auto style = document().style_computer().compute_style(*this);
if (style->display() == CSS::Display::None)
return nullptr;
return adopt_ref(*new Layout::SVGPathBox(document(), *this, move(style)));

View file

@ -5,7 +5,7 @@
*/
#include <LibGfx/Painter.h>
#include <LibWeb/CSS/StyleResolver.h>
#include <LibWeb/CSS/StyleComputer.h>
#include <LibWeb/DOM/Document.h>
#include <LibWeb/DOM/Event.h>
#include <LibWeb/Layout/SVGSVGBox.h>
@ -21,7 +21,7 @@ SVGSVGElement::SVGSVGElement(DOM::Document& document, QualifiedName qualified_na
RefPtr<Layout::Node> SVGSVGElement::create_layout_node()
{
auto style = document().style_resolver().resolve_style(*this);
auto style = document().style_computer().compute_style(*this);
if (style->display() == CSS::Display::None)
return nullptr;
return adopt_ref(*new Layout::SVGSVGBox(document(), *this, move(style)));