Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1097)

Side by Side Diff: Source/core/frame/LocalDOMWindow.cpp

Issue 446063007: Rename NoEventDispatchAssertion to EventDispatchForbiddenScope and move it to platform/ (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/events/EventTarget.cpp ('k') | Source/core/svg/graphics/SVGImage.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 30 matching lines...) Expand all
41 #include "core/css/MediaQueryList.h" 41 #include "core/css/MediaQueryList.h"
42 #include "core/css/MediaQueryMatcher.h" 42 #include "core/css/MediaQueryMatcher.h"
43 #include "core/css/StyleMedia.h" 43 #include "core/css/StyleMedia.h"
44 #include "core/css/resolver/StyleResolver.h" 44 #include "core/css/resolver/StyleResolver.h"
45 #include "core/dom/ContextFeatures.h" 45 #include "core/dom/ContextFeatures.h"
46 #include "core/dom/DOMImplementation.h" 46 #include "core/dom/DOMImplementation.h"
47 #include "core/dom/Document.h" 47 #include "core/dom/Document.h"
48 #include "core/dom/Element.h" 48 #include "core/dom/Element.h"
49 #include "core/dom/ExceptionCode.h" 49 #include "core/dom/ExceptionCode.h"
50 #include "core/dom/ExecutionContext.h" 50 #include "core/dom/ExecutionContext.h"
51 #include "core/dom/NoEventDispatchAssertion.h"
52 #include "core/dom/RequestAnimationFrameCallback.h" 51 #include "core/dom/RequestAnimationFrameCallback.h"
53 #include "core/editing/Editor.h" 52 #include "core/editing/Editor.h"
54 #include "core/events/DOMWindowEventQueue.h" 53 #include "core/events/DOMWindowEventQueue.h"
55 #include "core/events/EventListener.h" 54 #include "core/events/EventListener.h"
56 #include "core/events/HashChangeEvent.h" 55 #include "core/events/HashChangeEvent.h"
57 #include "core/events/MessageEvent.h" 56 #include "core/events/MessageEvent.h"
58 #include "core/events/PageTransitionEvent.h" 57 #include "core/events/PageTransitionEvent.h"
59 #include "core/events/PopStateEvent.h" 58 #include "core/events/PopStateEvent.h"
60 #include "core/frame/BarProp.h" 59 #include "core/frame/BarProp.h"
61 #include "core/frame/Console.h" 60 #include "core/frame/Console.h"
(...skipping 26 matching lines...) Expand all
88 #include "core/page/EventHandler.h" 87 #include "core/page/EventHandler.h"
89 #include "core/page/FrameTree.h" 88 #include "core/page/FrameTree.h"
90 #include "core/page/Page.h" 89 #include "core/page/Page.h"
91 #include "core/page/WindowFeatures.h" 90 #include "core/page/WindowFeatures.h"
92 #include "core/page/WindowFocusAllowedIndicator.h" 91 #include "core/page/WindowFocusAllowedIndicator.h"
93 #include "core/page/scrolling/ScrollingCoordinator.h" 92 #include "core/page/scrolling/ScrollingCoordinator.h"
94 #include "core/storage/Storage.h" 93 #include "core/storage/Storage.h"
95 #include "core/storage/StorageArea.h" 94 #include "core/storage/StorageArea.h"
96 #include "core/storage/StorageNamespace.h" 95 #include "core/storage/StorageNamespace.h"
97 #include "core/timing/Performance.h" 96 #include "core/timing/Performance.h"
97 #include "platform/EventDispatchForbiddenScope.h"
98 #include "platform/PlatformScreen.h" 98 #include "platform/PlatformScreen.h"
99 #include "platform/RuntimeEnabledFeatures.h" 99 #include "platform/RuntimeEnabledFeatures.h"
100 #include "platform/UserGestureIndicator.h" 100 #include "platform/UserGestureIndicator.h"
101 #include "platform/geometry/FloatRect.h" 101 #include "platform/geometry/FloatRect.h"
102 #include "platform/graphics/media/MediaPlayer.h" 102 #include "platform/graphics/media/MediaPlayer.h"
103 #include "platform/weborigin/KURL.h" 103 #include "platform/weborigin/KURL.h"
104 #include "platform/weborigin/SecurityOrigin.h" 104 #include "platform/weborigin/SecurityOrigin.h"
105 #include "platform/weborigin/SecurityPolicy.h" 105 #include "platform/weborigin/SecurityPolicy.h"
106 #include "public/platform/Platform.h" 106 #include "public/platform/Platform.h"
107 #include "wtf/MainThread.h" 107 #include "wtf/MainThread.h"
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
444 void LocalDOMWindow::enqueueDocumentEvent(PassRefPtrWillBeRawPtr<Event> event) 444 void LocalDOMWindow::enqueueDocumentEvent(PassRefPtrWillBeRawPtr<Event> event)
445 { 445 {
446 if (!m_eventQueue) 446 if (!m_eventQueue)
447 return; 447 return;
448 event->setTarget(m_document.get()); 448 event->setTarget(m_document.get());
449 m_eventQueue->enqueueEvent(event); 449 m_eventQueue->enqueueEvent(event);
450 } 450 }
451 451
452 void LocalDOMWindow::dispatchWindowLoadEvent() 452 void LocalDOMWindow::dispatchWindowLoadEvent()
453 { 453 {
454 ASSERT(!NoEventDispatchAssertion::isEventDispatchForbidden()); 454 ASSERT(!EventDispatchForbiddenScope::isEventDispatchForbidden());
455 dispatchLoadEvent(); 455 dispatchLoadEvent();
456 } 456 }
457 457
458 void LocalDOMWindow::documentWasClosed() 458 void LocalDOMWindow::documentWasClosed()
459 { 459 {
460 dispatchWindowLoadEvent(); 460 dispatchWindowLoadEvent();
461 enqueuePageshowEvent(PageshowEventNotPersisted); 461 enqueuePageshowEvent(PageshowEventNotPersisted);
462 if (m_pendingStateObject) 462 if (m_pendingStateObject)
463 enqueuePopstateEvent(m_pendingStateObject.release()); 463 enqueuePopstateEvent(m_pendingStateObject.release());
464 } 464 }
(...skipping 1128 matching lines...) Expand 10 before | Expand all | Expand 10 after
1593 if (owner) 1593 if (owner)
1594 owner->dispatchLoad(); 1594 owner->dispatchLoad();
1595 1595
1596 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "MarkLo ad", "data", InspectorMarkLoadEvent::data(frame())); 1596 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "MarkLo ad", "data", InspectorMarkLoadEvent::data(frame()));
1597 // FIXME(361045): remove InspectorInstrumentation calls once DevTools Timeli ne migrates to tracing. 1597 // FIXME(361045): remove InspectorInstrumentation calls once DevTools Timeli ne migrates to tracing.
1598 InspectorInstrumentation::loadEventFired(frame()); 1598 InspectorInstrumentation::loadEventFired(frame());
1599 } 1599 }
1600 1600
1601 bool LocalDOMWindow::dispatchEvent(PassRefPtrWillBeRawPtr<Event> prpEvent, PassR efPtrWillBeRawPtr<EventTarget> prpTarget) 1601 bool LocalDOMWindow::dispatchEvent(PassRefPtrWillBeRawPtr<Event> prpEvent, PassR efPtrWillBeRawPtr<EventTarget> prpTarget)
1602 { 1602 {
1603 ASSERT(!NoEventDispatchAssertion::isEventDispatchForbidden()); 1603 ASSERT(!EventDispatchForbiddenScope::isEventDispatchForbidden());
1604 1604
1605 RefPtrWillBeRawPtr<EventTarget> protect(this); 1605 RefPtrWillBeRawPtr<EventTarget> protect(this);
1606 RefPtrWillBeRawPtr<Event> event = prpEvent; 1606 RefPtrWillBeRawPtr<Event> event = prpEvent;
1607 1607
1608 event->setTarget(prpTarget ? prpTarget : this); 1608 event->setTarget(prpTarget ? prpTarget : this);
1609 event->setCurrentTarget(this); 1609 event->setCurrentTarget(this);
1610 event->setEventPhase(Event::AT_TARGET); 1610 event->setEventPhase(Event::AT_TARGET);
1611 1611
1612 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "EventDispatch" , "data", InspectorEventDispatchEvent::data(*event)); 1612 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "EventDispatch" , "data", InspectorEventDispatchEvent::data(*event));
1613 // FIXME(361045): remove InspectorInstrumentation calls once DevTools Timeli ne migrates to tracing. 1613 // FIXME(361045): remove InspectorInstrumentation calls once DevTools Timeli ne migrates to tracing.
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
1925 visitor->trace(m_localStorage); 1925 visitor->trace(m_localStorage);
1926 visitor->trace(m_applicationCache); 1926 visitor->trace(m_applicationCache);
1927 visitor->trace(m_performance); 1927 visitor->trace(m_performance);
1928 visitor->trace(m_css); 1928 visitor->trace(m_css);
1929 visitor->trace(m_eventQueue); 1929 visitor->trace(m_eventQueue);
1930 WillBeHeapSupplementable<LocalDOMWindow>::trace(visitor); 1930 WillBeHeapSupplementable<LocalDOMWindow>::trace(visitor);
1931 EventTargetWithInlineData::trace(visitor); 1931 EventTargetWithInlineData::trace(visitor);
1932 } 1932 }
1933 1933
1934 } // namespace blink 1934 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/events/EventTarget.cpp ('k') | Source/core/svg/graphics/SVGImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698