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

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

Issue 11471034: Merge 136878 (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/WebCore.exp.in ('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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
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> >& documentUserStyleSheets() const { retu rn m_userStyleSheets; } 58 const Vector<RefPtr<CSSStyleSheet> >& documentUserStyleSheets() const { retu rn m_userStyleSheets; }
59 const Vector<RefPtr<CSSStyleSheet> >& documentAuthorStyleSheets() const { re turn m_authorStyleSheets; }
59 const Vector<RefPtr<CSSStyleSheet> >& injectedUserStyleSheets() const; 60 const Vector<RefPtr<CSSStyleSheet> >& injectedUserStyleSheets() const;
60 const Vector<RefPtr<CSSStyleSheet> >& injectedAuthorStyleSheets() const; 61 const Vector<RefPtr<CSSStyleSheet> >& injectedAuthorStyleSheets() const;
61 62
62 void addStyleSheetCandidateNode(Node*, bool createdByParser); 63 void addStyleSheetCandidateNode(Node*, bool createdByParser);
63 void removeStyleSheetCandidateNode(Node*); 64 void removeStyleSheetCandidateNode(Node*);
64 65
65 void clearPageUserSheet(); 66 void clearPageUserSheet();
66 void updatePageUserSheet(); 67 void updatePageUserSheet();
67 void invalidateInjectedStyleSheetCache(); 68 void invalidateInjectedStyleSheetCache();
68 void updateInjectedStyleSheetCache() const; 69 void updateInjectedStyleSheetCache() const;
69 70
71 void addAuthorSheet(PassRefPtr<StyleSheetContents> authorSheet);
70 void addUserSheet(PassRefPtr<StyleSheetContents> userSheet); 72 void addUserSheet(PassRefPtr<StyleSheetContents> userSheet);
71 73
72 bool needsUpdateActiveStylesheetsOnStyleRecalc() const { return m_needsUpdat eActiveStylesheetsOnStyleRecalc; } 74 bool needsUpdateActiveStylesheetsOnStyleRecalc() const { return m_needsUpdat eActiveStylesheetsOnStyleRecalc; }
73 75
74 enum UpdateFlag { FullUpdate, OptimizedUpdate }; 76 enum UpdateFlag { FullUpdate, OptimizedUpdate };
75 bool updateActiveStyleSheets(UpdateFlag); 77 bool updateActiveStyleSheets(UpdateFlag);
76 78
77 String preferredStylesheetSetName() const { return m_preferredStylesheetSetN ame; } 79 String preferredStylesheetSetName() const { return m_preferredStylesheetSetN ame; }
78 String selectedStylesheetSetName() const { return m_selectedStylesheetSetNam e; } 80 String selectedStylesheetSetName() const { return m_selectedStylesheetSetNam e; }
79 void setPreferredStylesheetSetName(const String& name) { m_preferredStyleshe etSetName = name; } 81 void setPreferredStylesheetSetName(const String& name) { m_preferredStyleshe etSetName = name; }
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 // elements and when it is safe to execute scripts. 127 // elements and when it is safe to execute scripts.
126 int m_pendingStylesheets; 128 int m_pendingStylesheets;
127 129
128 RefPtr<CSSStyleSheet> m_pageUserSheet; 130 RefPtr<CSSStyleSheet> m_pageUserSheet;
129 131
130 mutable Vector<RefPtr<CSSStyleSheet> > m_injectedUserStyleSheets; 132 mutable Vector<RefPtr<CSSStyleSheet> > m_injectedUserStyleSheets;
131 mutable Vector<RefPtr<CSSStyleSheet> > m_injectedAuthorStyleSheets; 133 mutable Vector<RefPtr<CSSStyleSheet> > m_injectedAuthorStyleSheets;
132 mutable bool m_injectedStyleSheetCacheValid; 134 mutable bool m_injectedStyleSheetCacheValid;
133 135
134 Vector<RefPtr<CSSStyleSheet> > m_userStyleSheets; 136 Vector<RefPtr<CSSStyleSheet> > m_userStyleSheets;
137 Vector<RefPtr<CSSStyleSheet> > m_authorStyleSheets;
135 138
136 bool m_hadActiveLoadingStylesheet; 139 bool m_hadActiveLoadingStylesheet;
137 bool m_needsUpdateActiveStylesheetsOnStyleRecalc; 140 bool m_needsUpdateActiveStylesheetsOnStyleRecalc;
138 141
139 typedef ListHashSet<Node*, 32> StyleSheetCandidateListHashSet; 142 typedef ListHashSet<Node*, 32> StyleSheetCandidateListHashSet;
140 StyleSheetCandidateListHashSet m_styleSheetCandidateNodes; 143 StyleSheetCandidateListHashSet m_styleSheetCandidateNodes;
141 144
142 String m_preferredStylesheetSetName; 145 String m_preferredStylesheetSetName;
143 String m_selectedStylesheetSetName; 146 String m_selectedStylesheetSetName;
144 147
145 bool m_usesSiblingRules; 148 bool m_usesSiblingRules;
146 bool m_usesSiblingRulesOverride; 149 bool m_usesSiblingRulesOverride;
147 bool m_usesFirstLineRules; 150 bool m_usesFirstLineRules;
148 bool m_usesFirstLetterRules; 151 bool m_usesFirstLetterRules;
149 bool m_usesBeforeAfterRules; 152 bool m_usesBeforeAfterRules;
150 bool m_usesBeforeAfterRulesOverride; 153 bool m_usesBeforeAfterRulesOverride;
151 bool m_usesRemUnits; 154 bool m_usesRemUnits;
152 }; 155 };
153 156
154 } 157 }
155 158
156 #endif 159 #endif
157 160
OLDNEW
« no previous file with comments | « Source/WebCore/WebCore.exp.in ('k') | Source/WebCore/dom/DocumentStyleSheetCollection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698