Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(462)

Side by Side Diff: Source/core/html/HTMLTextAreaElement.cpp

Issue 72543005: Get rid of explict editor dependency from text field (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 2013-11-18T17:22:32 Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/html/HTMLInputElement.cpp ('k') | Source/core/html/forms/TextFieldInputType.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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, 2010 Apple Inc. All rights reserv ed. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Apple Inc. All rights reserv ed.
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 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 16 matching lines...) Expand all
27 #include "core/html/HTMLTextAreaElement.h" 27 #include "core/html/HTMLTextAreaElement.h"
28 28
29 #include "CSSValueKeywords.h" 29 #include "CSSValueKeywords.h"
30 #include "HTMLNames.h" 30 #include "HTMLNames.h"
31 #include "bindings/v8/ExceptionState.h" 31 #include "bindings/v8/ExceptionState.h"
32 #include "bindings/v8/ExceptionStatePlaceholder.h" 32 #include "bindings/v8/ExceptionStatePlaceholder.h"
33 #include "core/dom/Document.h" 33 #include "core/dom/Document.h"
34 #include "core/dom/ExceptionCode.h" 34 #include "core/dom/ExceptionCode.h"
35 #include "core/dom/Text.h" 35 #include "core/dom/Text.h"
36 #include "core/dom/shadow/ShadowRoot.h" 36 #include "core/dom/shadow/ShadowRoot.h"
37 #include "core/editing/Editor.h"
38 #include "core/editing/FrameSelection.h" 37 #include "core/editing/FrameSelection.h"
38 #include "core/editing/SpellChecker.h"
39 #include "core/editing/TextIterator.h" 39 #include "core/editing/TextIterator.h"
40 #include "core/events/BeforeTextInsertedEvent.h" 40 #include "core/events/BeforeTextInsertedEvent.h"
41 #include "core/events/Event.h" 41 #include "core/events/Event.h"
42 #include "core/events/ThreadLocalEventNames.h" 42 #include "core/events/ThreadLocalEventNames.h"
43 #include "core/html/FormDataList.h" 43 #include "core/html/FormDataList.h"
44 #include "core/html/forms/FormController.h" 44 #include "core/html/forms/FormController.h"
45 #include "core/html/shadow/ShadowElementNames.h" 45 #include "core/html/shadow/ShadowElementNames.h"
46 #include "core/html/shadow/TextControlInnerElements.h" 46 #include "core/html/shadow/TextControlInnerElements.h"
47 #include "core/frame/Frame.h" 47 #include "core/frame/Frame.h"
48 #include "core/rendering/RenderTextControlMultiLine.h" 48 #include "core/rendering/RenderTextControlMultiLine.h"
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 forwardEvent(event); 257 forwardEvent(event);
258 else if (renderer() && event->isBeforeTextInsertedEvent()) 258 else if (renderer() && event->isBeforeTextInsertedEvent())
259 handleBeforeTextInsertedEvent(static_cast<BeforeTextInsertedEvent*>(even t)); 259 handleBeforeTextInsertedEvent(static_cast<BeforeTextInsertedEvent*>(even t));
260 260
261 HTMLTextFormControlElement::defaultEventHandler(event); 261 HTMLTextFormControlElement::defaultEventHandler(event);
262 } 262 }
263 263
264 void HTMLTextAreaElement::handleFocusEvent(Element*, FocusDirection) 264 void HTMLTextAreaElement::handleFocusEvent(Element*, FocusDirection)
265 { 265 {
266 if (Frame* frame = document().frame()) 266 if (Frame* frame = document().frame())
267 frame->editor().textAreaOrTextFieldDidBeginEditing(this); 267 frame->spellChecker().didBeginEditing(this);
268 } 268 }
269 269
270 void HTMLTextAreaElement::subtreeHasChanged() 270 void HTMLTextAreaElement::subtreeHasChanged()
271 { 271 {
272 setChangedSinceLastFormControlChangeEvent(true); 272 setChangedSinceLastFormControlChangeEvent(true);
273 setFormControlValueMatchesRenderer(false); 273 setFormControlValueMatchesRenderer(false);
274 setNeedsValidityCheck(); 274 setNeedsValidityCheck();
275 275
276 if (!focused()) 276 if (!focused())
277 return; 277 return;
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 } 529 }
530 placeholder->setTextContent(placeholderText, ASSERT_NO_EXCEPTION); 530 placeholder->setTextContent(placeholderText, ASSERT_NO_EXCEPTION);
531 } 531 }
532 532
533 bool HTMLTextAreaElement::isInteractiveContent() const 533 bool HTMLTextAreaElement::isInteractiveContent() const
534 { 534 {
535 return true; 535 return true;
536 } 536 }
537 537
538 } 538 }
OLDNEW
« no previous file with comments | « Source/core/html/HTMLInputElement.cpp ('k') | Source/core/html/forms/TextFieldInputType.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698