Chromium Code Reviews| Index: third_party/WebKit/Source/core/dom/StyleEngine.h |
| diff --git a/third_party/WebKit/Source/core/dom/StyleEngine.h b/third_party/WebKit/Source/core/dom/StyleEngine.h |
| index 6b7206772724c3bbbfce8c77bf4964bafec46250..53205fd8668e605275db78127c766b912f4acfe2 100644 |
| --- a/third_party/WebKit/Source/core/dom/StyleEngine.h |
| +++ b/third_party/WebKit/Source/core/dom/StyleEngine.h |
| @@ -31,6 +31,7 @@ |
| #define StyleEngine_h |
| #include <memory> |
| +#include <utility> |
| #include "core/CoreExport.h" |
| #include "core/css/ActiveStyleSheets.h" |
| #include "core/css/CSSFontSelectorClient.h" |
| @@ -93,7 +94,7 @@ class CORE_EXPORT StyleEngine final |
| const HeapVector<TraceWrapperMember<StyleSheet>>& |
| StyleSheetsForStyleSheetList(TreeScope&); |
| - const HeapVector<TraceWrapperMember<CSSStyleSheet>>& |
| + const HeapVector<std::pair<int, TraceWrapperMember<CSSStyleSheet>>>& |
| InjectedAuthorStyleSheets() const { |
| return injected_author_style_sheets_; |
| } |
| @@ -112,7 +113,8 @@ class CORE_EXPORT StyleEngine final |
| void ViewportRulesChanged(); |
| void HtmlImportAddedOrRemoved(); |
| - void InjectAuthorSheet(StyleSheetContents* author_sheet); |
| + int InjectAuthorSheet(StyleSheetContents* author_sheet); |
| + bool RemoveInjectedAuthorSheet(int id); |
| CSSStyleSheet& EnsureInspectorStyleSheet(); |
| RuleSet* WatchedSelectorsRuleSet() { |
| return global_rule_set_.WatchedSelectorsRuleSet(); |
| @@ -344,7 +346,8 @@ class CORE_EXPORT StyleEngine final |
| int pending_render_blocking_stylesheets_ = 0; |
| int pending_body_stylesheets_ = 0; |
| - HeapVector<TraceWrapperMember<CSSStyleSheet>> injected_author_style_sheets_; |
| + HeapVector<std::pair<int, TraceWrapperMember<CSSStyleSheet>>> |
| + injected_author_style_sheets_; |
| Member<CSSStyleSheet> inspector_style_sheet_; |
| TraceWrapperMember<DocumentStyleSheetCollection> |
| @@ -387,6 +390,8 @@ class CORE_EXPORT StyleEngine final |
| std::unique_ptr<StyleResolverStats> style_resolver_stats_; |
| unsigned style_for_element_count_ = 0; |
| + volatile int injected_author_sheets_id_count_ = 0; |
|
rune
2017/05/16 09:00:58
Why volatile?
I would have used a plain unsigned
limasdf
2017/05/18 12:32:53
Done.
|
| + |
| friend class StyleEngineTest; |
| }; |