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

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

Issue 59463007: Have Element::ensureUserAgentShadowRoot() return a reference (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add extra assertion 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
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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 ScriptWrappable::init(this); 88 ScriptWrappable::init(this);
89 } 89 }
90 90
91 PassRefPtr<HTMLTextAreaElement> HTMLTextAreaElement::create(const QualifiedName& tagName, Document& document, HTMLFormElement* form) 91 PassRefPtr<HTMLTextAreaElement> HTMLTextAreaElement::create(const QualifiedName& tagName, Document& document, HTMLFormElement* form)
92 { 92 {
93 RefPtr<HTMLTextAreaElement> textArea = adoptRef(new HTMLTextAreaElement(tagN ame, document, form)); 93 RefPtr<HTMLTextAreaElement> textArea = adoptRef(new HTMLTextAreaElement(tagN ame, document, form));
94 textArea->ensureUserAgentShadowRoot(); 94 textArea->ensureUserAgentShadowRoot();
95 return textArea.release(); 95 return textArea.release();
96 } 96 }
97 97
98 void HTMLTextAreaElement::didAddUserAgentShadowRoot(ShadowRoot* root) 98 void HTMLTextAreaElement::didAddUserAgentShadowRoot(ShadowRoot& root)
99 { 99 {
100 root->appendChild(TextControlInnerTextElement::create(document())); 100 root.appendChild(TextControlInnerTextElement::create(document()));
101 } 101 }
102 102
103 const AtomicString& HTMLTextAreaElement::formControlType() const 103 const AtomicString& HTMLTextAreaElement::formControlType() const
104 { 104 {
105 DEFINE_STATIC_LOCAL(const AtomicString, textarea, ("textarea", AtomicString: :ConstructFromLiteral)); 105 DEFINE_STATIC_LOCAL(const AtomicString, textarea, ("textarea", AtomicString: :ConstructFromLiteral));
106 return textarea; 106 return textarea;
107 } 107 }
108 108
109 FormControlState HTMLTextAreaElement::saveFormControlState() const 109 FormControlState HTMLTextAreaElement::saveFormControlState() const
110 { 110 {
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
530 } 530 }
531 placeholder->setTextContent(placeholderText, ASSERT_NO_EXCEPTION); 531 placeholder->setTextContent(placeholderText, ASSERT_NO_EXCEPTION);
532 } 532 }
533 533
534 bool HTMLTextAreaElement::isInteractiveContent() const 534 bool HTMLTextAreaElement::isInteractiveContent() const
535 { 535 {
536 return true; 536 return true;
537 } 537 }
538 538
539 } 539 }
OLDNEW
« no previous file with comments | « Source/core/html/HTMLTextAreaElement.h ('k') | Source/core/html/shadow/MediaControlElements.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698