LibWeb/CSS: Qualify uses of LibURL

To prepare for introducing a CSS::URL type, we need to qualify any use
of LibURL as `::URL::foo` instead of `URL::foo` so the compiler doesn't
get confused.

Many of these uses will be replaced, but I don't want to mix this in
with what will likely already be a large change.
This commit is contained in:
Sam Atkins 2025-04-08 13:35:26 +01:00 committed by Tim Ledbetter
parent da1ff1ba40
commit c82f4b46a2
Notes: github-actions[bot] 2025-04-09 17:48:07 +00:00
24 changed files with 77 additions and 76 deletions

View file

@ -225,40 +225,40 @@ public:
: m_value(color)
{
}
SVGPaint(URL::URL const& url)
SVGPaint(::URL::URL const& url)
: m_value(url)
{
}
bool is_color() const { return m_value.has<Color>(); }
bool is_url() const { return m_value.has<URL::URL>(); }
bool is_url() const { return m_value.has<::URL::URL>(); }
Color as_color() const { return m_value.get<Color>(); }
URL::URL const& as_url() const { return m_value.get<URL::URL>(); }
::URL::URL const& as_url() const { return m_value.get<::URL::URL>(); }
private:
Variant<URL::URL, Color> m_value;
Variant<::URL::URL, Color> m_value;
};
// https://drafts.fxtf.org/css-masking-1/#typedef-mask-reference
class MaskReference {
public:
// TODO: Support other mask types.
MaskReference(URL::URL const& url)
MaskReference(::URL::URL const& url)
: m_url(url)
{
}
URL::URL const& url() const { return m_url; }
::URL::URL const& url() const { return m_url; }
private:
URL::URL m_url;
::URL::URL m_url;
};
// https://drafts.fxtf.org/css-masking/#the-clip-path
// TODO: Support clip sources.
class ClipPathReference {
public:
ClipPathReference(URL::URL const& url)
ClipPathReference(::URL::URL const& url)
: m_clip_source(url)
{
}
@ -270,16 +270,16 @@ public:
bool is_basic_shape() const { return m_clip_source.has<BasicShape>(); }
bool is_url() const { return m_clip_source.has<URL::URL>(); }
bool is_url() const { return m_clip_source.has<::URL::URL>(); }
URL::URL const& url() const { return m_clip_source.get<URL::URL>(); }
::URL::URL const& url() const { return m_clip_source.get<::URL::URL>(); }
BasicShapeStyleValue const& basic_shape() const { return *m_clip_source.get<BasicShape>(); }
private:
using BasicShape = NonnullRefPtr<BasicShapeStyleValue const>;
Variant<URL::URL, BasicShape> m_clip_source;
Variant<::URL::URL, BasicShape> m_clip_source;
};
struct BackgroundLayerData {