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