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

Side by Side Diff: Source/core/editing/TextIterator.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/dom/Text.cpp ('k') | Source/core/editing/htmlediting.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) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r ights reserved. 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r ights reserved.
3 * Copyright (C) 2005 Alexey Proskuryakov. 3 * Copyright (C) 2005 Alexey Proskuryakov.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 731 matching lines...) Expand 10 before | Expand all | Expand 10 after
742 handleTextBox(); 742 handleTextBox();
743 } 743 }
744 } 744 }
745 745
746 static inline RenderText* firstRenderTextInFirstLetter(RenderObject* firstLetter ) 746 static inline RenderText* firstRenderTextInFirstLetter(RenderObject* firstLetter )
747 { 747 {
748 if (!firstLetter) 748 if (!firstLetter)
749 return 0; 749 return 0;
750 750
751 // FIXME: Should this check descendent objects? 751 // FIXME: Should this check descendent objects?
752 for (RenderObject* current = firstLetter->firstChild(); current; current = c urrent->nextSibling()) { 752 for (RenderObject* current = firstLetter->slowFirstChild(); current; current = current->nextSibling()) {
753 if (current->isText()) 753 if (current->isText())
754 return toRenderText(current); 754 return toRenderText(current);
755 } 755 }
756 return 0; 756 return 0;
757 } 757 }
758 758
759 void TextIterator::handleTextNodeFirstLetter(RenderTextFragment* renderer) 759 void TextIterator::handleTextNodeFirstLetter(RenderTextFragment* renderer)
760 { 760 {
761 if (renderer->firstLetter()) { 761 if (renderer->firstLetter()) {
762 RenderObject* r = renderer->firstLetter(); 762 RenderObject* r = renderer->firstLetter();
(...skipping 1432 matching lines...) Expand 10 before | Expand all | Expand 10 after
2195 resultEnd = collapseTo; 2195 resultEnd = collapseTo;
2196 return; 2196 return;
2197 } 2197 }
2198 } 2198 }
2199 2199
2200 CharacterIterator computeRangeIterator(inputStart, inputEnd, iteratorFlagsFo rFindPlainText); 2200 CharacterIterator computeRangeIterator(inputStart, inputEnd, iteratorFlagsFo rFindPlainText);
2201 calculateCharacterSubrange(computeRangeIterator, matchStart, matchLength, re sultStart, resultEnd); 2201 calculateCharacterSubrange(computeRangeIterator, matchStart, matchLength, re sultStart, resultEnd);
2202 } 2202 }
2203 2203
2204 } 2204 }
OLDNEW
« no previous file with comments | « Source/core/dom/Text.cpp ('k') | Source/core/editing/htmlediting.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698