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

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

Issue 1050783003: Remove stylesheet injection from Blink. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Revert devtool removals Created 5 years, 8 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
« no previous file with comments | « Source/core/dom/DocumentStyleSheetCollection.cpp ('k') | 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 r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
9 * Copyright (C) 2011 Google Inc. All rights reserved. 9 * Copyright (C) 2011 Google Inc. All rights reserved.
10 * 10 *
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 ~StyleEngine(); 71 ~StyleEngine();
72 72
73 #if !ENABLE(OILPAN) 73 #if !ENABLE(OILPAN)
74 void detachFromDocument(); 74 void detachFromDocument();
75 #endif 75 #endif
76 76
77 const WillBeHeapVector<RefPtrWillBeMember<StyleSheet>>& styleSheetsForStyleS heetList(TreeScope&); 77 const WillBeHeapVector<RefPtrWillBeMember<StyleSheet>>& styleSheetsForStyleS heetList(TreeScope&);
78 const WillBeHeapVector<RefPtrWillBeMember<CSSStyleSheet>>& activeAuthorStyle Sheets() const; 78 const WillBeHeapVector<RefPtrWillBeMember<CSSStyleSheet>>& activeAuthorStyle Sheets() const;
79 79
80 const WillBeHeapVector<RefPtrWillBeMember<CSSStyleSheet>>& documentAuthorSty leSheets() const { return m_authorStyleSheets; } 80 const WillBeHeapVector<RefPtrWillBeMember<CSSStyleSheet>>& documentAuthorSty leSheets() const { return m_authorStyleSheets; }
81 const WillBeHeapVector<RefPtrWillBeMember<CSSStyleSheet>>& injectedAuthorSty leSheets() const;
82 81
83 const WillBeHeapVector<RefPtrWillBeMember<CSSStyleSheet>> activeStyleSheetsF orInspector() const; 82 const WillBeHeapVector<RefPtrWillBeMember<CSSStyleSheet>> activeStyleSheetsF orInspector() const;
84 83
85 void modifiedStyleSheet(StyleSheet*); 84 void modifiedStyleSheet(StyleSheet*);
86 void addStyleSheetCandidateNode(Node*, bool createdByParser); 85 void addStyleSheetCandidateNode(Node*, bool createdByParser);
87 void removeStyleSheetCandidateNode(Node*); 86 void removeStyleSheetCandidateNode(Node*);
88 void removeStyleSheetCandidateNode(Node*, TreeScope&); 87 void removeStyleSheetCandidateNode(Node*, TreeScope&);
89 void modifiedStyleSheetCandidateNode(Node*); 88 void modifiedStyleSheetCandidateNode(Node*);
90 void setExitTransitionStylesheetsEnabled(bool); 89 void setExitTransitionStylesheetsEnabled(bool);
91 90
92 void invalidateInjectedStyleSheetCache();
93 void updateInjectedStyleSheetCache() const;
94
95 void compatibilityModeChanged();
96
97 void addAuthorSheet(PassRefPtrWillBeRawPtr<StyleSheetContents> authorSheet); 91 void addAuthorSheet(PassRefPtrWillBeRawPtr<StyleSheetContents> authorSheet);
98 92
99 void clearMediaQueryRuleSetStyleSheets(); 93 void clearMediaQueryRuleSetStyleSheets();
100 void updateStyleSheetsInImport(DocumentStyleSheetCollector& parentCollector) ; 94 void updateStyleSheetsInImport(DocumentStyleSheetCollector& parentCollector) ;
101 void updateActiveStyleSheets(StyleResolverUpdateMode); 95 void updateActiveStyleSheets(StyleResolverUpdateMode);
102 96
103 String preferredStylesheetSetName() const { return m_preferredStylesheetSetN ame; } 97 String preferredStylesheetSetName() const { return m_preferredStylesheetSetN ame; }
104 String selectedStylesheetSetName() const { return m_selectedStylesheetSetNam e; } 98 String selectedStylesheetSetName() const { return m_selectedStylesheetSetNam e; }
105 void setPreferredStylesheetSetName(const String& name) { m_preferredStyleshe etSetName = name; } 99 void setPreferredStylesheetSetName(const String& name) { m_preferredStyleshe etSetName = name; }
106 void setSelectedStylesheetSetName(const String& name) { m_selectedStylesheet SetName = name; } 100 void setSelectedStylesheetSetName(const String& name) { m_selectedStylesheet SetName = name; }
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 254
261 RawPtrWillBeMember<Document> m_document; 255 RawPtrWillBeMember<Document> m_document;
262 bool m_isMaster; 256 bool m_isMaster;
263 257
264 // Track the number of currently loading top-level stylesheets needed for re ndering. 258 // Track the number of currently loading top-level stylesheets needed for re ndering.
265 // Sheets loaded using the @import directive are not included in this count. 259 // Sheets loaded using the @import directive are not included in this count.
266 // We use this count of pending sheets to detect when we can begin attaching 260 // We use this count of pending sheets to detect when we can begin attaching
267 // elements and when it is safe to execute scripts. 261 // elements and when it is safe to execute scripts.
268 int m_pendingStylesheets; 262 int m_pendingStylesheets;
269 263
270 mutable WillBeHeapVector<RefPtrWillBeMember<CSSStyleSheet>> m_injectedAuthor StyleSheets;
271 mutable bool m_injectedStyleSheetCacheValid;
272
273 WillBeHeapVector<RefPtrWillBeMember<CSSStyleSheet>> m_authorStyleSheets; 264 WillBeHeapVector<RefPtrWillBeMember<CSSStyleSheet>> m_authorStyleSheets;
274 265
275 OwnPtrWillBeMember<DocumentStyleSheetCollection> m_documentStyleSheetCollect ion; 266 OwnPtrWillBeMember<DocumentStyleSheetCollection> m_documentStyleSheetCollect ion;
276 267
277 typedef WillBeHeapHashMap<RawPtrWillBeWeakMember<TreeScope>, OwnPtrWillBeMem ber<ShadowTreeStyleSheetCollection>> StyleSheetCollectionMap; 268 typedef WillBeHeapHashMap<RawPtrWillBeWeakMember<TreeScope>, OwnPtrWillBeMem ber<ShadowTreeStyleSheetCollection>> StyleSheetCollectionMap;
278 StyleSheetCollectionMap m_styleSheetCollectionMap; 269 StyleSheetCollectionMap m_styleSheetCollectionMap;
279 270
280 bool m_documentScopeDirty; 271 bool m_documentScopeDirty;
281 UnorderedTreeScopeSet m_dirtyTreeScopes; 272 UnorderedTreeScopeSet m_dirtyTreeScopes;
282 OrderedTreeScopeSet m_activeTreeScopes; 273 OrderedTreeScopeSet m_activeTreeScopes;
(...skipping 14 matching lines...) Expand all
297 288
298 RefPtrWillBeMember<CSSFontSelector> m_fontSelector; 289 RefPtrWillBeMember<CSSFontSelector> m_fontSelector;
299 290
300 WillBeHeapHashMap<AtomicString, RawPtrWillBeMember<StyleSheetContents>> m_te xtToSheetCache; 291 WillBeHeapHashMap<AtomicString, RawPtrWillBeMember<StyleSheetContents>> m_te xtToSheetCache;
301 WillBeHeapHashMap<RawPtrWillBeMember<StyleSheetContents>, AtomicString> m_sh eetToTextCache; 292 WillBeHeapHashMap<RawPtrWillBeMember<StyleSheetContents>, AtomicString> m_sh eetToTextCache;
302 }; 293 };
303 294
304 } 295 }
305 296
306 #endif 297 #endif
OLDNEW
« no previous file with comments | « Source/core/dom/DocumentStyleSheetCollection.cpp ('k') | Source/core/dom/StyleEngine.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698