mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 00:25:12 +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:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user