OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. |
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) 2008 Alp Toker <alp@atoker.com> | 5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> |
6 * Copyright (C) Research In Motion Limited 2009. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2009. All rights reserved. |
7 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> | 7 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> |
8 * Copyright (C) 2011 Google Inc. All rights reserved. | 8 * Copyright (C) 2011 Google Inc. All rights reserved. |
9 * | 9 * |
10 * Redistribution and use in source and binary forms, with or without | 10 * Redistribution and use in source and binary forms, with or without |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 history()->setDefersLoading(defers); | 245 history()->setDefersLoading(defers); |
246 | 246 |
247 if (!defers) { | 247 if (!defers) { |
248 m_frame->navigationScheduler()->startTimer(); | 248 m_frame->navigationScheduler()->startTimer(); |
249 startCheckCompleteTimer(); | 249 startCheckCompleteTimer(); |
250 } | 250 } |
251 } | 251 } |
252 | 252 |
253 void FrameLoader::changeLocation(SecurityOrigin* securityOrigin, const KURL& url
, const String& referrer, bool lockHistory, bool lockBackForwardList, bool refre
sh) | 253 void FrameLoader::changeLocation(SecurityOrigin* securityOrigin, const KURL& url
, const String& referrer, bool lockHistory, bool lockBackForwardList, bool refre
sh) |
254 { | 254 { |
255 RefPtr<Frame> protect(m_frame); | |
256 urlSelected(FrameLoadRequest(securityOrigin, ResourceRequest(url, referrer,
refresh ? ReloadIgnoringCacheData : UseProtocolCachePolicy), "_self"), | 255 urlSelected(FrameLoadRequest(securityOrigin, ResourceRequest(url, referrer,
refresh ? ReloadIgnoringCacheData : UseProtocolCachePolicy), "_self"), |
257 0, lockHistory, lockBackForwardList, MaybeSendReferrer, ReplaceDocumentI
fJavaScriptURL); | 256 0, lockHistory, lockBackForwardList, MaybeSendReferrer, ReplaceDocumentI
fJavaScriptURL); |
258 } | 257 } |
259 | 258 |
260 void FrameLoader::urlSelected(const KURL& url, const String& passedTarget, PassR
efPtr<Event> triggeringEvent, bool lockHistory, bool lockBackForwardList, Should
SendReferrer shouldSendReferrer) | 259 void FrameLoader::urlSelected(const KURL& url, const String& passedTarget, PassR
efPtr<Event> triggeringEvent, bool lockHistory, bool lockBackForwardList, Should
SendReferrer shouldSendReferrer) |
261 { | 260 { |
262 urlSelected(FrameLoadRequest(m_frame->document()->securityOrigin(), Resource
Request(url), passedTarget), | 261 urlSelected(FrameLoadRequest(m_frame->document()->securityOrigin(), Resource
Request(url), passedTarget), |
263 triggeringEvent, lockHistory, lockBackForwardList, shouldSendReferrer, D
oNotReplaceDocumentIfJavaScriptURL); | 262 triggeringEvent, lockHistory, lockBackForwardList, shouldSendReferrer, D
oNotReplaceDocumentIfJavaScriptURL); |
264 } | 263 } |
265 | 264 |
266 // The shouldReplaceDocumentIfJavaScriptURL parameter will go away when the FIXM
E to eliminate the | 265 // The shouldReplaceDocumentIfJavaScriptURL parameter will go away when the FIXM
E to eliminate the |
267 // corresponding parameter from ScriptController::executeIfJavaScriptURL() is ad
dressed. | 266 // corresponding parameter from ScriptController::executeIfJavaScriptURL() is ad
dressed. |
268 void FrameLoader::urlSelected(const FrameLoadRequest& passedRequest, PassRefPtr<
Event> triggeringEvent, bool lockHistory, bool lockBackForwardList, ShouldSendRe
ferrer shouldSendReferrer, ShouldReplaceDocumentIfJavaScriptURL shouldReplaceDoc
umentIfJavaScriptURL) | 267 void FrameLoader::urlSelected(const FrameLoadRequest& passedRequest, PassRefPtr<
Event> triggeringEvent, bool lockHistory, bool lockBackForwardList, ShouldSendRe
ferrer shouldSendReferrer, ShouldReplaceDocumentIfJavaScriptURL shouldReplaceDoc
umentIfJavaScriptURL) |
269 { | 268 { |
270 ASSERT(!m_suppressOpenerInNewFrame); | 269 ASSERT(!m_suppressOpenerInNewFrame); |
271 | 270 |
| 271 RefPtr<Frame> protect(m_frame); |
272 FrameLoadRequest frameRequest(passedRequest); | 272 FrameLoadRequest frameRequest(passedRequest); |
273 | 273 |
274 if (m_frame->script()->executeIfJavaScriptURL(frameRequest.resourceRequest()
.url(), shouldReplaceDocumentIfJavaScriptURL)) | 274 if (m_frame->script()->executeIfJavaScriptURL(frameRequest.resourceRequest()
.url(), shouldReplaceDocumentIfJavaScriptURL)) |
275 return; | 275 return; |
276 | 276 |
277 if (frameRequest.frameName().isEmpty()) | 277 if (frameRequest.frameName().isEmpty()) |
278 frameRequest.setFrameName(m_frame->document()->baseTarget()); | 278 frameRequest.setFrameName(m_frame->document()->baseTarget()); |
279 | 279 |
280 if (shouldSendReferrer == NeverSendReferrer) | 280 if (shouldSendReferrer == NeverSendReferrer) |
281 m_suppressOpenerInNewFrame = true; | 281 m_suppressOpenerInNewFrame = true; |
(...skipping 3081 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3363 windowRect.setHeight(features.height + (windowRect.height() - pageSize.h
eight())); | 3363 windowRect.setHeight(features.height + (windowRect.height() - pageSize.h
eight())); |
3364 page->chrome()->setWindowRect(windowRect); | 3364 page->chrome()->setWindowRect(windowRect); |
3365 | 3365 |
3366 page->chrome()->show(); | 3366 page->chrome()->show(); |
3367 | 3367 |
3368 created = true; | 3368 created = true; |
3369 return frame; | 3369 return frame; |
3370 } | 3370 } |
3371 | 3371 |
3372 } // namespace WebCore | 3372 } // namespace WebCore |
OLD | NEW |