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

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

Issue 2413693002: Rename DOM.getLayoutTreeNodes to CSS.getLayoutTreeAndStyles (Closed)
Patch Set: Fix iframe path and drop font-family from test since it's different on mac Created 4 years, 2 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
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 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 CSSStyleDeclaration* findEffectiveDeclaration( 224 CSSStyleDeclaration* findEffectiveDeclaration(
225 CSSPropertyID, 225 CSSPropertyID,
226 const HeapVector<Member<CSSStyleDeclaration>>& styles); 226 const HeapVector<Member<CSSStyleDeclaration>>& styles);
227 void setLayoutEditorValue(ErrorString*, 227 void setLayoutEditorValue(ErrorString*,
228 Element*, 228 Element*,
229 CSSStyleDeclaration*, 229 CSSStyleDeclaration*,
230 CSSPropertyID, 230 CSSPropertyID,
231 const String& value, 231 const String& value,
232 bool forceImportant = false); 232 bool forceImportant = false);
233 void layoutEditorItemSelected(Element*, CSSStyleDeclaration*); 233 void layoutEditorItemSelected(Element*, CSSStyleDeclaration*);
234 void getLayoutTreeAndStyles(
235 ErrorString*,
236 std::unique_ptr<protocol::Array<String>> styleWhitelist,
237 std::unique_ptr<protocol::Array<protocol::CSS::LayoutTreeNode>>*
238 layoutTreeNodes,
239 std::unique_ptr<protocol::Array<protocol::CSS::ComputedStyle>>*
240 computedStyles) override;
234 241
235 HeapVector<Member<CSSStyleDeclaration>> matchingStyles(Element*); 242 HeapVector<Member<CSSStyleDeclaration>> matchingStyles(Element*);
236 String styleSheetId(CSSStyleSheet*); 243 String styleSheetId(CSSStyleSheet*);
237 244
238 private: 245 private:
239 class StyleSheetAction; 246 class StyleSheetAction;
240 class SetStyleSheetTextAction; 247 class SetStyleSheetTextAction;
241 class ModifyRuleAction; 248 class ModifyRuleAction;
242 class SetElementStyleAction; 249 class SetElementStyleAction;
243 class AddRuleAction; 250 class AddRuleAction;
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 // InspectorDOMAgent::DOMListener implementation 312 // InspectorDOMAgent::DOMListener implementation
306 void didRemoveDocument(Document*) override; 313 void didRemoveDocument(Document*) override;
307 void didRemoveDOMNode(Node*) override; 314 void didRemoveDOMNode(Node*) override;
308 void didModifyDOMAttr(Element*) override; 315 void didModifyDOMAttr(Element*) override;
309 316
310 // InspectorStyleSheet::Listener implementation 317 // InspectorStyleSheet::Listener implementation
311 void styleSheetChanged(InspectorStyleSheetBase*) override; 318 void styleSheetChanged(InspectorStyleSheetBase*) override;
312 319
313 void resetPseudoStates(); 320 void resetPseudoStates();
314 321
322 struct VectorStringHashTraits;
323 using ComputedStylesMap = WTF::HashMap<Vector<String>,
324 int,
325 VectorStringHashTraits,
326 VectorStringHashTraits>;
327
328 void visitLayoutTreeNodes(
329 Node*,
330 protocol::Array<protocol::CSS::LayoutTreeNode>& layoutTreeNodes,
331 const Vector<std::pair<String, CSSPropertyID>>& cssPropertyWhitelist,
332 ComputedStylesMap& styleToIndexMap,
333 protocol::Array<protocol::CSS::ComputedStyle>& computedStyles);
334
335 int getStyleIndexForNode(
336 Node*,
337 const Vector<std::pair<String, CSSPropertyID>>& cssPropertyWhitelist,
338 ComputedStylesMap& styleToIndexMap,
339 protocol::Array<protocol::CSS::ComputedStyle>& computedStyles);
340
315 Member<InspectorDOMAgent> m_domAgent; 341 Member<InspectorDOMAgent> m_domAgent;
316 Member<InspectedFrames> m_inspectedFrames; 342 Member<InspectedFrames> m_inspectedFrames;
317 Member<InspectorNetworkAgent> m_networkAgent; 343 Member<InspectorNetworkAgent> m_networkAgent;
318 Member<InspectorResourceContentLoader> m_resourceContentLoader; 344 Member<InspectorResourceContentLoader> m_resourceContentLoader;
319 Member<InspectorResourceContainer> m_resourceContainer; 345 Member<InspectorResourceContainer> m_resourceContainer;
320 346
321 IdToInspectorStyleSheet m_idToInspectorStyleSheet; 347 IdToInspectorStyleSheet m_idToInspectorStyleSheet;
322 IdToInspectorStyleSheetForInlineStyle m_idToInspectorStyleSheetForInlineStyle; 348 IdToInspectorStyleSheetForInlineStyle m_idToInspectorStyleSheetForInlineStyle;
323 HeapHashMap<Member<CSSStyleSheet>, Member<InspectorStyleSheet>> 349 HeapHashMap<Member<CSSStyleSheet>, Member<InspectorStyleSheet>>
324 m_cssStyleSheetToInspectorStyleSheet; 350 m_cssStyleSheetToInspectorStyleSheet;
(...skipping 10 matching lines...) Expand all
335 361
336 int m_resourceContentLoaderClientId; 362 int m_resourceContentLoaderClientId;
337 363
338 friend class InspectorResourceContentLoaderCallback; 364 friend class InspectorResourceContentLoaderCallback;
339 friend class StyleSheetBinder; 365 friend class StyleSheetBinder;
340 }; 366 };
341 367
342 } // namespace blink 368 } // namespace blink
343 369
344 #endif // !defined(InspectorCSSAgent_h) 370 #endif // !defined(InspectorCSSAgent_h)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698