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

Side by Side Diff: third_party/WebKit/Source/core/css/StyleSheetContents.cpp

Issue 2502413004: WTF/std normalization: replace WTF::Vector::last with ::back (Closed)
Patch Set: rebase Created 4 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 * (C) 1999-2003 Lars Knoll (knoll@kde.org) 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2004, 2006, 2007, 2012 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2006, 2007, 2012 Apple Inc. All rights reserved.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 } 156 }
157 157
158 void StyleSheetContents::parserAppendRule(StyleRuleBase* rule) { 158 void StyleSheetContents::parserAppendRule(StyleRuleBase* rule) {
159 if (rule->isImportRule()) { 159 if (rule->isImportRule()) {
160 // Parser enforces that @import rules come before anything else 160 // Parser enforces that @import rules come before anything else
161 ASSERT(m_childRules.isEmpty()); 161 ASSERT(m_childRules.isEmpty());
162 StyleRuleImport* importRule = toStyleRuleImport(rule); 162 StyleRuleImport* importRule = toStyleRuleImport(rule);
163 if (importRule->mediaQueries()) 163 if (importRule->mediaQueries())
164 setHasMediaQueries(); 164 setHasMediaQueries();
165 m_importRules.append(importRule); 165 m_importRules.append(importRule);
166 m_importRules.last()->setParentStyleSheet(this); 166 m_importRules.back()->setParentStyleSheet(this);
167 m_importRules.last()->requestStyleSheet(); 167 m_importRules.back()->requestStyleSheet();
168 return; 168 return;
169 } 169 }
170 170
171 if (rule->isNamespaceRule()) { 171 if (rule->isNamespaceRule()) {
172 // Parser enforces that @namespace rules come before all rules other than 172 // Parser enforces that @namespace rules come before all rules other than
173 // import/charset rules 173 // import/charset rules
174 ASSERT(m_childRules.isEmpty()); 174 ASSERT(m_childRules.isEmpty());
175 StyleRuleNamespace& namespaceRule = toStyleRuleNamespace(*rule); 175 StyleRuleNamespace& namespaceRule = toStyleRuleNamespace(*rule);
176 parserAddNamespace(namespaceRule.prefix(), namespaceRule.uri()); 176 parserAddNamespace(namespaceRule.prefix(), namespaceRule.uri());
177 m_namespaceRules.append(&namespaceRule); 177 m_namespaceRules.append(&namespaceRule);
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after
685 visitor->trace(m_importRules); 685 visitor->trace(m_importRules);
686 visitor->trace(m_namespaceRules); 686 visitor->trace(m_namespaceRules);
687 visitor->trace(m_childRules); 687 visitor->trace(m_childRules);
688 visitor->trace(m_loadingClients); 688 visitor->trace(m_loadingClients);
689 visitor->trace(m_completedClients); 689 visitor->trace(m_completedClients);
690 visitor->trace(m_ruleSet); 690 visitor->trace(m_ruleSet);
691 visitor->trace(m_referencedFromResource); 691 visitor->trace(m_referencedFromResource);
692 } 692 }
693 693
694 } // namespace blink 694 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698