OLD | NEW |
---|---|
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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
113 bool forcePseudoState(Element*, CSSSelector::PseudoType); | 113 bool forcePseudoState(Element*, CSSSelector::PseudoType); |
114 void didCommitLoadForLocalFrame(LocalFrame*) override; | 114 void didCommitLoadForLocalFrame(LocalFrame*) override; |
115 void restore() override; | 115 void restore() override; |
116 void flushPendingProtocolNotifications() override; | 116 void flushPendingProtocolNotifications() override; |
117 void reset(); | 117 void reset(); |
118 void mediaQueryResultChanged(); | 118 void mediaQueryResultChanged(); |
119 | 119 |
120 void activeStyleSheetsUpdated(Document*); | 120 void activeStyleSheetsUpdated(Document*); |
121 void documentDetached(Document*); | 121 void documentDetached(Document*); |
122 void fontsUpdated(); | 122 void fontsUpdated(); |
123 void getUnusedRules( | 123 void setCoverageEnabled(bool); |
124 std::unique_ptr<protocol::Array<protocol::CSS::RuleUsage>>*); | 124 void collectStyleSheetsForCoverage(); |
125 void setUsageTrackerStatus(bool enabled); | |
126 | 125 |
127 void enable(std::unique_ptr<EnableCallback>) override; | 126 void enable(std::unique_ptr<EnableCallback>) override; |
128 protocol::Response disable() override; | 127 protocol::Response disable() override; |
129 protocol::Response getMatchedStylesForNode( | 128 protocol::Response getMatchedStylesForNode( |
130 int nodeId, | 129 int nodeId, |
131 protocol::Maybe<protocol::CSS::CSSStyle>* inlineStyle, | 130 protocol::Maybe<protocol::CSS::CSSStyle>* inlineStyle, |
132 protocol::Maybe<protocol::CSS::CSSStyle>* attributesStyle, | 131 protocol::Maybe<protocol::CSS::CSSStyle>* attributesStyle, |
133 protocol::Maybe<protocol::Array<protocol::CSS::RuleMatch>>* | 132 protocol::Maybe<protocol::Array<protocol::CSS::RuleMatch>>* |
134 matchedCSSRules, | 133 matchedCSSRules, |
135 protocol::Maybe<protocol::Array<protocol::CSS::PseudoElementMatches>>*, | 134 protocol::Maybe<protocol::Array<protocol::CSS::PseudoElementMatches>>*, |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
190 std::unique_ptr<protocol::Array<protocol::CSS::CSSMedia>>*) override; | 189 std::unique_ptr<protocol::Array<protocol::CSS::CSSMedia>>*) override; |
191 protocol::Response setEffectivePropertyValueForNode( | 190 protocol::Response setEffectivePropertyValueForNode( |
192 int nodeId, | 191 int nodeId, |
193 const String& propertyName, | 192 const String& propertyName, |
194 const String& value) override; | 193 const String& value) override; |
195 protocol::Response getBackgroundColors( | 194 protocol::Response getBackgroundColors( |
196 int nodeId, | 195 int nodeId, |
197 protocol::Maybe<protocol::Array<String>>* backgroundColors) override; | 196 protocol::Maybe<protocol::Array<String>>* backgroundColors) override; |
198 | 197 |
199 protocol::Response startRuleUsageTracking() override; | 198 protocol::Response startRuleUsageTracking() override; |
200 | 199 protocol::Response takeCoverageDelta( |
200 std::unique_ptr<protocol::Array<protocol::CSS::RuleUsage>>* result) | |
201 override; | |
201 protocol::Response stopRuleUsageTracking( | 202 protocol::Response stopRuleUsageTracking( |
202 std::unique_ptr<protocol::Array<protocol::CSS::RuleUsage>>* result) | 203 std::unique_ptr<protocol::Array<protocol::CSS::RuleUsage>>* result) |
203 override; | 204 override; |
204 | 205 |
205 void collectMediaQueriesFromRule(CSSRule*, | 206 void collectMediaQueriesFromRule(CSSRule*, |
206 protocol::Array<protocol::CSS::CSSMedia>*); | 207 protocol::Array<protocol::CSS::CSSMedia>*); |
207 void collectMediaQueriesFromStyleSheet( | 208 void collectMediaQueriesFromStyleSheet( |
208 CSSStyleSheet*, | 209 CSSStyleSheet*, |
209 protocol::Array<protocol::CSS::CSSMedia>*); | 210 protocol::Array<protocol::CSS::CSSMedia>*); |
210 std::unique_ptr<protocol::CSS::CSSMedia> buildMediaObject(const MediaList*, | 211 std::unique_ptr<protocol::CSS::CSSMedia> buildMediaObject(const MediaList*, |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
280 InspectorStyleSheet* inspectorStyleSheetForRule(CSSStyleRule*); | 281 InspectorStyleSheet* inspectorStyleSheetForRule(CSSStyleRule*); |
281 | 282 |
282 InspectorStyleSheet* viaInspectorStyleSheet(Document*); | 283 InspectorStyleSheet* viaInspectorStyleSheet(Document*); |
283 protocol::Response assertInspectorStyleSheetForId(const String&, | 284 protocol::Response assertInspectorStyleSheetForId(const String&, |
284 InspectorStyleSheet*&); | 285 InspectorStyleSheet*&); |
285 protocol::Response assertStyleSheetForId(const String&, | 286 protocol::Response assertStyleSheetForId(const String&, |
286 InspectorStyleSheetBase*&); | 287 InspectorStyleSheetBase*&); |
287 String detectOrigin(CSSStyleSheet* pageStyleSheet, Document* ownerDocument); | 288 String detectOrigin(CSSStyleSheet* pageStyleSheet, Document* ownerDocument); |
288 | 289 |
289 std::unique_ptr<protocol::CSS::CSSRule> buildObjectForRule(CSSStyleRule*); | 290 std::unique_ptr<protocol::CSS::CSSRule> buildObjectForRule(CSSStyleRule*); |
290 std::unique_ptr<protocol::CSS::RuleUsage> buildObjectForRuleUsage( | 291 std::unique_ptr<protocol::CSS::RuleUsage> buildCoverageInfo(CSSStyleRule*, |
291 CSSStyleRule*, | 292 bool); |
292 bool); | |
293 std::unique_ptr<protocol::Array<protocol::CSS::RuleMatch>> | 293 std::unique_ptr<protocol::Array<protocol::CSS::RuleMatch>> |
294 buildArrayForMatchedRuleList(CSSRuleList*, Element*, PseudoId); | 294 buildArrayForMatchedRuleList(CSSRuleList*, Element*, PseudoId); |
295 std::unique_ptr<protocol::CSS::CSSStyle> buildObjectForAttributesStyle( | 295 std::unique_ptr<protocol::CSS::CSSStyle> buildObjectForAttributesStyle( |
296 Element*); | 296 Element*); |
297 | 297 |
298 // InspectorDOMAgent::DOMListener implementation | 298 // InspectorDOMAgent::DOMListener implementation |
299 void didAddDocument(Document*) override; | 299 void didAddDocument(Document*) override; |
300 void didRemoveDocument(Document*) override; | 300 void didRemoveDocument(Document*) override; |
301 void didRemoveDOMNode(Node*) override; | 301 void didRemoveDOMNode(Node*) override; |
302 void didModifyDOMAttr(Element*) override; | 302 void didModifyDOMAttr(Element*) override; |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
340 typedef HeapHashMap<Member<Document>, | 340 typedef HeapHashMap<Member<Document>, |
341 Member<HeapHashSet<Member<CSSStyleSheet>>>> | 341 Member<HeapHashSet<Member<CSSStyleSheet>>>> |
342 DocumentStyleSheets; | 342 DocumentStyleSheets; |
343 DocumentStyleSheets m_documentToCSSStyleSheets; | 343 DocumentStyleSheets m_documentToCSSStyleSheets; |
344 HeapHashSet<Member<Document>> m_invalidatedDocuments; | 344 HeapHashSet<Member<Document>> m_invalidatedDocuments; |
345 | 345 |
346 NodeToInspectorStyleSheet m_nodeToInspectorStyleSheet; | 346 NodeToInspectorStyleSheet m_nodeToInspectorStyleSheet; |
347 NodeIdToForcedPseudoState m_nodeIdToForcedPseudoState; | 347 NodeIdToForcedPseudoState m_nodeIdToForcedPseudoState; |
348 | 348 |
349 Member<StyleRuleUsageTracker> m_tracker; | 349 Member<StyleRuleUsageTracker> m_tracker; |
350 bool m_hadFirstCoverageRequest; | |
351 HeapHashMap<Member<const StyleRule>, Member<CSSStyleRule>> | |
352 m_unusedStyleRuleToCSSStyleRule; | |
353 HeapVector<Member<InspectorStyleSheet>> m_coveragePendingStylsheets; | |
alph
2017/03/20 20:48:31
typo
| |
350 | 354 |
351 Member<CSSStyleSheet> m_inspectorUserAgentStyleSheet; | 355 Member<CSSStyleSheet> m_inspectorUserAgentStyleSheet; |
352 | 356 |
353 int m_resourceContentLoaderClientId; | 357 int m_resourceContentLoaderClientId; |
354 | 358 |
355 friend class InspectorResourceContentLoaderCallback; | 359 friend class InspectorResourceContentLoaderCallback; |
356 friend class StyleSheetBinder; | 360 friend class StyleSheetBinder; |
357 }; | 361 }; |
358 | 362 |
359 } // namespace blink | 363 } // namespace blink |
360 | 364 |
361 #endif // !defined(InspectorCSSAgent_h) | 365 #endif // !defined(InspectorCSSAgent_h) |
OLD | NEW |