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 16 matching lines...) Expand all Loading... |
27 #include "config.h" | 27 #include "config.h" |
28 #include "core/frame/LocalDOMWindow.h" | 28 #include "core/frame/LocalDOMWindow.h" |
29 | 29 |
30 #include "bindings/core/v8/Dictionary.h" | 30 #include "bindings/core/v8/Dictionary.h" |
31 #include "bindings/core/v8/ExceptionMessages.h" | 31 #include "bindings/core/v8/ExceptionMessages.h" |
32 #include "bindings/core/v8/ExceptionState.h" | 32 #include "bindings/core/v8/ExceptionState.h" |
33 #include "bindings/core/v8/ExceptionStatePlaceholder.h" | 33 #include "bindings/core/v8/ExceptionStatePlaceholder.h" |
34 #include "bindings/core/v8/ScriptCallStackFactory.h" | 34 #include "bindings/core/v8/ScriptCallStackFactory.h" |
35 #include "bindings/core/v8/ScriptController.h" | 35 #include "bindings/core/v8/ScriptController.h" |
36 #include "bindings/core/v8/SerializedScriptValue.h" | 36 #include "bindings/core/v8/SerializedScriptValue.h" |
| 37 #include "core/app/Application.h" |
37 #include "core/css/CSSComputedStyleDeclaration.h" | 38 #include "core/css/CSSComputedStyleDeclaration.h" |
38 #include "core/css/CSSRuleList.h" | 39 #include "core/css/CSSRuleList.h" |
39 #include "core/css/DOMWindowCSS.h" | 40 #include "core/css/DOMWindowCSS.h" |
40 #include "core/css/MediaQueryList.h" | 41 #include "core/css/MediaQueryList.h" |
41 #include "core/css/MediaQueryMatcher.h" | 42 #include "core/css/MediaQueryMatcher.h" |
42 #include "core/css/StyleMedia.h" | 43 #include "core/css/StyleMedia.h" |
43 #include "core/css/resolver/StyleResolver.h" | 44 #include "core/css/resolver/StyleResolver.h" |
44 #include "core/dom/Document.h" | 45 #include "core/dom/Document.h" |
45 #include "core/dom/Element.h" | 46 #include "core/dom/Element.h" |
46 #include "core/dom/ExceptionCode.h" | 47 #include "core/dom/ExceptionCode.h" |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 dispatchEvent(Event::create(EventTypeNames::languagechange)); | 228 dispatchEvent(Event::create(EventTypeNames::languagechange)); |
228 } | 229 } |
229 | 230 |
230 PassRefPtr<Document> LocalDOMWindow::installNewDocument(const DocumentInit& init
) | 231 PassRefPtr<Document> LocalDOMWindow::installNewDocument(const DocumentInit& init
) |
231 { | 232 { |
232 ASSERT(init.frame() == m_frame); | 233 ASSERT(init.frame() == m_frame); |
233 | 234 |
234 clearDocument(); | 235 clearDocument(); |
235 | 236 |
236 m_document = HTMLDocument::create(init); | 237 m_document = HTMLDocument::create(init); |
| 238 m_application = Application::create(m_document.get(), m_document.get(), m_do
cument->url().string()); |
237 m_eventQueue = DOMWindowEventQueue::create(m_document.get()); | 239 m_eventQueue = DOMWindowEventQueue::create(m_document.get()); |
238 m_document->attach(); | 240 m_document->attach(); |
239 | 241 |
240 m_frame->script().updateDocument(); | 242 m_frame->script().updateDocument(); |
241 return m_document; | 243 return m_document; |
242 } | 244 } |
243 | 245 |
244 EventQueue* LocalDOMWindow::eventQueue() const | 246 EventQueue* LocalDOMWindow::eventQueue() const |
245 { | 247 { |
246 return m_eventQueue.get(); | 248 return m_eventQueue.get(); |
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
796 { | 798 { |
797 return static_cast<DOMWindowLifecycleNotifier&>(LifecycleContext<LocalDOMWin
dow>::lifecycleNotifier()); | 799 return static_cast<DOMWindowLifecycleNotifier&>(LifecycleContext<LocalDOMWin
dow>::lifecycleNotifier()); |
798 } | 800 } |
799 | 801 |
800 PassOwnPtr<LifecycleNotifier<LocalDOMWindow> > LocalDOMWindow::createLifecycleNo
tifier() | 802 PassOwnPtr<LifecycleNotifier<LocalDOMWindow> > LocalDOMWindow::createLifecycleNo
tifier() |
801 { | 803 { |
802 return DOMWindowLifecycleNotifier::create(this); | 804 return DOMWindowLifecycleNotifier::create(this); |
803 } | 805 } |
804 | 806 |
805 } // namespace blink | 807 } // namespace blink |
OLD | NEW |