| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. |
| 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
| 4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
| 5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> | 5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> |
| 6 * Copyright (C) Research In Motion Limited 2009. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2009. All rights reserved. |
| 7 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> | 7 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> |
| 8 * Copyright (C) 2011 Google Inc. All rights reserved. | 8 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 9 * | 9 * |
| 10 * Redistribution and use in source and binary forms, with or without | 10 * Redistribution and use in source and binary forms, with or without |
| (...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 void FrameLoader::setHistoryItemStateForCommit(HistoryCommitType historyCommitTy
pe, HistoryNavigationType navigationType) | 361 void FrameLoader::setHistoryItemStateForCommit(HistoryCommitType historyCommitTy
pe, HistoryNavigationType navigationType) |
| 362 { | 362 { |
| 363 RefPtrWillBeRawPtr<HistoryItem> oldItem = m_currentItem; | 363 RefPtrWillBeRawPtr<HistoryItem> oldItem = m_currentItem; |
| 364 if (historyCommitType == BackForwardCommit && m_provisionalItem) | 364 if (historyCommitType == BackForwardCommit && m_provisionalItem) |
| 365 m_currentItem = m_provisionalItem.release(); | 365 m_currentItem = m_provisionalItem.release(); |
| 366 else | 366 else |
| 367 m_currentItem = HistoryItem::create(); | 367 m_currentItem = HistoryItem::create(); |
| 368 m_currentItem->setURL(m_documentLoader->urlForHistory()); | 368 m_currentItem->setURL(m_documentLoader->urlForHistory()); |
| 369 m_currentItem->setDocumentState(m_frame->document()->formElementsState()); | 369 m_currentItem->setDocumentState(m_frame->document()->formElementsState()); |
| 370 m_currentItem->setTarget(m_frame->tree().uniqueName()); | 370 m_currentItem->setTarget(m_frame->tree().uniqueName()); |
| 371 m_currentItem->setReferrer(SecurityPolicy::generateReferrer(m_documentLoader
->request().referrerPolicy(), m_currentItem->url(), m_documentLoader->request().
httpReferrer())); | 371 m_currentItem->setReferrer(SecurityPolicy::generateReferrer(m_documentLoader
->request().getReferrerPolicy(), m_currentItem->url(), m_documentLoader->request
().httpReferrer())); |
| 372 m_currentItem->setFormInfoFromRequest(m_documentLoader->request()); | 372 m_currentItem->setFormInfoFromRequest(m_documentLoader->request()); |
| 373 | 373 |
| 374 // Don't propagate state from the old item to the new item if there isn't an
old item (obviously), | 374 // Don't propagate state from the old item to the new item if there isn't an
old item (obviously), |
| 375 // or if this is a back/forward navigation, since we explicitly want to rest
ore the state we just | 375 // or if this is a back/forward navigation, since we explicitly want to rest
ore the state we just |
| 376 // committed. | 376 // committed. |
| 377 if (!oldItem || historyCommitType == BackForwardCommit) | 377 if (!oldItem || historyCommitType == BackForwardCommit) |
| 378 return; | 378 return; |
| 379 // Don't propagate state from the old item if this is a different-document n
avigation, unless the before | 379 // Don't propagate state from the old item if this is a different-document n
avigation, unless the before |
| 380 // and after pages are logically related. This means they have the same url
(ignoring fragment) and | 380 // and after pages are logically related. This means they have the same url
(ignoring fragment) and |
| 381 // the new item was loaded via reload or client redirect. | 381 // the new item was loaded via reload or client redirect. |
| (...skipping 1189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1571 // FIXME: We need a way to propagate insecure requests policy flags to | 1571 // FIXME: We need a way to propagate insecure requests policy flags to |
| 1572 // out-of-process frames. For now, we'll always use default behavior. | 1572 // out-of-process frames. For now, we'll always use default behavior. |
| 1573 if (!parentFrame->isLocalFrame()) | 1573 if (!parentFrame->isLocalFrame()) |
| 1574 return nullptr; | 1574 return nullptr; |
| 1575 | 1575 |
| 1576 ASSERT(toLocalFrame(parentFrame)->document()); | 1576 ASSERT(toLocalFrame(parentFrame)->document()); |
| 1577 return toLocalFrame(parentFrame)->document()->insecureNavigationsToUpgrade()
; | 1577 return toLocalFrame(parentFrame)->document()->insecureNavigationsToUpgrade()
; |
| 1578 } | 1578 } |
| 1579 | 1579 |
| 1580 } // namespace blink | 1580 } // namespace blink |
| OLD | NEW |