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: Source/core/html/HTMLOptionsCollection.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/HTMLOptionElement.cpp ('k') | Source/core/html/HTMLOutputElement.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) 2006, 2011, 2012 Apple Computer, Inc. 2 * Copyright (C) 2006, 2011, 2012 Apple Computer, Inc.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 ec = TYPE_MISMATCH_ERR; 52 ec = TYPE_MISMATCH_ERR;
53 return; 53 return;
54 } 54 }
55 55
56 if (index < -1) { 56 if (index < -1) {
57 ec = INDEX_SIZE_ERR; 57 ec = INDEX_SIZE_ERR;
58 return; 58 return;
59 } 59 }
60 60
61 ec = 0; 61 ec = 0;
62 HTMLSelectElement* select = toHTMLSelectElement(ownerNode()); 62 Handle<HTMLSelectElement> select = toHTMLSelectElement(ownerNode());
63 63
64 if (index == -1 || unsigned(index) >= length()) 64 if (index == -1 || unsigned(index) >= length())
65 select->add(newOption, 0, ec); 65 select->add(newOption, 0, ec);
66 else 66 else
67 select->add(newOption, static_cast<HTMLOptionElement*>(item(index)), ec) ; 67 select->add(newOption, static_cast<HTMLOptionElement*>(item(index)), ec) ;
68 68
69 ASSERT(!ec); 69 ASSERT(!ec);
70 } 70 }
71 71
72 void HTMLOptionsCollection::remove(int index) 72 void HTMLOptionsCollection::remove(int index)
(...skipping 10 matching lines...) Expand all
83 { 83 {
84 toHTMLSelectElement(ownerNode())->setSelectedIndex(index); 84 toHTMLSelectElement(ownerNode())->setSelectedIndex(index);
85 } 85 }
86 86
87 void HTMLOptionsCollection::setLength(unsigned length, ExceptionCode& ec) 87 void HTMLOptionsCollection::setLength(unsigned length, ExceptionCode& ec)
88 { 88 {
89 toHTMLSelectElement(ownerNode())->setLength(length, ec); 89 toHTMLSelectElement(ownerNode())->setLength(length, ec);
90 } 90 }
91 91
92 } //namespace 92 } //namespace
OLDNEW
« no previous file with comments | « Source/core/html/HTMLOptionElement.cpp ('k') | Source/core/html/HTMLOutputElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698