| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |