summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Userland/Libraries/LibWeb/CMakeLists.txt2
-rw-r--r--Userland/Libraries/LibWeb/CSS/ResolvedCSSStyleDeclaration.cpp4
-rw-r--r--Userland/Libraries/LibWeb/CSS/StyleComputer.cpp (renamed from Userland/Libraries/LibWeb/CSS/StyleResolver.cpp)32
-rw-r--r--Userland/Libraries/LibWeb/CSS/StyleComputer.h (renamed from Userland/Libraries/LibWeb/CSS/StyleResolver.h)8
-rw-r--r--Userland/Libraries/LibWeb/CSS/StyleInvalidator.cpp12
-rw-r--r--Userland/Libraries/LibWeb/CSS/StyleInvalidator.h2
-rw-r--r--Userland/Libraries/LibWeb/CSS/StyleProperties.h2
-rw-r--r--Userland/Libraries/LibWeb/DOM/Document.cpp6
-rw-r--r--Userland/Libraries/LibWeb/DOM/Document.h8
-rw-r--r--Userland/Libraries/LibWeb/DOM/Element.cpp4
-rw-r--r--Userland/Libraries/LibWeb/DOM/Element.h8
-rw-r--r--Userland/Libraries/LibWeb/Forward.h2
-rw-r--r--Userland/Libraries/LibWeb/HTML/HTMLBRElement.cpp2
-rw-r--r--Userland/Libraries/LibWeb/HTML/HTMLCanvasElement.cpp4
-rw-r--r--Userland/Libraries/LibWeb/HTML/HTMLIFrameElement.cpp2
-rw-r--r--Userland/Libraries/LibWeb/HTML/HTMLImageElement.cpp4
-rw-r--r--Userland/Libraries/LibWeb/HTML/HTMLInputElement.cpp2
-rw-r--r--Userland/Libraries/LibWeb/HTML/HTMLLabelElement.cpp2
-rw-r--r--Userland/Libraries/LibWeb/HTML/HTMLObjectElement.cpp4
-rw-r--r--Userland/Libraries/LibWeb/SVG/SVGGElement.cpp2
-rw-r--r--Userland/Libraries/LibWeb/SVG/SVGPathElement.cpp2
-rw-r--r--Userland/Libraries/LibWeb/SVG/SVGSVGElement.cpp4
22 files changed, 59 insertions, 59 deletions
diff --git a/Userland/Libraries/LibWeb/CMakeLists.txt b/Userland/Libraries/LibWeb/CMakeLists.txt
index 358c4a1ff3..5a6d89af48 100644
--- a/Userland/Libraries/LibWeb/CMakeLists.txt
+++ b/Userland/Libraries/LibWeb/CMakeLists.txt
@@ -31,9 +31,9 @@ set(SOURCES
CSS/Screen.cpp
CSS/Selector.cpp
CSS/SelectorEngine.cpp
+ CSS/StyleComputer.cpp
CSS/StyleInvalidator.cpp
CSS/StyleProperties.cpp
- CSS/StyleResolver.cpp
CSS/StyleSheet.cpp
CSS/StyleSheetList.cpp
CSS/StyleValue.cpp
diff --git a/Userland/Libraries/LibWeb/CSS/ResolvedCSSStyleDeclaration.cpp b/Userland/Libraries/LibWeb/CSS/ResolvedCSSStyleDeclaration.cpp
index 03d0b62a41..30f79e8df8 100644
--- a/Userland/Libraries/LibWeb/CSS/ResolvedCSSStyleDeclaration.cpp
+++ b/Userland/Libraries/LibWeb/CSS/ResolvedCSSStyleDeclaration.cpp
@@ -7,7 +7,7 @@
#include <AK/NonnullRefPtr.h>
#include <LibWeb/CSS/ResolvedCSSStyleDeclaration.h>
-#include <LibWeb/CSS/StyleResolver.h>
+#include <LibWeb/CSS/StyleComputer.h>
#include <LibWeb/DOM/Document.h>
#include <LibWeb/DOM/Element.h>
@@ -555,7 +555,7 @@ Optional<StyleProperty> ResolvedCSSStyleDeclaration::property(PropertyID propert
const_cast<DOM::Document&>(m_element->document()).ensure_layout();
if (!m_element->layout_node()) {
- auto style = m_element->document().style_resolver().resolve_style(const_cast<DOM::Element&>(*m_element));
+ auto style = m_element->document().style_computer().compute_style(const_cast<DOM::Element&>(*m_element));
if (auto maybe_property = style->property(property_id); maybe_property.has_value()) {
return StyleProperty {
.property_id = property_id,
diff --git a/Userland/Libraries/LibWeb/CSS/StyleResolver.cpp b/Userland/Libraries/LibWeb/CSS/StyleComputer.cpp
index 5c7217f6b4..aa88f855fd 100644
--- a/Userland/Libraries/LibWeb/CSS/StyleResolver.cpp
+++ b/Userland/Libraries/LibWeb/CSS/StyleComputer.cpp
@@ -12,7 +12,7 @@
#include <LibWeb/CSS/CSSStyleRule.h>
#include <LibWeb/CSS/Parser/Parser.h>
#include <LibWeb/CSS/SelectorEngine.h>
-#include <LibWeb/CSS/StyleResolver.h>
+#include <LibWeb/CSS/StyleComputer.h>
#include <LibWeb/CSS/StyleSheet.h>
#include <LibWeb/DOM/Document.h>
#include <LibWeb/DOM/Element.h>
@@ -24,12 +24,12 @@
namespace Web::CSS {
-StyleResolver::StyleResolver(DOM::Document& document)
+StyleComputer::StyleComputer(DOM::Document& document)
: m_document(document)
{
}
-StyleResolver::~StyleResolver()
+StyleComputer::~StyleComputer()
{
}
@@ -56,7 +56,7 @@ static StyleSheet& quirks_mode_stylesheet()
}
template<typename Callback>
-void StyleResolver::for_each_stylesheet(CascadeOrigin cascade_origin, Callback callback) const
+void StyleComputer::for_each_stylesheet(CascadeOrigin cascade_origin, Callback callback) const
{
if (cascade_origin == CascadeOrigin::Any || cascade_origin == CascadeOrigin::UserAgent) {
callback(default_stylesheet());
@@ -70,7 +70,7 @@ void StyleResolver::for_each_stylesheet(CascadeOrigin cascade_origin, Callback c
}
}
-Vector<MatchingRule> StyleResolver::collect_matching_rules(DOM::Element const& element, CascadeOrigin declaration_type) const
+Vector<MatchingRule> StyleComputer::collect_matching_rules(DOM::Element const& element, CascadeOrigin declaration_type) const
{
Vector<MatchingRule> matching_rules;
@@ -94,7 +94,7 @@ Vector<MatchingRule> StyleResolver::collect_matching_rules(DOM::Element const& e
return matching_rules;
}
-void StyleResolver::sort_matching_rules(Vector<MatchingRule>& matching_rules) const
+void StyleComputer::sort_matching_rules(Vector<MatchingRule>& matching_rules) const
{
quick_sort(matching_rules, [&](MatchingRule& a, MatchingRule& b) {
auto& a_selector = a.rule->selectors()[a.selector_index];
@@ -473,7 +473,7 @@ static void set_property_expanding_shorthands(StyleProperties& style, CSS::Prope
style.set_property(property_id, value);
}
-StyleResolver::CustomPropertyResolutionTuple StyleResolver::resolve_custom_property_with_specificity(DOM::Element& element, String const& custom_property_name) const
+StyleComputer::CustomPropertyResolutionTuple StyleComputer::resolve_custom_property_with_specificity(DOM::Element& element, String const& custom_property_name) const
{
if (auto maybe_property = element.resolve_custom_property(custom_property_name); maybe_property.has_value())
return maybe_property.value();
@@ -501,7 +501,7 @@ StyleResolver::CustomPropertyResolutionTuple StyleResolver::resolve_custom_prope
return parent_resolved;
}
-Optional<StyleProperty> StyleResolver::resolve_custom_property(DOM::Element& element, String const& custom_property_name) const
+Optional<StyleProperty> StyleComputer::resolve_custom_property(DOM::Element& element, String const& custom_property_name) const
{
auto resolved_with_specificity = resolve_custom_property_with_specificity(element, custom_property_name);
@@ -513,7 +513,7 @@ struct MatchingDeclarations {
Vector<MatchingRule> author_rules;
};
-void StyleResolver::cascade_declarations(StyleProperties& style, DOM::Element& element, Vector<MatchingRule> const& matching_rules, CascadeOrigin cascade_origin, bool important) const
+void StyleComputer::cascade_declarations(StyleProperties& style, DOM::Element& element, Vector<MatchingRule> const& matching_rules, CascadeOrigin cascade_origin, bool important) const
{
for (auto& match : matching_rules) {
for (auto& property : verify_cast<PropertyOwningCSSStyleDeclaration>(match.rule->declaration()).properties()) {
@@ -543,7 +543,7 @@ void StyleResolver::cascade_declarations(StyleProperties& style, DOM::Element& e
}
// https://drafts.csswg.org/css-cascade/#cascading
-void StyleResolver::compute_cascaded_values(StyleProperties& style, DOM::Element& element) const
+void StyleComputer::compute_cascaded_values(StyleProperties& style, DOM::Element& element) const
{
// First, we collect all the CSS rules whose selectors match `element`:
MatchingRuleSet matching_rule_set;
@@ -596,7 +596,7 @@ static NonnullRefPtr<StyleValue> get_inherit_value(CSS::PropertyID property_id,
return *it->value;
};
-void StyleResolver::compute_defaulted_property_value(StyleProperties& style, DOM::Element const* element, CSS::PropertyID property_id) const
+void StyleComputer::compute_defaulted_property_value(StyleProperties& style, DOM::Element const* element, CSS::PropertyID property_id) const
{
// FIXME: If we don't know the correct initial value for a property, we fall back to InitialStyleValue.
@@ -621,7 +621,7 @@ void StyleResolver::compute_defaulted_property_value(StyleProperties& style, DOM
}
// https://drafts.csswg.org/css-cascade/#defaulting
-void StyleResolver::compute_defaulted_values(StyleProperties& style, DOM::Element const* element) const
+void StyleComputer::compute_defaulted_values(StyleProperties& style, DOM::Element const* element) const
{
// Walk the list of all known CSS properties and:
// - Add them to `style` if they are missing.
@@ -632,7 +632,7 @@ void StyleResolver::compute_defaulted_values(StyleProperties& style, DOM::Elemen
}
}
-void StyleResolver::compute_font(StyleProperties& style, DOM::Element const* element) const
+void StyleComputer::compute_font(StyleProperties& style, DOM::Element const* element) const
{
// To compute the font, first ensure that we've defaulted the relevant CSS font properties.
// FIXME: This should be more sophisticated.
@@ -810,7 +810,7 @@ void StyleResolver::compute_font(StyleProperties& style, DOM::Element const* ele
style.set_computed_font(found_font.release_nonnull());
}
-void StyleResolver::absolutize_values(StyleProperties& style, DOM::Element const*) const
+void StyleComputer::absolutize_values(StyleProperties& style, DOM::Element const*) const
{
auto viewport_rect = document().browsing_context()->viewport_rect();
auto font_metrics = style.computed_font().metrics('M');
@@ -827,7 +827,7 @@ void StyleResolver::absolutize_values(StyleProperties& style, DOM::Element const
}
}
-NonnullRefPtr<StyleProperties> StyleResolver::create_document_style() const
+NonnullRefPtr<StyleProperties> StyleComputer::create_document_style() const
{
auto style = StyleProperties::create();
compute_font(style, nullptr);
@@ -836,7 +836,7 @@ NonnullRefPtr<StyleProperties> StyleResolver::create_document_style() const
return style;
}
-NonnullRefPtr<StyleProperties> StyleResolver::resolve_style(DOM::Element& element) const
+NonnullRefPtr<StyleProperties> StyleComputer::compute_style(DOM::Element& element) const
{
auto style = StyleProperties::create();
// 1. Perform the cascade. This produces the "specified style"
diff --git a/Userland/Libraries/LibWeb/CSS/StyleResolver.h b/Userland/Libraries/LibWeb/CSS/StyleComputer.h
index b654d70df7..a301b243c0 100644
--- a/Userland/Libraries/LibWeb/CSS/StyleResolver.h
+++ b/Userland/Libraries/LibWeb/CSS/StyleComputer.h
@@ -22,16 +22,16 @@ struct MatchingRule {
u32 specificity { 0 };
};
-class StyleResolver {
+class StyleComputer {
public:
- explicit StyleResolver(DOM::Document&);
- ~StyleResolver();
+ explicit StyleComputer(DOM::Document&);
+ ~StyleComputer();
DOM::Document& document() { return m_document; }
DOM::Document const& document() const { return m_document; }
NonnullRefPtr<StyleProperties> create_document_style() const;
- NonnullRefPtr<StyleProperties> resolve_style(DOM::Element&) const;
+ NonnullRefPtr<StyleProperties> compute_style(DOM::Element&) const;
// https://www.w3.org/TR/css-cascade/#origin
enum class CascadeOrigin {
diff --git a/Userland/Libraries/LibWeb/CSS/StyleInvalidator.cpp b/Userland/Libraries/LibWeb/CSS/StyleInvalidator.cpp
index 315c780478..0fc2d4ffcd 100644
--- a/Userland/Libraries/LibWeb/CSS/StyleInvalidator.cpp
+++ b/Userland/Libraries/LibWeb/CSS/StyleInvalidator.cpp
@@ -16,9 +16,9 @@ StyleInvalidator::StyleInvalidator(DOM::Document& document)
{
if (!m_document.should_invalidate_styles_on_attribute_changes())
return;
- auto& style_resolver = m_document.style_resolver();
+ auto& style_computer = m_document.style_computer();
m_document.for_each_in_inclusive_subtree_of_type<DOM::Element>([&](auto& element) {
- m_elements_and_matching_rules_before.set(&element, style_resolver.collect_matching_rules(element));
+ m_elements_and_matching_rules_before.set(&element, style_computer.collect_matching_rules(element));
return IterationDecision::Continue;
});
}
@@ -27,7 +27,7 @@ StyleInvalidator::~StyleInvalidator()
{
if (!m_document.should_invalidate_styles_on_attribute_changes())
return;
- auto& style_resolver = m_document.style_resolver();
+ auto& style_computer = m_document.style_computer();
m_document.for_each_in_inclusive_subtree_of_type<DOM::Element>([&](auto& element) {
auto maybe_matching_rules_before = m_elements_and_matching_rules_before.get(&element);
if (!maybe_matching_rules_before.has_value()) {
@@ -35,13 +35,13 @@ StyleInvalidator::~StyleInvalidator()
return IterationDecision::Continue;
}
auto& matching_rules_before = maybe_matching_rules_before.value();
- auto matching_rules_after = style_resolver.collect_matching_rules(element);
+ auto matching_rules_after = style_computer.collect_matching_rules(element);
if (matching_rules_before.size() != matching_rules_after.size()) {
element.set_needs_style_update(true);
return IterationDecision::Continue;
}
- style_resolver.sort_matching_rules(matching_rules_before);
- style_resolver.sort_matching_rules(matching_rules_after);
+ style_computer.sort_matching_rules(matching_rules_before);
+ style_computer.sort_matching_rules(matching_rules_after);
for (size_t i = 0; i < matching_rules_before.size(); ++i) {
if (matching_rules_before[i].rule != matching_rules_after[i].rule) {
element.set_needs_style_update(true);
diff --git a/Userland/Libraries/LibWeb/CSS/StyleInvalidator.h b/Userland/Libraries/LibWeb/CSS/StyleInvalidator.h
index 6371a3ebc2..c213d39813 100644
--- a/Userland/Libraries/LibWeb/CSS/StyleInvalidator.h
+++ b/Userland/Libraries/LibWeb/CSS/StyleInvalidator.h
@@ -7,7 +7,7 @@
#pragma once
#include <AK/HashMap.h>
-#include <LibWeb/CSS/StyleResolver.h>
+#include <LibWeb/CSS/StyleComputer.h>
#include <LibWeb/DOM/Document.h>
#include <LibWeb/DOM/Element.h>
diff --git a/Userland/Libraries/LibWeb/CSS/StyleProperties.h b/Userland/Libraries/LibWeb/CSS/StyleProperties.h
index c3bc84807d..36e1e26d56 100644
--- a/Userland/Libraries/LibWeb/CSS/StyleProperties.h
+++ b/Userland/Libraries/LibWeb/CSS/StyleProperties.h
@@ -91,7 +91,7 @@ public:
static NonnullRefPtr<Gfx::Font> font_fallback(bool monospace, bool bold);
private:
- friend class StyleResolver;
+ friend class StyleComputer;
HashMap<CSS::PropertyID, NonnullRefPtr<StyleValue>> m_property_values;
Optional<CSS::Overflow> overflow(CSS::PropertyID) const;
diff --git a/Userland/Libraries/LibWeb/DOM/Document.cpp b/Userland/Libraries/LibWeb/DOM/Document.cpp
index cb4295322e..b082c76711 100644
--- a/Userland/Libraries/LibWeb/DOM/Document.cpp
+++ b/Userland/Libraries/LibWeb/DOM/Document.cpp
@@ -15,7 +15,7 @@
#include <LibJS/Runtime/FunctionObject.h>
#include <LibWeb/Bindings/MainThreadVM.h>
#include <LibWeb/Bindings/WindowObject.h>
-#include <LibWeb/CSS/StyleResolver.h>
+#include <LibWeb/CSS/StyleComputer.h>
#include <LibWeb/Cookie/ParsedCookie.h>
#include <LibWeb/DOM/Comment.h>
#include <LibWeb/DOM/DOMException.h>
@@ -59,7 +59,7 @@ namespace Web::DOM {
Document::Document(const AK::URL& url)
: ParentNode(*this, NodeType::DOCUMENT_NODE)
- , m_style_resolver(make<CSS::StyleResolver>(*this))
+ , m_style_computer(make<CSS::StyleComputer>(*this))
, m_style_sheets(CSS::StyleSheetList::create(*this))
, m_url(url)
, m_window(Window::create_with_document(*this))
@@ -451,7 +451,7 @@ void Document::update_style()
RefPtr<Layout::Node> Document::create_layout_node()
{
- return adopt_ref(*new Layout::InitialContainingBlock(*this, style_resolver().create_document_style()));
+ return adopt_ref(*new Layout::InitialContainingBlock(*this, style_computer().create_document_style()));
}
void Document::set_link_color(Color color)
diff --git a/Userland/Libraries/LibWeb/DOM/Document.h b/Userland/Libraries/LibWeb/DOM/Document.h
index 28505b270c..07e9f10d1e 100644
--- a/Userland/Libraries/LibWeb/DOM/Document.h
+++ b/Userland/Libraries/LibWeb/DOM/Document.h
@@ -19,7 +19,7 @@
#include <LibWeb/Bindings/ScriptExecutionContext.h>
#include <LibWeb/Bindings/WindowObject.h>
#include <LibWeb/CSS/CSSStyleSheet.h>
-#include <LibWeb/CSS/StyleResolver.h>
+#include <LibWeb/CSS/StyleComputer.h>
#include <LibWeb/CSS/StyleSheetList.h>
#include <LibWeb/Cookie/Cookie.h>
#include <LibWeb/DOM/DOMImplementation.h>
@@ -74,8 +74,8 @@ public:
AK::URL parse_url(String const&) const;
- CSS::StyleResolver& style_resolver() { return *m_style_resolver; }
- const CSS::StyleResolver& style_resolver() const { return *m_style_resolver; }
+ CSS::StyleComputer& style_computer() { return *m_style_computer; }
+ const CSS::StyleComputer& style_computer() const { return *m_style_computer; }
CSS::StyleSheetList& style_sheets() { return *m_style_sheets; }
const CSS::StyleSheetList& style_sheets() const { return *m_style_sheets; }
@@ -314,7 +314,7 @@ private:
unsigned m_referencing_node_count { 0 };
- OwnPtr<CSS::StyleResolver> m_style_resolver;
+ OwnPtr<CSS::StyleComputer> m_style_computer;
RefPtr<CSS::StyleSheetList> m_style_sheets;
RefPtr<Node> m_hovered_node;
RefPtr<Node> m_inspected_node;
diff --git a/Userland/Libraries/LibWeb/DOM/Element.cpp b/Userland/Libraries/LibWeb/DOM/Element.cpp
index a81fe67d3f..07f7b40251 100644
--- a/Userland/Libraries/LibWeb/DOM/Element.cpp
+++ b/Userland/Libraries/LibWeb/DOM/Element.cpp
@@ -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)
diff --git a/Userland/Libraries/LibWeb/DOM/Element.h b/Userland/Libraries/LibWeb/DOM/Element.h
index 10bb8b6f57..a1f36de618 100644
--- a/Userland/Libraries/LibWeb/DOM/Element.h
+++ b/Userland/Libraries/LibWeb/DOM/Element.h
@@ -9,7 +9,7 @@
#include <AK/FlyString.h>
#include <AK/String.h>
#include <LibWeb/CSS/CSSStyleDeclaration.h>
-#include <LibWeb/CSS/StyleResolver.h>
+#include <LibWeb/CSS/StyleComputer.h>
#include <LibWeb/DOM/Attribute.h>
#include <LibWeb/DOM/ExceptionOr.h>
#include <LibWeb/DOM/NonDocumentTypeChildNode.h>
@@ -95,11 +95,11 @@ public:
const ShadowRoot* shadow_root() const { return m_shadow_root; }
void set_shadow_root(RefPtr<ShadowRoot>);
- Optional<CSS::StyleResolver::CustomPropertyResolutionTuple> resolve_custom_property(const String& custom_property_name) const
+ Optional<CSS::StyleComputer::CustomPropertyResolutionTuple> resolve_custom_property(const String& custom_property_name) const
{
return m_custom_properties.get(custom_property_name);
}
- void add_custom_property(const String& custom_property_name, CSS::StyleResolver::CustomPropertyResolutionTuple style_property)
+ void add_custom_property(const String& custom_property_name, CSS::StyleComputer::CustomPropertyResolutionTuple style_property)
{
m_custom_properties.set(custom_property_name, style_property);
}
@@ -125,7 +125,7 @@ private:
RefPtr<CSS::CSSStyleDeclaration> m_inline_style;
RefPtr<CSS::StyleProperties> m_specified_css_values;
- HashMap<String, CSS::StyleResolver::CustomPropertyResolutionTuple> m_custom_properties;
+ HashMap<String, CSS::StyleComputer::CustomPropertyResolutionTuple> m_custom_properties;
Vector<FlyString> m_classes;
diff --git a/Userland/Libraries/LibWeb/Forward.h b/Userland/Libraries/LibWeb/Forward.h
index 45635fd526..1690e20646 100644
--- a/Userland/Libraries/LibWeb/Forward.h
+++ b/Userland/Libraries/LibWeb/Forward.h
@@ -26,7 +26,7 @@ class PropertyOwningCSSStyleDeclaration;
class Screen;
class Selector;
class StyleProperties;
-class StyleResolver;
+class StyleComputer;
class StyleSheet;
enum class Display;
diff --git a/Userland/Libraries/LibWeb/HTML/HTMLBRElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLBRElement.cpp
index 015f2462ea..8d35f793eb 100644
--- a/Userland/Libraries/LibWeb/HTML/HTMLBRElement.cpp
+++ b/Userland/Libraries/LibWeb/HTML/HTMLBRElement.cpp
@@ -21,7 +21,7 @@ HTMLBRElement::~HTMLBRElement()
RefPtr<Layout::Node> HTMLBRElement::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::BreakNode(document(), *this, move(style)));
diff --git a/Userland/Libraries/LibWeb/HTML/HTMLCanvasElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLCanvasElement.cpp
index cabbf54f75..0b70f6983b 100644
--- a/Userland/Libraries/LibWeb/HTML/HTMLCanvasElement.cpp
+++ b/Userland/Libraries/LibWeb/HTML/HTMLCanvasElement.cpp
@@ -8,7 +8,7 @@
#include <AK/Checked.h>
#include <LibGfx/Bitmap.h>
#include <LibGfx/PNGWriter.h>
-#include <LibWeb/CSS/StyleResolver.h>
+#include <LibWeb/CSS/StyleComputer.h>
#include <LibWeb/DOM/Document.h>
#include <LibWeb/HTML/CanvasRenderingContext2D.h>
#include <LibWeb/HTML/HTMLCanvasElement.h>
@@ -39,7 +39,7 @@ unsigned HTMLCanvasElement::height() const
RefPtr<Layout::Node> HTMLCanvasElement::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::CanvasBox(document(), *this, move(style)));
diff --git a/Userland/Libraries/LibWeb/HTML/HTMLIFrameElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLIFrameElement.cpp
index 1b5edea58c..8a33217a15 100644
--- a/Userland/Libraries/LibWeb/HTML/HTMLIFrameElement.cpp
+++ b/Userland/Libraries/LibWeb/HTML/HTMLIFrameElement.cpp
@@ -23,7 +23,7 @@ HTMLIFrameElement::~HTMLIFrameElement()
RefPtr<Layout::Node> HTMLIFrameElement::create_layout_node()
{
- auto style = document().style_resolver().resolve_style(*this);
+ auto style = document().style_computer().compute_style(*this);
return adopt_ref(*new Layout::FrameBox(document(), *this, move(style)));
}
diff --git a/Userland/Libraries/LibWeb/HTML/HTMLImageElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLImageElement.cpp
index 3cbcca10b7..14e79b1a87 100644
--- a/Userland/Libraries/LibWeb/HTML/HTMLImageElement.cpp
+++ b/Userland/Libraries/LibWeb/HTML/HTMLImageElement.cpp
@@ -6,7 +6,7 @@
#include <LibGfx/Bitmap.h>
#include <LibWeb/CSS/Parser/Parser.h>
-#include <LibWeb/CSS/StyleResolver.h>
+#include <LibWeb/CSS/StyleComputer.h>
#include <LibWeb/DOM/Document.h>
#include <LibWeb/DOM/Event.h>
#include <LibWeb/HTML/EventNames.h>
@@ -70,7 +70,7 @@ void HTMLImageElement::parse_attribute(const FlyString& name, const String& valu
RefPtr<Layout::Node> HTMLImageElement::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::ImageBox(document(), *this, move(style), m_image_loader));
diff --git a/Userland/Libraries/LibWeb/HTML/HTMLInputElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLInputElement.cpp
index e00ac66856..52d30e5d6b 100644
--- a/Userland/Libraries/LibWeb/HTML/HTMLInputElement.cpp
+++ b/Userland/Libraries/LibWeb/HTML/HTMLInputElement.cpp
@@ -46,7 +46,7 @@ RefPtr<Layout::Node> HTMLInputElement::create_layout_node()
if (type() == "hidden")
return nullptr;
- auto style = document().style_resolver().resolve_style(*this);
+ auto style = document().style_computer().compute_style(*this);
if (style->display() == CSS::Display::None)
return nullptr;
diff --git a/Userland/Libraries/LibWeb/HTML/HTMLLabelElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLLabelElement.cpp
index 316fd8cae6..4907d4ece2 100644
--- a/Userland/Libraries/LibWeb/HTML/HTMLLabelElement.cpp
+++ b/Userland/Libraries/LibWeb/HTML/HTMLLabelElement.cpp
@@ -21,7 +21,7 @@ HTMLLabelElement::~HTMLLabelElement()
RefPtr<Layout::Node> HTMLLabelElement::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;
diff --git a/Userland/Libraries/LibWeb/HTML/HTMLObjectElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLObjectElement.cpp
index 620955ddf8..eea0acc7a1 100644
--- a/Userland/Libraries/LibWeb/HTML/HTMLObjectElement.cpp
+++ b/Userland/Libraries/LibWeb/HTML/HTMLObjectElement.cpp
@@ -5,7 +5,7 @@
*/
#include <LibGfx/Bitmap.h>
-#include <LibWeb/CSS/StyleResolver.h>
+#include <LibWeb/CSS/StyleComputer.h>
#include <LibWeb/DOM/Document.h>
#include <LibWeb/DOM/Event.h>
#include <LibWeb/HTML/HTMLObjectElement.h>
@@ -46,7 +46,7 @@ RefPtr<Layout::Node> HTMLObjectElement::create_layout_node()
if (m_should_show_fallback_content)
return HTMLElement::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;
if (m_image_loader.has_image())
diff --git a/Userland/Libraries/LibWeb/SVG/SVGGElement.cpp b/Userland/Libraries/LibWeb/SVG/SVGGElement.cpp
index 9b6da36fbc..ec905ef6cd 100644
--- a/Userland/Libraries/LibWeb/SVG/SVGGElement.cpp
+++ b/Userland/Libraries/LibWeb/SVG/SVGGElement.cpp
@@ -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)));
diff --git a/Userland/Libraries/LibWeb/SVG/SVGPathElement.cpp b/Userland/Libraries/LibWeb/SVG/SVGPathElement.cpp
index c37b32702a..e5a2c5e3c9 100644
--- a/Userland/Libraries/LibWeb/SVG/SVGPathElement.cpp
+++ b/Userland/Libraries/LibWeb/SVG/SVGPathElement.cpp
@@ -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)));
diff --git a/Userland/Libraries/LibWeb/SVG/SVGSVGElement.cpp b/Userland/Libraries/LibWeb/SVG/SVGSVGElement.cpp
index b687816b7c..9be889f5c9 100644
--- a/Userland/Libraries/LibWeb/SVG/SVGSVGElement.cpp
+++ b/Userland/Libraries/LibWeb/SVG/SVGSVGElement.cpp
@@ -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)));