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

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

Issue 1479923002: Enumerate the return value of dispatchEvent so it is clear. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master_passive_uma_add
Patch Set: Fix typo Created 4 years, 9 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
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 1366 matching lines...) Expand 10 before | Expand all | Expand 10 after
1377 // This is a DOM extension and is independent of bubbling/capturing rules of 1377 // This is a DOM extension and is independent of bubbling/capturing rules of
1378 // the DOM. 1378 // the DOM.
1379 FrameOwner* owner = frame() ? frame()->owner() : nullptr; 1379 FrameOwner* owner = frame() ? frame()->owner() : nullptr;
1380 if (owner) 1380 if (owner)
1381 owner->dispatchLoad(); 1381 owner->dispatchLoad();
1382 1382
1383 TRACE_EVENT_INSTANT1("devtools.timeline", "MarkLoad", TRACE_EVENT_SCOPE_THRE AD, "data", InspectorMarkLoadEvent::data(frame())); 1383 TRACE_EVENT_INSTANT1("devtools.timeline", "MarkLoad", TRACE_EVENT_SCOPE_THRE AD, "data", InspectorMarkLoadEvent::data(frame()));
1384 InspectorInstrumentation::loadEventFired(frame()); 1384 InspectorInstrumentation::loadEventFired(frame());
1385 } 1385 }
1386 1386
1387 bool LocalDOMWindow::dispatchEvent(PassRefPtrWillBeRawPtr<Event> prpEvent, PassR efPtrWillBeRawPtr<EventTarget> prpTarget) 1387 DispatchEventResult LocalDOMWindow::dispatchEvent(PassRefPtrWillBeRawPtr<Event> prpEvent, PassRefPtrWillBeRawPtr<EventTarget> prpTarget)
1388 { 1388 {
1389 ASSERT(!EventDispatchForbiddenScope::isEventDispatchForbidden()); 1389 ASSERT(!EventDispatchForbiddenScope::isEventDispatchForbidden());
1390 1390
1391 RefPtrWillBeRawPtr<EventTarget> protect(this); 1391 RefPtrWillBeRawPtr<EventTarget> protect(this);
1392 RefPtrWillBeRawPtr<Event> event = prpEvent; 1392 RefPtrWillBeRawPtr<Event> event = prpEvent;
1393 1393
1394 event->setTrusted(true); 1394 event->setTrusted(true);
1395 event->setTarget(prpTarget ? prpTarget : this); 1395 event->setTarget(prpTarget ? prpTarget : this);
1396 event->setCurrentTarget(this); 1396 event->setCurrentTarget(this);
1397 event->setEventPhase(Event::AT_TARGET); 1397 event->setEventPhase(Event::AT_TARGET);
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
1519 { 1519 {
1520 // If the LocalDOMWindow still has a frame reference, that frame must point 1520 // If the LocalDOMWindow still has a frame reference, that frame must point
1521 // back to this LocalDOMWindow: otherwise, it's easy to get into a situation 1521 // back to this LocalDOMWindow: otherwise, it's easy to get into a situation
1522 // where script execution leaks between different LocalDOMWindows. 1522 // where script execution leaks between different LocalDOMWindows.
1523 if (m_frameObserver->frame()) 1523 if (m_frameObserver->frame())
1524 ASSERT_WITH_SECURITY_IMPLICATION(m_frameObserver->frame()->domWindow() = = this); 1524 ASSERT_WITH_SECURITY_IMPLICATION(m_frameObserver->frame()->domWindow() = = this);
1525 return m_frameObserver->frame(); 1525 return m_frameObserver->frame();
1526 } 1526 }
1527 1527
1528 } // namespace blink 1528 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/LocalDOMWindow.h ('k') | third_party/WebKit/Source/core/html/HTMLFormControlElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698