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

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

Issue 9963061: Merge 112184 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1025/
Patch Set: Created 8 years, 8 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
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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 81
82 m_frame->navigationScheduler()->scheduleHistoryNavigation(distance); 82 m_frame->navigationScheduler()->scheduleHistoryNavigation(distance);
83 } 83 }
84 84
85 void History::go(ScriptExecutionContext* context, int distance) 85 void History::go(ScriptExecutionContext* context, int distance)
86 { 86 {
87 if (!m_frame) 87 if (!m_frame)
88 return; 88 return;
89 89
90 ASSERT(isMainThread()); 90 ASSERT(isMainThread());
91 Frame* activeFrame = static_cast<Document*>(context)->frame(); 91 Document* activeDocument = static_cast<Document*>(context);
92 if (!activeFrame) 92 if (!activeDocument)
93 return; 93 return;
94 94
95 if (!activeFrame->loader()->shouldAllowNavigation(m_frame)) 95 if (!activeDocument->canNavigate(m_frame))
96 return; 96 return;
97 97
98 m_frame->navigationScheduler()->scheduleHistoryNavigation(distance); 98 m_frame->navigationScheduler()->scheduleHistoryNavigation(distance);
99 } 99 }
100 100
101 KURL History::urlForState(const String& urlString) 101 KURL History::urlForState(const String& urlString)
102 { 102 {
103 KURL baseURL = m_frame->document()->baseURL(); 103 KURL baseURL = m_frame->document()->baseURL();
104 if (urlString.isEmpty()) 104 if (urlString.isEmpty())
105 return baseURL; 105 return baseURL;
(...skipping 20 matching lines...) Expand all
126 if (!urlString.isEmpty()) 126 if (!urlString.isEmpty())
127 m_frame->document()->updateURLForPushOrReplaceState(fullURL); 127 m_frame->document()->updateURLForPushOrReplaceState(fullURL);
128 128
129 if (stateObjectType == StateObjectPush) 129 if (stateObjectType == StateObjectPush)
130 m_frame->loader()->client()->dispatchDidPushStateWithinPage(); 130 m_frame->loader()->client()->dispatchDidPushStateWithinPage();
131 else if (stateObjectType == StateObjectReplace) 131 else if (stateObjectType == StateObjectReplace)
132 m_frame->loader()->client()->dispatchDidReplaceStateWithinPage(); 132 m_frame->loader()->client()->dispatchDidReplaceStateWithinPage();
133 } 133 }
134 134
135 } // namespace WebCore 135 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/WebCore/page/DOMWindow.cpp ('k') | Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698