OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/renderer/render_frame_impl.h" | 5 #include "content/renderer/render_frame_impl.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 6292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6303 | 6303 |
6304 int load_flags = GetLoadFlagsForWebURLRequest(info.urlRequest); | 6304 int load_flags = GetLoadFlagsForWebURLRequest(info.urlRequest); |
6305 | 6305 |
6306 // Requests initiated via devtools can have caching disabled. | 6306 // Requests initiated via devtools can have caching disabled. |
6307 if (info.isCacheDisabled) { | 6307 if (info.isCacheDisabled) { |
6308 // Turn off all caching related flags and set LOAD_BYPASS_CACHE. | 6308 // Turn off all caching related flags and set LOAD_BYPASS_CACHE. |
6309 load_flags &= ~(net::LOAD_VALIDATE_CACHE | net::LOAD_SKIP_CACHE_VALIDATION | | 6309 load_flags &= ~(net::LOAD_VALIDATE_CACHE | net::LOAD_SKIP_CACHE_VALIDATION | |
6310 net::LOAD_ONLY_FROM_CACHE | net::LOAD_DISABLE_CACHE); | 6310 net::LOAD_ONLY_FROM_CACHE | net::LOAD_DISABLE_CACHE); |
6311 load_flags |= net::LOAD_BYPASS_CACHE; | 6311 load_flags |= net::LOAD_BYPASS_CACHE; |
6312 } | 6312 } |
6313 | |
6314 bool is_form_submission = | |
6315 info.navigationType == blink::WebNavigationTypeFormSubmitted || | |
6316 info.navigationType == blink::WebNavigationTypeFormSubmitted; | |
Mike West
2017/02/22 15:36:08
This seems like you pasted the same thing twice. D
arthursonzogni
2017/02/22 17:15:23
Oops, thanks!
Ack for the test. I assume that a fo
alexmos
2017/02/28 02:48:46
Again, can't speak for Mike, but there's a Blink u
arthursonzogni
2017/03/07 16:25:51
I will add a test with an allowed form submission
| |
6317 | |
6313 BeginNavigationParams begin_navigation_params( | 6318 BeginNavigationParams begin_navigation_params( |
6314 GetWebURLRequestHeaders(info.urlRequest), load_flags, | 6319 GetWebURLRequestHeaders(info.urlRequest), load_flags, |
6315 info.urlRequest.hasUserGesture(), | 6320 info.urlRequest.hasUserGesture(), |
6316 info.urlRequest.skipServiceWorker() != | 6321 info.urlRequest.skipServiceWorker() != |
6317 blink::WebURLRequest::SkipServiceWorker::None, | 6322 blink::WebURLRequest::SkipServiceWorker::None, |
6318 GetRequestContextTypeForWebURLRequest(info.urlRequest), | 6323 GetRequestContextTypeForWebURLRequest(info.urlRequest), |
6319 GetMixedContentContextTypeForWebURLRequest(info.urlRequest), | 6324 GetMixedContentContextTypeForWebURLRequest(info.urlRequest), |
6320 initiator_origin); | 6325 is_form_submission, initiator_origin); |
6321 | 6326 |
6322 if (!info.form.isNull()) { | 6327 if (!info.form.isNull()) { |
6323 WebSearchableFormData web_searchable_form_data(info.form); | 6328 WebSearchableFormData web_searchable_form_data(info.form); |
6324 begin_navigation_params.searchable_form_url = | 6329 begin_navigation_params.searchable_form_url = |
6325 web_searchable_form_data.url(); | 6330 web_searchable_form_data.url(); |
6326 begin_navigation_params.searchable_form_encoding = | 6331 begin_navigation_params.searchable_form_encoding = |
6327 web_searchable_form_data.encoding().utf8(); | 6332 web_searchable_form_data.encoding().utf8(); |
6328 } | 6333 } |
6329 | 6334 |
6330 if (info.isClientRedirect) | 6335 if (info.isClientRedirect) |
(...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6878 // event target. Potentially a Pepper plugin will receive the event. | 6883 // event target. Potentially a Pepper plugin will receive the event. |
6879 // In order to tell whether a plugin gets the last mouse event and which it | 6884 // In order to tell whether a plugin gets the last mouse event and which it |
6880 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6885 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
6881 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6886 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
6882 // |pepper_last_mouse_event_target_|. | 6887 // |pepper_last_mouse_event_target_|. |
6883 pepper_last_mouse_event_target_ = nullptr; | 6888 pepper_last_mouse_event_target_ = nullptr; |
6884 #endif | 6889 #endif |
6885 } | 6890 } |
6886 | 6891 |
6887 } // namespace content | 6892 } // namespace content |
OLD | NEW |