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