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

Issue 2799953002: Treat loads of invalid URLs as no-ops unless triggered by window.open. (Closed)

Created:
3 years, 8 months ago by kkhorimoto
Modified:
3 years, 8 months ago
CC:
chromium-reviews, ios-reviews_chromium.org, Eugene But (OOO till 7-30), baxley+watch_chromium.org, ios-reviews+web_chromium.org, huangml+watch_chromium.org, liaoyuke+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Treat loads of invalid URLs as no-ops unless triggered by window.open. The HTML5 spec indicates that a load of an invalid URL via links or the window.location API should be a no-op. However, window.open calls with an invalid URL should still create a new window, but pointed to about:blank. BUG=709059 Review-Url: https://codereview.chromium.org/2799953002 Cr-Commit-Position: refs/heads/master@{#462700} Committed: https://chromium.googlesource.com/chromium/src/+/45b26c61d1eec665cd55bc17d6c0799b092d66e7

Patch Set 1 #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+51 lines, -24 lines) Patch
M ios/testing/data/http_server_files/window_location.html View 1 chunk +2 lines, -0 lines 0 comments Download
M ios/testing/data/http_server_files/window_location.js View 2 chunks +16 lines, -0 lines 2 comments Download
M ios/web/navigation/window_location_inttest.mm View 4 chunks +24 lines, -18 lines 0 comments Download
M ios/web/public/web_state/web_state.h View 1 chunk +1 line, -1 line 0 comments Download
M ios/web/web_state/ui/crw_web_controller.mm View 1 chunk +8 lines, -5 lines 3 comments Download

Messages

Total messages: 15 (9 generated)
kkhorimoto
3 years, 8 months ago (2017-04-06 18:07:12 UTC) #2
Eugene But (OOO till 7-30)
lgtm https://codereview.chromium.org/2799953002/diff/1/ios/testing/data/http_server_files/window_location.js File ios/testing/data/http_server_files/window_location.js (right): https://codereview.chromium.org/2799953002/diff/1/ios/testing/data/http_server_files/window_location.js#newcode45 ios/testing/data/http_server_files/window_location.js:45: buttonWasTapped(); |locationAssign| and other methods are named in ...
3 years, 8 months ago (2017-04-06 18:34:19 UTC) #6
kkhorimoto
https://codereview.chromium.org/2799953002/diff/1/ios/testing/data/http_server_files/window_location.js File ios/testing/data/http_server_files/window_location.js (right): https://codereview.chromium.org/2799953002/diff/1/ios/testing/data/http_server_files/window_location.js#newcode45 ios/testing/data/http_server_files/window_location.js:45: buttonWasTapped(); On 2017/04/06 18:34:19, Eugene But wrote: > |locationAssign| ...
3 years, 8 months ago (2017-04-07 00:03:41 UTC) #9
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/2799953002/1
3 years, 8 months ago (2017-04-07 00:04:43 UTC) #11
commit-bot: I haz the power
Committed patchset #1 (id:1) as https://chromium.googlesource.com/chromium/src/+/45b26c61d1eec665cd55bc17d6c0799b092d66e7
3 years, 8 months ago (2017-04-07 00:14:47 UTC) #14
Eugene But (OOO till 7-30)
3 years, 8 months ago (2017-04-07 01:03:36 UTC) #15
Message was sent while issue was closed.
https://codereview.chromium.org/2799953002/diff/1/ios/web/web_state/ui/crw_we...
File ios/web/web_state/ui/crw_web_controller.mm (right):

https://codereview.chromium.org/2799953002/diff/1/ios/web/web_state/ui/crw_we...
ios/web/web_state/ui/crw_web_controller.mm:4317: if (isFirstLoadInOpenedWindow
&& isMainFrame) {
On 2017/04/07 00:03:40, kkhorimoto_ wrote:
> On 2017/04/06 18:34:19, Eugene But wrote:
> > I thought this will break CRWWebControllerInvalidUrlTest.LoadInvalidURL, but
> it
> > does not. Do you know why?
> 
> It looks like WKWebView's |-loadHTMLString:baseURL:| rewrites invalid URLs to
> about:blank before reaching this delegate callback.  I've created a bug and
> added a TODO to revisit what we want to do with that test.  I'm not sure if we
> depend on that behavior for that specific WKWebView API.
Sorry looks like that test was useless :( I will delete it.

Powered by Google App Engine
This is Rietveld 408576698