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

Side by Side Diff: Source/core/css/resolver/ScopedStyleResolver.cpp

Issue 418833002: Remove all members in ScopedStyleTree for preparing class removal (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: ifdef 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 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
4 * Copyright (C) 2012 Google Inc. All rights reserved. 4 * Copyright (C) 2012 Google Inc. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 { 73 {
74 m_authorStyleSheets.append(cssSheet); 74 m_authorStyleSheets.append(cssSheet);
75 StyleSheetContents* sheet = cssSheet->contents(); 75 StyleSheetContents* sheet = cssSheet->contents();
76 76
77 AddRuleFlags addRuleFlags = resolver->document().securityOrigin()->canReques t(sheet->baseURL()) ? RuleHasDocumentSecurityOrigin : RuleHasNoSpecialState; 77 AddRuleFlags addRuleFlags = resolver->document().securityOrigin()->canReques t(sheet->baseURL()) ? RuleHasDocumentSecurityOrigin : RuleHasNoSpecialState;
78 const RuleSet& ruleSet = sheet->ensureRuleSet(medium, addRuleFlags); 78 const RuleSet& ruleSet = sheet->ensureRuleSet(medium, addRuleFlags);
79 resolver->addMediaQueryResults(ruleSet.viewportDependentMediaQueryResults()) ; 79 resolver->addMediaQueryResults(ruleSet.viewportDependentMediaQueryResults()) ;
80 resolver->processScopedRules(ruleSet, cssSheet, treeScope().rootNode()); 80 resolver->processScopedRules(ruleSet, cssSheet, treeScope().rootNode());
81 } 81 }
82 82
83 void ScopedStyleResolver::collectFeaturesTo(RuleFeatureSet& features, HashSet<co nst StyleSheetContents*>& visitedSharedStyleSheetContents) 83 void ScopedStyleResolver::collectFeaturesTo(RuleFeatureSet& features, HashSet<co nst StyleSheetContents*>& visitedSharedStyleSheetContents) const
84 { 84 {
85 for (size_t i = 0; i < m_authorStyleSheets.size(); ++i) { 85 for (size_t i = 0; i < m_authorStyleSheets.size(); ++i) {
86 StyleSheetContents* contents = m_authorStyleSheets[i]->contents(); 86 StyleSheetContents* contents = m_authorStyleSheets[i]->contents();
87 if (contents->hasOneClient() || visitedSharedStyleSheetContents.add(cont ents).isNewEntry) 87 if (contents->hasOneClient() || visitedSharedStyleSheetContents.add(cont ents).isNewEntry)
88 features.add(contents->ruleSet().features()); 88 features.add(contents->ruleSet().features());
89 } 89 }
90 } 90 }
91 91
92 void ScopedStyleResolver::resetAuthorStyle() 92 void ScopedStyleResolver::resetAuthorStyle()
93 { 93 {
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 void ScopedStyleResolver::trace(Visitor* visitor) 154 void ScopedStyleResolver::trace(Visitor* visitor)
155 { 155 {
156 #if ENABLE(OILPAN) 156 #if ENABLE(OILPAN)
157 visitor->trace(m_scope); 157 visitor->trace(m_scope);
158 visitor->trace(m_authorStyleSheets); 158 visitor->trace(m_authorStyleSheets);
159 visitor->trace(m_keyframesRuleMap); 159 visitor->trace(m_keyframesRuleMap);
160 #endif 160 #endif
161 } 161 }
162 162
163 } // namespace blink 163 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698