mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
LibWeb/CSS: Add dump method to CalculatedStyleValue
The individual nodes all have dump methods, but there was no way of calling them from the outside. So now there is.
This commit is contained in:
parent
3af6a69f1e
commit
5bd585d446
Notes:
github-actions[bot]
2024-08-21 09:52:40 +00:00
Author: https://github.com/AtkinsSJ Commit: https://github.com/LadybirdBrowser/ladybird/commit/5bd585d4460 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1091
2 changed files with 9 additions and 0 deletions
|
@ -2766,4 +2766,11 @@ bool CalculatedStyleValue::contains_percentage() const
|
|||
return m_calculation->contains_percentage();
|
||||
}
|
||||
|
||||
String CalculatedStyleValue::dump() const
|
||||
{
|
||||
StringBuilder builder;
|
||||
m_calculation->dump(builder, 0);
|
||||
return builder.to_string_without_validation();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -121,6 +121,8 @@ public:
|
|||
|
||||
bool contains_percentage() const;
|
||||
|
||||
String dump() const;
|
||||
|
||||
private:
|
||||
explicit CalculatedStyleValue(NonnullOwnPtr<CalculationNode> calculation, CSSNumericType resolved_type)
|
||||
: CSSStyleValue(Type::Calculated)
|
||||
|
|
Loading…
Reference in a new issue