OLD | NEW |
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 Loading... |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |