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