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 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 // DocumentLoader::replaceDocumentWhileExecutingJavaScriptURL can cause the
DocumentLoader to get deref'ed and possible destroyed, | 320 // DocumentLoader::replaceDocumentWhileExecutingJavaScriptURL can cause the
DocumentLoader to get deref'ed and possible destroyed, |
321 // so protect it with a RefPtr. | 321 // so protect it with a RefPtr. |
322 RefPtrWillBeRawPtr<DocumentLoader> documentLoader(m_frame->document()->loade
r()); | 322 RefPtrWillBeRawPtr<DocumentLoader> documentLoader(m_frame->document()->loade
r()); |
323 | 323 |
324 UseCounter::count(*m_frame->document(), UseCounter::ReplaceDocumentViaJavaSc
riptURL); | 324 UseCounter::count(*m_frame->document(), UseCounter::ReplaceDocumentViaJavaSc
riptURL); |
325 | 325 |
326 // Prepare a DocumentInit before clearing the frame, because it may need to | 326 // Prepare a DocumentInit before clearing the frame, because it may need to |
327 // inherit an aliased security context. | 327 // inherit an aliased security context. |
328 DocumentInit init(m_frame->document()->url(), m_frame); | 328 DocumentInit init(m_frame->document()->url(), m_frame); |
329 init.withNewRegistrationContext(); | 329 init.withNewRegistrationContext(); |
330 init.withoutInheritingSecurityOrigin(); | |
331 | 330 |
332 stopAllLoaders(); | 331 stopAllLoaders(); |
333 // Don't allow any new child frames to load in this frame: attaching a new | 332 // Don't allow any new child frames to load in this frame: attaching a new |
334 // child frame during or after detaching children results in an attached | 333 // child frame during or after detaching children results in an attached |
335 // frame on a detached DOM tree, which is bad. | 334 // frame on a detached DOM tree, which is bad. |
336 SubframeLoadingDisabler disabler(m_frame->document()); | 335 SubframeLoadingDisabler disabler(m_frame->document()); |
337 m_frame->detachChildren(); | 336 m_frame->detachChildren(); |
338 m_frame->document()->detach(); | 337 m_frame->document()->detach(); |
339 clear(); | 338 clear(); |
340 | 339 |
(...skipping 1218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1559 // FIXME: We need a way to propagate insecure requests policy flags to | 1558 // FIXME: We need a way to propagate insecure requests policy flags to |
1560 // out-of-process frames. For now, we'll always use default behavior. | 1559 // out-of-process frames. For now, we'll always use default behavior. |
1561 if (!parentFrame->isLocalFrame()) | 1560 if (!parentFrame->isLocalFrame()) |
1562 return nullptr; | 1561 return nullptr; |
1563 | 1562 |
1564 ASSERT(toLocalFrame(parentFrame)->document()); | 1563 ASSERT(toLocalFrame(parentFrame)->document()); |
1565 return toLocalFrame(parentFrame)->document()->insecureNavigationsToUpgrade()
; | 1564 return toLocalFrame(parentFrame)->document()->insecureNavigationsToUpgrade()
; |
1566 } | 1565 } |
1567 | 1566 |
1568 } // namespace blink | 1567 } // namespace blink |
OLD | NEW |