mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 20:59:16 +00:00
LibWeb/CSS: Pass Length::ResolutionContext to resolve_integer
The length resolution context might be needed even when resolving an integer value, since it might contain a sign() function with length values inside. This fixes a WPT subtest.
This commit is contained in:
parent
8bec80ac47
commit
1882a2e19b
Notes:
github-actions[bot]
2024-12-04 12:38:56 +00:00
Author: https://github.com/milotier
Commit: 1882a2e19b
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2640
Reviewed-by: https://github.com/AtkinsSJ ✅
7 changed files with 75 additions and 17 deletions
|
@ -99,7 +99,7 @@ public:
|
|||
|
||||
bool resolves_to_length() const { return m_resolved_type.matches_length(); }
|
||||
bool resolves_to_length_percentage() const { return m_resolved_type.matches_length_percentage(); }
|
||||
[[nodiscard]] Optional<Length> resolve_length(Length::ResolutionContext const&) const;
|
||||
Optional<Length> resolve_length(Length::ResolutionContext const&) const;
|
||||
Optional<Length> resolve_length(Layout::Node const& layout_node) const;
|
||||
Optional<Length> resolve_length_percentage(Layout::Node const&, Length const& percentage_basis) const;
|
||||
Optional<Length> resolve_length_percentage(Layout::Node const&, CSSPixels percentage_basis) const;
|
||||
|
@ -119,7 +119,11 @@ public:
|
|||
bool resolves_to_number() const { return m_resolved_type.matches_number(); }
|
||||
bool resolves_to_number_percentage() const { return m_resolved_type.matches_number_percentage(); }
|
||||
Optional<double> resolve_number() const;
|
||||
Optional<double> resolve_number(Length::ResolutionContext const&) const;
|
||||
Optional<double> resolve_number(Layout::Node const& layout_node) const;
|
||||
Optional<i64> resolve_integer() const;
|
||||
Optional<i64> resolve_integer(Length::ResolutionContext const&) const;
|
||||
Optional<i64> resolve_integer(Layout::Node const& layout_node) const;
|
||||
|
||||
bool resolves_to_dimension() const { return m_resolved_type.matches_dimension(); }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue