mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:27:43 +00:00
LibWeb: Add URLStyleValue to represent general url() values
This is primarily being added to support `fill: url(#gradient)` for SVGs.
This commit is contained in:
parent
b19d2634f6
commit
2fbe5b969b
4 changed files with 55 additions and 0 deletions
|
@ -51,6 +51,7 @@
|
|||
#include <LibWeb/CSS/StyleValues/TextDecorationStyleValue.h>
|
||||
#include <LibWeb/CSS/StyleValues/TimeStyleValue.h>
|
||||
#include <LibWeb/CSS/StyleValues/TransformationStyleValue.h>
|
||||
#include <LibWeb/CSS/StyleValues/URLStyleValue.h>
|
||||
#include <LibWeb/CSS/StyleValues/UnresolvedStyleValue.h>
|
||||
#include <LibWeb/CSS/StyleValues/UnsetStyleValue.h>
|
||||
|
||||
|
@ -325,6 +326,12 @@ UnsetStyleValue const& StyleValue::as_unset() const
|
|||
return static_cast<UnsetStyleValue const&>(*this);
|
||||
}
|
||||
|
||||
URLStyleValue const& StyleValue::as_url() const
|
||||
{
|
||||
VERIFY(is_url());
|
||||
return static_cast<URLStyleValue const&>(*this);
|
||||
}
|
||||
|
||||
StyleValueList const& StyleValue::as_value_list() const
|
||||
{
|
||||
VERIFY(is_value_list());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue