Index: third_party/WebKit/Source/core/svg/SVGURIReference.h |
diff --git a/third_party/WebKit/Source/core/svg/SVGURIReference.h b/third_party/WebKit/Source/core/svg/SVGURIReference.h |
index 7174a3b6b4d5b3ebc82767ccaa7d095c09751271..47126e9049b0ccb265b258d61c8cf4827705da49 100644 |
--- a/third_party/WebKit/Source/core/svg/SVGURIReference.h |
+++ b/third_party/WebKit/Source/core/svg/SVGURIReference.h |
@@ -41,6 +41,11 @@ public: |
static inline bool isExternalURIReference(const String& uri, const Document& document) |
{ |
+ // Fragment-only URIs are always internal, if baseURL matches with document URL |
fs
2015/11/20 11:48:36
Nit: Remove ',', and add '.' at the end. While we'
|
+ // This early check fixes the performance regression crbug.com/557979 |
fs
2015/11/20 11:48:36
Nit: I'd suggest something more like:
"This is a
|
+ if (document.baseURL() == document.url() && uri.startsWith('#')) |
+ return false; |
+ |
// If the URI matches our documents URL, we're dealing with a local reference. |
KURL url = document.completeURL(uri); |
return !equalIgnoringFragmentIdentifier(url, document.url()); |