mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 04:57:45 +00:00
LibWeb: Rename Element::specified_css_values() => computed_css_values()
Let's make it very clear that these are *computed* values, and not at all the specified values. The specified values are currently discarded by the CSS cascade algorithm.
This commit is contained in:
parent
43ef813f3d
commit
e31fe3eeb8
6 changed files with 23 additions and 23 deletions
|
@ -271,12 +271,12 @@ void Element::recompute_style()
|
|||
{
|
||||
set_needs_style_update(false);
|
||||
VERIFY(parent());
|
||||
auto new_specified_css_values = document().style_computer().compute_style(*this);
|
||||
auto new_computed_css_values = document().style_computer().compute_style(*this);
|
||||
|
||||
if (m_specified_css_values && *m_specified_css_values == *new_specified_css_values)
|
||||
if (m_computed_css_values && *m_computed_css_values == *new_computed_css_values)
|
||||
return;
|
||||
|
||||
m_specified_css_values = move(new_specified_css_values);
|
||||
m_computed_css_values = move(new_computed_css_values);
|
||||
|
||||
document().invalidate_layout();
|
||||
}
|
||||
|
|
|
@ -94,8 +94,8 @@ public:
|
|||
|
||||
String name() const { return attribute(HTML::AttributeNames::name); }
|
||||
|
||||
CSS::StyleProperties const* specified_css_values() const { return m_specified_css_values.ptr(); }
|
||||
void set_specified_css_values(RefPtr<CSS::StyleProperties> style) { m_specified_css_values = move(style); }
|
||||
CSS::StyleProperties const* computed_css_values() const { return m_computed_css_values.ptr(); }
|
||||
void set_computed_css_values(RefPtr<CSS::StyleProperties> style) { m_computed_css_values = move(style); }
|
||||
NonnullRefPtr<CSS::StyleProperties> resolved_css_values();
|
||||
|
||||
const CSS::CSSStyleDeclaration* inline_style() const { return m_inline_style; }
|
||||
|
@ -149,7 +149,7 @@ private:
|
|||
|
||||
RefPtr<CSS::CSSStyleDeclaration> m_inline_style;
|
||||
|
||||
RefPtr<CSS::StyleProperties> m_specified_css_values;
|
||||
RefPtr<CSS::StyleProperties> m_computed_css_values;
|
||||
HashMap<FlyString, CSS::StyleProperty> m_custom_properties;
|
||||
|
||||
RefPtr<DOMTokenList> m_class_list;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue