| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. |
| 6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
| 7 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org) | 7 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org) |
| 8 * Copyright (C) 2010 Google Inc. All rights reserved. | 8 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 9 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 9 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
| 10 * Copyright (C) 2012 Samsung Electronics. All rights reserved. | 10 * Copyright (C) 2012 Samsung Electronics. All rights reserved. |
| (...skipping 1161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1172 // FIXME: Check whether there are any cases where this actually ends up leak
ing. | 1172 // FIXME: Check whether there are any cases where this actually ends up leak
ing. |
| 1173 return m_inputTypeView->willDispatchClick().leakPtr(); | 1173 return m_inputTypeView->willDispatchClick().leakPtr(); |
| 1174 #endif | 1174 #endif |
| 1175 } | 1175 } |
| 1176 | 1176 |
| 1177 void HTMLInputElement::postDispatchEventHandler(Event* event, void* dataFromPreD
ispatch) | 1177 void HTMLInputElement::postDispatchEventHandler(Event* event, void* dataFromPreD
ispatch) |
| 1178 { | 1178 { |
| 1179 OwnPtrWillBeRawPtr<ClickHandlingState> state = adoptPtrWillBeNoop(static_cas
t<ClickHandlingState*>(dataFromPreDispatch)); | 1179 OwnPtrWillBeRawPtr<ClickHandlingState> state = adoptPtrWillBeNoop(static_cas
t<ClickHandlingState*>(dataFromPreDispatch)); |
| 1180 if (!state) | 1180 if (!state) |
| 1181 return; | 1181 return; |
| 1182 // m_inputTypeView could be freed if the type attribute is modified through
a change event handler. |
| 1183 RefPtrWillBeRawPtr<InputTypeView> protect(m_inputTypeView.get()); |
| 1182 m_inputTypeView->didDispatchClick(event, *state); | 1184 m_inputTypeView->didDispatchClick(event, *state); |
| 1183 } | 1185 } |
| 1184 | 1186 |
| 1185 void HTMLInputElement::defaultEventHandler(Event* evt) | 1187 void HTMLInputElement::defaultEventHandler(Event* evt) |
| 1186 { | 1188 { |
| 1187 if (evt->isMouseEvent() && evt->type() == EventTypeNames::click && toMouseEv
ent(evt)->button() == LeftButton) { | 1189 if (evt->isMouseEvent() && evt->type() == EventTypeNames::click && toMouseEv
ent(evt)->button() == LeftButton) { |
| 1188 m_inputTypeView->handleClickEvent(toMouseEvent(evt)); | 1190 m_inputTypeView->handleClickEvent(toMouseEvent(evt)); |
| 1189 if (evt->defaultHandled()) | 1191 if (evt->defaultHandled()) |
| 1190 return; | 1192 return; |
| 1191 } | 1193 } |
| (...skipping 740 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1932 void HTMLInputElement::ensurePrimaryContent() | 1934 void HTMLInputElement::ensurePrimaryContent() |
| 1933 { | 1935 { |
| 1934 m_inputTypeView->ensurePrimaryContent(); | 1936 m_inputTypeView->ensurePrimaryContent(); |
| 1935 } | 1937 } |
| 1936 | 1938 |
| 1937 bool HTMLInputElement::hasFallbackContent() const | 1939 bool HTMLInputElement::hasFallbackContent() const |
| 1938 { | 1940 { |
| 1939 return m_inputTypeView->hasFallbackContent(); | 1941 return m_inputTypeView->hasFallbackContent(); |
| 1940 } | 1942 } |
| 1941 } // namespace | 1943 } // namespace |
| OLD | NEW |