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

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

Issue 67473002: Have ElementTraversal / NodeTraversal's next() methods take a reference (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase on master Created 7 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
« no previous file with comments | « Source/core/html/HTMLObjectElement.h ('k') | Source/core/html/HTMLTextFormControlElement.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 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 String HTMLOptionElement::collectOptionInnerText() const 360 String HTMLOptionElement::collectOptionInnerText() const
361 { 361 {
362 StringBuilder text; 362 StringBuilder text;
363 for (Node* node = firstChild(); node; ) { 363 for (Node* node = firstChild(); node; ) {
364 if (node->isTextNode()) 364 if (node->isTextNode())
365 text.append(node->nodeValue()); 365 text.append(node->nodeValue());
366 // Text nodes inside script elements are not part of the option text. 366 // Text nodes inside script elements are not part of the option text.
367 if (node->isElementNode() && toScriptLoaderIfPossible(toElement(node))) 367 if (node->isElementNode() && toScriptLoaderIfPossible(toElement(node)))
368 node = NodeTraversal::nextSkippingChildren(node, this); 368 node = NodeTraversal::nextSkippingChildren(node, this);
369 else 369 else
370 node = NodeTraversal::next(node, this); 370 node = NodeTraversal::next(*node, this);
371 } 371 }
372 return text.toString(); 372 return text.toString();
373 } 373 }
374 374
375 } // namespace WebCore 375 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/html/HTMLObjectElement.h ('k') | Source/core/html/HTMLTextFormControlElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698