| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 #include "core/frame/History.h" | 55 #include "core/frame/History.h" |
| 56 #include "core/frame/LocalFrame.h" | 56 #include "core/frame/LocalFrame.h" |
| 57 #include "core/frame/Navigator.h" | 57 #include "core/frame/Navigator.h" |
| 58 #include "core/frame/Screen.h" | 58 #include "core/frame/Screen.h" |
| 59 #include "core/frame/ScrollToOptions.h" | 59 #include "core/frame/ScrollToOptions.h" |
| 60 #include "core/frame/Settings.h" | 60 #include "core/frame/Settings.h" |
| 61 #include "core/frame/SuspendableTimer.h" | 61 #include "core/frame/SuspendableTimer.h" |
| 62 #include "core/frame/VisualViewport.h" | 62 #include "core/frame/VisualViewport.h" |
| 63 #include "core/html/HTMLFrameOwnerElement.h" | 63 #include "core/html/HTMLFrameOwnerElement.h" |
| 64 #include "core/input/EventHandler.h" | 64 #include "core/input/EventHandler.h" |
| 65 #include "core/inspector/ConsoleMessageStorage.h" | 65 #include "core/inspector/ConsoleMessage.h" |
| 66 #include "core/inspector/InspectorInstrumentation.h" | 66 #include "core/inspector/InspectorInstrumentation.h" |
| 67 #include "core/loader/DocumentLoader.h" | 67 #include "core/loader/DocumentLoader.h" |
| 68 #include "core/loader/FrameLoaderClient.h" | 68 #include "core/loader/FrameLoaderClient.h" |
| 69 #include "core/loader/SinkDocument.h" | 69 #include "core/loader/SinkDocument.h" |
| 70 #include "core/loader/appcache/ApplicationCache.h" | 70 #include "core/loader/appcache/ApplicationCache.h" |
| 71 #include "core/page/ChromeClient.h" | 71 #include "core/page/ChromeClient.h" |
| 72 #include "core/page/CreateWindow.h" | 72 #include "core/page/CreateWindow.h" |
| 73 #include "core/page/Page.h" | 73 #include "core/page/Page.h" |
| 74 #include "core/page/WindowFeatures.h" | 74 #include "core/page/WindowFeatures.h" |
| 75 #include "core/page/scrolling/ScrollingCoordinator.h" | 75 #include "core/page/scrolling/ScrollingCoordinator.h" |
| (...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 491 } | 491 } |
| 492 | 492 |
| 493 MediaQueryList* LocalDOMWindow::matchMedia(const String& media) | 493 MediaQueryList* LocalDOMWindow::matchMedia(const String& media) |
| 494 { | 494 { |
| 495 return document() ? document()->mediaQueryMatcher().matchMedia(media) : null
ptr; | 495 return document() ? document()->mediaQueryMatcher().matchMedia(media) : null
ptr; |
| 496 } | 496 } |
| 497 | 497 |
| 498 void LocalDOMWindow::willDetachFrameHost() | 498 void LocalDOMWindow::willDetachFrameHost() |
| 499 { | 499 { |
| 500 frame()->host()->eventHandlerRegistry().didRemoveAllEventHandlers(*this); | 500 frame()->host()->eventHandlerRegistry().didRemoveAllEventHandlers(*this); |
| 501 frame()->host()->consoleMessageStorage().frameWindowDiscarded(this); | |
| 502 LocalDOMWindow::notifyContextDestroyed(); | 501 LocalDOMWindow::notifyContextDestroyed(); |
| 503 } | 502 } |
| 504 | 503 |
| 505 void LocalDOMWindow::frameDestroyed() | 504 void LocalDOMWindow::frameDestroyed() |
| 506 { | 505 { |
| 507 willDestroyDocumentInFrame(); | 506 willDestroyDocumentInFrame(); |
| 508 resetLocation(); | 507 resetLocation(); |
| 509 m_properties.clear(); | 508 m_properties.clear(); |
| 510 removeAllEventListeners(); | 509 removeAllEventListeners(); |
| 511 } | 510 } |
| (...skipping 1038 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1550 { | 1549 { |
| 1551 // If the LocalDOMWindow still has a frame reference, that frame must point | 1550 // If the LocalDOMWindow still has a frame reference, that frame must point |
| 1552 // back to this LocalDOMWindow: otherwise, it's easy to get into a situation | 1551 // back to this LocalDOMWindow: otherwise, it's easy to get into a situation |
| 1553 // where script execution leaks between different LocalDOMWindows. | 1552 // where script execution leaks between different LocalDOMWindows. |
| 1554 if (m_frameObserver->frame()) | 1553 if (m_frameObserver->frame()) |
| 1555 ASSERT_WITH_SECURITY_IMPLICATION(m_frameObserver->frame()->domWindow() =
= this); | 1554 ASSERT_WITH_SECURITY_IMPLICATION(m_frameObserver->frame()->domWindow() =
= this); |
| 1556 return m_frameObserver->frame(); | 1555 return m_frameObserver->frame(); |
| 1557 } | 1556 } |
| 1558 | 1557 |
| 1559 } // namespace blink | 1558 } // namespace blink |
| OLD | NEW |