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

Side by Side Diff: Source/core/rendering/RenderTreeAsText.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/rendering/RenderTableSection.cpp ('k') | Source/core/rendering/TextAutosizer.h » ('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, 2006, 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2006, 2007 Apple 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 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 ts << "\n"; 467 ts << "\n";
468 468
469 if (o.isText() && !o.isBR()) { 469 if (o.isText() && !o.isBR()) {
470 const RenderText& text = *toRenderText(&o); 470 const RenderText& text = *toRenderText(&o);
471 for (InlineTextBox* box = text.firstTextBox(); box; box = box->nextTextB ox()) { 471 for (InlineTextBox* box = text.firstTextBox(); box; box = box->nextTextB ox()) {
472 writeIndent(ts, indent + 1); 472 writeIndent(ts, indent + 1);
473 writeTextRun(ts, text, *box); 473 writeTextRun(ts, text, *box);
474 } 474 }
475 } 475 }
476 476
477 for (RenderObject* child = o.firstChild(); child; child = child->nextSibling ()) { 477 for (RenderObject* child = o.slowFirstChild(); child; child = child->nextSib ling()) {
478 if (child->hasLayer()) 478 if (child->hasLayer())
479 continue; 479 continue;
480 write(ts, *child, indent + 1, behavior); 480 write(ts, *child, indent + 1, behavior);
481 } 481 }
482 482
483 if (o.isWidget()) { 483 if (o.isWidget()) {
484 Widget* widget = toRenderWidget(&o)->widget(); 484 Widget* widget = toRenderWidget(&o)->widget();
485 if (widget && widget->isFrameView()) { 485 if (widget && widget->isFrameView()) {
486 FrameView* view = toFrameView(widget); 486 FrameView* view = toFrameView(widget);
487 RenderView* root = view->frame().contentRenderer(); 487 RenderView* root = view->frame().contentRenderer();
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
729 729
730 RenderObject* renderer = element->renderer(); 730 RenderObject* renderer = element->renderer();
731 if (!renderer || !renderer->isBox()) 731 if (!renderer || !renderer->isBox())
732 return String(); 732 return String();
733 733
734 return externalRepresentation(toRenderBox(renderer), behavior | RenderAsText ShowAllLayers); 734 return externalRepresentation(toRenderBox(renderer), behavior | RenderAsText ShowAllLayers);
735 } 735 }
736 736
737 static void writeCounterValuesFromChildren(TextStream& stream, RenderObject* par ent, bool& isFirstCounter) 737 static void writeCounterValuesFromChildren(TextStream& stream, RenderObject* par ent, bool& isFirstCounter)
738 { 738 {
739 for (RenderObject* child = parent->firstChild(); child; child = child->nextS ibling()) { 739 for (RenderObject* child = parent->slowFirstChild(); child; child = child->n extSibling()) {
740 if (child->isCounter()) { 740 if (child->isCounter()) {
741 if (!isFirstCounter) 741 if (!isFirstCounter)
742 stream << " "; 742 stream << " ";
743 isFirstCounter = false; 743 isFirstCounter = false;
744 String str(toRenderText(child)->text()); 744 String str(toRenderText(child)->text());
745 stream << str; 745 stream << str;
746 } 746 }
747 } 747 }
748 } 748 }
749 749
(...skipping 19 matching lines...) Expand all
769 element->document().updateLayout(); 769 element->document().updateLayout();
770 770
771 RenderObject* renderer = element->renderer(); 771 RenderObject* renderer = element->renderer();
772 if (!renderer || !renderer->isListItem()) 772 if (!renderer || !renderer->isListItem())
773 return String(); 773 return String();
774 774
775 return toRenderListItem(renderer)->markerText(); 775 return toRenderListItem(renderer)->markerText();
776 } 776 }
777 777
778 } // namespace WebCore 778 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderTableSection.cpp ('k') | Source/core/rendering/TextAutosizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698