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

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

Issue 121263002: DevTools: Do not force style sheets update on inspector start. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed test Created 6 years, 11 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
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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 , public InspectorStyleSheet::Listener { 70 , public InspectorStyleSheet::Listener {
71 WTF_MAKE_NONCOPYABLE(InspectorCSSAgent); 71 WTF_MAKE_NONCOPYABLE(InspectorCSSAgent);
72 public: 72 public:
73 enum MediaListSource { 73 enum MediaListSource {
74 MediaListSourceLinkedSheet, 74 MediaListSourceLinkedSheet,
75 MediaListSourceInlineSheet, 75 MediaListSourceInlineSheet,
76 MediaListSourceMediaRule, 76 MediaListSourceMediaRule,
77 MediaListSourceImportRule 77 MediaListSourceImportRule
78 }; 78 };
79 79
80 enum StyleSheetsUpdateType {
81 InitialFrontendLoad = 0,
82 ExistingFrontendRefresh,
83 };
84
80 class InlineStyleOverrideScope { 85 class InlineStyleOverrideScope {
81 public: 86 public:
82 InlineStyleOverrideScope(SecurityContext* context) 87 InlineStyleOverrideScope(SecurityContext* context)
83 : m_contentSecurityPolicy(context->contentSecurityPolicy()) 88 : m_contentSecurityPolicy(context->contentSecurityPolicy())
84 { 89 {
85 m_contentSecurityPolicy->setOverrideAllowInlineStyle(true); 90 m_contentSecurityPolicy->setOverrideAllowInlineStyle(true);
86 } 91 }
87 92
88 ~InlineStyleOverrideScope() 93 ~InlineStyleOverrideScope()
89 { 94 {
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 174
170 void wasEnabled(PassRefPtr<EnableCallback>); 175 void wasEnabled(PassRefPtr<EnableCallback>);
171 void resetNonPersistentData(); 176 void resetNonPersistentData();
172 InspectorStyleSheetForInlineStyle* asInspectorStyleSheet(Element* element); 177 InspectorStyleSheetForInlineStyle* asInspectorStyleSheet(Element* element);
173 Element* elementForId(ErrorString*, int nodeId); 178 Element* elementForId(ErrorString*, int nodeId);
174 int documentNodeWithRequestedFlowsId(Document*); 179 int documentNodeWithRequestedFlowsId(Document*);
175 void collectAllStyleSheets(Vector<InspectorStyleSheet*>&); 180 void collectAllStyleSheets(Vector<InspectorStyleSheet*>&);
176 void collectAllDocumentStyleSheets(Document*, Vector<CSSStyleSheet*>&); 181 void collectAllDocumentStyleSheets(Document*, Vector<CSSStyleSheet*>&);
177 void collectStyleSheets(CSSStyleSheet*, Vector<CSSStyleSheet*>&); 182 void collectStyleSheets(CSSStyleSheet*, Vector<CSSStyleSheet*>&);
178 183
179 void updateActiveStyleSheets(Document*, const Vector<CSSStyleSheet*>&); 184 void updateActiveStyleSheets(Document*, const Vector<CSSStyleSheet*>&, Style SheetsUpdateType);
180 185
181 void collectPlatformFontsForRenderer(RenderText*, HashCountedSet<String>*); 186 void collectPlatformFontsForRenderer(RenderText*, HashCountedSet<String>*);
182 187
183 InspectorStyleSheet* bindStyleSheet(CSSStyleSheet*); 188 InspectorStyleSheet* bindStyleSheet(CSSStyleSheet*);
184 String unbindStyleSheet(InspectorStyleSheet*); 189 String unbindStyleSheet(InspectorStyleSheet*);
185 InspectorStyleSheet* viaInspectorStyleSheet(Document*, bool createIfAbsent); 190 InspectorStyleSheet* viaInspectorStyleSheet(Document*, bool createIfAbsent);
186 InspectorStyleSheet* assertStyleSheetForId(ErrorString*, const String&); 191 InspectorStyleSheet* assertStyleSheetForId(ErrorString*, const String&);
187 TypeBuilder::CSS::StyleSheetOrigin::Enum detectOrigin(CSSStyleSheet* pageSty leSheet, Document* ownerDocument); 192 TypeBuilder::CSS::StyleSheetOrigin::Enum detectOrigin(CSSStyleSheet* pageSty leSheet, Document* ownerDocument);
188 bool styleSheetEditInProgress() const { return m_styleSheetsPendingMutation || m_styleDeclarationPendingMutation || m_isSettingStyleSheetText; } 193 bool styleSheetEditInProgress() const { return m_styleSheetsPendingMutation || m_styleDeclarationPendingMutation || m_isSettingStyleSheetText; }
189 194
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 friend class ChangeRegionOversetTask; 234 friend class ChangeRegionOversetTask;
230 friend class EnableResourceClient; 235 friend class EnableResourceClient;
231 friend class StyleSheetBinder; 236 friend class StyleSheetBinder;
232 friend class UpdateRegionLayoutTask; 237 friend class UpdateRegionLayoutTask;
233 }; 238 };
234 239
235 240
236 } // namespace WebCore 241 } // namespace WebCore
237 242
238 #endif // !defined(InspectorCSSAgent_h) 243 #endif // !defined(InspectorCSSAgent_h)
OLDNEW
« no previous file with comments | « LayoutTests/inspector-protocol/stylesheet-tracking-restart-expected.txt ('k') | Source/core/inspector/InspectorCSSAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698