| 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 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 | 244 |
| 245 // Prevent window.open(url) -- eg window.open("about:blank") -- from blowing
away results | 245 // Prevent window.open(url) -- eg window.open("about:blank") -- from blowing
away results |
| 246 // from a subsequent window.document.open / window.document.write call. | 246 // from a subsequent window.document.open / window.document.write call. |
| 247 // Canceling redirection here works for all cases because document.open | 247 // Canceling redirection here works for all cases because document.open |
| 248 // implicitly precedes document.write. | 248 // implicitly precedes document.write. |
| 249 m_frame->navigationScheduler().cancel(); | 249 m_frame->navigationScheduler().cancel(); |
| 250 } | 250 } |
| 251 | 251 |
| 252 void FrameLoader::clear() | 252 void FrameLoader::clear() |
| 253 { | 253 { |
| 254 // clear() is called during (Local)Frame finalization and when creating | 254 // clear() is called during (Local)Frame detachment or when |
| 255 // a new Document within it (DocumentLoader::createWriterFor().) | 255 // reusing a FrameLoader by putting a new Document within it |
| 256 // (DocumentLoader::ensureWriter().) |
| 256 if (m_stateMachine.creatingInitialEmptyDocument()) | 257 if (m_stateMachine.creatingInitialEmptyDocument()) |
| 257 return; | 258 return; |
| 258 | 259 |
| 259 m_frame->editor().clear(); | 260 m_frame->editor().clear(); |
| 260 m_frame->document()->cancelParsing(); | 261 m_frame->document()->cancelParsing(); |
| 261 m_frame->document()->prepareForDestruction(); | 262 m_frame->document()->prepareForDestruction(); |
| 262 m_frame->document()->removeFocusedElementOfSubtree(m_frame->document()); | 263 m_frame->document()->removeFocusedElementOfSubtree(m_frame->document()); |
| 263 m_frame->selection().prepareForDestruction(); | 264 m_frame->selection().prepareForDestruction(); |
| 264 m_frame->eventHandler().clear(); | 265 m_frame->eventHandler().clear(); |
| 265 if (m_frame->view()) | 266 if (m_frame->view()) |
| (...skipping 1210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1476 // FIXME: We need a way to propagate sandbox flags to out-of-process frames. | 1477 // FIXME: We need a way to propagate sandbox flags to out-of-process frames. |
| 1477 Frame* parentFrame = m_frame->tree().parent(); | 1478 Frame* parentFrame = m_frame->tree().parent(); |
| 1478 if (parentFrame && parentFrame->isLocalFrame()) | 1479 if (parentFrame && parentFrame->isLocalFrame()) |
| 1479 flags |= toLocalFrame(parentFrame)->document()->sandboxFlags(); | 1480 flags |= toLocalFrame(parentFrame)->document()->sandboxFlags(); |
| 1480 if (FrameOwner* frameOwner = m_frame->owner()) | 1481 if (FrameOwner* frameOwner = m_frame->owner()) |
| 1481 flags |= frameOwner->sandboxFlags(); | 1482 flags |= frameOwner->sandboxFlags(); |
| 1482 return flags; | 1483 return flags; |
| 1483 } | 1484 } |
| 1484 | 1485 |
| 1485 } // namespace blink | 1486 } // namespace blink |
| OLD | NEW |