mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:27:35 +00:00
LibWeb: Use IdentifierStyleValue for CSS 'text-decoration-line'
Also 'text-decoration' is actually a shorthand, so treat it that way.
This commit is contained in:
parent
dd9a77099f
commit
4d7ce81835
9 changed files with 96 additions and 3 deletions
|
@ -147,6 +147,10 @@ enum class ValueID {
|
|||
TableHeaderGroup,
|
||||
TableRowGroup,
|
||||
TableFooterGroup,
|
||||
Underline,
|
||||
Overline,
|
||||
LineThrough,
|
||||
Blink,
|
||||
};
|
||||
|
||||
enum class Position {
|
||||
|
@ -165,6 +169,14 @@ enum class TextAlign {
|
|||
VendorSpecificCenter,
|
||||
};
|
||||
|
||||
enum class TextDecorationLine {
|
||||
None,
|
||||
Underline,
|
||||
Overline,
|
||||
LineThrough,
|
||||
Blink,
|
||||
};
|
||||
|
||||
enum class Display {
|
||||
None,
|
||||
Block,
|
||||
|
@ -244,6 +256,8 @@ public:
|
|||
virtual Length to_length() const { return Length::make_auto(); }
|
||||
virtual Color to_color(const DOM::Document&) const { return {}; }
|
||||
|
||||
CSS::ValueID to_identifier() const;
|
||||
|
||||
virtual bool is_auto() const { return false; }
|
||||
|
||||
bool operator==(const StyleValue& other) const { return equals(other); }
|
||||
|
@ -410,4 +424,11 @@ private:
|
|||
RefPtr<Gfx::Bitmap> m_bitmap;
|
||||
};
|
||||
|
||||
inline CSS::ValueID StyleValue::to_identifier() const
|
||||
{
|
||||
if (is_identifier())
|
||||
return static_cast<const IdentifierStyleValue&>(*this).id();
|
||||
return CSS::ValueID::Invalid;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue