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

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

Issue 20123003: [oilpan] The Node hierarchy should have correct accept method chains (Closed) 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
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 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 break; 461 break;
462 } while (++diff); 462 } while (++diff);
463 } else { 463 } else {
464 const Vector<HTMLElement*>& items = listItems(); 464 const Vector<HTMLElement*>& items = listItems();
465 465
466 // Removing children fires mutation events, which might mutate the DOM f urther, so we first copy out a list 466 // Removing children fires mutation events, which might mutate the DOM f urther, so we first copy out a list
467 // of elements that we intend to remove then attempt to remove them one at a time. 467 // of elements that we intend to remove then attempt to remove them one at a time.
468 Vector<RefPtr<Element> > itemsToRemove; 468 Vector<RefPtr<Element> > itemsToRemove;
469 size_t optionIndex = 0; 469 size_t optionIndex = 0;
470 for (size_t i = 0; i < items.size(); ++i) { 470 for (size_t i = 0; i < items.size(); ++i) {
471 NoHandleScope scope; 471 HandleScope scope;
472 Element* item = items[i]; 472 Element* item = items[i];
473 if (item->hasLocalName(optionTag) && optionIndex++ >= newLen) { 473 if (item->hasLocalName(optionTag) && optionIndex++ >= newLen) {
474 ASSERT(item->parentNode()); 474 ASSERT(item->parentNode());
475 itemsToRemove.append(item); 475 itemsToRemove.append(item);
476 } 476 }
477 } 477 }
478 478
479 for (size_t i = 0; i < itemsToRemove.size(); ++i) { 479 for (size_t i = 0; i < itemsToRemove.size(); ++i) {
480 HandleScope scope; 480 HandleScope scope;
481 Element* item = itemsToRemove[i].get(); 481 Element* item = itemsToRemove[i].get();
(...skipping 1083 matching lines...) Expand 10 before | Expand all | Expand 10 after
1565 1565
1566 return options; 1566 return options;
1567 } 1567 }
1568 1568
1569 void HTMLSelectElement::acceptHeapVisitor(Visitor* visitor) const 1569 void HTMLSelectElement::acceptHeapVisitor(Visitor* visitor) const
1570 { 1570 {
1571 HTMLFormControlElementWithState::acceptHeapVisitor(visitor); 1571 HTMLFormControlElementWithState::acceptHeapVisitor(visitor);
1572 } 1572 }
1573 1573
1574 } // namespace 1574 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698