mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 19:59:17 +00:00
LibWeb: Parse the rotate css property
This commit is contained in:
parent
8ac60273a6
commit
488436fb54
Notes:
github-actions[bot]
2024-10-29 14:41:49 +00:00
Author: https://github.com/stelar7
Commit: 488436fb54
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1823
Reviewed-by: https://github.com/AtkinsSJ ✅
17 changed files with 284 additions and 0 deletions
|
@ -2650,6 +2650,20 @@ Optional<Angle> CSSMathValue::resolve_angle() const
|
|||
return {};
|
||||
}
|
||||
|
||||
Optional<Angle> CSSMathValue::resolve_angle(Layout::Node const& layout_node) const
|
||||
{
|
||||
return resolve_angle(Length::ResolutionContext::for_layout_node(layout_node));
|
||||
}
|
||||
|
||||
Optional<Angle> CSSMathValue::resolve_angle(Length::ResolutionContext const& context) const
|
||||
{
|
||||
auto result = m_calculation->resolve(context, {});
|
||||
|
||||
if (result.value().has<Angle>())
|
||||
return result.value().get<Angle>();
|
||||
return {};
|
||||
}
|
||||
|
||||
Optional<Angle> CSSMathValue::resolve_angle_percentage(Angle const& percentage_basis) const
|
||||
{
|
||||
auto result = m_calculation->resolve({}, percentage_basis);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue