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 80d75bfceeb78c6dc30f154148bc85f9223d3f73..665e9eb30e86721a723bccc57af0bd61d58d5f24 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" |
@@ -50,6 +51,7 @@ |
#include "platform/wtf/ListHashSet.h" |
#include "platform/wtf/Vector.h" |
#include "platform/wtf/text/WTFString.h" |
+#include "public/web/WebDocument.h" |
namespace blink { |
@@ -93,7 +95,8 @@ class CORE_EXPORT StyleEngine final |
const HeapVector<TraceWrapperMember<StyleSheet>>& |
StyleSheetsForStyleSheetList(TreeScope&); |
- const HeapVector<TraceWrapperMember<CSSStyleSheet>>& |
+ const HeapVector< |
+ std::pair<WebStyleSheetId, TraceWrapperMember<CSSStyleSheet>>>& |
InjectedAuthorStyleSheets() const { |
return injected_author_style_sheets_; |
} |
@@ -112,7 +115,8 @@ class CORE_EXPORT StyleEngine final |
void ViewportRulesChanged(); |
void HtmlImportAddedOrRemoved(); |
- void InjectAuthorSheet(StyleSheetContents* author_sheet); |
+ WebStyleSheetId InjectAuthorSheet(StyleSheetContents* author_sheet); |
+ void RemoveInjectedAuthorSheet(WebStyleSheetId author_sheet_id); |
CSSStyleSheet& EnsureInspectorStyleSheet(); |
RuleSet* WatchedSelectorsRuleSet() { |
DCHECK(IsMaster()); |
@@ -356,7 +360,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<WebStyleSheetId, TraceWrapperMember<CSSStyleSheet>>> |
+ injected_author_style_sheets_; |
Member<CSSStyleSheet> inspector_style_sheet_; |
TraceWrapperMember<DocumentStyleSheetCollection> |
@@ -398,6 +403,8 @@ class CORE_EXPORT StyleEngine final |
std::unique_ptr<StyleResolverStats> style_resolver_stats_; |
unsigned style_for_element_count_ = 0; |
+ WebStyleSheetId injected_author_sheets_id_count_ = 0; |
+ |
friend class StyleEngineTest; |
}; |