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

Side by Side Diff: third_party/WebKit/Source/core/html/parser/HTMLFormattingElementList.cpp

Issue 2776203002: Migrate WTF::Vector::remove() to ::erase() (Closed)
Patch Set: rebase, repatch VectorTest Created 3 years, 8 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google, Inc. All Rights Reserved. 2 * Copyright (C) 2010 Google, Inc. All Rights Reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 } 91 }
92 92
93 void HTMLFormattingElementList::append(HTMLStackItem* item) { 93 void HTMLFormattingElementList::append(HTMLStackItem* item) {
94 ensureNoahsArkCondition(item); 94 ensureNoahsArkCondition(item);
95 m_entries.push_back(item); 95 m_entries.push_back(item);
96 } 96 }
97 97
98 void HTMLFormattingElementList::remove(Element* element) { 98 void HTMLFormattingElementList::remove(Element* element) {
99 size_t index = m_entries.reverseFind(element); 99 size_t index = m_entries.reverseFind(element);
100 if (index != kNotFound) 100 if (index != kNotFound)
101 m_entries.remove(index); 101 m_entries.erase(index);
102 } 102 }
103 103
104 void HTMLFormattingElementList::appendMarker() { 104 void HTMLFormattingElementList::appendMarker() {
105 m_entries.push_back(Entry::MarkerEntry); 105 m_entries.push_back(Entry::MarkerEntry);
106 } 106 }
107 107
108 void HTMLFormattingElementList::clearToLastMarker() { 108 void HTMLFormattingElementList::clearToLastMarker() {
109 // http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#cl ear-the-list-of-active-formatting-elements-up-to-the-last-marker 109 // http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#cl ear-the-list-of-active-formatting-elements-up-to-the-last-marker
110 while (m_entries.size()) { 110 while (m_entries.size()) {
111 bool shouldStop = m_entries.back().isMarker(); 111 bool shouldStop = m_entries.back().isMarker();
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 if (entry.isMarker()) 203 if (entry.isMarker())
204 LOG(INFO) << "marker"; 204 LOG(INFO) << "marker";
205 else 205 else
206 LOG(INFO) << *entry.element(); 206 LOG(INFO) << *entry.element();
207 } 207 }
208 } 208 }
209 209
210 #endif 210 #endif
211 211
212 } // namespace blink 212 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698