| Index: third_party/WebKit/Source/platform/exported/WebURL.cpp
|
| diff --git a/third_party/WebKit/Source/platform/exported/WebURL.cpp b/third_party/WebKit/Source/platform/exported/WebURL.cpp
|
| index e3a5804264785fe36755f1bb6250d7561069e1c4..5e0c99e10053e4b89ece8f21bb4c6b125976b022 100644
|
| --- a/third_party/WebKit/Source/platform/exported/WebURL.cpp
|
| +++ b/third_party/WebKit/Source/platform/exported/WebURL.cpp
|
| @@ -31,11 +31,15 @@
|
| #include "public/platform/WebURL.h"
|
|
|
| #include "platform/weborigin/KURL.h"
|
| +#include "wtf/text/StringView.h"
|
|
|
| namespace blink {
|
|
|
| bool WebURL::protocolIs(const char* protocol) const {
|
| - return ::blink::protocolIs(m_string, protocol);
|
| + const url::Component& scheme = m_parsed.scheme;
|
| + StringView urlView = m_string;
|
| + // For subtlety why this works in all cases, see KURL::componentString.
|
| + return m_isValid && StringView(urlView, scheme.begin, scheme.len) == protocol;
|
| }
|
|
|
| WebURL::WebURL(const KURL& url)
|
|
|