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

Side by Side Diff: Source/WebCore/loader/NavigationScheduler.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
« no previous file with comments | « Source/WebCore/loader/FrameLoader.cpp ('k') | Source/WebCore/page/DOMWindow.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, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010 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 * Copyright (C) 2009 Adam Barth. All rights reserved. 5 * Copyright (C) 2009 Adam Barth. All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 10 *
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 } 220 }
221 221
222 virtual void fire(Frame* frame) 222 virtual void fire(Frame* frame)
223 { 223 {
224 UserGestureIndicator gestureIndicator(wasUserGesture() ? DefinitelyProce ssingUserGesture : DefinitelyNotProcessingUserGesture); 224 UserGestureIndicator gestureIndicator(wasUserGesture() ? DefinitelyProce ssingUserGesture : DefinitelyNotProcessingUserGesture);
225 225
226 // The submitForm function will find a target frame before using the red irection timer. 226 // The submitForm function will find a target frame before using the red irection timer.
227 // Now that the timer has fired, we need to repeat the security check wh ich normally is done when 227 // Now that the timer has fired, we need to repeat the security check wh ich normally is done when
228 // selecting a target, in case conditions have changed. Other code paths avoid this by targeting 228 // selecting a target, in case conditions have changed. Other code paths avoid this by targeting
229 // without leaving a time window. If we fail the check just silently dro p the form submission. 229 // without leaving a time window. If we fail the check just silently dro p the form submission.
230 Frame* requestingFrame = m_submission->state()->sourceFrame(); 230 Document* requestingDocument = m_submission->state()->sourceDocument();
231 if (!requestingFrame->loader()->shouldAllowNavigation(frame)) 231 if (!requestingDocument->canNavigate(frame))
232 return; 232 return;
233 FrameLoadRequest frameRequest(requestingFrame->document()->securityOrigi n()); 233 FrameLoadRequest frameRequest(requestingDocument->document()->securityOr igin());
234 m_submission->populateFrameLoadRequest(frameRequest); 234 m_submission->populateFrameLoadRequest(frameRequest);
235 frame->loader()->loadFrameRequest(frameRequest, lockHistory(), lockBackF orwardList(), m_submission->event(), m_submission->state(), MaybeSendReferrer); 235 frame->loader()->loadFrameRequest(frameRequest, lockHistory(), lockBackF orwardList(), m_submission->event(), m_submission->state(), MaybeSendReferrer);
236 } 236 }
237 237
238 virtual void didStartTimer(Frame* frame, Timer<NavigationScheduler>* timer) 238 virtual void didStartTimer(Frame* frame, Timer<NavigationScheduler>* timer)
239 { 239 {
240 if (m_haveToldClient) 240 if (m_haveToldClient)
241 return; 241 return;
242 m_haveToldClient = true; 242 m_haveToldClient = true;
243 243
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 void NavigationScheduler::cancel(bool newLoadInProgress) 463 void NavigationScheduler::cancel(bool newLoadInProgress)
464 { 464 {
465 m_timer.stop(); 465 m_timer.stop();
466 466
467 OwnPtr<ScheduledNavigation> redirect(m_redirect.release()); 467 OwnPtr<ScheduledNavigation> redirect(m_redirect.release());
468 if (redirect) 468 if (redirect)
469 redirect->didStopTimer(m_frame, newLoadInProgress); 469 redirect->didStopTimer(m_frame, newLoadInProgress);
470 } 470 }
471 471
472 } // namespace WebCore 472 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/WebCore/loader/FrameLoader.cpp ('k') | Source/WebCore/page/DOMWindow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698