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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 { | 50 { |
51 return adoptRef(new FocusEvent(type, canBubble, cancelable, view, detail
, relatedTarget)); | 51 return adoptRef(new FocusEvent(type, canBubble, cancelable, view, detail
, relatedTarget)); |
52 } | 52 } |
53 | 53 |
54 static PassRefPtr<FocusEvent> create(const AtomicString& type, const FocusEv
entInit& initializer) | 54 static PassRefPtr<FocusEvent> create(const AtomicString& type, const FocusEv
entInit& initializer) |
55 { | 55 { |
56 return adoptRef(new FocusEvent(type, initializer)); | 56 return adoptRef(new FocusEvent(type, initializer)); |
57 } | 57 } |
58 | 58 |
59 EventTarget* relatedTarget() const { return m_relatedTarget.get(); } | 59 EventTarget* relatedTarget() const { return m_relatedTarget.get(); } |
| 60 EventTarget* relatedTarget(bool& isNull) const { isNull = !m_relatedTarget;
return m_relatedTarget.get(); } |
60 void setRelatedTarget(EventTarget* relatedTarget) { m_relatedTarget = relate
dTarget; } | 61 void setRelatedTarget(EventTarget* relatedTarget) { m_relatedTarget = relate
dTarget; } |
61 | 62 |
62 virtual const AtomicString& interfaceName() const; | 63 virtual const AtomicString& interfaceName() const; |
63 virtual bool isFocusEvent() const; | 64 virtual bool isFocusEvent() const; |
64 | 65 |
65 private: | 66 private: |
66 FocusEvent(); | 67 FocusEvent(); |
67 FocusEvent(const AtomicString& type, bool canBubble, bool cancelable, PassRe
fPtr<AbstractView>, int, EventTarget*); | 68 FocusEvent(const AtomicString& type, bool canBubble, bool cancelable, PassRe
fPtr<AbstractView>, int, EventTarget*); |
68 FocusEvent(const AtomicString& type, const FocusEventInit&); | 69 FocusEvent(const AtomicString& type, const FocusEventInit&); |
69 | 70 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 static PassRefPtr<FocusOutEventDispatchMediator> create(PassRefPtr<FocusEven
t>); | 105 static PassRefPtr<FocusOutEventDispatchMediator> create(PassRefPtr<FocusEven
t>); |
105 private: | 106 private: |
106 explicit FocusOutEventDispatchMediator(PassRefPtr<FocusEvent>); | 107 explicit FocusOutEventDispatchMediator(PassRefPtr<FocusEvent>); |
107 FocusEvent* event() const { return static_cast<FocusEvent*>(EventDispatchMed
iator::event()); } | 108 FocusEvent* event() const { return static_cast<FocusEvent*>(EventDispatchMed
iator::event()); } |
108 virtual bool dispatchEvent(EventDispatcher*) const OVERRIDE; | 109 virtual bool dispatchEvent(EventDispatcher*) const OVERRIDE; |
109 }; | 110 }; |
110 | 111 |
111 } // namespace WebCore | 112 } // namespace WebCore |
112 | 113 |
113 #endif // FocusEvent_h | 114 #endif // FocusEvent_h |
OLD | NEW |