summaryrefslogtreecommitdiffstats
path: root/dom/base/nsContentUtils.h
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-09-04 17:55:18 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-09-04 17:55:18 +0200
commit19f010c62022e269f99066a8d90e3522fe31adaf (patch)
tree4ad67dcc3ec63790f1ed75b7aed912b7d69b8036 /dom/base/nsContentUtils.h
parentb28ab55f9675f2e97dda9a4fcac0d4f5267a2bb9 (diff)
downloadUXP-19f010c62022e269f99066a8d90e3522fe31adaf.tar
UXP-19f010c62022e269f99066a8d90e3522fe31adaf.tar.gz
UXP-19f010c62022e269f99066a8d90e3522fe31adaf.tar.lz
UXP-19f010c62022e269f99066a8d90e3522fe31adaf.tar.xz
UXP-19f010c62022e269f99066a8d90e3522fe31adaf.zip
Part 1. Move IsLocalRefURL to nsContentUtils to reuse this function. (port-rewrite)
`IsLocalRefURL` is originally designed to be used by URLValue only. Since we need this function in SVGUseElement::LookupHref too, move it to nsContentUtils as a util function.
Diffstat (limited to 'dom/base/nsContentUtils.h')
-rw-r--r--dom/base/nsContentUtils.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/dom/base/nsContentUtils.h b/dom/base/nsContentUtils.h
index 9ae6d2155..c255f813a 100644
--- a/dom/base/nsContentUtils.h
+++ b/dom/base/nsContentUtils.h
@@ -2730,6 +2730,13 @@ public:
static bool AttemptLargeAllocationLoad(nsIHttpChannel* aChannel);
+ /**
+ * Detect whether a string is a (CSS) local-url.
+ * https://drafts.csswg.org/css-values/#local-urls
+ */
+ static bool
+ IsLocalRefURL(const nsString& aString);
+
private:
static bool InitializeEventTable();