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

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

Issue 1233233003: Add Event.isTrusted support (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master_event_trusted_main2
Patch Set: Fix nits Created 5 years, 5 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
« no previous file with comments | « Source/core/events/MouseEvent.cpp ('k') | Source/platform/RuntimeEnabledFeatures.in » ('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 1350 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « Source/core/events/MouseEvent.cpp ('k') | Source/platform/RuntimeEnabledFeatures.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698