summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/CSS/StyleProperties.h
diff options
context:
space:
mode:
authorSam Atkins <atkinssj@serenityos.org>2022-01-19 16:19:43 +0000
committerAndreas Kling <kling@serenityos.org>2022-01-20 00:04:10 +0100
commitdc681913e85d6a5fda18197da57e393fffffa2b1 (patch)
tree3774b5dbf080e3809af830bfa667af9aa20df49c /Userland/Libraries/LibWeb/CSS/StyleProperties.h
parentcb0cce5cdc294f0ed53621b375104152b37fa0d9 (diff)
downloadserenity-dc681913e85d6a5fda18197da57e393fffffa2b1.zip
LibWeb: Convert width/height and min-/max- versions to LengthPercentage
A lot of this is quite ugly, but it should only be so until I remove Length::Type::Percentage entirely. (Which should happen later in this PR, otherwise, yell at me!) For now, a lot of things have to be resolved twice, first from a LengthPercentage to a Length, and then from a Length to a pixel one.
Diffstat (limited to 'Userland/Libraries/LibWeb/CSS/StyleProperties.h')
-rw-r--r--Userland/Libraries/LibWeb/CSS/StyleProperties.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/CSS/StyleProperties.h b/Userland/Libraries/LibWeb/CSS/StyleProperties.h
index 0737ee26ea..4589dbcf85 100644
--- a/Userland/Libraries/LibWeb/CSS/StyleProperties.h
+++ b/Userland/Libraries/LibWeb/CSS/StyleProperties.h
@@ -39,7 +39,8 @@ public:
void set_property(CSS::PropertyID, NonnullRefPtr<StyleValue> value);
Optional<NonnullRefPtr<StyleValue>> property(CSS::PropertyID) const;
- Length length_or_fallback(CSS::PropertyID, const Length& fallback) const;
+ Length length_or_fallback(CSS::PropertyID, Length const& fallback) const;
+ LengthPercentage length_percentage_or_fallback(CSS::PropertyID, LengthPercentage const& fallback) const;
LengthBox length_box(CSS::PropertyID left_id, CSS::PropertyID top_id, CSS::PropertyID right_id, CSS::PropertyID bottom_id, const CSS::Length& default_value) const;
Color color_or_fallback(CSS::PropertyID, Layout::NodeWithStyle const&, Color fallback) const;
Optional<CSS::TextAlign> text_align() const;