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

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

Issue 1913833002: Current work-in-progress crbug.com/567021 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed html import issue. Created 4 years 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 | « third_party/WebKit/Source/core/html/imports/LinkImport.cpp ('k') | no next file » | 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 1766 matching lines...) Expand 10 before | Expand all | Expand 10 after
1777 m_idToInspectorStyleSheetForInlineStyle.set(inspectorStyleSheet->id(), 1777 m_idToInspectorStyleSheetForInlineStyle.set(inspectorStyleSheet->id(),
1778 inspectorStyleSheet); 1778 inspectorStyleSheet);
1779 m_nodeToInspectorStyleSheet.set(element, inspectorStyleSheet); 1779 m_nodeToInspectorStyleSheet.set(element, inspectorStyleSheet);
1780 return inspectorStyleSheet; 1780 return inspectorStyleSheet;
1781 } 1781 }
1782 1782
1783 // static 1783 // static
1784 void InspectorCSSAgent::collectAllDocumentStyleSheets( 1784 void InspectorCSSAgent::collectAllDocumentStyleSheets(
1785 Document* document, 1785 Document* document,
1786 HeapVector<Member<CSSStyleSheet>>& result) { 1786 HeapVector<Member<CSSStyleSheet>>& result) {
1787 const HeapVector<Member<CSSStyleSheet>> activeStyleSheets = 1787 for (const auto& style :
1788 document->styleEngine().activeStyleSheetsForInspector(); 1788 document->styleEngine().activeStyleSheetsForInspector())
1789 for (const auto& style : activeStyleSheets) { 1789 InspectorCSSAgent::collectStyleSheets(style.first, result);
1790 CSSStyleSheet* styleSheet = style.get();
1791 InspectorCSSAgent::collectStyleSheets(styleSheet, result);
1792 }
1793 } 1790 }
1794 1791
1795 // static 1792 // static
1796 void InspectorCSSAgent::collectStyleSheets( 1793 void InspectorCSSAgent::collectStyleSheets(
1797 CSSStyleSheet* styleSheet, 1794 CSSStyleSheet* styleSheet,
1798 HeapVector<Member<CSSStyleSheet>>& result) { 1795 HeapVector<Member<CSSStyleSheet>>& result) {
1799 result.append(styleSheet); 1796 result.append(styleSheet);
1800 for (unsigned i = 0, size = styleSheet->length(); i < size; ++i) { 1797 for (unsigned i = 0, size = styleSheet->length(); i < size; ++i) {
1801 CSSRule* rule = styleSheet->item(i); 1798 CSSRule* rule = styleSheet->item(i);
1802 if (rule->type() == CSSRule::kImportRule) { 1799 if (rule->type() == CSSRule::kImportRule) {
(...skipping 750 matching lines...) Expand 10 before | Expand all | Expand 10 after
2553 visitor->trace(m_cssStyleSheetToInspectorStyleSheet); 2550 visitor->trace(m_cssStyleSheetToInspectorStyleSheet);
2554 visitor->trace(m_documentToCSSStyleSheets); 2551 visitor->trace(m_documentToCSSStyleSheets);
2555 visitor->trace(m_invalidatedDocuments); 2552 visitor->trace(m_invalidatedDocuments);
2556 visitor->trace(m_nodeToInspectorStyleSheet); 2553 visitor->trace(m_nodeToInspectorStyleSheet);
2557 visitor->trace(m_inspectorUserAgentStyleSheet); 2554 visitor->trace(m_inspectorUserAgentStyleSheet);
2558 visitor->trace(m_tracker); 2555 visitor->trace(m_tracker);
2559 InspectorBaseAgent::trace(visitor); 2556 InspectorBaseAgent::trace(visitor);
2560 } 2557 }
2561 2558
2562 } // namespace blink 2559 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/imports/LinkImport.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698