OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |