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

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

Issue 66643004: Remove QualifiedName argument from most HTMLElement::create functions (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Hack for XML prefix 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
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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 count++; 68 count++;
69 } 69 }
70 return count; 70 return count;
71 } 71 }
72 72
73 static inline unsigned computeLengthForSubmission(const String& text) 73 static inline unsigned computeLengthForSubmission(const String& text)
74 { 74 {
75 return text.length() + numberOfLineBreaks(text); 75 return text.length() + numberOfLineBreaks(text);
76 } 76 }
77 77
78 HTMLTextAreaElement::HTMLTextAreaElement(const QualifiedName& tagName, Document& document, HTMLFormElement* form) 78 HTMLTextAreaElement::HTMLTextAreaElement(Document& document, HTMLFormElement* fo rm)
79 : HTMLTextFormControlElement(tagName, document, form) 79 : HTMLTextFormControlElement(textareaTag, document, form)
80 , m_rows(defaultRows) 80 , m_rows(defaultRows)
81 , m_cols(defaultCols) 81 , m_cols(defaultCols)
82 , m_wrap(SoftWrap) 82 , m_wrap(SoftWrap)
83 , m_isDirty(false) 83 , m_isDirty(false)
84 , m_wasModifiedByUser(false) 84 , m_wasModifiedByUser(false)
85 { 85 {
86 ASSERT(hasTagName(textareaTag));
87 setFormControlValueMatchesRenderer(true); 86 setFormControlValueMatchesRenderer(true);
88 ScriptWrappable::init(this); 87 ScriptWrappable::init(this);
89 } 88 }
90 89
91 PassRefPtr<HTMLTextAreaElement> HTMLTextAreaElement::create(const QualifiedName& tagName, Document& document, HTMLFormElement* form) 90 PassRefPtr<HTMLTextAreaElement> HTMLTextAreaElement::create(Document& document, HTMLFormElement* form)
92 { 91 {
93 RefPtr<HTMLTextAreaElement> textArea = adoptRef(new HTMLTextAreaElement(tagN ame, document, form)); 92 RefPtr<HTMLTextAreaElement> textArea = adoptRef(new HTMLTextAreaElement(docu ment, form));
94 textArea->ensureUserAgentShadowRoot(); 93 textArea->ensureUserAgentShadowRoot();
95 return textArea.release(); 94 return textArea.release();
96 } 95 }
97 96
98 void HTMLTextAreaElement::didAddUserAgentShadowRoot(ShadowRoot& root) 97 void HTMLTextAreaElement::didAddUserAgentShadowRoot(ShadowRoot& root)
99 { 98 {
100 root.appendChild(TextControlInnerTextElement::create(document())); 99 root.appendChild(TextControlInnerTextElement::create(document()));
101 } 100 }
102 101
103 const AtomicString& HTMLTextAreaElement::formControlType() const 102 const AtomicString& HTMLTextAreaElement::formControlType() const
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
530 } 529 }
531 placeholder->setTextContent(placeholderText, ASSERT_NO_EXCEPTION); 530 placeholder->setTextContent(placeholderText, ASSERT_NO_EXCEPTION);
532 } 531 }
533 532
534 bool HTMLTextAreaElement::isInteractiveContent() const 533 bool HTMLTextAreaElement::isInteractiveContent() const
535 { 534 {
536 return true; 535 return true;
537 } 536 }
538 537
539 } 538 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698