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 4754 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4765 else | 4765 else |
4766 params.transition = ui::PAGE_TRANSITION_AUTO_SUBFRAME; | 4766 params.transition = ui::PAGE_TRANSITION_AUTO_SUBFRAME; |
4767 | 4767 |
4768 DCHECK(!navigation_state->request_params().should_clear_history_list); | 4768 DCHECK(!navigation_state->request_params().should_clear_history_list); |
4769 params.history_list_was_cleared = false; | 4769 params.history_list_was_cleared = false; |
4770 params.report_type = FrameMsg_UILoadMetricsReportType::NO_REPORT; | 4770 params.report_type = FrameMsg_UILoadMetricsReportType::NO_REPORT; |
4771 // Subframes should match the zoom level of the main frame. | 4771 // Subframes should match the zoom level of the main frame. |
4772 render_view_->SetZoomLevel(render_view_->page_zoom_level()); | 4772 render_view_->SetZoomLevel(render_view_->page_zoom_level()); |
4773 } | 4773 } |
4774 | 4774 |
4775 // Standard URLs must match the reported origin, when it is not unique. | |
4776 if (params.url.IsStandard() && !params.origin.unique() && | |
4777 render_view_->GetWebkitPreferences().web_security_enabled) { | |
Charlie Reis
2016/07/15 20:33:17
Ah, good point. We'll need to skip the check for
nasko
2016/07/15 20:56:31
Such check added. However, all tests passed before
| |
4778 CHECK(params.origin.IsSameOriginWith(url::Origin(params.url))) | |
4779 << " url:" << params.url << " origin:" << params.origin; | |
4780 } | |
4781 | |
4775 // This message needs to be sent before any of allowScripts(), | 4782 // This message needs to be sent before any of allowScripts(), |
4776 // allowImages(), allowPlugins() is called for the new page, so that when | 4783 // allowImages(), allowPlugins() is called for the new page, so that when |
4777 // these functions send a ViewHostMsg_ContentBlocked message, it arrives | 4784 // these functions send a ViewHostMsg_ContentBlocked message, it arrives |
4778 // after the FrameHostMsg_DidCommitProvisionalLoad message. | 4785 // after the FrameHostMsg_DidCommitProvisionalLoad message. |
4779 Send(new FrameHostMsg_DidCommitProvisionalLoad(routing_id_, params)); | 4786 Send(new FrameHostMsg_DidCommitProvisionalLoad(routing_id_, params)); |
4780 | 4787 |
4781 // If we end up reusing this WebRequest (for example, due to a #ref click), | 4788 // If we end up reusing this WebRequest (for example, due to a #ref click), |
4782 // we don't want the transition type to persist. Just clear it. | 4789 // we don't want the transition type to persist. Just clear it. |
4783 navigation_state->set_transition_type(ui::PAGE_TRANSITION_LINK); | 4790 navigation_state->set_transition_type(ui::PAGE_TRANSITION_LINK); |
4784 } | 4791 } |
(...skipping 1550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6335 // event target. Potentially a Pepper plugin will receive the event. | 6342 // event target. Potentially a Pepper plugin will receive the event. |
6336 // In order to tell whether a plugin gets the last mouse event and which it | 6343 // In order to tell whether a plugin gets the last mouse event and which it |
6337 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6344 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
6338 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6345 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
6339 // |pepper_last_mouse_event_target_|. | 6346 // |pepper_last_mouse_event_target_|. |
6340 pepper_last_mouse_event_target_ = nullptr; | 6347 pepper_last_mouse_event_target_ = nullptr; |
6341 #endif | 6348 #endif |
6342 } | 6349 } |
6343 | 6350 |
6344 } // namespace content | 6351 } // namespace content |
OLD | NEW |