| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 { | 51 { |
| 52 } | 52 } |
| 53 | 53 |
| 54 FocusEvent::FocusEvent(const AtomicString& type, const FocusEventInit& initializ
er) | 54 FocusEvent::FocusEvent(const AtomicString& type, const FocusEventInit& initializ
er) |
| 55 : UIEvent(type, initializer) | 55 : UIEvent(type, initializer) |
| 56 { | 56 { |
| 57 if (initializer.hasRelatedTarget()) | 57 if (initializer.hasRelatedTarget()) |
| 58 m_relatedTarget = initializer.relatedTarget(); | 58 m_relatedTarget = initializer.relatedTarget(); |
| 59 } | 59 } |
| 60 | 60 |
| 61 PassRefPtrWillBeRawPtr<EventDispatchMediator> FocusEvent::createMediator() |
| 62 { |
| 63 return FocusEventDispatchMediator::create(this); |
| 64 } |
| 65 |
| 61 DEFINE_TRACE(FocusEvent) | 66 DEFINE_TRACE(FocusEvent) |
| 62 { | 67 { |
| 63 visitor->trace(m_relatedTarget); | 68 visitor->trace(m_relatedTarget); |
| 64 UIEvent::trace(visitor); | 69 UIEvent::trace(visitor); |
| 65 } | 70 } |
| 66 | 71 |
| 67 PassRefPtrWillBeRawPtr<FocusEventDispatchMediator> FocusEventDispatchMediator::c
reate(PassRefPtrWillBeRawPtr<FocusEvent> focusEvent) | 72 PassRefPtrWillBeRawPtr<FocusEventDispatchMediator> FocusEventDispatchMediator::c
reate(PassRefPtrWillBeRawPtr<FocusEvent> focusEvent) |
| 68 { | 73 { |
| 69 return adoptRefWillBeNoop(new FocusEventDispatchMediator(focusEvent)); | 74 return adoptRefWillBeNoop(new FocusEventDispatchMediator(focusEvent)); |
| 70 } | 75 } |
| 71 | 76 |
| 72 FocusEventDispatchMediator::FocusEventDispatchMediator(PassRefPtrWillBeRawPtr<Fo
cusEvent> focusEvent) | 77 FocusEventDispatchMediator::FocusEventDispatchMediator(PassRefPtrWillBeRawPtr<Fo
cusEvent> focusEvent) |
| 73 : EventDispatchMediator(focusEvent) | 78 : EventDispatchMediator(focusEvent) |
| 74 { | 79 { |
| 75 } | 80 } |
| 76 | 81 |
| 77 bool FocusEventDispatchMediator::dispatchEvent(EventDispatcher& dispatcher) cons
t | 82 bool FocusEventDispatchMediator::dispatchEvent(EventDispatcher& dispatcher) cons
t |
| 78 { | 83 { |
| 79 event().eventPath().adjustForRelatedTarget(dispatcher.node(), event().relate
dTarget()); | 84 event().eventPath().adjustForRelatedTarget(dispatcher.node(), event().relate
dTarget()); |
| 80 return EventDispatchMediator::dispatchEvent(dispatcher); | 85 return EventDispatchMediator::dispatchEvent(dispatcher); |
| 81 } | 86 } |
| 82 | 87 |
| 83 PassRefPtrWillBeRawPtr<BlurEventDispatchMediator> BlurEventDispatchMediator::cre
ate(PassRefPtrWillBeRawPtr<FocusEvent> focusEvent) | |
| 84 { | |
| 85 return adoptRefWillBeNoop(new BlurEventDispatchMediator(focusEvent)); | |
| 86 } | |
| 87 | |
| 88 BlurEventDispatchMediator::BlurEventDispatchMediator(PassRefPtrWillBeRawPtr<Focu
sEvent> focusEvent) | |
| 89 : EventDispatchMediator(focusEvent) | |
| 90 { | |
| 91 } | |
| 92 | |
| 93 bool BlurEventDispatchMediator::dispatchEvent(EventDispatcher& dispatcher) const | |
| 94 { | |
| 95 event().eventPath().adjustForRelatedTarget(dispatcher.node(), event().relate
dTarget()); | |
| 96 return EventDispatchMediator::dispatchEvent(dispatcher); | |
| 97 } | |
| 98 | |
| 99 PassRefPtrWillBeRawPtr<FocusInEventDispatchMediator> FocusInEventDispatchMediato
r::create(PassRefPtrWillBeRawPtr<FocusEvent> focusEvent) | |
| 100 { | |
| 101 return adoptRefWillBeNoop(new FocusInEventDispatchMediator(focusEvent)); | |
| 102 } | |
| 103 | |
| 104 FocusInEventDispatchMediator::FocusInEventDispatchMediator(PassRefPtrWillBeRawPt
r<FocusEvent> focusEvent) | |
| 105 : EventDispatchMediator(focusEvent) | |
| 106 { | |
| 107 } | |
| 108 | |
| 109 bool FocusInEventDispatchMediator::dispatchEvent(EventDispatcher& dispatcher) co
nst | |
| 110 { | |
| 111 event().eventPath().adjustForRelatedTarget(dispatcher.node(), event().relate
dTarget()); | |
| 112 return EventDispatchMediator::dispatchEvent(dispatcher); | |
| 113 } | |
| 114 | |
| 115 PassRefPtrWillBeRawPtr<FocusOutEventDispatchMediator> FocusOutEventDispatchMedia
tor::create(PassRefPtrWillBeRawPtr<FocusEvent> focusEvent) | |
| 116 { | |
| 117 return adoptRefWillBeNoop(new FocusOutEventDispatchMediator(focusEvent)); | |
| 118 } | |
| 119 | |
| 120 FocusOutEventDispatchMediator::FocusOutEventDispatchMediator(PassRefPtrWillBeRaw
Ptr<FocusEvent> focusEvent) | |
| 121 : EventDispatchMediator(focusEvent) | |
| 122 { | |
| 123 } | |
| 124 | |
| 125 bool FocusOutEventDispatchMediator::dispatchEvent(EventDispatcher& dispatcher) c
onst | |
| 126 { | |
| 127 event().eventPath().adjustForRelatedTarget(dispatcher.node(), event().relate
dTarget()); | |
| 128 return EventDispatchMediator::dispatchEvent(dispatcher); | |
| 129 } | |
| 130 | |
| 131 } // namespace blink | 88 } // namespace blink |
| OLD | NEW |