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

Side by Side Diff: Source/WebCore/page/History.cpp

Issue 12092048: Merge 140748 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1364/
Patch Set: Created 7 years, 10 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
« no previous file with comments | « Source/WebCore/page/History.h ('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) 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2007 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 48
49 unsigned History::length() const 49 unsigned History::length() const
50 { 50 {
51 if (!m_frame) 51 if (!m_frame)
52 return 0; 52 return 0;
53 if (!m_frame->page()) 53 if (!m_frame->page())
54 return 0; 54 return 0;
55 return m_frame->page()->backForward()->count(); 55 return m_frame->page()->backForward()->count();
56 } 56 }
57 57
58 SerializedScriptValue* History::state() 58 PassRefPtr<SerializedScriptValue> History::state()
59 { 59 {
60 m_lastStateObjectRequested = stateInternal(); 60 m_lastStateObjectRequested = stateInternal();
61 return m_lastStateObjectRequested; 61 return m_lastStateObjectRequested;
62 } 62 }
63 63
64 SerializedScriptValue* History::stateInternal() const 64 PassRefPtr<SerializedScriptValue> History::stateInternal() const
65 { 65 {
66 if (!m_frame) 66 if (!m_frame)
67 return 0; 67 return 0;
68 68
69 if (HistoryItem* historyItem = m_frame->loader()->history()->currentItem()) 69 if (HistoryItem* historyItem = m_frame->loader()->history()->currentItem())
70 return historyItem->stateObject(); 70 return historyItem->stateObject();
71 71
72 return 0; 72 return 0;
73 } 73 }
74 74
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 if (!urlString.isEmpty()) 154 if (!urlString.isEmpty())
155 m_frame->document()->updateURLForPushOrReplaceState(fullURL); 155 m_frame->document()->updateURLForPushOrReplaceState(fullURL);
156 156
157 if (stateObjectType == StateObjectPush) 157 if (stateObjectType == StateObjectPush)
158 m_frame->loader()->client()->dispatchDidPushStateWithinPage(); 158 m_frame->loader()->client()->dispatchDidPushStateWithinPage();
159 else if (stateObjectType == StateObjectReplace) 159 else if (stateObjectType == StateObjectReplace)
160 m_frame->loader()->client()->dispatchDidReplaceStateWithinPage(); 160 m_frame->loader()->client()->dispatchDidReplaceStateWithinPage();
161 } 161 }
162 162
163 } // namespace WebCore 163 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/WebCore/page/History.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698