| 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 5474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5485 // PageState. | 5485 // PageState. |
| 5486 item_for_history_navigation = entry->root(); | 5486 item_for_history_navigation = entry->root(); |
| 5487 history_load_type = request_params.is_same_document_history_load | 5487 history_load_type = request_params.is_same_document_history_load |
| 5488 ? blink::WebHistorySameDocumentLoad | 5488 ? blink::WebHistorySameDocumentLoad |
| 5489 : blink::WebHistoryDifferentDocumentLoad; | 5489 : blink::WebHistoryDifferentDocumentLoad; |
| 5490 load_type = request_params.is_history_navigation_in_new_child | 5490 load_type = request_params.is_history_navigation_in_new_child |
| 5491 ? blink::WebFrameLoadType::InitialHistoryLoad | 5491 ? blink::WebFrameLoadType::InitialHistoryLoad |
| 5492 : blink::WebFrameLoadType::BackForward; | 5492 : blink::WebFrameLoadType::BackForward; |
| 5493 should_load_request = true; | 5493 should_load_request = true; |
| 5494 | 5494 |
| 5495 // If this is marked as a same document load but we haven't committed |
| 5496 // anything, treat it as a new load. The browser shouldn't let this |
| 5497 // happen. |
| 5498 // TODO(creis): Add a similar check if the DSN doesn't match, and add a |
| 5499 // NOTREACHED when we're confident this won't happen. |
| 5500 if (history_load_type == blink::WebHistorySameDocumentLoad && |
| 5501 current_history_item_.isNull()) { |
| 5502 history_load_type = blink::WebHistoryDifferentDocumentLoad; |
| 5503 } |
| 5504 |
| 5495 // If this navigation is to a history item for a new child frame, we may | 5505 // If this navigation is to a history item for a new child frame, we may |
| 5496 // want to ignore it in some cases. If a Javascript navigation (i.e., | 5506 // want to ignore it in some cases. If a Javascript navigation (i.e., |
| 5497 // client redirect) interrupted it and has either been scheduled, | 5507 // client redirect) interrupted it and has either been scheduled, |
| 5498 // started loading, or has committed, we should ignore the history item. | 5508 // started loading, or has committed, we should ignore the history item. |
| 5499 // Similarly, if the history item just says to stay on about:blank, | 5509 // Similarly, if the history item just says to stay on about:blank, |
| 5500 // don't load it again, which might clobber injected content. | 5510 // don't load it again, which might clobber injected content. |
| 5501 bool interrupted_by_client_redirect = | 5511 bool interrupted_by_client_redirect = |
| 5502 frame_->isNavigationScheduledWithin(0) || | 5512 frame_->isNavigationScheduledWithin(0) || |
| 5503 frame_->provisionalDataSource() || | 5513 frame_->provisionalDataSource() || |
| 5504 !current_history_item_.isNull(); | 5514 !current_history_item_.isNull(); |
| (...skipping 792 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6297 // event target. Potentially a Pepper plugin will receive the event. | 6307 // event target. Potentially a Pepper plugin will receive the event. |
| 6298 // In order to tell whether a plugin gets the last mouse event and which it | 6308 // In order to tell whether a plugin gets the last mouse event and which it |
| 6299 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6309 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
| 6300 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6310 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
| 6301 // |pepper_last_mouse_event_target_|. | 6311 // |pepper_last_mouse_event_target_|. |
| 6302 pepper_last_mouse_event_target_ = nullptr; | 6312 pepper_last_mouse_event_target_ = nullptr; |
| 6303 #endif | 6313 #endif |
| 6304 } | 6314 } |
| 6305 | 6315 |
| 6306 } // namespace content | 6316 } // namespace content |
| OLD | NEW |