| 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 1766 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 for (const auto& style : | 1787 const HeapVector<Member<CSSStyleSheet>> activeStyleSheets = |
| 1788 document->styleEngine().activeStyleSheetsForInspector()) | 1788 document->styleEngine().activeStyleSheetsForInspector(); |
| 1789 InspectorCSSAgent::collectStyleSheets(style.first, result); | 1789 for (const auto& style : activeStyleSheets) { |
| 1790 CSSStyleSheet* styleSheet = style.get(); |
| 1791 InspectorCSSAgent::collectStyleSheets(styleSheet, result); |
| 1792 } |
| 1790 } | 1793 } |
| 1791 | 1794 |
| 1792 // static | 1795 // static |
| 1793 void InspectorCSSAgent::collectStyleSheets( | 1796 void InspectorCSSAgent::collectStyleSheets( |
| 1794 CSSStyleSheet* styleSheet, | 1797 CSSStyleSheet* styleSheet, |
| 1795 HeapVector<Member<CSSStyleSheet>>& result) { | 1798 HeapVector<Member<CSSStyleSheet>>& result) { |
| 1796 result.append(styleSheet); | 1799 result.append(styleSheet); |
| 1797 for (unsigned i = 0, size = styleSheet->length(); i < size; ++i) { | 1800 for (unsigned i = 0, size = styleSheet->length(); i < size; ++i) { |
| 1798 CSSRule* rule = styleSheet->item(i); | 1801 CSSRule* rule = styleSheet->item(i); |
| 1799 if (rule->type() == CSSRule::kImportRule) { | 1802 if (rule->type() == CSSRule::kImportRule) { |
| (...skipping 714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2514 visitor->trace(m_cssStyleSheetToInspectorStyleSheet); | 2517 visitor->trace(m_cssStyleSheetToInspectorStyleSheet); |
| 2515 visitor->trace(m_documentToCSSStyleSheets); | 2518 visitor->trace(m_documentToCSSStyleSheets); |
| 2516 visitor->trace(m_invalidatedDocuments); | 2519 visitor->trace(m_invalidatedDocuments); |
| 2517 visitor->trace(m_nodeToInspectorStyleSheet); | 2520 visitor->trace(m_nodeToInspectorStyleSheet); |
| 2518 visitor->trace(m_inspectorUserAgentStyleSheet); | 2521 visitor->trace(m_inspectorUserAgentStyleSheet); |
| 2519 visitor->trace(m_tracker); | 2522 visitor->trace(m_tracker); |
| 2520 InspectorBaseAgent::trace(visitor); | 2523 InspectorBaseAgent::trace(visitor); |
| 2521 } | 2524 } |
| 2522 | 2525 |
| 2523 } // namespace blink | 2526 } // namespace blink |
| OLD | NEW |