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

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

Issue 295513003: add 'slow' prefix to RenderObject's firstChild() / lastChild() methods (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 months 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/editing/htmlediting.cpp ('k') | Source/core/plugins/PluginOcclusionSupport.cpp » ('j') | 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 763 matching lines...) Expand 10 before | Expand all | Expand 10 after
774 } 774 }
775 775
776 HashCountedSet<String> fontStats; 776 HashCountedSet<String> fontStats;
777 for (size_t i = 0; i < textNodes.size(); ++i) { 777 for (size_t i = 0; i < textNodes.size(); ++i) {
778 RenderText* renderer = toRenderText(textNodes[i]->renderer()); 778 RenderText* renderer = toRenderText(textNodes[i]->renderer());
779 collectPlatformFontsForRenderer(renderer, &fontStats); 779 collectPlatformFontsForRenderer(renderer, &fontStats);
780 if (renderer->isTextFragment()) { 780 if (renderer->isTextFragment()) {
781 RenderTextFragment* textFragment = toRenderTextFragment(renderer); 781 RenderTextFragment* textFragment = toRenderTextFragment(renderer);
782 if (textFragment->firstLetter()) { 782 if (textFragment->firstLetter()) {
783 RenderObject* firstLetter = textFragment->firstLetter(); 783 RenderObject* firstLetter = textFragment->firstLetter();
784 for (RenderObject* current = firstLetter->firstChild(); current; current = current->nextSibling()) { 784 for (RenderObject* current = firstLetter->slowFirstChild(); curr ent; current = current->nextSibling()) {
785 if (current->isText()) 785 if (current->isText())
786 collectPlatformFontsForRenderer(toRenderText(current), & fontStats); 786 collectPlatformFontsForRenderer(toRenderText(current), & fontStats);
787 } 787 }
788 } 788 }
789 } 789 }
790 } 790 }
791 791
792 platformFonts = TypeBuilder::Array<TypeBuilder::CSS::PlatformFontUsage>::cre ate(); 792 platformFonts = TypeBuilder::Array<TypeBuilder::CSS::PlatformFontUsage>::cre ate();
793 for (HashCountedSet<String>::iterator it = fontStats.begin(), end = fontStat s.end(); it != end; ++it) { 793 for (HashCountedSet<String>::iterator it = fontStats.begin(), end = fontStat s.end(); it != end; ++it) {
794 RefPtr<TypeBuilder::CSS::PlatformFontUsage> platformFont = TypeBuilder:: CSS::PlatformFontUsage::create() 794 RefPtr<TypeBuilder::CSS::PlatformFontUsage> platformFont = TypeBuilder:: CSS::PlatformFontUsage::create()
(...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after
1387 documentsToChange.add(element->ownerDocument()); 1387 documentsToChange.add(element->ownerDocument());
1388 } 1388 }
1389 1389
1390 m_nodeIdToForcedPseudoState.clear(); 1390 m_nodeIdToForcedPseudoState.clear();
1391 for (HashSet<Document*>::iterator it = documentsToChange.begin(), end = docu mentsToChange.end(); it != end; ++it) 1391 for (HashSet<Document*>::iterator it = documentsToChange.begin(), end = docu mentsToChange.end(); it != end; ++it)
1392 (*it)->setNeedsStyleRecalc(SubtreeStyleChange); 1392 (*it)->setNeedsStyleRecalc(SubtreeStyleChange);
1393 } 1393 }
1394 1394
1395 } // namespace WebCore 1395 } // namespace WebCore
1396 1396
OLDNEW
« no previous file with comments | « Source/core/editing/htmlediting.cpp ('k') | Source/core/plugins/PluginOcclusionSupport.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698