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 690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
701 return; | 701 return; |
702 | 702 |
703 RefPtrWillBeRawPtr<CSSComputedStyleDeclaration> computedStyleInfo = CSSCompu
tedStyleDeclaration::create(node, true); | 703 RefPtrWillBeRawPtr<CSSComputedStyleDeclaration> computedStyleInfo = CSSCompu
tedStyleDeclaration::create(node, true); |
704 RefPtr<InspectorStyle> inspectorStyle = InspectorStyle::create(InspectorCSSI
d(), computedStyleInfo, 0); | 704 RefPtr<InspectorStyle> inspectorStyle = InspectorStyle::create(InspectorCSSI
d(), computedStyleInfo, 0); |
705 style = inspectorStyle->buildArrayForComputedStyle(); | 705 style = inspectorStyle->buildArrayForComputedStyle(); |
706 } | 706 } |
707 | 707 |
708 void InspectorCSSAgent::collectPlatformFontsForRenderer(RenderText* renderer, Ha
shCountedSet<String>* fontStats) | 708 void InspectorCSSAgent::collectPlatformFontsForRenderer(RenderText* renderer, Ha
shCountedSet<String>* fontStats) |
709 { | 709 { |
710 for (InlineTextBox* box = renderer->firstTextBox(); box; box = box->nextText
Box()) { | 710 for (InlineTextBox* box = renderer->firstTextBox(); box; box = box->nextText
Box()) { |
711 RenderStyle* style = renderer->style(box->isFirstLineStyle()); | 711 RenderStyle* style = renderer->styleOrFirstLineStyle(box->isFirstLineSty
le()); |
712 const Font& font = style->font(); | 712 const Font& font = style->font(); |
713 TextRun run = box->constructTextRunForInspector(style, font); | 713 TextRun run = box->constructTextRunForInspector(style, font); |
714 WidthIterator it(&font, run, 0, false); | 714 WidthIterator it(&font, run, 0, false); |
715 GlyphBuffer glyphBuffer; | 715 GlyphBuffer glyphBuffer; |
716 it.advance(run.length(), &glyphBuffer); | 716 it.advance(run.length(), &glyphBuffer); |
717 for (unsigned i = 0; i < glyphBuffer.size(); ++i) { | 717 for (unsigned i = 0; i < glyphBuffer.size(); ++i) { |
718 String familyName = glyphBuffer.fontDataAt(i)->platformData().fontFa
milyName(); | 718 String familyName = glyphBuffer.fontDataAt(i)->platformData().fontFa
milyName(); |
719 if (familyName.isNull()) | 719 if (familyName.isNull()) |
720 familyName = ""; | 720 familyName = ""; |
721 fontStats->add(familyName); | 721 fontStats->add(familyName); |
(...skipping 677 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1399 documentsToChange.add(element->ownerDocument()); | 1399 documentsToChange.add(element->ownerDocument()); |
1400 } | 1400 } |
1401 | 1401 |
1402 m_nodeIdToForcedPseudoState.clear(); | 1402 m_nodeIdToForcedPseudoState.clear(); |
1403 for (HashSet<Document*>::iterator it = documentsToChange.begin(), end = docu
mentsToChange.end(); it != end; ++it) | 1403 for (HashSet<Document*>::iterator it = documentsToChange.begin(), end = docu
mentsToChange.end(); it != end; ++it) |
1404 (*it)->setNeedsStyleRecalc(SubtreeStyleChange); | 1404 (*it)->setNeedsStyleRecalc(SubtreeStyleChange); |
1405 } | 1405 } |
1406 | 1406 |
1407 } // namespace WebCore | 1407 } // namespace WebCore |
1408 | 1408 |
OLD | NEW |