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

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

Issue 2716153003: Removed FrameHost::chromeClient() (Closed)
Patch Set: Small feedback Created 3 years, 9 months 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
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 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Apple Inc. All rights
6 * reserved. 6 * 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 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 21 matching lines...) Expand all
32 #include "core/dom/Document.h" 32 #include "core/dom/Document.h"
33 #include "core/dom/ExceptionCode.h" 33 #include "core/dom/ExceptionCode.h"
34 #include "core/dom/StyleChangeReason.h" 34 #include "core/dom/StyleChangeReason.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/FrameSelection.h" 37 #include "core/editing/FrameSelection.h"
38 #include "core/editing/iterators/TextIterator.h" 38 #include "core/editing/iterators/TextIterator.h"
39 #include "core/editing/spellcheck/SpellChecker.h" 39 #include "core/editing/spellcheck/SpellChecker.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/frame/FrameHost.h"
43 #include "core/frame/LocalFrame.h" 42 #include "core/frame/LocalFrame.h"
44 #include "core/frame/UseCounter.h" 43 #include "core/frame/UseCounter.h"
45 #include "core/html/FormData.h" 44 #include "core/html/FormData.h"
46 #include "core/html/forms/FormController.h" 45 #include "core/html/forms/FormController.h"
47 #include "core/html/parser/HTMLParserIdioms.h" 46 #include "core/html/parser/HTMLParserIdioms.h"
48 #include "core/html/shadow/ShadowElementNames.h" 47 #include "core/html/shadow/ShadowElementNames.h"
49 #include "core/html/shadow/TextControlInnerElements.h" 48 #include "core/html/shadow/TextControlInnerElements.h"
50 #include "core/layout/LayoutTextControlMultiLine.h" 49 #include "core/layout/LayoutTextControlMultiLine.h"
51 #include "core/page/ChromeClient.h" 50 #include "core/page/ChromeClient.h"
51 #include "core/page/Page.h"
52 #include "platform/text/PlatformLocale.h" 52 #include "platform/text/PlatformLocale.h"
53 #include "wtf/StdLibExtras.h" 53 #include "wtf/StdLibExtras.h"
54 #include "wtf/text/StringBuilder.h" 54 #include "wtf/text/StringBuilder.h"
55 55
56 namespace blink { 56 namespace blink {
57 57
58 using namespace HTMLNames; 58 using namespace HTMLNames;
59 59
60 static const unsigned defaultRows = 2; 60 static const unsigned defaultRows = 2;
61 static const unsigned defaultCols = 20; 61 static const unsigned defaultCols = 20;
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 updatePlaceholderVisibility(); 293 updatePlaceholderVisibility();
294 294
295 if (!isFocused()) 295 if (!isFocused())
296 return; 296 return;
297 297
298 // When typing in a textarea, childrenChanged is not called, so we need to 298 // When typing in a textarea, childrenChanged is not called, so we need to
299 // force the directionality check. 299 // force the directionality check.
300 calculateAndAdjustDirectionality(); 300 calculateAndAdjustDirectionality();
301 301
302 DCHECK(document().isActive()); 302 DCHECK(document().isActive());
303 document().frameHost()->chromeClient().didChangeValueInTextField(*this); 303 document().page()->chromeClient().didChangeValueInTextField(*this);
304 } 304 }
305 305
306 void HTMLTextAreaElement::handleBeforeTextInsertedEvent( 306 void HTMLTextAreaElement::handleBeforeTextInsertedEvent(
307 BeforeTextInsertedEvent* event) const { 307 BeforeTextInsertedEvent* event) const {
308 DCHECK(event); 308 DCHECK(event);
309 DCHECK(layoutObject()); 309 DCHECK(layoutObject());
310 int signedMaxLength = maxLength(); 310 int signedMaxLength = maxLength();
311 if (signedMaxLength < 0) 311 if (signedMaxLength < 0)
312 return; 312 return;
313 unsigned unsignedMaxLength = static_cast<unsigned>(signedMaxLength); 313 unsigned unsignedMaxLength = static_cast<unsigned>(signedMaxLength);
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
641 void HTMLTextAreaElement::copyNonAttributePropertiesFromElement( 641 void HTMLTextAreaElement::copyNonAttributePropertiesFromElement(
642 const Element& source) { 642 const Element& source) {
643 const HTMLTextAreaElement& sourceElement = 643 const HTMLTextAreaElement& sourceElement =
644 static_cast<const HTMLTextAreaElement&>(source); 644 static_cast<const HTMLTextAreaElement&>(source);
645 setValueCommon(sourceElement.value(), DispatchNoEvent, SetSeletion); 645 setValueCommon(sourceElement.value(), DispatchNoEvent, SetSeletion);
646 m_isDirty = sourceElement.m_isDirty; 646 m_isDirty = sourceElement.m_isDirty;
647 TextControlElement::copyNonAttributePropertiesFromElement(source); 647 TextControlElement::copyNonAttributePropertiesFromElement(source);
648 } 648 }
649 649
650 } // namespace blink 650 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698