diff --git a/components/style/gecko/url.rs b/components/style/gecko/url.rs index 3ee7c830788..811a0250826 100644 --- a/components/style/gecko/url.rs +++ b/components/style/gecko/url.rs @@ -54,8 +54,9 @@ impl CssUrl { /// Returns true if this URL looks like a fragment. /// See https://drafts.csswg.org/css-values/#local-urls + #[inline] pub fn is_fragment(&self) -> bool { - self.as_str().chars().next().map_or(false, |c| c == '#') + self.0.is_fragment() } /// Return the unresolved url as string, or the empty string if it's @@ -67,6 +68,12 @@ impl CssUrl { } impl CssUrlData { + /// Returns true if this URL looks like a fragment. + /// See https://drafts.csswg.org/css-values/#local-urls + pub fn is_fragment(&self) -> bool { + self.as_str().chars().next().map_or(false, |c| c == '#') + } + /// Return the unresolved url as string, or the empty string if it's /// invalid. pub fn as_str(&self) -> &str {