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 1382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1393 // This is a DOM extension and is independent of bubbling/capturing rules of | 1393 // This is a DOM extension and is independent of bubbling/capturing rules of |
1394 // the DOM. | 1394 // the DOM. |
1395 FrameOwner* owner = frame() ? frame()->owner() : nullptr; | 1395 FrameOwner* owner = frame() ? frame()->owner() : nullptr; |
1396 if (owner) | 1396 if (owner) |
1397 owner->dispatchLoad(); | 1397 owner->dispatchLoad(); |
1398 | 1398 |
1399 TRACE_EVENT_INSTANT1("devtools.timeline", "MarkLoad", TRACE_EVENT_SCOPE_THRE
AD, "data", InspectorMarkLoadEvent::data(frame())); | 1399 TRACE_EVENT_INSTANT1("devtools.timeline", "MarkLoad", TRACE_EVENT_SCOPE_THRE
AD, "data", InspectorMarkLoadEvent::data(frame())); |
1400 InspectorInstrumentation::loadEventFired(frame()); | 1400 InspectorInstrumentation::loadEventFired(frame()); |
1401 } | 1401 } |
1402 | 1402 |
1403 bool LocalDOMWindow::dispatchEvent(PassRefPtrWillBeRawPtr<Event> prpEvent, PassR
efPtrWillBeRawPtr<EventTarget> prpTarget) | 1403 WebInputEventResult LocalDOMWindow::dispatchEvent(PassRefPtrWillBeRawPtr<Event>
prpEvent, PassRefPtrWillBeRawPtr<EventTarget> prpTarget) |
1404 { | 1404 { |
1405 ASSERT(!EventDispatchForbiddenScope::isEventDispatchForbidden()); | 1405 ASSERT(!EventDispatchForbiddenScope::isEventDispatchForbidden()); |
1406 | 1406 |
1407 RefPtrWillBeRawPtr<EventTarget> protect(this); | 1407 RefPtrWillBeRawPtr<EventTarget> protect(this); |
1408 RefPtrWillBeRawPtr<Event> event = prpEvent; | 1408 RefPtrWillBeRawPtr<Event> event = prpEvent; |
1409 | 1409 |
1410 event->setTrusted(true); | 1410 event->setTrusted(true); |
1411 event->setTarget(prpTarget ? prpTarget : this); | 1411 event->setTarget(prpTarget ? prpTarget : this); |
1412 event->setCurrentTarget(this); | 1412 event->setCurrentTarget(this); |
1413 event->setEventPhase(Event::AT_TARGET); | 1413 event->setEventPhase(Event::AT_TARGET); |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1533 { | 1533 { |
1534 // If the LocalDOMWindow still has a frame reference, that frame must point | 1534 // If the LocalDOMWindow still has a frame reference, that frame must point |
1535 // back to this LocalDOMWindow: otherwise, it's easy to get into a situation | 1535 // back to this LocalDOMWindow: otherwise, it's easy to get into a situation |
1536 // where script execution leaks between different LocalDOMWindows. | 1536 // where script execution leaks between different LocalDOMWindows. |
1537 if (m_frameObserver->frame()) | 1537 if (m_frameObserver->frame()) |
1538 ASSERT_WITH_SECURITY_IMPLICATION(m_frameObserver->frame()->domWindow() =
= this); | 1538 ASSERT_WITH_SECURITY_IMPLICATION(m_frameObserver->frame()->domWindow() =
= this); |
1539 return m_frameObserver->frame(); | 1539 return m_frameObserver->frame(); |
1540 } | 1540 } |
1541 | 1541 |
1542 } // namespace blink | 1542 } // namespace blink |
OLD | NEW |