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

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

Issue 418833002: Remove all members in ScopedStyleTree for preparing class removal (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix destructor Created 6 years, 5 months 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 | Annotate | Revision Log
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 600 matching lines...) Expand 10 before | Expand all | Expand 10 after
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();
624 }
625 } 623 }
626 } 624 }
627 625
628 void StyleSheetContents::clearRuleSet() 626 void StyleSheetContents::clearRuleSet()
629 { 627 {
630 if (StyleSheetContents* parentSheet = parentStyleSheet()) 628 if (StyleSheetContents* parentSheet = parentStyleSheet())
631 parentSheet->clearRuleSet(); 629 parentSheet->clearRuleSet();
632 630
633 // Don't want to clear the StyleResolver if the RuleSet hasn't been created 631 // Don't want to clear the StyleResolver if the RuleSet hasn't been created
634 // since we only clear the StyleResolver so that it's members are properly 632 // 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
691 visitor->trace(m_ownerRule); 689 visitor->trace(m_ownerRule);
692 visitor->trace(m_importRules); 690 visitor->trace(m_importRules);
693 visitor->trace(m_childRules); 691 visitor->trace(m_childRules);
694 visitor->trace(m_loadingClients); 692 visitor->trace(m_loadingClients);
695 visitor->trace(m_completedClients); 693 visitor->trace(m_completedClients);
696 visitor->trace(m_ruleSet); 694 visitor->trace(m_ruleSet);
697 #endif 695 #endif
698 } 696 }
699 697
700 } 698 }
OLDNEW
« no previous file with comments | « no previous file | Source/core/css/resolver/ScopedStyleResolver.h » ('j') | Source/core/css/resolver/StyleResolver.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698