summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/CSS/ComputedValues.h
diff options
context:
space:
mode:
authorEnver Balalic <balalic.enver@gmail.com>2022-03-31 22:11:38 +0200
committerAndreas Kling <kling@serenityos.org>2022-04-02 18:40:32 +0200
commit58398b1e127f1428261f4b86230c411573fb6426 (patch)
treeaeac1a6a98a80c64ce8f022ccd6f71ca301056fa /Userland/Libraries/LibWeb/CSS/ComputedValues.h
parent2377344a892b73258dbcb9ebe327e9356216f8bc (diff)
downloadserenity-58398b1e127f1428261f4b86230c411573fb6426.zip
LibWeb: Implement the flex order CSS property
Adds support for the flex order property and a test page for it on the browser welcome page.
Diffstat (limited to 'Userland/Libraries/LibWeb/CSS/ComputedValues.h')
-rw-r--r--Userland/Libraries/LibWeb/CSS/ComputedValues.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/CSS/ComputedValues.h b/Userland/Libraries/LibWeb/CSS/ComputedValues.h
index 3462c152bd..c8b14a3f82 100644
--- a/Userland/Libraries/LibWeb/CSS/ComputedValues.h
+++ b/Userland/Libraries/LibWeb/CSS/ComputedValues.h
@@ -43,6 +43,7 @@ public:
static CSS::PointerEvents pointer_events() { return CSS::PointerEvents::Auto; }
static float flex_grow() { return 0.0f; }
static float flex_shrink() { return 1.0f; }
+ static int order() { return 0; }
static float opacity() { return 1.0f; }
static CSS::Length border_radius() { return Length::make_px(0); }
static Variant<CSS::VerticalAlign, CSS::LengthPercentage> vertical_align() { return CSS::VerticalAlign::Baseline; }
@@ -133,6 +134,7 @@ public:
FlexBasisData const& flex_basis() const { return m_noninherited.flex_basis; }
float flex_grow() const { return m_noninherited.flex_grow; }
float flex_shrink() const { return m_noninherited.flex_shrink; }
+ int order() const { return m_noninherited.order; }
CSS::AlignItems align_items() const { return m_noninherited.align_items; }
float opacity() const { return m_noninherited.opacity; }
CSS::Visibility visibility() const { return m_inherited.visibility; }
@@ -245,6 +247,7 @@ protected:
CSS::FlexBasisData flex_basis {};
float flex_grow { InitialValues::flex_grow() };
float flex_shrink { InitialValues::flex_shrink() };
+ int order { InitialValues::order() };
CSS::AlignItems align_items { InitialValues::align_items() };
CSS::JustifyContent justify_content { InitialValues::justify_content() };
CSS::Overflow overflow_x { InitialValues::overflow() };
@@ -313,6 +316,7 @@ public:
void set_flex_basis(FlexBasisData value) { m_noninherited.flex_basis = value; }
void set_flex_grow(float value) { m_noninherited.flex_grow = value; }
void set_flex_shrink(float value) { m_noninherited.flex_shrink = value; }
+ void set_order(int value) { m_noninherited.order = value; }
void set_align_items(CSS::AlignItems value) { m_noninherited.align_items = value; }
void set_opacity(float value) { m_noninherited.opacity = value; }
void set_justify_content(CSS::JustifyContent value) { m_noninherited.justify_content = value; }