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 1143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1154 } | 1154 } |
1155 | 1155 |
1156 if (m_inputTypeView->shouldSubmitImplicitly(evt)) { | 1156 if (m_inputTypeView->shouldSubmitImplicitly(evt)) { |
1157 if (isSearchField()) | 1157 if (isSearchField()) |
1158 onSearch(); | 1158 onSearch(); |
1159 // Form submission finishes editing, just as loss of focus does. | 1159 // Form submission finishes editing, just as loss of focus does. |
1160 // If there was a change, send the event now. | 1160 // If there was a change, send the event now. |
1161 if (wasChangedSinceLastFormControlChangeEvent()) | 1161 if (wasChangedSinceLastFormControlChangeEvent()) |
1162 dispatchFormControlChangeEvent(); | 1162 dispatchFormControlChangeEvent(); |
1163 | 1163 |
1164 RefPtr<HTMLFormElement> formForSubmission = m_inputTypeView->formForSubm
ission(); | 1164 RefPtrWillBeRawPtr<HTMLFormElement> formForSubmission = m_inputTypeView-
>formForSubmission(); |
1165 // Form may never have been present, or may have been destroyed by code
responding to the change event. | 1165 // Form may never have been present, or may have been destroyed by code
responding to the change event. |
1166 if (formForSubmission) | 1166 if (formForSubmission) |
1167 formForSubmission->submitImplicitly(evt, canTriggerImplicitSubmissio
n()); | 1167 formForSubmission->submitImplicitly(evt, canTriggerImplicitSubmissio
n()); |
1168 | 1168 |
1169 evt->setDefaultHandled(); | 1169 evt->setDefaultHandled(); |
1170 return; | 1170 return; |
1171 } | 1171 } |
1172 | 1172 |
1173 if (evt->isBeforeTextInsertedEvent()) | 1173 if (evt->isBeforeTextInsertedEvent()) |
1174 m_inputTypeView->handleBeforeTextInsertedEvent(static_cast<BeforeTextIns
ertedEvent*>(evt)); | 1174 m_inputTypeView->handleBeforeTextInsertedEvent(static_cast<BeforeTextIns
ertedEvent*>(evt)); |
(...skipping 698 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1873 return m_inputTypeView->customStyleForRenderer(originalStyleForRenderer()); | 1873 return m_inputTypeView->customStyleForRenderer(originalStyleForRenderer()); |
1874 } | 1874 } |
1875 #endif | 1875 #endif |
1876 | 1876 |
1877 bool HTMLInputElement::shouldDispatchFormControlChangeEvent(String& oldValue, St
ring& newValue) | 1877 bool HTMLInputElement::shouldDispatchFormControlChangeEvent(String& oldValue, St
ring& newValue) |
1878 { | 1878 { |
1879 return m_inputType->shouldDispatchFormControlChangeEvent(oldValue, newValue)
; | 1879 return m_inputType->shouldDispatchFormControlChangeEvent(oldValue, newValue)
; |
1880 } | 1880 } |
1881 | 1881 |
1882 } // namespace | 1882 } // namespace |
OLD | NEW |