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

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

Issue 656723005: Use C++11 features in core/html (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: mike's comments Created 6 years, 1 month 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
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 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 } 420 }
421 421
422 return value.toString(); 422 return value.toString();
423 } 423 }
424 424
425 void HTMLTextAreaElement::setDefaultValue(const String& defaultValue) 425 void HTMLTextAreaElement::setDefaultValue(const String& defaultValue)
426 { 426 {
427 RefPtrWillBeRawPtr<Node> protectFromMutationEvents(this); 427 RefPtrWillBeRawPtr<Node> protectFromMutationEvents(this);
428 428
429 // To preserve comments, remove only the text nodes, then add a single text node. 429 // To preserve comments, remove only the text nodes, then add a single text node.
430 WillBeHeapVector<RefPtrWillBeMember<Node> > textNodes; 430 WillBeHeapVector<RefPtrWillBeMember<Node>> textNodes;
431 for (Node* n = firstChild(); n; n = n->nextSibling()) { 431 for (Node* n = firstChild(); n; n = n->nextSibling()) {
432 if (n->isTextNode()) 432 if (n->isTextNode())
433 textNodes.append(n); 433 textNodes.append(n);
434 } 434 }
435 size_t size = textNodes.size(); 435 size_t size = textNodes.size();
436 for (size_t i = 0; i < size; ++i) 436 for (size_t i = 0; i < size; ++i)
437 removeChild(textNodes[i].get(), IGNORE_EXCEPTION); 437 removeChild(textNodes[i].get(), IGNORE_EXCEPTION);
438 438
439 // Normalize line endings. 439 // Normalize line endings.
440 String value = defaultValue; 440 String value = defaultValue;
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
626 { 626 {
627 return true; 627 return true;
628 } 628 }
629 629
630 bool HTMLTextAreaElement::supportsAutofocus() const 630 bool HTMLTextAreaElement::supportsAutofocus() const
631 { 631 {
632 return true; 632 return true;
633 } 633 }
634 634
635 } 635 }
OLDNEW
« no previous file with comments | « Source/core/html/HTMLTableSectionElement.cpp ('k') | Source/core/html/HTMLTextFormControlElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698