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

Side by Side Diff: Source/core/html/HTMLOptionElement.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/HTMLMediaElement.cpp ('k') | Source/core/html/HTMLPlugInElement.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) 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 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 5 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
6 * Copyright (C) 2004, 2005, 2006, 2010 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2010 Apple Inc. All rights reserved.
7 * Copyright (C) 2010 Google Inc. All rights reserved. 7 * Copyright (C) 2010 Google Inc. All rights reserved.
8 * Copyright (C) 2011 Motorola Mobility, Inc. All rights reserved. 8 * Copyright (C) 2011 Motorola Mobility, Inc. All rights reserved.
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 61
62 PassRefPtr<HTMLOptionElement> HTMLOptionElement::createForJSConstructor(Document & document, const String& data, const AtomicString& value, 62 PassRefPtr<HTMLOptionElement> HTMLOptionElement::createForJSConstructor(Document & document, const String& data, const AtomicString& value,
63 bool defaultSelected, bool selected, ExceptionState& exceptionState) 63 bool defaultSelected, bool selected, ExceptionState& exceptionState)
64 { 64 {
65 RefPtr<HTMLOptionElement> element = adoptRef(new HTMLOptionElement(document) ); 65 RefPtr<HTMLOptionElement> element = adoptRef(new HTMLOptionElement(document) );
66 66
67 RefPtr<Text> text = Text::create(document, data.isNull() ? "" : data); 67 RefPtr<Text> text = Text::create(document, data.isNull() ? "" : data);
68 68
69 element->appendChild(text.release(), exceptionState); 69 element->appendChild(text.release(), exceptionState);
70 if (exceptionState.hadException()) 70 if (exceptionState.hadException())
71 return 0; 71 return nullptr;
72 72
73 if (!value.isNull()) 73 if (!value.isNull())
74 element->setValue(value); 74 element->setValue(value);
75 if (defaultSelected) 75 if (defaultSelected)
76 element->setAttribute(selectedAttr, emptyAtom); 76 element->setAttribute(selectedAttr, emptyAtom);
77 element->setSelected(selected); 77 element->setSelected(selected);
78 78
79 return element.release(); 79 return element.release();
80 } 80 }
81 81
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 369
370 HTMLFormElement* HTMLOptionElement::form() const 370 HTMLFormElement* HTMLOptionElement::form() const
371 { 371 {
372 if (HTMLSelectElement* selectElement = ownerSelectElement()) 372 if (HTMLSelectElement* selectElement = ownerSelectElement())
373 return selectElement->formOwner(); 373 return selectElement->formOwner();
374 374
375 return 0; 375 return 0;
376 } 376 }
377 377
378 } // namespace WebCore 378 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/html/HTMLMediaElement.cpp ('k') | Source/core/html/HTMLPlugInElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698