OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) | 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) |
4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) | 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) |
5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All | 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All |
6 * rights reserved. | 6 * rights reserved. |
7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> | 8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> |
9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. | 9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
10 * (http://www.torchmobile.com/) | 10 * (http://www.torchmobile.com/) |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
253 return; | 253 return; |
254 | 254 |
255 if (!FindBestRuleSetAndAdd(rule_data.Selector(), rule_data)) { | 255 if (!FindBestRuleSetAndAdd(rule_data.Selector(), rule_data)) { |
256 // If we didn't find a specialized map to stick it in, file under universal | 256 // If we didn't find a specialized map to stick it in, file under universal |
257 // rules. | 257 // rules. |
258 universal_rules_.push_back(rule_data); | 258 universal_rules_.push_back(rule_data); |
259 } | 259 } |
260 } | 260 } |
261 | 261 |
262 void RuleSet::AddPageRule(StyleRulePage* rule) { | 262 void RuleSet::AddPageRule(StyleRulePage* rule) { |
263 EnsurePendingRules(); // So that m_pageRules.shrinkToFit() gets called. | 263 EnsurePendingRules(); // So that page_rules_.ShrinkToFit() gets called. |
dcheng
2017/04/10 23:19:57
This is likely going to get renamed to shrink_to_f
| |
264 page_rules_.push_back(rule); | 264 page_rules_.push_back(rule); |
265 } | 265 } |
266 | 266 |
267 void RuleSet::AddFontFaceRule(StyleRuleFontFace* rule) { | 267 void RuleSet::AddFontFaceRule(StyleRuleFontFace* rule) { |
268 EnsurePendingRules(); // So that m_fontFaceRules.shrinkToFit() gets called. | 268 EnsurePendingRules(); // So that font_face_rules_.ShrinkToFit() gets called. |
269 font_face_rules_.push_back(rule); | 269 font_face_rules_.push_back(rule); |
270 } | 270 } |
271 | 271 |
272 void RuleSet::AddKeyframesRule(StyleRuleKeyframes* rule) { | 272 void RuleSet::AddKeyframesRule(StyleRuleKeyframes* rule) { |
273 EnsurePendingRules(); // So that m_keyframesRules.shrinkToFit() gets called. | 273 EnsurePendingRules(); // So that keyframes_rules_.ShrinkToFit() gets called. |
274 keyframes_rules_.push_back(rule); | 274 keyframes_rules_.push_back(rule); |
275 } | 275 } |
276 | 276 |
277 void RuleSet::AddChildRules(const HeapVector<Member<StyleRuleBase>>& rules, | 277 void RuleSet::AddChildRules(const HeapVector<Member<StyleRuleBase>>& rules, |
278 const MediaQueryEvaluator& medium, | 278 const MediaQueryEvaluator& medium, |
279 AddRuleFlags add_rule_flags) { | 279 AddRuleFlags add_rule_flags) { |
280 for (unsigned i = 0; i < rules.size(); ++i) { | 280 for (unsigned i = 0; i < rules.size(); ++i) { |
281 StyleRuleBase* rule = rules[i].Get(); | 281 StyleRuleBase* rule = rules[i].Get(); |
282 | 282 |
283 if (rule->IsStyleRule()) { | 283 if (rule->IsStyleRule()) { |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
433 } | 433 } |
434 | 434 |
435 #ifndef NDEBUG | 435 #ifndef NDEBUG |
436 void RuleSet::Show() const { | 436 void RuleSet::Show() const { |
437 for (const auto& rule : all_rules_) | 437 for (const auto& rule : all_rules_) |
438 rule.Selector().Show(); | 438 rule.Selector().Show(); |
439 } | 439 } |
440 #endif | 440 #endif |
441 | 441 |
442 } // namespace blink | 442 } // namespace blink |
OLD | NEW |