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

Side by Side Diff: third_party/WebKit/Source/core/dom/StyleEngine.h

Issue 2593643002: Clear active tree scopes on StyleEngine::didDetach(). (Closed)
Patch Set: Rebased Created 4 years 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/StyleEngine.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All
7 * rights reserved. 7 * rights reserved.
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
9 * (http://www.torchmobile.com/) 9 * (http://www.torchmobile.com/)
10 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 10 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 void setRuleUsageTracker(StyleRuleUsageTracker*); 180 void setRuleUsageTracker(StyleRuleUsageTracker*);
181 181
182 StyleResolver& ensureResolver() { 182 StyleResolver& ensureResolver() {
183 updateActiveStyle(); 183 updateActiveStyle();
184 if (!m_resolver) 184 if (!m_resolver)
185 createResolver(); 185 createResolver();
186 return *m_resolver; 186 return *m_resolver;
187 } 187 }
188 188
189 bool hasResolver() const { return m_resolver; } 189 bool hasResolver() const { return m_resolver; }
190 void clearResolver();
191 190
192 StyleInvalidator& styleInvalidator() { return m_styleInvalidator; } 191 StyleInvalidator& styleInvalidator() { return m_styleInvalidator; }
193 bool mediaQueryAffectedByViewportChange(); 192 bool mediaQueryAffectedByViewportChange();
194 bool mediaQueryAffectedByDeviceChange(); 193 bool mediaQueryAffectedByDeviceChange();
195 bool hasViewportDependentMediaQueries() const { 194 bool hasViewportDependentMediaQueries() const {
196 return !m_globalRuleSet.ruleFeatureSet() 195 return !m_globalRuleSet.ruleFeatureSet()
197 .viewportDependentMediaQueryResults() 196 .viewportDependentMediaQueryResults()
198 .isEmpty(); 197 .isEmpty();
199 } 198 }
200 199
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 Document& document() const { return *m_document; } 279 Document& document() const { return *m_document; }
281 280
282 typedef HeapHashSet<Member<TreeScope>> UnorderedTreeScopeSet; 281 typedef HeapHashSet<Member<TreeScope>> UnorderedTreeScopeSet;
283 282
284 void mediaQueryAffectingValueChanged(UnorderedTreeScopeSet&); 283 void mediaQueryAffectingValueChanged(UnorderedTreeScopeSet&);
285 const RuleFeatureSet& ruleFeatureSet() const { 284 const RuleFeatureSet& ruleFeatureSet() const {
286 return m_globalRuleSet.ruleFeatureSet(); 285 return m_globalRuleSet.ruleFeatureSet();
287 } 286 }
288 287
289 void createResolver(); 288 void createResolver();
289 void clearResolvers();
290 290
291 CSSStyleSheet* parseSheet(Element&, 291 CSSStyleSheet* parseSheet(Element&,
292 const String& text, 292 const String& text,
293 TextPosition startPosition); 293 TextPosition startPosition);
294 294
295 const DocumentStyleSheetCollection& documentStyleSheetCollection() const { 295 const DocumentStyleSheetCollection& documentStyleSheetCollection() const {
296 DCHECK(m_documentStyleSheetCollection); 296 DCHECK(m_documentStyleSheetCollection);
297 return *m_documentStyleSheetCollection; 297 return *m_documentStyleSheetCollection;
298 } 298 }
299 299
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 365
366 std::unique_ptr<StyleResolverStats> m_styleResolverStats; 366 std::unique_ptr<StyleResolverStats> m_styleResolverStats;
367 unsigned m_styleForElementCount = 0; 367 unsigned m_styleForElementCount = 0;
368 368
369 friend class StyleEngineTest; 369 friend class StyleEngineTest;
370 }; 370 };
371 371
372 } // namespace blink 372 } // namespace blink
373 373
374 #endif 374 #endif
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/StyleEngine.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698