1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 23:17:45 +00:00

LibWeb: Pick up the CSS "visibility" property an honor it when painting

This commit is contained in:
Andreas Kling 2022-03-21 15:42:57 +01:00
parent 01662b2320
commit df8ef03957
5 changed files with 33 additions and 1 deletions

View file

@ -31,6 +31,7 @@ public:
static Color color() { return Color::Black; }
static Color background_color() { return Color::Transparent; }
static CSS::ListStyleType list_style_type() { return CSS::ListStyleType::Disc; }
static CSS::Visibility visibility() { return CSS::Visibility::Visible; }
static CSS::FlexDirection flex_direction() { return CSS::FlexDirection::Row; }
static CSS::FlexWrap flex_wrap() { return CSS::FlexWrap::Nowrap; }
static CSS::ImageRendering image_rendering() { return CSS::ImageRendering::Auto; }
@ -127,6 +128,7 @@ public:
float flex_shrink() const { return m_noninherited.flex_shrink; }
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; }
CSS::ImageRendering image_rendering() const { return m_inherited.image_rendering; }
CSS::JustifyContent justify_content() const { return m_noninherited.justify_content; }
Vector<BoxShadowData> const& box_shadow() const { return m_noninherited.box_shadow; }
@ -191,6 +193,7 @@ protected:
CSS::TextTransform text_transform { InitialValues::text_transform() };
CSS::WhiteSpace white_space { InitialValues::white_space() };
CSS::ListStyleType list_style_type { InitialValues::list_style_type() };
CSS::Visibility visibility { InitialValues::visibility() };
Optional<Color> fill;
Optional<Color> stroke;
@ -303,6 +306,7 @@ public:
void set_transformations(Vector<CSS::Transformation> value) { m_noninherited.transformations = move(value); }
void set_box_sizing(CSS::BoxSizing value) { m_noninherited.box_sizing = value; }
void set_vertical_align(Variant<CSS::VerticalAlign, CSS::LengthPercentage> value) { m_noninherited.vertical_align = value; }
void set_visibility(CSS::Visibility value) { m_inherited.visibility = value; }
void set_fill(Color value) { m_inherited.fill = value; }
void set_stroke(Color value) { m_inherited.stroke = value; }