OLD | NEW |
---|---|
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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
116 } | 116 } |
117 | 117 |
118 void HistoryController::saveDocumentAndScrollState() | 118 void HistoryController::saveDocumentAndScrollState() |
119 { | 119 { |
120 if (!m_currentItem) | 120 if (!m_currentItem) |
121 return; | 121 return; |
122 | 122 |
123 Document* document = m_frame->document(); | 123 Document* document = m_frame->document(); |
124 ASSERT(document); | 124 ASSERT(document); |
125 | 125 |
126 if (m_currentItem->isCurrentDocument(document) && document->confusingAndOfte nMisusedAttached()) { | 126 if (m_currentItem->isCurrentDocument(document) && document->renderer()) { |
esprehn
2013/09/27 18:23:45
I usually use renderView() since it's more clear,
abarth-chromium
2013/09/27 18:26:13
Ok. That will require me to pull in another heade
| |
127 LOG(Loading, "WebCoreLoading %s: saving form state to %p", m_frame->tree ()->uniqueName().string().utf8().data(), m_currentItem.get()); | 127 LOG(Loading, "WebCoreLoading %s: saving form state to %p", m_frame->tree ()->uniqueName().string().utf8().data(), m_currentItem.get()); |
128 m_currentItem->setDocumentState(document->formElementsState()); | 128 m_currentItem->setDocumentState(document->formElementsState()); |
129 } | 129 } |
130 | 130 |
131 if (!m_frame->view()) | 131 if (!m_frame->view()) |
132 return; | 132 return; |
133 | 133 |
134 m_currentItem->setScrollPoint(m_frame->view()->scrollPosition()); | 134 m_currentItem->setScrollPoint(m_frame->view()->scrollPosition()); |
135 | 135 |
136 Page* page = m_frame->page(); | 136 Page* page = m_frame->page(); |
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
583 m_currentItem->setURLString(urlString); | 583 m_currentItem->setURLString(urlString); |
584 m_currentItem->setTitle(title); | 584 m_currentItem->setTitle(title); |
585 m_currentItem->setStateObject(stateObject); | 585 m_currentItem->setStateObject(stateObject); |
586 m_currentItem->setFormData(0); | 586 m_currentItem->setFormData(0); |
587 m_currentItem->setFormContentType(String()); | 587 m_currentItem->setFormContentType(String()); |
588 | 588 |
589 ASSERT(m_frame->page()); | 589 ASSERT(m_frame->page()); |
590 } | 590 } |
591 | 591 |
592 } // namespace WebCore | 592 } // namespace WebCore |
OLD | NEW |