| 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 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 { | 321 { |
| 322 if (!shouldScheduleNavigation(url)) | 322 if (!shouldScheduleNavigation(url)) |
| 323 return; | 323 return; |
| 324 | 324 |
| 325 replacesCurrentItem = replacesCurrentItem || mustReplaceCurrentItem(m_frame)
; | 325 replacesCurrentItem = replacesCurrentItem || mustReplaceCurrentItem(m_frame)
; |
| 326 | 326 |
| 327 // If the URL we're going to navigate to is the same as the current one, exc
ept for the | 327 // If the URL we're going to navigate to is the same as the current one, exc
ept for the |
| 328 // fragment part, we don't need to schedule the location change. We'll skip
this | 328 // fragment part, we don't need to schedule the location change. We'll skip
this |
| 329 // optimization for cross-origin navigations to minimize the navigator's abi
lity to | 329 // optimization for cross-origin navigations to minimize the navigator's abi
lity to |
| 330 // execute timing attacks. | 330 // execute timing attacks. |
| 331 if (originDocument->securityOrigin()->canAccess(m_frame->document()->securit
yOrigin())) { | 331 if (originDocument->getSecurityOrigin()->canAccess(m_frame->document()->getS
ecurityOrigin())) { |
| 332 KURL parsedURL(ParsedURLString, url); | 332 KURL parsedURL(ParsedURLString, url); |
| 333 if (parsedURL.hasFragmentIdentifier() && equalIgnoringFragmentIdentifier
(m_frame->document()->url(), parsedURL)) { | 333 if (parsedURL.hasFragmentIdentifier() && equalIgnoringFragmentIdentifier
(m_frame->document()->url(), parsedURL)) { |
| 334 FrameLoadRequest request(originDocument, m_frame->document()->comple
teURL(url), "_self"); | 334 FrameLoadRequest request(originDocument, m_frame->document()->comple
teURL(url), "_self"); |
| 335 request.setReplacesCurrentItem(replacesCurrentItem); | 335 request.setReplacesCurrentItem(replacesCurrentItem); |
| 336 if (replacesCurrentItem) | 336 if (replacesCurrentItem) |
| 337 request.setClientRedirect(ClientRedirect); | 337 request.setClientRedirect(ClientRedirect); |
| 338 m_frame->loader().load(request); | 338 m_frame->loader().load(request); |
| 339 return; | 339 return; |
| 340 } | 340 } |
| 341 } | 341 } |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 432 m_redirect.clear(); | 432 m_redirect.clear(); |
| 433 } | 433 } |
| 434 | 434 |
| 435 DEFINE_TRACE(NavigationScheduler) | 435 DEFINE_TRACE(NavigationScheduler) |
| 436 { | 436 { |
| 437 visitor->trace(m_frame); | 437 visitor->trace(m_frame); |
| 438 visitor->trace(m_redirect); | 438 visitor->trace(m_redirect); |
| 439 } | 439 } |
| 440 | 440 |
| 441 } // namespace blink | 441 } // namespace blink |
| OLD | NEW |