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

Unified Diff: Source/core/css/invalidation/StyleSheetInvalidationAnalysis.h

Issue 1313443003: Fix crash when removing stylesheets from shadow tree. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Addressed review issues and added test. Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/css/invalidation/StyleSheetInvalidationAnalysis.h
diff --git a/Source/core/css/invalidation/StyleSheetInvalidationAnalysis.h b/Source/core/css/invalidation/StyleSheetInvalidationAnalysis.h
index 009a5c42a3080df75a12a0fd9880f48926a6383f..409fa774fbb4fddbee3e0f7c7f4ce81a6fb415b8 100644
--- a/Source/core/css/invalidation/StyleSheetInvalidationAnalysis.h
+++ b/Source/core/css/invalidation/StyleSheetInvalidationAnalysis.h
@@ -36,23 +36,26 @@ namespace blink {
class Document;
class Node;
class StyleSheetContents;
+class TreeScope;
class StyleSheetInvalidationAnalysis {
STACK_ALLOCATED();
public:
- StyleSheetInvalidationAnalysis(const WillBeHeapVector<RawPtrWillBeMember<StyleSheetContents>>&);
+ StyleSheetInvalidationAnalysis(const TreeScope&, const WillBeHeapVector<RawPtrWillBeMember<StyleSheetContents>>&);
bool dirtiesAllStyle() const { return m_dirtiesAllStyle; }
- void invalidateStyle(Document&);
+ void invalidateStyle();
private:
void analyzeStyleSheet(StyleSheetContents*);
- bool m_dirtiesAllStyle;
+ const TreeScope& m_treeScope;
HashSet<StringImpl*> m_idScopes;
HashSet<StringImpl*> m_classScopes;
- WillBeHeapVector<RawPtrWillBeMember<Node>, 8> m_scopingNodes;
+
+ bool m_dirtiesAllStyle = false;
+ bool m_hasDistributedRules = false;
};
}

Powered by Google App Engine
This is Rietveld 408576698