| 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 824 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 835 { | 835 { |
| 836 Node* node = m_domAgent->assertNode(errorString, nodeId); | 836 Node* node = m_domAgent->assertNode(errorString, nodeId); |
| 837 if (!node) | 837 if (!node) |
| 838 return; | 838 return; |
| 839 | 839 |
| 840 RefPtrWillBeRawPtr<CSSComputedStyleDeclaration> computedStyleInfo = CSSCompu
tedStyleDeclaration::create(node, true); | 840 RefPtrWillBeRawPtr<CSSComputedStyleDeclaration> computedStyleInfo = CSSCompu
tedStyleDeclaration::create(node, true); |
| 841 *cssFamilyName = computedStyleInfo->getPropertyValue(CSSPropertyFontFamily); | 841 *cssFamilyName = computedStyleInfo->getPropertyValue(CSSPropertyFontFamily); |
| 842 | 842 |
| 843 WillBeHeapVector<RawPtrWillBeMember<Text> > textNodes; | 843 WillBeHeapVector<RawPtrWillBeMember<Text> > textNodes; |
| 844 if (node->nodeType() == Node::TEXT_NODE) { | 844 if (node->nodeType() == Node::TEXT_NODE) { |
| 845 if (node->renderer()) | 845 if (node->layoutObject()) |
| 846 textNodes.append(toText(node)); | 846 textNodes.append(toText(node)); |
| 847 } else { | 847 } else { |
| 848 for (Node* child = node->firstChild(); child; child = child->nextSibling
()) { | 848 for (Node* child = node->firstChild(); child; child = child->nextSibling
()) { |
| 849 if (child->nodeType() == Node::TEXT_NODE && child->renderer()) | 849 if (child->nodeType() == Node::TEXT_NODE && child->layoutObject()) |
| 850 textNodes.append(toText(child)); | 850 textNodes.append(toText(child)); |
| 851 } | 851 } |
| 852 } | 852 } |
| 853 | 853 |
| 854 HashCountedSet<String> fontStats; | 854 HashCountedSet<String> fontStats; |
| 855 for (size_t i = 0; i < textNodes.size(); ++i) { | 855 for (size_t i = 0; i < textNodes.size(); ++i) { |
| 856 LayoutText* renderer = textNodes[i]->renderer(); | 856 LayoutText* renderer = textNodes[i]->layoutObject(); |
| 857 collectPlatformFontsForRenderer(renderer, &fontStats); | 857 collectPlatformFontsForRenderer(renderer, &fontStats); |
| 858 | 858 |
| 859 if (!renderer->isTextFragment()) | 859 if (!renderer->isTextFragment()) |
| 860 continue; | 860 continue; |
| 861 | 861 |
| 862 // If we're the remaining text from a first-letter then our previous | 862 // If we're the remaining text from a first-letter then our previous |
| 863 // sibling has to be the first-letter renderer. | 863 // sibling has to be the first-letter renderer. |
| 864 LayoutObject* previous = renderer->previousSibling(); | 864 LayoutObject* previous = renderer->previousSibling(); |
| 865 if (!previous) | 865 if (!previous) |
| 866 continue; | 866 continue; |
| (...skipping 709 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1576 visitor->trace(m_invalidatedDocuments); | 1576 visitor->trace(m_invalidatedDocuments); |
| 1577 visitor->trace(m_nodeToInspectorStyleSheet); | 1577 visitor->trace(m_nodeToInspectorStyleSheet); |
| 1578 visitor->trace(m_documentToViaInspectorStyleSheet); | 1578 visitor->trace(m_documentToViaInspectorStyleSheet); |
| 1579 #endif | 1579 #endif |
| 1580 visitor->trace(m_inspectorUserAgentStyleSheet); | 1580 visitor->trace(m_inspectorUserAgentStyleSheet); |
| 1581 InspectorBaseAgent::trace(visitor); | 1581 InspectorBaseAgent::trace(visitor); |
| 1582 } | 1582 } |
| 1583 | 1583 |
| 1584 } // namespace blink | 1584 } // namespace blink |
| 1585 | 1585 |
| OLD | NEW |