| 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 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 } | 263 } |
| 264 | 264 |
| 265 void FrameLoader::clear(ClearOptions options) | 265 void FrameLoader::clear(ClearOptions options) |
| 266 { | 266 { |
| 267 if (m_stateMachine.creatingInitialEmptyDocument()) | 267 if (m_stateMachine.creatingInitialEmptyDocument()) |
| 268 return; | 268 return; |
| 269 | 269 |
| 270 m_frame->editor().clear(); | 270 m_frame->editor().clear(); |
| 271 m_frame->document()->cancelParsing(); | 271 m_frame->document()->cancelParsing(); |
| 272 m_frame->document()->stopActiveDOMObjects(); | 272 m_frame->document()->stopActiveDOMObjects(); |
| 273 if (m_frame->document()->attached()) { | 273 if (m_frame->document()->confusingAndOftenMisusedAttached()) { |
| 274 m_frame->document()->prepareForDestruction(); | 274 m_frame->document()->prepareForDestruction(); |
| 275 m_frame->document()->removeFocusedElementOfSubtree(m_frame->document()); | 275 m_frame->document()->removeFocusedElementOfSubtree(m_frame->document()); |
| 276 } | 276 } |
| 277 | 277 |
| 278 // Do this after detaching the document so that the unload event works. | 278 // Do this after detaching the document so that the unload event works. |
| 279 if (options & ClearWindowProperties) { | 279 if (options & ClearWindowProperties) { |
| 280 InspectorInstrumentation::frameWindowDiscarded(m_frame, m_frame->domWind
ow()); | 280 InspectorInstrumentation::frameWindowDiscarded(m_frame, m_frame->domWind
ow()); |
| 281 m_frame->domWindow()->reset(); | 281 m_frame->domWindow()->reset(); |
| 282 m_frame->script()->clearWindowShell(); | 282 m_frame->script()->clearWindowShell(); |
| 283 } | 283 } |
| (...skipping 1327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1611 { | 1611 { |
| 1612 SandboxFlags flags = m_forcedSandboxFlags; | 1612 SandboxFlags flags = m_forcedSandboxFlags; |
| 1613 if (Frame* parentFrame = m_frame->tree()->parent()) | 1613 if (Frame* parentFrame = m_frame->tree()->parent()) |
| 1614 flags |= parentFrame->document()->sandboxFlags(); | 1614 flags |= parentFrame->document()->sandboxFlags(); |
| 1615 if (HTMLFrameOwnerElement* ownerElement = m_frame->ownerElement()) | 1615 if (HTMLFrameOwnerElement* ownerElement = m_frame->ownerElement()) |
| 1616 flags |= ownerElement->sandboxFlags(); | 1616 flags |= ownerElement->sandboxFlags(); |
| 1617 return flags; | 1617 return flags; |
| 1618 } | 1618 } |
| 1619 | 1619 |
| 1620 } // namespace WebCore | 1620 } // namespace WebCore |
| OLD | NEW |