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

Side by Side Diff: Source/core/inspector/InspectorCSSAgent.h

Issue 338253007: Revert "DevTools: Load document (html) content from disk cache in page agent enabling." (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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/core.gypi ('k') | Source/core/inspector/InspectorCSSAgent.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) 2010, Google Inc. All rights reserved. 2 * Copyright (C) 2010, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 virtual void addRule(ErrorString*, const String& styleSheetId, const String& selector, RefPtr<TypeBuilder::CSS::CSSRule>& result) OVERRIDE; 135 virtual void addRule(ErrorString*, const String& styleSheetId, const String& selector, RefPtr<TypeBuilder::CSS::CSSRule>& result) OVERRIDE;
136 virtual void forcePseudoState(ErrorString*, int nodeId, const RefPtr<JSONArr ay>& forcedPseudoClasses) OVERRIDE; 136 virtual void forcePseudoState(ErrorString*, int nodeId, const RefPtr<JSONArr ay>& forcedPseudoClasses) OVERRIDE;
137 virtual void getMediaQueries(ErrorString*, RefPtr<TypeBuilder::Array<TypeBui lder::CSS::CSSMedia> >& medias) OVERRIDE; 137 virtual void getMediaQueries(ErrorString*, RefPtr<TypeBuilder::Array<TypeBui lder::CSS::CSSMedia> >& medias) OVERRIDE;
138 138
139 139
140 bool collectMediaQueriesFromRule(CSSRule*, TypeBuilder::Array<TypeBuilder::C SS::CSSMedia>* mediaArray); 140 bool collectMediaQueriesFromRule(CSSRule*, TypeBuilder::Array<TypeBuilder::C SS::CSSMedia>* mediaArray);
141 bool collectMediaQueriesFromStyleSheet(CSSStyleSheet*, TypeBuilder::Array<Ty peBuilder::CSS::CSSMedia>* mediaArray); 141 bool collectMediaQueriesFromStyleSheet(CSSStyleSheet*, TypeBuilder::Array<Ty peBuilder::CSS::CSSMedia>* mediaArray);
142 PassRefPtr<TypeBuilder::CSS::CSSMedia> buildMediaObject(const MediaList*, Me diaListSource, const String&, CSSStyleSheet*); 142 PassRefPtr<TypeBuilder::CSS::CSSMedia> buildMediaObject(const MediaList*, Me diaListSource, const String&, CSSStyleSheet*);
143 PassRefPtr<TypeBuilder::Array<TypeBuilder::CSS::CSSMedia> > buildMediaListCh ain(CSSRule*); 143 PassRefPtr<TypeBuilder::Array<TypeBuilder::CSS::CSSMedia> > buildMediaListCh ain(CSSRule*);
144 144
145 static void collectAllDocumentStyleSheets(Document*, Vector<CSSStyleSheet*>& );
146
147 private: 145 private:
148 class StyleSheetAction; 146 class StyleSheetAction;
149 class SetStyleSheetTextAction; 147 class SetStyleSheetTextAction;
150 class SetPropertyTextAction; 148 class SetPropertyTextAction;
151 class SetRuleSelectorAction; 149 class SetRuleSelectorAction;
152 class AddRuleAction; 150 class AddRuleAction;
153 class InspectorResourceContentLoaderCallback; 151 class EnableResourceClient;
154 152
155 InspectorCSSAgent(InspectorDOMAgent*, InspectorPageAgent*, InspectorResource Agent*); 153 InspectorCSSAgent(InspectorDOMAgent*, InspectorPageAgent*, InspectorResource Agent*);
156 154
157 typedef HashMap<String, RefPtr<InspectorStyleSheet> > IdToInspectorStyleShee t; 155 typedef HashMap<String, RefPtr<InspectorStyleSheet> > IdToInspectorStyleShee t;
158 typedef HashMap<String, RefPtr<InspectorStyleSheetForInlineStyle> > IdToInsp ectorStyleSheetForInlineStyle; 156 typedef HashMap<String, RefPtr<InspectorStyleSheetForInlineStyle> > IdToInsp ectorStyleSheetForInlineStyle;
159 typedef HashMap<Node*, RefPtr<InspectorStyleSheetForInlineStyle> > NodeToIns pectorStyleSheet; // bogus "stylesheets" with elements' inline styles 157 typedef HashMap<Node*, RefPtr<InspectorStyleSheetForInlineStyle> > NodeToIns pectorStyleSheet; // bogus "stylesheets" with elements' inline styles
160 typedef HashMap<int, unsigned> NodeIdToForcedPseudoState; 158 typedef HashMap<int, unsigned> NodeIdToForcedPseudoState;
161 159
162 void wasEnabled(); 160 void wasEnabled(PassRefPtr<EnableCallback>);
163 void resetNonPersistentData(); 161 void resetNonPersistentData();
164 InspectorStyleSheetForInlineStyle* asInspectorStyleSheet(Element* element); 162 InspectorStyleSheetForInlineStyle* asInspectorStyleSheet(Element* element);
165 Element* elementForId(ErrorString*, int nodeId); 163 Element* elementForId(ErrorString*, int nodeId);
166 static void collectStyleSheets(CSSStyleSheet*, Vector<CSSStyleSheet*>&); 164 void collectAllStyleSheets(Vector<InspectorStyleSheet*>&);
165 void collectAllDocumentStyleSheets(Document*, Vector<CSSStyleSheet*>&);
166 void collectStyleSheets(CSSStyleSheet*, Vector<CSSStyleSheet*>&);
167 167
168 void updateActiveStyleSheets(Document*, StyleSheetsUpdateType); 168 void updateActiveStyleSheets(Document*, StyleSheetsUpdateType);
169 void setActiveStyleSheets(Document*, const Vector<CSSStyleSheet*>&, StyleShe etsUpdateType); 169 void setActiveStyleSheets(Document*, const Vector<CSSStyleSheet*>&, StyleShe etsUpdateType);
170 170
171 void collectPlatformFontsForRenderer(RenderText*, HashCountedSet<String>*); 171 void collectPlatformFontsForRenderer(RenderText*, HashCountedSet<String>*);
172 172
173 InspectorStyleSheet* bindStyleSheet(CSSStyleSheet*); 173 InspectorStyleSheet* bindStyleSheet(CSSStyleSheet*);
174 String unbindStyleSheet(InspectorStyleSheet*); 174 String unbindStyleSheet(InspectorStyleSheet*);
175 InspectorStyleSheet* viaInspectorStyleSheet(Document*, bool createIfAbsent); 175 InspectorStyleSheet* viaInspectorStyleSheet(Document*, bool createIfAbsent);
176 InspectorStyleSheet* assertInspectorStyleSheetForId(ErrorString*, const Stri ng&); 176 InspectorStyleSheet* assertInspectorStyleSheetForId(ErrorString*, const Stri ng&);
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 NodeIdToForcedPseudoState m_nodeIdToForcedPseudoState; 211 NodeIdToForcedPseudoState m_nodeIdToForcedPseudoState;
212 212
213 RefPtrWillBePersistent<CSSStyleSheet> m_inspectorUserAgentStyleSheet; 213 RefPtrWillBePersistent<CSSStyleSheet> m_inspectorUserAgentStyleSheet;
214 214
215 int m_lastStyleSheetId; 215 int m_lastStyleSheetId;
216 int m_styleSheetsPendingMutation; 216 int m_styleSheetsPendingMutation;
217 bool m_styleDeclarationPendingMutation; 217 bool m_styleDeclarationPendingMutation;
218 bool m_creatingViaInspectorStyleSheet; 218 bool m_creatingViaInspectorStyleSheet;
219 bool m_isSettingStyleSheetText; 219 bool m_isSettingStyleSheetText;
220 220
221 friend class InspectorResourceContentLoaderCallback; 221 friend class EnableResourceClient;
222 friend class StyleSheetBinder; 222 friend class StyleSheetBinder;
223 }; 223 };
224 224
225 225
226 } // namespace WebCore 226 } // namespace WebCore
227 227
228 #endif // !defined(InspectorCSSAgent_h) 228 #endif // !defined(InspectorCSSAgent_h)
OLDNEW
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/inspector/InspectorCSSAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698