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

Side by Side Diff: Source/WebCore/dom/DocumentStyleSheetCollection.h

Issue 11412176: Merge 135082 - REGRESSION(r129644): User StyleSheet not applying (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1312/
Patch Set: Created 8 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 | « Source/WebCore/dom/Document.cpp ('k') | Source/WebCore/dom/DocumentStyleSheetCollection.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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 public: 48 public:
49 static PassOwnPtr<DocumentStyleSheetCollection> create(Document* document) { return adoptPtr(new DocumentStyleSheetCollection(document)); } 49 static PassOwnPtr<DocumentStyleSheetCollection> create(Document* document) { return adoptPtr(new DocumentStyleSheetCollection(document)); }
50 50
51 ~DocumentStyleSheetCollection(); 51 ~DocumentStyleSheetCollection();
52 52
53 const Vector<RefPtr<StyleSheet> >& styleSheetsForStyleSheetList() const { re turn m_styleSheetsForStyleSheetList; } 53 const Vector<RefPtr<StyleSheet> >& styleSheetsForStyleSheetList() const { re turn m_styleSheetsForStyleSheetList; }
54 54
55 const Vector<RefPtr<CSSStyleSheet> >& activeAuthorStyleSheets() const { retu rn m_activeAuthorStyleSheets; } 55 const Vector<RefPtr<CSSStyleSheet> >& activeAuthorStyleSheets() const { retu rn m_activeAuthorStyleSheets; }
56 56
57 CSSStyleSheet* pageUserSheet(); 57 CSSStyleSheet* pageUserSheet();
58 const Vector<RefPtr<CSSStyleSheet> >* pageGroupUserSheets() const; 58 const Vector<RefPtr<CSSStyleSheet> >& documentUserStyleSheets() const { retu rn m_userStyleSheets; }
59 const Vector<RefPtr<CSSStyleSheet> >* documentUserSheets() const { return m_ userSheets.get(); } 59 const Vector<RefPtr<CSSStyleSheet> >& injectedUserStyleSheets() const;
60 const Vector<RefPtr<CSSStyleSheet> >& injectedAuthorStyleSheets() const;
60 61
61 void addStyleSheetCandidateNode(Node*, bool createdByParser); 62 void addStyleSheetCandidateNode(Node*, bool createdByParser);
62 void removeStyleSheetCandidateNode(Node*); 63 void removeStyleSheetCandidateNode(Node*);
63 64
64 void clearPageUserSheet(); 65 void clearPageUserSheet();
65 void updatePageUserSheet(); 66 void updatePageUserSheet();
66 void clearPageGroupUserSheets(); 67 void invalidateInjectedStyleSheetCache();
67 void updatePageGroupUserSheets(); 68 void updateInjectedStyleSheetCache() const;
68 69
69 void addUserSheet(PassRefPtr<StyleSheetContents> userSheet); 70 void addUserSheet(PassRefPtr<StyleSheetContents> userSheet);
70 71
71 bool needsUpdateActiveStylesheetsOnStyleRecalc() const { return m_needsUpdat eActiveStylesheetsOnStyleRecalc; } 72 bool needsUpdateActiveStylesheetsOnStyleRecalc() const { return m_needsUpdat eActiveStylesheetsOnStyleRecalc; }
72 73
73 enum UpdateFlag { FullUpdate, OptimizedUpdate }; 74 enum UpdateFlag { FullUpdate, OptimizedUpdate };
74 bool updateActiveStyleSheets(UpdateFlag); 75 bool updateActiveStyleSheets(UpdateFlag);
75 76
76 String preferredStylesheetSetName() const { return m_preferredStylesheetSetN ame; } 77 String preferredStylesheetSetName() const { return m_preferredStylesheetSetN ame; }
77 String selectedStylesheetSetName() const { return m_selectedStylesheetSetNam e; } 78 String selectedStylesheetSetName() const { return m_selectedStylesheetSetNam e; }
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 Vector<RefPtr<StyleSheet> > m_styleSheetsForStyleSheetList; 119 Vector<RefPtr<StyleSheet> > m_styleSheetsForStyleSheetList;
119 Vector<RefPtr<CSSStyleSheet> > m_activeAuthorStyleSheets; 120 Vector<RefPtr<CSSStyleSheet> > m_activeAuthorStyleSheets;
120 121
121 // Track the number of currently loading top-level stylesheets needed for re ndering. 122 // Track the number of currently loading top-level stylesheets needed for re ndering.
122 // Sheets loaded using the @import directive are not included in this count. 123 // Sheets loaded using the @import directive are not included in this count.
123 // We use this count of pending sheets to detect when we can begin attaching 124 // We use this count of pending sheets to detect when we can begin attaching
124 // elements and when it is safe to execute scripts. 125 // elements and when it is safe to execute scripts.
125 int m_pendingStylesheets; 126 int m_pendingStylesheets;
126 127
127 RefPtr<CSSStyleSheet> m_pageUserSheet; 128 RefPtr<CSSStyleSheet> m_pageUserSheet;
128 mutable OwnPtr<Vector<RefPtr<CSSStyleSheet> > > m_pageGroupUserSheets; 129
129 OwnPtr<Vector<RefPtr<CSSStyleSheet> > > m_userSheets; 130 mutable Vector<RefPtr<CSSStyleSheet> > m_injectedUserStyleSheets;
130 mutable bool m_pageGroupUserSheetCacheValid; 131 mutable Vector<RefPtr<CSSStyleSheet> > m_injectedAuthorStyleSheets;
132 mutable bool m_injectedStyleSheetCacheValid;
133
134 Vector<RefPtr<CSSStyleSheet> > m_userStyleSheets;
131 135
132 bool m_hadActiveLoadingStylesheet; 136 bool m_hadActiveLoadingStylesheet;
133 bool m_needsUpdateActiveStylesheetsOnStyleRecalc; 137 bool m_needsUpdateActiveStylesheetsOnStyleRecalc;
134 138
135 typedef ListHashSet<Node*, 32> StyleSheetCandidateListHashSet; 139 typedef ListHashSet<Node*, 32> StyleSheetCandidateListHashSet;
136 StyleSheetCandidateListHashSet m_styleSheetCandidateNodes; 140 StyleSheetCandidateListHashSet m_styleSheetCandidateNodes;
137 141
138 String m_preferredStylesheetSetName; 142 String m_preferredStylesheetSetName;
139 String m_selectedStylesheetSetName; 143 String m_selectedStylesheetSetName;
140 144
141 bool m_usesSiblingRules; 145 bool m_usesSiblingRules;
142 bool m_usesSiblingRulesOverride; 146 bool m_usesSiblingRulesOverride;
143 bool m_usesFirstLineRules; 147 bool m_usesFirstLineRules;
144 bool m_usesFirstLetterRules; 148 bool m_usesFirstLetterRules;
145 bool m_usesBeforeAfterRules; 149 bool m_usesBeforeAfterRules;
146 bool m_usesBeforeAfterRulesOverride; 150 bool m_usesBeforeAfterRulesOverride;
147 bool m_usesRemUnits; 151 bool m_usesRemUnits;
148 }; 152 };
149 153
150 } 154 }
151 155
152 #endif 156 #endif
153 157
OLDNEW
« no previous file with comments | « Source/WebCore/dom/Document.cpp ('k') | Source/WebCore/dom/DocumentStyleSheetCollection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698