Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(384)

Issue 2644633006: Add KURL::protocolIsJavascript member function (Closed)

Created:
3 years, 11 months ago by Charlie Harrison
Modified:
3 years, 11 months ago
Reviewers:
Mike West
CC:
chromium-reviews, tyoshino+watch_chromium.org, blink-reviews-html_chromium.org, sof, eae+blinkwatch, blink-reviews-dom_chromium.org, dglazkov+blink, blink-reviews-bindings_chromium.org, gavinp+loader_chromium.org, blink-reviews, kinuko+watch, Nate Chapin, loading-reviews_chromium.org, rwlbuis
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add KURL::protocolIsJavascript member function Javascript URLs have weird rules in Blink. Even if the URL is invalid, many systems would like to know if the URL has a javascript protocol. Using KURL::protocol does not work, because for invalid URLs it results in the empty string. Previously, systems used blink::protocolIsJavascript, which calls into url::FindAndCompareScheme. However, a StringView approach with the already-canonicalized URL is good enough and more efficient, as it doesn't scan for whitespace and can quickly fail with a length mismatch. Also, callers were passing Strings around instead of KURLs, so this tightens the KURL interface. BUG=348655 Review-Url: https://codereview.chromium.org/2644633006 Cr-Commit-Position: refs/heads/master@{#445481} Committed: https://chromium.googlesource.com/chromium/src/+/43d920ee6dea456674a0baa54506ec4da3cc6a85

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+42 lines, -41 lines) Patch
M third_party/WebKit/Source/bindings/core/v8/ScriptController.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/dom/Document.cpp View 1 chunk +5 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/core/frame/DOMWindow.h View 1 chunk +1 line, -2 lines 0 comments Download
M third_party/WebKit/Source/core/frame/DOMWindow.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/frame/LocalFrame.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/frame/Location.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/HTMLFormElement.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/HTMLFrameElementBase.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/loader/NavigationScheduler.h View 3 chunks +4 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/loader/NavigationScheduler.cpp View 9 chunks +15 lines, -18 lines 0 comments Download
M third_party/WebKit/Source/platform/weborigin/KURL.h View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/weborigin/KURL.cpp View 3 chunks +6 lines, -1 line 0 comments Download

Messages

Total messages: 14 (10 generated)
Charlie Harrison
mkwst: Would you take a look here?
3 years, 11 months ago (2017-01-20 13:50:08 UTC) #7
Mike West
On 2017/01/20 at 13:50:08, csharrison wrote: > mkwst: Would you take a look here? LGTM. ...
3 years, 11 months ago (2017-01-23 06:42:23 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2644633006/1
3 years, 11 months ago (2017-01-23 18:52:48 UTC) #11
commit-bot: I haz the power
3 years, 11 months ago (2017-01-23 20:59:59 UTC) #14
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://chromium.googlesource.com/chromium/src/+/43d920ee6dea456674a0baa54506...

Powered by Google App Engine
This is Rietveld 408576698