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/core/inspector/InspectorCSSAgent.cpp

Issue 975933002: Return reference from styleEngine() accessor. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « Source/core/html/imports/HTMLImportTreeRoot.cpp ('k') | Source/core/layout/LayoutBR.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 1269 matching lines...) Expand 10 before | Expand all | Expand 10 after
1280 if (!node->isElementNode()) { 1280 if (!node->isElementNode()) {
1281 *errorString = "Not an element node"; 1281 *errorString = "Not an element node";
1282 return nullptr; 1282 return nullptr;
1283 } 1283 }
1284 return toElement(node); 1284 return toElement(node);
1285 } 1285 }
1286 1286
1287 // static 1287 // static
1288 void InspectorCSSAgent::collectAllDocumentStyleSheets(Document* document, WillBe HeapVector<RawPtrWillBeMember<CSSStyleSheet> >& result) 1288 void InspectorCSSAgent::collectAllDocumentStyleSheets(Document* document, WillBe HeapVector<RawPtrWillBeMember<CSSStyleSheet> >& result)
1289 { 1289 {
1290 const WillBeHeapVector<RefPtrWillBeMember<CSSStyleSheet> > activeStyleSheets = document->styleEngine()->activeStyleSheetsForInspector(); 1290 const WillBeHeapVector<RefPtrWillBeMember<CSSStyleSheet>> activeStyleSheets = document->styleEngine().activeStyleSheetsForInspector();
1291 for (const auto& style : activeStyleSheets) { 1291 for (const auto& style : activeStyleSheets) {
1292 CSSStyleSheet* styleSheet = style.get(); 1292 CSSStyleSheet* styleSheet = style.get();
1293 InspectorCSSAgent::collectStyleSheets(styleSheet, result); 1293 InspectorCSSAgent::collectStyleSheets(styleSheet, result);
1294 } 1294 }
1295 } 1295 }
1296 1296
1297 // static 1297 // static
1298 void InspectorCSSAgent::collectStyleSheets(CSSStyleSheet* styleSheet, WillBeHeap Vector<RawPtrWillBeMember<CSSStyleSheet> >& result) 1298 void InspectorCSSAgent::collectStyleSheets(CSSStyleSheet* styleSheet, WillBeHeap Vector<RawPtrWillBeMember<CSSStyleSheet> >& result)
1299 { 1299 {
1300 result.append(styleSheet); 1300 result.append(styleSheet);
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
1574 visitor->trace(m_invalidatedDocuments); 1574 visitor->trace(m_invalidatedDocuments);
1575 visitor->trace(m_nodeToInspectorStyleSheet); 1575 visitor->trace(m_nodeToInspectorStyleSheet);
1576 visitor->trace(m_documentToViaInspectorStyleSheet); 1576 visitor->trace(m_documentToViaInspectorStyleSheet);
1577 #endif 1577 #endif
1578 visitor->trace(m_inspectorUserAgentStyleSheet); 1578 visitor->trace(m_inspectorUserAgentStyleSheet);
1579 InspectorBaseAgent::trace(visitor); 1579 InspectorBaseAgent::trace(visitor);
1580 } 1580 }
1581 1581
1582 } // namespace blink 1582 } // namespace blink
1583 1583
OLDNEW
« no previous file with comments | « Source/core/html/imports/HTMLImportTreeRoot.cpp ('k') | Source/core/layout/LayoutBR.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698