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

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

Issue 170603003: Use nullptr_t for RefPtr, PassRefPtr and RawPtr. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Final rebase Created 6 years, 10 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/HTMLPlugInElement.cpp ('k') | Source/core/html/HTMLTableElement.cpp » ('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 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 Element* HTMLSelectElement::item(unsigned index) 402 Element* HTMLSelectElement::item(unsigned index)
403 { 403 {
404 return options()->item(index); 404 return options()->item(index);
405 } 405 }
406 406
407 void HTMLSelectElement::setOption(unsigned index, HTMLOptionElement* option, Exc eptionState& exceptionState) 407 void HTMLSelectElement::setOption(unsigned index, HTMLOptionElement* option, Exc eptionState& exceptionState)
408 { 408 {
409 if (index > maxSelectItems - 1) 409 if (index > maxSelectItems - 1)
410 index = maxSelectItems - 1; 410 index = maxSelectItems - 1;
411 int diff = index - length(); 411 int diff = index - length();
412 RefPtr<HTMLElement> before = 0; 412 RefPtr<HTMLElement> before = nullptr;
413 // Out of array bounds? First insert empty dummies. 413 // Out of array bounds? First insert empty dummies.
414 if (diff > 0) { 414 if (diff > 0) {
415 setLength(index, exceptionState); 415 setLength(index, exceptionState);
416 // Replace an existing entry? 416 // Replace an existing entry?
417 } else if (diff < 0) { 417 } else if (diff < 0) {
418 before = toHTMLElement(options()->item(index+1)); 418 before = toHTMLElement(options()->item(index+1));
419 remove(index); 419 remove(index);
420 } 420 }
421 // Finally add the new element. 421 // Finally add the new element.
422 if (!exceptionState.hadException()) { 422 if (!exceptionState.hadException()) {
(...skipping 1146 matching lines...) Expand 10 before | Expand all | Expand 10 after
1569 { 1569 {
1570 return true; 1570 return true;
1571 } 1571 }
1572 1572
1573 bool HTMLSelectElement::supportsAutofocus() const 1573 bool HTMLSelectElement::supportsAutofocus() const
1574 { 1574 {
1575 return true; 1575 return true;
1576 } 1576 }
1577 1577
1578 } // namespace 1578 } // namespace
OLDNEW
« no previous file with comments | « Source/core/html/HTMLPlugInElement.cpp ('k') | Source/core/html/HTMLTableElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698