| 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 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 362 void FrameLoader::setHistoryItemStateForCommit(HistoryCommitType historyCommitTy
pe, HistoryNavigationType navigationType) | 362 void FrameLoader::setHistoryItemStateForCommit(HistoryCommitType historyCommitTy
pe, HistoryNavigationType navigationType) |
| 363 { | 363 { |
| 364 RefPtrWillBeRawPtr<HistoryItem> oldItem = m_currentItem; | 364 RefPtrWillBeRawPtr<HistoryItem> oldItem = m_currentItem; |
| 365 if (historyCommitType == BackForwardCommit && m_provisionalItem) | 365 if (historyCommitType == BackForwardCommit && m_provisionalItem) |
| 366 m_currentItem = m_provisionalItem.release(); | 366 m_currentItem = m_provisionalItem.release(); |
| 367 else | 367 else |
| 368 m_currentItem = HistoryItem::create(); | 368 m_currentItem = HistoryItem::create(); |
| 369 m_currentItem->setURL(m_documentLoader->urlForHistory()); | 369 m_currentItem->setURL(m_documentLoader->urlForHistory()); |
| 370 m_currentItem->setDocumentState(m_frame->document()->formElementsState()); | 370 m_currentItem->setDocumentState(m_frame->document()->formElementsState()); |
| 371 m_currentItem->setTarget(m_frame->tree().uniqueName()); | 371 m_currentItem->setTarget(m_frame->tree().uniqueName()); |
| 372 m_currentItem->setReferrer(SecurityPolicy::generateReferrer(m_documentLoader
->request().referrerPolicy(), m_currentItem->url(), m_documentLoader->request().
httpReferrer())); | 372 m_currentItem->setReferrer(SecurityPolicy::generateReferrer(m_documentLoader
->request().getReferrerPolicy(), m_currentItem->url(), m_documentLoader->request
().httpReferrer())); |
| 373 m_currentItem->setFormInfoFromRequest(m_documentLoader->request()); | 373 m_currentItem->setFormInfoFromRequest(m_documentLoader->request()); |
| 374 | 374 |
| 375 // Don't propagate state from the old item to the new item if there isn't an
old item (obviously), | 375 // Don't propagate state from the old item to the new item if there isn't an
old item (obviously), |
| 376 // or if this is a back/forward navigation, since we explicitly want to rest
ore the state we just | 376 // or if this is a back/forward navigation, since we explicitly want to rest
ore the state we just |
| 377 // committed. | 377 // committed. |
| 378 if (!oldItem || historyCommitType == BackForwardCommit) | 378 if (!oldItem || historyCommitType == BackForwardCommit) |
| 379 return; | 379 return; |
| 380 // Don't propagate state from the old item if this is a different-document n
avigation, unless the before | 380 // Don't propagate state from the old item if this is a different-document n
avigation, unless the before |
| 381 // and after pages are logically related. This means they have the same url
(ignoring fragment) and | 381 // and after pages are logically related. This means they have the same url
(ignoring fragment) and |
| 382 // the new item was loaded via reload or client redirect. | 382 // the new item was loaded via reload or client redirect. |
| (...skipping 1189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1572 // FIXME: We need a way to propagate insecure requests policy flags to | 1572 // FIXME: We need a way to propagate insecure requests policy flags to |
| 1573 // out-of-process frames. For now, we'll always use default behavior. | 1573 // out-of-process frames. For now, we'll always use default behavior. |
| 1574 if (!parentFrame->isLocalFrame()) | 1574 if (!parentFrame->isLocalFrame()) |
| 1575 return nullptr; | 1575 return nullptr; |
| 1576 | 1576 |
| 1577 ASSERT(toLocalFrame(parentFrame)->document()); | 1577 ASSERT(toLocalFrame(parentFrame)->document()); |
| 1578 return toLocalFrame(parentFrame)->document()->insecureNavigationsToUpgrade()
; | 1578 return toLocalFrame(parentFrame)->document()->insecureNavigationsToUpgrade()
; |
| 1579 } | 1579 } |
| 1580 | 1580 |
| 1581 } // namespace blink | 1581 } // namespace blink |
| OLD | NEW |