| 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 | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All |
| 6 * rights reserved. | 6 * rights reserved. |
| 7 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 7 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
| 8 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org) | 8 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org) |
| 9 * Copyright (C) 2010 Google Inc. All rights reserved. | 9 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 10 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. | 10 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. |
| (...skipping 1247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1258 wrapPersistent(this))); | 1258 wrapPersistent(this))); |
| 1259 } | 1259 } |
| 1260 // Form submission finishes editing, just as loss of focus does. | 1260 // Form submission finishes editing, just as loss of focus does. |
| 1261 // If there was a change, send the event now. | 1261 // If there was a change, send the event now. |
| 1262 if (wasChangedSinceLastFormControlChangeEvent()) | 1262 if (wasChangedSinceLastFormControlChangeEvent()) |
| 1263 dispatchFormControlChangeEvent(); | 1263 dispatchFormControlChangeEvent(); |
| 1264 | 1264 |
| 1265 HTMLFormElement* formForSubmission = m_inputTypeView->formForSubmission(); | 1265 HTMLFormElement* formForSubmission = m_inputTypeView->formForSubmission(); |
| 1266 // Form may never have been present, or may have been destroyed by code | 1266 // Form may never have been present, or may have been destroyed by code |
| 1267 // responding to the change event. | 1267 // responding to the change event. |
| 1268 if (formForSubmission) | 1268 if (formForSubmission) { |
| 1269 formForSubmission->submitImplicitly(evt, canTriggerImplicitSubmission()); | 1269 formForSubmission->submitImplicitly(evt, canTriggerImplicitSubmission()); |
| 1270 // We treat implicit submission is something like blur()-then-focus(). So |
| 1271 // we reset the last value. crbug.com/695349. |
| 1272 setTextAsOfLastFormControlChangeEvent(value()); |
| 1273 } |
| 1270 | 1274 |
| 1271 evt->setDefaultHandled(); | 1275 evt->setDefaultHandled(); |
| 1272 return; | 1276 return; |
| 1273 } | 1277 } |
| 1274 | 1278 |
| 1275 if (evt->isBeforeTextInsertedEvent()) | 1279 if (evt->isBeforeTextInsertedEvent()) |
| 1276 m_inputTypeView->handleBeforeTextInsertedEvent( | 1280 m_inputTypeView->handleBeforeTextInsertedEvent( |
| 1277 static_cast<BeforeTextInsertedEvent*>(evt)); | 1281 static_cast<BeforeTextInsertedEvent*>(evt)); |
| 1278 | 1282 |
| 1279 if (evt->isMouseEvent() && evt->type() == EventTypeNames::mousedown) { | 1283 if (evt->isMouseEvent() && evt->type() == EventTypeNames::mousedown) { |
| (...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1875 | 1879 |
| 1876 bool HTMLInputElement::hasFallbackContent() const { | 1880 bool HTMLInputElement::hasFallbackContent() const { |
| 1877 return m_inputTypeView->hasFallbackContent(); | 1881 return m_inputTypeView->hasFallbackContent(); |
| 1878 } | 1882 } |
| 1879 | 1883 |
| 1880 void HTMLInputElement::setFilesFromPaths(const Vector<String>& paths) { | 1884 void HTMLInputElement::setFilesFromPaths(const Vector<String>& paths) { |
| 1881 return m_inputType->setFilesFromPaths(paths); | 1885 return m_inputType->setFilesFromPaths(paths); |
| 1882 } | 1886 } |
| 1883 | 1887 |
| 1884 } // namespace blink | 1888 } // namespace blink |
| OLD | NEW |