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 1350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1361 InspectorInstrumentation::loadEventFired(frame()); | 1361 InspectorInstrumentation::loadEventFired(frame()); |
1362 } | 1362 } |
1363 | 1363 |
1364 bool LocalDOMWindow::dispatchEvent(PassRefPtrWillBeRawPtr<Event> prpEvent, PassR
efPtrWillBeRawPtr<EventTarget> prpTarget) | 1364 bool LocalDOMWindow::dispatchEvent(PassRefPtrWillBeRawPtr<Event> prpEvent, PassR
efPtrWillBeRawPtr<EventTarget> prpTarget) |
1365 { | 1365 { |
1366 ASSERT(!EventDispatchForbiddenScope::isEventDispatchForbidden()); | 1366 ASSERT(!EventDispatchForbiddenScope::isEventDispatchForbidden()); |
1367 | 1367 |
1368 RefPtrWillBeRawPtr<EventTarget> protect(this); | 1368 RefPtrWillBeRawPtr<EventTarget> protect(this); |
1369 RefPtrWillBeRawPtr<Event> event = prpEvent; | 1369 RefPtrWillBeRawPtr<Event> event = prpEvent; |
1370 | 1370 |
| 1371 event->setTrusted(true); |
1371 event->setTarget(prpTarget ? prpTarget : this); | 1372 event->setTarget(prpTarget ? prpTarget : this); |
1372 event->setCurrentTarget(this); | 1373 event->setCurrentTarget(this); |
1373 event->setEventPhase(Event::AT_TARGET); | 1374 event->setEventPhase(Event::AT_TARGET); |
1374 | 1375 |
1375 TRACE_EVENT1("devtools.timeline", "EventDispatch", "data", InspectorEventDis
patchEvent::data(*event)); | 1376 TRACE_EVENT1("devtools.timeline", "EventDispatch", "data", InspectorEventDis
patchEvent::data(*event)); |
1376 return fireEventListeners(event.get()); | 1377 return fireEventListeners(event.get()); |
1377 } | 1378 } |
1378 | 1379 |
1379 void LocalDOMWindow::removeAllEventListeners() | 1380 void LocalDOMWindow::removeAllEventListeners() |
1380 { | 1381 { |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1486 DOMWindow::trace(visitor); | 1487 DOMWindow::trace(visitor); |
1487 DOMWindowLifecycleNotifier::trace(visitor); | 1488 DOMWindowLifecycleNotifier::trace(visitor); |
1488 } | 1489 } |
1489 | 1490 |
1490 LocalFrame* LocalDOMWindow::frame() const | 1491 LocalFrame* LocalDOMWindow::frame() const |
1491 { | 1492 { |
1492 return m_frameObserver->frame(); | 1493 return m_frameObserver->frame(); |
1493 } | 1494 } |
1494 | 1495 |
1495 } // namespace blink | 1496 } // namespace blink |
OLD | NEW |