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

Side by Side Diff: Source/core/html/HTMLSelectElement.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/HTMLSelectElement.h ('k') | Source/core/html/HTMLTextAreaElement.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) 2010 Nokia Corporation and/or its subsidiary(-ies). 2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
4 * (C) 1999 Antti Koivisto (koivisto@kde.org) 4 * (C) 1999 Antti Koivisto (koivisto@kde.org)
5 * (C) 2001 Dirk Mueller (mueller@kde.org) 5 * (C) 2001 Dirk Mueller (mueller@kde.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010, 2011 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010, 2011 Apple Inc. All rights reserved.
7 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 7 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
8 * Copyright (C) 2010 Google Inc. All rights reserved. 8 * Copyright (C) 2010 Google Inc. All rights reserved.
9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
10 * 10 *
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 , m_activeSelectionEndIndex(-1) 77 , m_activeSelectionEndIndex(-1)
78 , m_isProcessingUserDrivenChange(false) 78 , m_isProcessingUserDrivenChange(false)
79 , m_multiple(false) 79 , m_multiple(false)
80 , m_activeSelectionState(false) 80 , m_activeSelectionState(false)
81 , m_shouldRecalcListItems(false) 81 , m_shouldRecalcListItems(false)
82 { 82 {
83 ASSERT(hasTagName(selectTag)); 83 ASSERT(hasTagName(selectTag));
84 ScriptWrappable::init(this); 84 ScriptWrappable::init(this);
85 } 85 }
86 86
87 PassRefPtr<HTMLSelectElement> HTMLSelectElement::create(const QualifiedName& tag Name, Document* document, HTMLFormElement* form) 87 Result<HTMLSelectElement> HTMLSelectElement::create(const QualifiedName& tagName , Document* document, HTMLFormElement* form)
88 { 88 {
89 ASSERT(tagName.matches(selectTag)); 89 ASSERT(tagName.matches(selectTag));
90 return adoptRef(new HTMLSelectElement(tagName, document, form)); 90 return adoptNode(new HTMLSelectElement(tagName, document, form));
91 } 91 }
92 92
93 const AtomicString& HTMLSelectElement::formControlType() const 93 const AtomicString& HTMLSelectElement::formControlType() const
94 { 94 {
95 DEFINE_STATIC_LOCAL(const AtomicString, selectMultiple, ("select-multiple", AtomicString::ConstructFromLiteral)); 95 DEFINE_STATIC_LOCAL(const AtomicString, selectMultiple, ("select-multiple", AtomicString::ConstructFromLiteral));
96 DEFINE_STATIC_LOCAL(const AtomicString, selectOne, ("select-one", AtomicStri ng::ConstructFromLiteral)); 96 DEFINE_STATIC_LOCAL(const AtomicString, selectOne, ("select-one", AtomicStri ng::ConstructFromLiteral));
97 return m_multiple ? selectMultiple : selectOne; 97 return m_multiple ? selectMultiple : selectOne;
98 } 98 }
99 99
100 void HTMLSelectElement::deselectItems(HTMLOptionElement* excludeElement) 100 void HTMLSelectElement::deselectItems(HTMLOptionElement* excludeElement)
(...skipping 1458 matching lines...) Expand 10 before | Expand all | Expand 10 after
1559 1559
1560 const Vector<HTMLElement*>& items = listItems(); 1560 const Vector<HTMLElement*>& items = listItems();
1561 for (unsigned i = 0; i < items.size(); ++i) { 1561 for (unsigned i = 0; i < items.size(); ++i) {
1562 if (items[i]->hasTagName(optionTag)) 1562 if (items[i]->hasTagName(optionTag))
1563 ++options; 1563 ++options;
1564 } 1564 }
1565 1565
1566 return options; 1566 return options;
1567 } 1567 }
1568 1568
1569 void HTMLSelectElement::acceptHeapVisitor(Visitor* visitor) const
1570 {
1571 HTMLFormControlElementWithState::acceptHeapVisitor(visitor);
1572 }
1573
1569 } // namespace 1574 } // namespace
OLDNEW
« no previous file with comments | « Source/core/html/HTMLSelectElement.h ('k') | Source/core/html/HTMLTextAreaElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698