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

LibWeb: Stop making ComputedValues::stroke_width() optional

This defaults to 1px and should always have some kind of value.
This commit is contained in:
Sam Atkins 2023-06-15 16:51:17 +01:00 committed by Andreas Kling
parent 5cdcd135ab
commit af51095fe2
2 changed files with 13 additions and 15 deletions

View file

@ -308,7 +308,7 @@ public:
Optional<SVGPaint> const& stroke() const { return m_inherited.stroke; }
float fill_opacity() const { return m_inherited.fill_opacity; }
float stroke_opacity() const { return m_inherited.stroke_opacity; }
Optional<LengthPercentage> const& stroke_width() const { return m_inherited.stroke_width; }
LengthPercentage const& stroke_width() const { return m_inherited.stroke_width; }
Color stop_color() const { return m_noninherited.stop_color; }
float stop_opacity() const { return m_noninherited.stop_opacity; }
@ -352,7 +352,7 @@ protected:
Optional<SVGPaint> stroke;
float fill_opacity { InitialValues::fill_opacity() };
float stroke_opacity { InitialValues::stroke_opacity() };
Optional<LengthPercentage> stroke_width;
LengthPercentage stroke_width { Length::make_px(1) };
Vector<ShadowData> text_shadow;
} m_inherited;