mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 01:07:36 +00:00
LibWeb: Add mutable_computed_values()
for NodeWithStyle
This fixes the issue that we previously had to use a gross static_cast whenever we wanted to mutate computed values outside of the Node methods.
This commit is contained in:
parent
44b2735b9e
commit
7eee3f6952
2 changed files with 4 additions and 3 deletions
|
@ -209,6 +209,7 @@ public:
|
|||
virtual ~NodeWithStyle() override = default;
|
||||
|
||||
const CSS::ImmutableComputedValues& computed_values() const { return static_cast<const CSS::ImmutableComputedValues&>(m_computed_values); }
|
||||
CSS::MutableComputedValues& mutable_computed_values() { return static_cast<CSS::MutableComputedValues&>(m_computed_values); }
|
||||
|
||||
void apply_style(const CSS::StyleProperties&);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue