| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 #include "sky/engine/core/frame/DOMWindowLifecycleNotifier.h" | 56 #include "sky/engine/core/frame/DOMWindowLifecycleNotifier.h" |
| 57 #include "sky/engine/core/frame/FrameConsole.h" | 57 #include "sky/engine/core/frame/FrameConsole.h" |
| 58 #include "sky/engine/core/frame/FrameHost.h" | 58 #include "sky/engine/core/frame/FrameHost.h" |
| 59 #include "sky/engine/core/frame/FrameView.h" | 59 #include "sky/engine/core/frame/FrameView.h" |
| 60 #include "sky/engine/core/frame/LocalFrame.h" | 60 #include "sky/engine/core/frame/LocalFrame.h" |
| 61 #include "sky/engine/core/frame/Location.h" | 61 #include "sky/engine/core/frame/Location.h" |
| 62 #include "sky/engine/core/frame/Screen.h" | 62 #include "sky/engine/core/frame/Screen.h" |
| 63 #include "sky/engine/core/frame/Settings.h" | 63 #include "sky/engine/core/frame/Settings.h" |
| 64 #include "sky/engine/core/inspector/ConsoleMessage.h" | 64 #include "sky/engine/core/inspector/ConsoleMessage.h" |
| 65 #include "sky/engine/core/inspector/ConsoleMessageStorage.h" | 65 #include "sky/engine/core/inspector/ConsoleMessageStorage.h" |
| 66 #include "sky/engine/core/inspector/InspectorTraceEvents.h" | |
| 67 #include "sky/engine/core/loader/FrameLoaderClient.h" | 66 #include "sky/engine/core/loader/FrameLoaderClient.h" |
| 68 #include "sky/engine/core/page/ChromeClient.h" | 67 #include "sky/engine/core/page/ChromeClient.h" |
| 69 #include "sky/engine/core/page/EventHandler.h" | 68 #include "sky/engine/core/page/EventHandler.h" |
| 70 #include "sky/engine/core/page/Page.h" | 69 #include "sky/engine/core/page/Page.h" |
| 71 #include "sky/engine/core/rendering/style/RenderStyle.h" | 70 #include "sky/engine/core/rendering/style/RenderStyle.h" |
| 72 #include "sky/engine/platform/EventDispatchForbiddenScope.h" | 71 #include "sky/engine/platform/EventDispatchForbiddenScope.h" |
| 73 #include "sky/engine/platform/PlatformScreen.h" | 72 #include "sky/engine/platform/PlatformScreen.h" |
| 74 #include "sky/engine/platform/geometry/FloatRect.h" | 73 #include "sky/engine/platform/geometry/FloatRect.h" |
| 75 #include "sky/engine/platform/weborigin/KURL.h" | 74 #include "sky/engine/platform/weborigin/KURL.h" |
| 76 #include "sky/engine/platform/weborigin/SecurityPolicy.h" | 75 #include "sky/engine/platform/weborigin/SecurityPolicy.h" |
| (...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 655 removeUnloadEventListener(this); | 654 removeUnloadEventListener(this); |
| 656 } | 655 } |
| 657 | 656 |
| 658 return true; | 657 return true; |
| 659 } | 658 } |
| 660 | 659 |
| 661 void LocalDOMWindow::dispatchLoadEvent() | 660 void LocalDOMWindow::dispatchLoadEvent() |
| 662 { | 661 { |
| 663 RefPtr<Event> loadEvent(Event::create(EventTypeNames::load)); | 662 RefPtr<Event> loadEvent(Event::create(EventTypeNames::load)); |
| 664 dispatchEvent(loadEvent, document()); | 663 dispatchEvent(loadEvent, document()); |
| 665 | |
| 666 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "MarkLo
ad", TRACE_EVENT_SCOPE_PROCESS, "data", InspectorMarkLoadEvent::data()); | |
| 667 } | 664 } |
| 668 | 665 |
| 669 bool LocalDOMWindow::dispatchEvent(PassRefPtr<Event> prpEvent, PassRefPtr<EventT
arget> prpTarget) | 666 bool LocalDOMWindow::dispatchEvent(PassRefPtr<Event> prpEvent, PassRefPtr<EventT
arget> prpTarget) |
| 670 { | 667 { |
| 671 ASSERT(!EventDispatchForbiddenScope::isEventDispatchForbidden()); | 668 ASSERT(!EventDispatchForbiddenScope::isEventDispatchForbidden()); |
| 672 | 669 |
| 673 RefPtr<EventTarget> protect(this); | 670 RefPtr<EventTarget> protect(this); |
| 674 RefPtr<Event> event = prpEvent; | 671 RefPtr<Event> event = prpEvent; |
| 675 | 672 |
| 676 event->setTarget(prpTarget ? prpTarget : this); | 673 event->setTarget(prpTarget ? prpTarget : this); |
| 677 event->setCurrentTarget(this); | 674 event->setCurrentTarget(this); |
| 678 event->setEventPhase(Event::AT_TARGET); | 675 event->setEventPhase(Event::AT_TARGET); |
| 679 | 676 |
| 680 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "EventDispatch"
, "data", InspectorEventDispatchEvent::data(*event)); | |
| 681 | |
| 682 bool result = fireEventListeners(event.get()); | 677 bool result = fireEventListeners(event.get()); |
| 683 | 678 |
| 684 return result; | 679 return result; |
| 685 } | 680 } |
| 686 | 681 |
| 687 void LocalDOMWindow::removeAllEventListenersInternal(BroadcastListenerRemoval mo
de) | 682 void LocalDOMWindow::removeAllEventListenersInternal(BroadcastListenerRemoval mo
de) |
| 688 { | 683 { |
| 689 EventTarget::removeAllEventListeners(); | 684 EventTarget::removeAllEventListeners(); |
| 690 | 685 |
| 691 lifecycleNotifier().notifyRemoveAllEventListeners(this); | 686 lifecycleNotifier().notifyRemoveAllEventListeners(this); |
| (...skipping 30 matching lines...) Expand all Loading... |
| 722 { | 717 { |
| 723 return static_cast<DOMWindowLifecycleNotifier&>(LifecycleContext<LocalDOMWin
dow>::lifecycleNotifier()); | 718 return static_cast<DOMWindowLifecycleNotifier&>(LifecycleContext<LocalDOMWin
dow>::lifecycleNotifier()); |
| 724 } | 719 } |
| 725 | 720 |
| 726 PassOwnPtr<LifecycleNotifier<LocalDOMWindow> > LocalDOMWindow::createLifecycleNo
tifier() | 721 PassOwnPtr<LifecycleNotifier<LocalDOMWindow> > LocalDOMWindow::createLifecycleNo
tifier() |
| 727 { | 722 { |
| 728 return DOMWindowLifecycleNotifier::create(this); | 723 return DOMWindowLifecycleNotifier::create(this); |
| 729 } | 724 } |
| 730 | 725 |
| 731 } // namespace blink | 726 } // namespace blink |
| OLD | NEW |