| 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 1424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1435 m_client->documentElementAvailable(); | 1435 m_client->documentElementAvailable(); |
| 1436 } | 1436 } |
| 1437 | 1437 |
| 1438 void FrameLoader::dispatchDidClearWindowObjectsInAllWorlds() | 1438 void FrameLoader::dispatchDidClearWindowObjectsInAllWorlds() |
| 1439 { | 1439 { |
| 1440 if (!m_frame->script().canExecuteScripts(NotAboutToExecuteScript)) | 1440 if (!m_frame->script().canExecuteScripts(NotAboutToExecuteScript)) |
| 1441 return; | 1441 return; |
| 1442 | 1442 |
| 1443 Vector<RefPtr<DOMWrapperWorld> > worlds; | 1443 Vector<RefPtr<DOMWrapperWorld> > worlds; |
| 1444 DOMWrapperWorld::getAllWorlds(worlds); | 1444 DOMWrapperWorld::getAllWorlds(worlds); |
| 1445 for (size_t i = 0; i < worlds.size(); ++i) | 1445 for (size_t i = 0; i < worlds.size(); ++i) { |
| 1446 dispatchDidClearWindowObjectInWorld(worlds[i].get()); | 1446 if (Page* page = m_frame->page()) |
| 1447 page->inspectorController().didClearWindowObjectInWorld(m_frame, wor
lds[i].get()); |
| 1448 m_client->dispatchDidClearWindowObjectInWorld(worlds[i].get()); |
| 1449 |
| 1450 InspectorInstrumentation::didClearWindowObjectInWorld(m_frame, worlds[i]
.get()); |
| 1451 } |
| 1447 } | 1452 } |
| 1448 | 1453 |
| 1449 void FrameLoader::dispatchDidClearWindowObjectInWorld(DOMWrapperWorld* world) | 1454 void FrameLoader::dispatchDidClearWindowObjectInWorld(DOMWrapperWorld* world) |
| 1450 { | 1455 { |
| 1451 if (!m_frame->script().canExecuteScripts(NotAboutToExecuteScript) || !m_fram
e->script().existingWindowShell(world)) | 1456 if (!m_frame->script().canExecuteScripts(NotAboutToExecuteScript) || !m_fram
e->script().existingWindowShell(world)) |
| 1452 return; | 1457 return; |
| 1453 | 1458 |
| 1454 m_client->dispatchDidClearWindowObjectInWorld(world); | 1459 m_client->dispatchDidClearWindowObjectInWorld(world); |
| 1455 | |
| 1456 if (Page* page = m_frame->page()) | |
| 1457 page->inspectorController().didClearWindowObjectInWorld(m_frame, world); | |
| 1458 | |
| 1459 InspectorInstrumentation::didClearWindowObjectInWorld(m_frame, world); | |
| 1460 } | 1460 } |
| 1461 | 1461 |
| 1462 SandboxFlags FrameLoader::effectiveSandboxFlags() const | 1462 SandboxFlags FrameLoader::effectiveSandboxFlags() const |
| 1463 { | 1463 { |
| 1464 SandboxFlags flags = m_forcedSandboxFlags; | 1464 SandboxFlags flags = m_forcedSandboxFlags; |
| 1465 if (Frame* parentFrame = m_frame->tree().parent()) | 1465 if (Frame* parentFrame = m_frame->tree().parent()) |
| 1466 flags |= parentFrame->document()->sandboxFlags(); | 1466 flags |= parentFrame->document()->sandboxFlags(); |
| 1467 if (HTMLFrameOwnerElement* ownerElement = m_frame->ownerElement()) | 1467 if (HTMLFrameOwnerElement* ownerElement = m_frame->ownerElement()) |
| 1468 flags |= ownerElement->sandboxFlags(); | 1468 flags |= ownerElement->sandboxFlags(); |
| 1469 return flags; | 1469 return flags; |
| 1470 } | 1470 } |
| 1471 | 1471 |
| 1472 } // namespace WebCore | 1472 } // namespace WebCore |
| OLD | NEW |