Commit b09ef22f authored by Dmitry Gozman's avatar Dmitry Gozman Committed by Commit Bot

Ask client for navigation policy for empty url

This is the only case when we don't even ask the client to decide the
navigation policy, and it breaks a very nice assumption that
DecidePolicyForNavigation is always called for renderer-initiated
navigations.

For reference: this was introduced [1] in 2002 (sic!) and being
copied around since then.

[1] https://chromium.googlesource.com/chromium/src/+/80834d145816195289a30e4168a0659380a00d75%5E%21/

Bug: 789577
Change-Id: Ic4a4671bcc34db46f70d53d4281d2ce68017ec1a
Reviewed-on: https://chromium-review.googlesource.com/1114199Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
Commit-Queue: Dmitry Gozman <dgozman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#570856}
parent 5b66b829
......@@ -1336,8 +1336,8 @@ NavigationPolicy FrameLoader::ShouldContinueForNavigationPolicy(
HTMLFormElement* form,
mojom::blink::BlobURLTokenPtr blob_url_token,
bool check_with_client) {
// Don't ask if we are loading an empty URL.
if (request.Url().IsEmpty() || substitute_data.IsValid())
// Don't ask if we already have the data.
if (substitute_data.IsValid())
return kNavigationPolicyCurrentTab;
// Check for non-escaped new lines in the url.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment