Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 611 if (!m_ruleSet) { | 611 if (!m_ruleSet) { |
| 612 m_ruleSet = RuleSet::create(); | 612 m_ruleSet = RuleSet::create(); |
| 613 m_ruleSet->addRulesFromSheet(this, medium, addRuleFlags); | 613 m_ruleSet->addRulesFromSheet(this, medium, addRuleFlags); |
| 614 } | 614 } |
| 615 return *m_ruleSet.get(); | 615 return *m_ruleSet.get(); |
| 616 } | 616 } |
| 617 | 617 |
| 618 static void clearResolvers(WillBeHeapHashSet<RawPtrWillBeWeakMember<CSSStyleShee t> >& clients) | 618 static void clearResolvers(WillBeHeapHashSet<RawPtrWillBeWeakMember<CSSStyleShee t> >& clients) |
| 619 { | 619 { |
| 620 for (WillBeHeapHashSet<RawPtrWillBeWeakMember<CSSStyleSheet> >::iterator it = clients.begin(); it != clients.end(); ++it) { | 620 for (WillBeHeapHashSet<RawPtrWillBeWeakMember<CSSStyleSheet> >::iterator it = clients.begin(); it != clients.end(); ++it) { |
| 621 if (Document* document = (*it)->ownerDocument()) | 621 if (Document* document = (*it)->ownerDocument()) { |
| 622 document->styleEngine()->clearResolver(); | 622 document->styleEngine()->clearResolver(); |
| 623 document->clearScopedStyleResolver(); | |
|
kochi
2014/07/24 12:46:40
Probably eventually we should clear the ScopedStyl
| |
| 624 } | |
| 623 } | 625 } |
| 624 } | 626 } |
| 625 | 627 |
| 626 void StyleSheetContents::clearRuleSet() | 628 void StyleSheetContents::clearRuleSet() |
| 627 { | 629 { |
| 628 if (StyleSheetContents* parentSheet = parentStyleSheet()) | 630 if (StyleSheetContents* parentSheet = parentStyleSheet()) |
| 629 parentSheet->clearRuleSet(); | 631 parentSheet->clearRuleSet(); |
| 630 | 632 |
| 631 // Don't want to clear the StyleResolver if the RuleSet hasn't been created | 633 // Don't want to clear the StyleResolver if the RuleSet hasn't been created |
| 632 // since we only clear the StyleResolver so that it's members are properly | 634 // since we only clear the StyleResolver so that it's members are properly |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 689 visitor->trace(m_ownerRule); | 691 visitor->trace(m_ownerRule); |
| 690 visitor->trace(m_importRules); | 692 visitor->trace(m_importRules); |
| 691 visitor->trace(m_childRules); | 693 visitor->trace(m_childRules); |
| 692 visitor->trace(m_loadingClients); | 694 visitor->trace(m_loadingClients); |
| 693 visitor->trace(m_completedClients); | 695 visitor->trace(m_completedClients); |
| 694 visitor->trace(m_ruleSet); | 696 visitor->trace(m_ruleSet); |
| 695 #endif | 697 #endif |
| 696 } | 698 } |
| 697 | 699 |
| 698 } | 700 } |
| OLD | NEW |