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

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

Issue 24773003: Rename Node::attached() to confusingAndOftenMisusedAttached() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 2 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') | Source/core/loader/ImageLoader.cpp » ('j') | 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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 } 128 }
129 129
130 void HistoryController::saveDocumentState() 130 void HistoryController::saveDocumentState()
131 { 131 {
132 if (!m_currentItem) 132 if (!m_currentItem)
133 return; 133 return;
134 134
135 Document* document = m_frame->document(); 135 Document* document = m_frame->document();
136 ASSERT(document); 136 ASSERT(document);
137 137
138 if (m_currentItem->isCurrentDocument(document) && document->attached()) { 138 if (m_currentItem->isCurrentDocument(document) && document->confusingAndOfte nMisusedAttached()) {
139 LOG(Loading, "WebCoreLoading %s: saving form state to %p", m_frame->tree ()->uniqueName().string().utf8().data(), m_currentItem.get()); 139 LOG(Loading, "WebCoreLoading %s: saving form state to %p", m_frame->tree ()->uniqueName().string().utf8().data(), m_currentItem.get());
140 m_currentItem->setDocumentState(document->formElementsState()); 140 m_currentItem->setDocumentState(document->formElementsState());
141 } 141 }
142 } 142 }
143 143
144 // Walk the frame tree, telling all frames to save their form state into their c urrent 144 // Walk the frame tree, telling all frames to save their form state into their c urrent
145 // history item. 145 // history item.
146 void HistoryController::saveDocumentAndScrollState() 146 void HistoryController::saveDocumentAndScrollState()
147 { 147 {
148 for (Frame* frame = m_frame; frame; frame = frame->tree()->traverseNext(m_fr ame)) { 148 for (Frame* frame = m_frame; frame; frame = frame->tree()->traverseNext(m_fr ame)) {
(...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after
707 m_currentItem->setURLString(urlString); 707 m_currentItem->setURLString(urlString);
708 m_currentItem->setTitle(title); 708 m_currentItem->setTitle(title);
709 m_currentItem->setStateObject(stateObject); 709 m_currentItem->setStateObject(stateObject);
710 m_currentItem->setFormData(0); 710 m_currentItem->setFormData(0);
711 m_currentItem->setFormContentType(String()); 711 m_currentItem->setFormContentType(String());
712 712
713 ASSERT(m_frame->page()); 713 ASSERT(m_frame->page());
714 } 714 }
715 715
716 } // namespace WebCore 716 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/loader/FrameLoader.cpp ('k') | Source/core/loader/ImageLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698