Index: third_party/WebKit/Source/core/html/HTMLLinkElement.cpp |
diff --git a/third_party/WebKit/Source/core/html/HTMLLinkElement.cpp b/third_party/WebKit/Source/core/html/HTMLLinkElement.cpp |
index e3baf910d492c2287c9c1a5f97b1bcde1a9b0cd1..ae4f4dd33c61a07379bb4d6c073955834bde5257 100644 |
--- a/third_party/WebKit/Source/core/html/HTMLLinkElement.cpp |
+++ b/third_party/WebKit/Source/core/html/HTMLLinkElement.cpp |
@@ -324,7 +324,10 @@ const QualifiedName& HTMLLinkElement::subResourceAttributeName() const { |
} |
KURL HTMLLinkElement::href() const { |
- return document().completeURL(getAttribute(hrefAttr)); |
+ const String& url = getAttribute(hrefAttr); |
+ if (url.isEmpty()) |
+ return KURL(); |
+ return document().completeURL(url); |
} |
const AtomicString& HTMLLinkElement::rel() const { |