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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
99 if (m_capturing) { | 99 if (m_capturing) { |
100 if (LocalFrame* frame = document().frame()) { | 100 if (LocalFrame* frame = document().frame()) { |
101 frame->eventHandler().setCapturingMouseEventsNode(nullptr); | 101 frame->eventHandler().setCapturingMouseEventsNode(nullptr); |
102 m_capturing = false; | 102 m_capturing = false; |
103 } | 103 } |
104 if (hovered()) { | 104 if (hovered()) { |
105 m_clearButtonOwner->clearValue(); | 105 m_clearButtonOwner->clearValue(); |
106 event->setDefaultHandled(); | 106 event->setDefaultHandled(); |
107 } | 107 } |
108 } | 108 } |
109 } else if (event->type() == EventTypeNames::mousemove) { | |
Habib Virji
2014/09/23 11:09:06
As suggested by tkent. Please use click instead of
| |
110 if (m_capturing) { | |
111 if (LocalFrame* frame = document().frame()) { | |
112 frame->eventHandler().setCapturingMouseEventsNode(nullptr); | |
113 m_capturing = false; | |
114 } | |
115 } | |
116 event->setDefaultHandled(); | |
109 } | 117 } |
110 | 118 |
111 if (!event->defaultHandled()) | 119 if (!event->defaultHandled()) |
112 HTMLDivElement::defaultEventHandler(event); | 120 HTMLDivElement::defaultEventHandler(event); |
113 } | 121 } |
114 | 122 |
115 bool ClearButtonElement::isClearButtonElement() const | 123 bool ClearButtonElement::isClearButtonElement() const |
116 { | 124 { |
117 return true; | 125 return true; |
118 } | 126 } |
119 | 127 |
120 void ClearButtonElement::trace(Visitor* visitor) | 128 void ClearButtonElement::trace(Visitor* visitor) |
121 { | 129 { |
122 visitor->trace(m_clearButtonOwner); | 130 visitor->trace(m_clearButtonOwner); |
123 HTMLDivElement::trace(visitor); | 131 HTMLDivElement::trace(visitor); |
124 } | 132 } |
125 | 133 |
126 } | 134 } |
OLD | NEW |