| 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 20 matching lines...) Expand all Loading... |
| 31 #include "core/html/HTMLInputElement.h" | 31 #include "core/html/HTMLInputElement.h" |
| 32 | 32 |
| 33 #include "bindings/core/v8/ExceptionMessages.h" | 33 #include "bindings/core/v8/ExceptionMessages.h" |
| 34 #include "bindings/core/v8/ExceptionState.h" | 34 #include "bindings/core/v8/ExceptionState.h" |
| 35 #include "bindings/core/v8/ScriptEventListener.h" | 35 #include "bindings/core/v8/ScriptEventListener.h" |
| 36 #include "core/CSSPropertyNames.h" | 36 #include "core/CSSPropertyNames.h" |
| 37 #include "core/HTMLNames.h" | 37 #include "core/HTMLNames.h" |
| 38 #include "core/InputTypeNames.h" | 38 #include "core/InputTypeNames.h" |
| 39 #include "core/dom/AXObjectCache.h" | 39 #include "core/dom/AXObjectCache.h" |
| 40 #include "core/dom/Document.h" | 40 #include "core/dom/Document.h" |
| 41 #include "core/dom/ExecutionContextTask.h" | |
| 42 #include "core/dom/IdTargetObserver.h" | 41 #include "core/dom/IdTargetObserver.h" |
| 43 #include "core/dom/StyleChangeReason.h" | 42 #include "core/dom/StyleChangeReason.h" |
| 44 #include "core/dom/TaskRunnerHelper.h" | 43 #include "core/dom/TaskRunnerHelper.h" |
| 45 #include "core/dom/shadow/InsertionPoint.h" | 44 #include "core/dom/shadow/InsertionPoint.h" |
| 46 #include "core/dom/shadow/ShadowRoot.h" | 45 #include "core/dom/shadow/ShadowRoot.h" |
| 47 #include "core/editing/FrameSelection.h" | 46 #include "core/editing/FrameSelection.h" |
| 48 #include "core/editing/spellcheck/SpellChecker.h" | 47 #include "core/editing/spellcheck/SpellChecker.h" |
| 49 #include "core/events/BeforeTextInsertedEvent.h" | 48 #include "core/events/BeforeTextInsertedEvent.h" |
| 50 #include "core/events/KeyboardEvent.h" | 49 #include "core/events/KeyboardEvent.h" |
| 51 #include "core/events/MouseEvent.h" | 50 #include "core/events/MouseEvent.h" |
| (...skipping 1205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1257 } | 1256 } |
| 1258 | 1257 |
| 1259 if (evt->isKeyboardEvent() && evt->type() == EventTypeNames::keyup) { | 1258 if (evt->isKeyboardEvent() && evt->type() == EventTypeNames::keyup) { |
| 1260 m_inputTypeView->handleKeyupEvent(toKeyboardEvent(evt)); | 1259 m_inputTypeView->handleKeyupEvent(toKeyboardEvent(evt)); |
| 1261 if (evt->defaultHandled()) | 1260 if (evt->defaultHandled()) |
| 1262 return; | 1261 return; |
| 1263 } | 1262 } |
| 1264 | 1263 |
| 1265 if (m_inputTypeView->shouldSubmitImplicitly(evt)) { | 1264 if (m_inputTypeView->shouldSubmitImplicitly(evt)) { |
| 1266 // FIXME: Remove type check. | 1265 // FIXME: Remove type check. |
| 1267 if (type() == InputTypeNames::search) | 1266 if (type() == InputTypeNames::search) { |
| 1268 document().postTask(TaskType::UserInteraction, BLINK_FROM_HERE, | 1267 TaskRunnerHelper::get(TaskType::UserInteraction, &document()) |
| 1269 createSameThreadTask(&HTMLInputElement::onSearch, | 1268 ->postTask(BLINK_FROM_HERE, WTF::bind(&HTMLInputElement::onSearch, |
| 1270 wrapPersistent(this))); | 1269 wrapPersistent(this))); |
| 1270 } |
| 1271 // Form submission finishes editing, just as loss of focus does. | 1271 // Form submission finishes editing, just as loss of focus does. |
| 1272 // If there was a change, send the event now. | 1272 // If there was a change, send the event now. |
| 1273 if (wasChangedSinceLastFormControlChangeEvent()) | 1273 if (wasChangedSinceLastFormControlChangeEvent()) |
| 1274 dispatchFormControlChangeEvent(); | 1274 dispatchFormControlChangeEvent(); |
| 1275 | 1275 |
| 1276 HTMLFormElement* formForSubmission = m_inputTypeView->formForSubmission(); | 1276 HTMLFormElement* formForSubmission = m_inputTypeView->formForSubmission(); |
| 1277 // Form may never have been present, or may have been destroyed by code | 1277 // Form may never have been present, or may have been destroyed by code |
| 1278 // responding to the change event. | 1278 // responding to the change event. |
| 1279 if (formForSubmission) | 1279 if (formForSubmission) |
| 1280 formForSubmission->submitImplicitly(evt, canTriggerImplicitSubmission()); | 1280 formForSubmission->submitImplicitly(evt, canTriggerImplicitSubmission()); |
| (...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1886 | 1886 |
| 1887 bool HTMLInputElement::hasFallbackContent() const { | 1887 bool HTMLInputElement::hasFallbackContent() const { |
| 1888 return m_inputTypeView->hasFallbackContent(); | 1888 return m_inputTypeView->hasFallbackContent(); |
| 1889 } | 1889 } |
| 1890 | 1890 |
| 1891 void HTMLInputElement::setFilesFromPaths(const Vector<String>& paths) { | 1891 void HTMLInputElement::setFilesFromPaths(const Vector<String>& paths) { |
| 1892 return m_inputType->setFilesFromPaths(paths); | 1892 return m_inputType->setFilesFromPaths(paths); |
| 1893 } | 1893 } |
| 1894 | 1894 |
| 1895 } // namespace blink | 1895 } // namespace blink |
| OLD | NEW |