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

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

Issue 19510005: [oilpan] Completely move HTMLFormControlElement's hierarchy to the managed heap Base URL: svn://svn.chromium.org/blink/branches/oilpan
Patch Set: Created 7 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/html/HTMLTextAreaElement.h ('k') | Source/core/html/HTMLTextFormControlElement.h » ('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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 , m_wrap(SoftWrap) 93 , m_wrap(SoftWrap)
94 , m_placeholder(0) 94 , m_placeholder(0)
95 , m_isDirty(false) 95 , m_isDirty(false)
96 , m_wasModifiedByUser(false) 96 , m_wasModifiedByUser(false)
97 { 97 {
98 ASSERT(hasTagName(textareaTag)); 98 ASSERT(hasTagName(textareaTag));
99 setFormControlValueMatchesRenderer(true); 99 setFormControlValueMatchesRenderer(true);
100 ScriptWrappable::init(this); 100 ScriptWrappable::init(this);
101 } 101 }
102 102
103 PassRefPtr<HTMLTextAreaElement> HTMLTextAreaElement::create(const QualifiedName& tagName, Document* document, HTMLFormElement* form) 103 Result<HTMLTextAreaElement> HTMLTextAreaElement::create(const QualifiedName& tag Name, Document* document, HTMLFormElement* form)
104 { 104 {
105 RefPtr<HTMLTextAreaElement> textArea = adoptRef(new HTMLTextAreaElement(tagN ame, document, form)); 105 Handle<HTMLTextAreaElement> textArea = adoptNode(new HTMLTextAreaElement(tag Name, document, form));
106 textArea->ensureUserAgentShadowRoot(); 106 textArea->ensureUserAgentShadowRoot();
107 return textArea.release(); 107 return textArea;
108 } 108 }
109 109
110 void HTMLTextAreaElement::didAddUserAgentShadowRoot(ShadowRoot* root) 110 void HTMLTextAreaElement::didAddUserAgentShadowRoot(ShadowRoot* root)
111 { 111 {
112 root->appendChild(TextControlInnerTextElement::create(document()), ASSERT_NO _EXCEPTION); 112 root->appendChild(TextControlInnerTextElement::create(document()), ASSERT_NO _EXCEPTION);
113 } 113 }
114 114
115 const AtomicString& HTMLTextAreaElement::formControlType() const 115 const AtomicString& HTMLTextAreaElement::formControlType() const
116 { 116 {
117 DEFINE_STATIC_LOCAL(const AtomicString, textarea, ("textarea", AtomicString: :ConstructFromLiteral)); 117 DEFINE_STATIC_LOCAL(const AtomicString, textarea, ("textarea", AtomicString: :ConstructFromLiteral));
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
554 if (!m_placeholder) { 554 if (!m_placeholder) {
555 RefPtr<HTMLDivElement> placeholder = HTMLDivElement::create(document()); 555 RefPtr<HTMLDivElement> placeholder = HTMLDivElement::create(document());
556 m_placeholder = placeholder.get(); 556 m_placeholder = placeholder.get();
557 m_placeholder->setPseudo(AtomicString("-webkit-input-placeholder", Atomi cString::ConstructFromLiteral)); 557 m_placeholder->setPseudo(AtomicString("-webkit-input-placeholder", Atomi cString::ConstructFromLiteral));
558 userAgentShadowRoot()->insertBefore(m_placeholder, innerTextElement()->n extSibling(), ASSERT_NO_EXCEPTION); 558 userAgentShadowRoot()->insertBefore(m_placeholder, innerTextElement()->n extSibling(), ASSERT_NO_EXCEPTION);
559 } 559 }
560 m_placeholder->setInnerText(placeholderText, ASSERT_NO_EXCEPTION); 560 m_placeholder->setInnerText(placeholderText, ASSERT_NO_EXCEPTION);
561 fixPlaceholderRenderer(m_placeholder, innerTextElement()); 561 fixPlaceholderRenderer(m_placeholder, innerTextElement());
562 } 562 }
563 563
564 void HTMLTextAreaElement::acceptHeapVisitor(Visitor* visitor) const
565 {
566 HTMLTextFormControlElement::acceptHeapVisitor(visitor);
564 } 567 }
568
569 }
OLDNEW
« no previous file with comments | « Source/core/html/HTMLTextAreaElement.h ('k') | Source/core/html/HTMLTextFormControlElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698