Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(53)

Side by Side Diff: Source/core/loader/HistoryController.cpp

Issue 24045002: Remove some HTMLObjectElement logic from FrameLoader (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/loader/FrameLoader.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
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 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 9 *
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 16 matching lines...) Expand all
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
28 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #include "config.h" 31 #include "config.h"
32 #include "core/loader/HistoryController.h" 32 #include "core/loader/HistoryController.h"
33 33
34 #include "core/dom/Document.h" 34 #include "core/dom/Document.h"
35 #include "core/history/BackForwardController.h" 35 #include "core/history/BackForwardController.h"
36 #include "core/history/HistoryItem.h" 36 #include "core/history/HistoryItem.h"
37 #include "core/html/HTMLFrameOwnerElement.h"
37 #include "core/loader/DocumentLoader.h" 38 #include "core/loader/DocumentLoader.h"
38 #include "core/loader/FrameLoader.h" 39 #include "core/loader/FrameLoader.h"
39 #include "core/loader/FrameLoaderClient.h" 40 #include "core/loader/FrameLoaderClient.h"
40 #include "core/loader/FrameLoaderStateMachine.h" 41 #include "core/loader/FrameLoaderStateMachine.h"
41 #include "core/page/Frame.h" 42 #include "core/page/Frame.h"
42 #include "core/page/FrameTree.h" 43 #include "core/page/FrameTree.h"
43 #include "core/page/FrameView.h" 44 #include "core/page/FrameView.h"
44 #include "core/page/Page.h" 45 #include "core/page/Page.h"
45 #include "core/page/scrolling/ScrollingCoordinator.h" 46 #include "core/page/scrolling/ScrollingCoordinator.h"
46 #include "core/platform/Logging.h" 47 #include "core/platform/Logging.h"
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 if (m_frame != targetFrame) 528 if (m_frame != targetFrame)
528 bfItem->setItemSequenceNumber(m_previousItem->itemSequenceNumber ()); 529 bfItem->setItemSequenceNumber(m_previousItem->itemSequenceNumber ());
529 bfItem->setDocumentSequenceNumber(m_previousItem->documentSequenceNu mber()); 530 bfItem->setDocumentSequenceNumber(m_previousItem->documentSequenceNu mber());
530 } 531 }
531 532
532 for (Frame* child = m_frame->tree()->firstChild(); child; child = child- >tree()->nextSibling()) { 533 for (Frame* child = m_frame->tree()->firstChild(); child; child = child- >tree()->nextSibling()) {
533 // If the child is a frame corresponding to an <object> element that never loaded, 534 // If the child is a frame corresponding to an <object> element that never loaded,
534 // we don't want to create a history item, because that causes fallb ack content 535 // we don't want to create a history item, because that causes fallb ack content
535 // to be ignored on reload. 536 // to be ignored on reload.
536 FrameLoader* childLoader = child->loader(); 537 FrameLoader* childLoader = child->loader();
537 if (childLoader->stateMachine()->startedFirstRealLoad() || !childLoa der->isHostedByObjectElement()) 538 if (childLoader->stateMachine()->startedFirstRealLoad() || !child->o wnerElement()->isObjectElement())
538 bfItem->addChildItem(childLoader->history()->createItemTree(targ etFrame, clipAtTarget)); 539 bfItem->addChildItem(childLoader->history()->createItemTree(targ etFrame, clipAtTarget));
539 } 540 }
540 } 541 }
541 // FIXME: Eliminate the isTargetItem flag in favor of itemSequenceNumber. 542 // FIXME: Eliminate the isTargetItem flag in favor of itemSequenceNumber.
542 if (m_frame == targetFrame) 543 if (m_frame == targetFrame)
543 bfItem->setIsTargetItem(true); 544 bfItem->setIsTargetItem(true);
544 return bfItem; 545 return bfItem;
545 } 546 }
546 547
547 // The general idea here is to traverse the frame tree and the item tree in para llel, 548 // The general idea here is to traverse the frame tree and the item tree in para llel,
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
706 m_currentItem->setURLString(urlString); 707 m_currentItem->setURLString(urlString);
707 m_currentItem->setTitle(title); 708 m_currentItem->setTitle(title);
708 m_currentItem->setStateObject(stateObject); 709 m_currentItem->setStateObject(stateObject);
709 m_currentItem->setFormData(0); 710 m_currentItem->setFormData(0);
710 m_currentItem->setFormContentType(String()); 711 m_currentItem->setFormContentType(String());
711 712
712 ASSERT(m_frame->page()); 713 ASSERT(m_frame->page());
713 } 714 }
714 715
715 } // namespace WebCore 716 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/loader/FrameLoader.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698