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 786 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
797 if (behavior & RenderAsTextPrintingMode) | 797 if (behavior & RenderAsTextPrintingMode) |
798 printContext.begin(toRenderBox(renderer)->width()); | 798 printContext.begin(toRenderBox(renderer)->width()); |
799 | 799 |
800 return externalRepresentation(toRenderBox(renderer), behavior); | 800 return externalRepresentation(toRenderBox(renderer), behavior); |
801 } | 801 } |
802 | 802 |
803 String externalRepresentation(Element* element, RenderAsTextBehavior behavior) | 803 String externalRepresentation(Element* element, RenderAsTextBehavior behavior) |
804 { | 804 { |
805 // Doesn't support printing mode. | 805 // Doesn't support printing mode. |
806 ASSERT(!(behavior & RenderAsTextPrintingMode)); | 806 ASSERT(!(behavior & RenderAsTextPrintingMode)); |
807 if (!(behavior & RenderAsTextDontUpdateLayout) && element->document()) | 807 if (!(behavior & RenderAsTextDontUpdateLayout)) |
808 element->document()->updateLayout(); | 808 element->document()->updateLayout(); |
809 | 809 |
810 RenderObject* renderer = element->renderer(); | 810 RenderObject* renderer = element->renderer(); |
811 if (!renderer || !renderer->isBox()) | 811 if (!renderer || !renderer->isBox()) |
812 return String(); | 812 return String(); |
813 | 813 |
814 return externalRepresentation(toRenderBox(renderer), behavior | RenderAsText
ShowAllLayers); | 814 return externalRepresentation(toRenderBox(renderer), behavior | RenderAsText
ShowAllLayers); |
815 } | 815 } |
816 | 816 |
817 static void writeCounterValuesFromChildren(TextStream& stream, RenderObject* par
ent, bool& isFirstCounter) | 817 static void writeCounterValuesFromChildren(TextStream& stream, RenderObject* par
ent, bool& isFirstCounter) |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
849 element->document()->updateLayout(); | 849 element->document()->updateLayout(); |
850 | 850 |
851 RenderObject* renderer = element->renderer(); | 851 RenderObject* renderer = element->renderer(); |
852 if (!renderer || !renderer->isListItem()) | 852 if (!renderer || !renderer->isListItem()) |
853 return String(); | 853 return String(); |
854 | 854 |
855 return toRenderListItem(renderer)->markerText(); | 855 return toRenderListItem(renderer)->markerText(); |
856 } | 856 } |
857 | 857 |
858 } // namespace WebCore | 858 } // namespace WebCore |
OLD | NEW |