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 23 matching lines...) Expand all Loading... |
34 #include "RuntimeEnabledFeatures.h" | 34 #include "RuntimeEnabledFeatures.h" |
35 #include "bindings/v8/ExceptionState.h" | 35 #include "bindings/v8/ExceptionState.h" |
36 #include "bindings/v8/ScriptEventListener.h" | 36 #include "bindings/v8/ScriptEventListener.h" |
37 #include "core/accessibility/AXObjectCache.h" | 37 #include "core/accessibility/AXObjectCache.h" |
38 #include "core/dom/Document.h" | 38 #include "core/dom/Document.h" |
39 #include "core/dom/ExceptionCode.h" | 39 #include "core/dom/ExceptionCode.h" |
40 #include "core/dom/IdTargetObserver.h" | 40 #include "core/dom/IdTargetObserver.h" |
41 #include "core/dom/shadow/ElementShadow.h" | 41 #include "core/dom/shadow/ElementShadow.h" |
42 #include "core/dom/shadow/InsertionPoint.h" | 42 #include "core/dom/shadow/InsertionPoint.h" |
43 #include "core/dom/shadow/ShadowRoot.h" | 43 #include "core/dom/shadow/ShadowRoot.h" |
44 #include "core/editing/Editor.h" | |
45 #include "core/editing/FrameSelection.h" | 44 #include "core/editing/FrameSelection.h" |
| 45 #include "core/editing/SpellChecker.h" |
46 #include "core/events/BeforeTextInsertedEvent.h" | 46 #include "core/events/BeforeTextInsertedEvent.h" |
47 #include "core/events/KeyboardEvent.h" | 47 #include "core/events/KeyboardEvent.h" |
48 #include "core/events/MouseEvent.h" | 48 #include "core/events/MouseEvent.h" |
49 #include "core/events/ScopedEventQueue.h" | 49 #include "core/events/ScopedEventQueue.h" |
50 #include "core/events/ThreadLocalEventNames.h" | 50 #include "core/events/ThreadLocalEventNames.h" |
51 #include "core/events/TouchEvent.h" | 51 #include "core/events/TouchEvent.h" |
52 #include "core/fileapi/FileList.h" | 52 #include "core/fileapi/FileList.h" |
53 #include "core/frame/Frame.h" | 53 #include "core/frame/Frame.h" |
54 #include "core/frame/FrameView.h" | 54 #include "core/frame/FrameView.h" |
55 #include "core/html/HTMLCollection.h" | 55 #include "core/html/HTMLCollection.h" |
56 #include "core/html/HTMLDataListElement.h" | 56 #include "core/html/HTMLDataListElement.h" |
57 #include "core/html/HTMLFormElement.h" | 57 #include "core/html/HTMLFormElement.h" |
58 #include "core/html/HTMLImageLoader.h" | 58 #include "core/html/HTMLImageLoader.h" |
59 #include "core/html/HTMLOptionElement.h" | 59 #include "core/html/HTMLOptionElement.h" |
60 #include "core/html/forms/ColorInputType.h" | 60 #include "core/html/forms/ColorInputType.h" |
61 #include "core/html/forms/FileInputType.h" | 61 #include "core/html/forms/FileInputType.h" |
62 #include "core/html/forms/FormController.h" | 62 #include "core/html/forms/FormController.h" |
63 #include "core/html/forms/InputType.h" | 63 #include "core/html/forms/InputType.h" |
64 #include "core/html/forms/SearchInputType.h" | 64 #include "core/html/forms/SearchInputType.h" |
65 #include "core/html/parser/HTMLParserIdioms.h" | 65 #include "core/html/parser/HTMLParserIdioms.h" |
66 #include "core/html/shadow/ShadowElementNames.h" | 66 #include "core/html/shadow/ShadowElementNames.h" |
67 #include "core/frame/UseCounter.h" | 67 #include "core/frame/UseCounter.h" |
| 68 #include "core/page/Chrome.h" |
| 69 #include "core/page/ChromeClient.h" |
| 70 #include "core/page/Page.h" |
68 #include "core/rendering/RenderTextControlSingleLine.h" | 71 #include "core/rendering/RenderTextControlSingleLine.h" |
69 #include "core/rendering/RenderTheme.h" | 72 #include "core/rendering/RenderTheme.h" |
70 #include "platform/DateTimeChooser.h" | 73 #include "platform/DateTimeChooser.h" |
71 #include "platform/Language.h" | 74 #include "platform/Language.h" |
72 #include "platform/PlatformMouseEvent.h" | 75 #include "platform/PlatformMouseEvent.h" |
73 #include "platform/text/PlatformLocale.h" | 76 #include "platform/text/PlatformLocale.h" |
74 #include "wtf/MathExtras.h" | 77 #include "wtf/MathExtras.h" |
75 | 78 |
76 using namespace std; | 79 using namespace std; |
77 | 80 |
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 } else | 348 } else |
346 HTMLTextFormControlElement::updateFocusAppearance(restorePreviousSelecti
on); | 349 HTMLTextFormControlElement::updateFocusAppearance(restorePreviousSelecti
on); |
347 } | 350 } |
348 | 351 |
349 void HTMLInputElement::beginEditing() | 352 void HTMLInputElement::beginEditing() |
350 { | 353 { |
351 if (!isTextField()) | 354 if (!isTextField()) |
352 return; | 355 return; |
353 | 356 |
354 if (Frame* frame = document().frame()) | 357 if (Frame* frame = document().frame()) |
355 frame->editor().textAreaOrTextFieldDidBeginEditing(this); | 358 frame->spellChecker().didBeginEditing(this); |
356 } | 359 } |
357 | 360 |
358 void HTMLInputElement::endEditing() | 361 void HTMLInputElement::endEditing() |
359 { | 362 { |
360 if (!isTextField()) | 363 if (!isTextField()) |
361 return; | 364 return; |
362 | 365 |
363 if (Frame* frame = document().frame()) | 366 if (Frame* frame = document().frame()) { |
364 frame->editor().textFieldDidEndEditing(this); | 367 frame->spellChecker().didEndEditingOnTextField(this); |
| 368 if (Page* page = frame->page()) |
| 369 page->chrome().client().didEndEditingOnTextField(*this); |
| 370 } |
365 } | 371 } |
366 | 372 |
367 bool HTMLInputElement::shouldUseInputMethod() | 373 bool HTMLInputElement::shouldUseInputMethod() |
368 { | 374 { |
369 return m_inputType->shouldUseInputMethod(); | 375 return m_inputType->shouldUseInputMethod(); |
370 } | 376 } |
371 | 377 |
372 void HTMLInputElement::handleFocusEvent(Element* oldFocusedElement, FocusDirecti
on direction) | 378 void HTMLInputElement::handleFocusEvent(Element* oldFocusedElement, FocusDirecti
on direction) |
373 { | 379 { |
374 m_inputTypeView->handleFocusEvent(oldFocusedElement, direction); | 380 m_inputTypeView->handleFocusEvent(oldFocusedElement, direction); |
(...skipping 1483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1858 } | 1864 } |
1859 | 1865 |
1860 #if ENABLE(INPUT_MULTIPLE_FIELDS_UI) | 1866 #if ENABLE(INPUT_MULTIPLE_FIELDS_UI) |
1861 PassRefPtr<RenderStyle> HTMLInputElement::customStyleForRenderer() | 1867 PassRefPtr<RenderStyle> HTMLInputElement::customStyleForRenderer() |
1862 { | 1868 { |
1863 return m_inputTypeView->customStyleForRenderer(originalStyleForRenderer()); | 1869 return m_inputTypeView->customStyleForRenderer(originalStyleForRenderer()); |
1864 } | 1870 } |
1865 #endif | 1871 #endif |
1866 | 1872 |
1867 } // namespace | 1873 } // namespace |
OLD | NEW |