| 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 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 while (!pending_rules->IsEmpty()) { | 363 while (!pending_rules->IsEmpty()) { |
| 364 builder.Append(pending_rules->Peek()); | 364 builder.Append(pending_rules->Peek()); |
| 365 pending_rules->Pop(); | 365 pending_rules->Pop(); |
| 366 } | 366 } |
| 367 | 367 |
| 368 compact_rules->value = builder.Release(); | 368 compact_rules->value = builder.Release(); |
| 369 } | 369 } |
| 370 } | 370 } |
| 371 | 371 |
| 372 void RuleSet::CompactRules() { | 372 void RuleSet::CompactRules() { |
| 373 ASSERT(pending_rules_); | 373 DCHECK(pending_rules_); |
| 374 PendingRuleMaps* pending_rules = pending_rules_.Release(); | 374 PendingRuleMaps* pending_rules = pending_rules_.Release(); |
| 375 CompactPendingRules(pending_rules->id_rules, id_rules_); | 375 CompactPendingRules(pending_rules->id_rules, id_rules_); |
| 376 CompactPendingRules(pending_rules->class_rules, class_rules_); | 376 CompactPendingRules(pending_rules->class_rules, class_rules_); |
| 377 CompactPendingRules(pending_rules->tag_rules, tag_rules_); | 377 CompactPendingRules(pending_rules->tag_rules, tag_rules_); |
| 378 CompactPendingRules(pending_rules->shadow_pseudo_element_rules, | 378 CompactPendingRules(pending_rules->shadow_pseudo_element_rules, |
| 379 shadow_pseudo_element_rules_); | 379 shadow_pseudo_element_rules_); |
| 380 link_pseudo_class_rules_.ShrinkToFit(); | 380 link_pseudo_class_rules_.ShrinkToFit(); |
| 381 cue_pseudo_rules_.ShrinkToFit(); | 381 cue_pseudo_rules_.ShrinkToFit(); |
| 382 focus_pseudo_class_rules_.ShrinkToFit(); | 382 focus_pseudo_class_rules_.ShrinkToFit(); |
| 383 placeholder_pseudo_rules_.ShrinkToFit(); | 383 placeholder_pseudo_rules_.ShrinkToFit(); |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 431 } | 431 } |
| 432 | 432 |
| 433 #ifndef NDEBUG | 433 #ifndef NDEBUG |
| 434 void RuleSet::Show() const { | 434 void RuleSet::Show() const { |
| 435 for (const auto& rule : all_rules_) | 435 for (const auto& rule : all_rules_) |
| 436 rule.Selector().Show(); | 436 rule.Selector().Show(); |
| 437 } | 437 } |
| 438 #endif | 438 #endif |
| 439 | 439 |
| 440 } // namespace blink | 440 } // namespace blink |
| OLD | NEW |