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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 #include "wtf/UnusedParam.h" | 62 #include "wtf/UnusedParam.h" |
63 #include "wtf/Vector.h" | 63 #include "wtf/Vector.h" |
64 #include "wtf/unicode/CharacterNames.h" | 64 #include "wtf/unicode/CharacterNames.h" |
65 | 65 |
66 namespace WebCore { | 66 namespace WebCore { |
67 | 67 |
68 using namespace HTMLNames; | 68 using namespace HTMLNames; |
69 | 69 |
70 static void writeLayers(TextStream&, const RenderLayer* rootLayer, RenderLayer*,
const LayoutRect& paintDirtyRect, int indent = 0, RenderAsTextBehavior = Render
AsTextBehaviorNormal); | 70 static void writeLayers(TextStream&, const RenderLayer* rootLayer, RenderLayer*,
const LayoutRect& paintDirtyRect, int indent = 0, RenderAsTextBehavior = Render
AsTextBehaviorNormal); |
71 | 71 |
72 TextStream& operator<<(TextStream& ts, const IntRect& r) | |
73 { | |
74 return ts << "at (" << r.x() << "," << r.y() << ") size " << r.width() << "x
" << r.height(); | |
75 } | |
76 | |
77 TextStream& operator<<(TextStream& ts, const IntPoint& p) | |
78 { | |
79 return ts << "(" << p.x() << "," << p.y() << ")"; | |
80 } | |
81 | |
82 TextStream& operator<<(TextStream& ts, const FloatPoint& p) | |
83 { | |
84 ts << "(" << TextStream::FormatNumberRespectingIntegers(p.x()); | |
85 ts << "," << TextStream::FormatNumberRespectingIntegers(p.y()); | |
86 ts << ")"; | |
87 return ts; | |
88 } | |
89 | |
90 TextStream& operator<<(TextStream& ts, const FloatSize& s) | |
91 { | |
92 ts << "width=" << TextStream::FormatNumberRespectingIntegers(s.width()); | |
93 ts << " height=" << TextStream::FormatNumberRespectingIntegers(s.height()); | |
94 return ts; | |
95 } | |
96 | |
97 void writeIndent(TextStream& ts, int indent) | |
98 { | |
99 for (int i = 0; i != indent; ++i) | |
100 ts << " "; | |
101 } | |
102 | |
103 static void printBorderStyle(TextStream& ts, const EBorderStyle borderStyle) | 72 static void printBorderStyle(TextStream& ts, const EBorderStyle borderStyle) |
104 { | 73 { |
105 switch (borderStyle) { | 74 switch (borderStyle) { |
106 case BNONE: | 75 case BNONE: |
107 ts << "none"; | 76 ts << "none"; |
108 break; | 77 break; |
109 case BHIDDEN: | 78 case BHIDDEN: |
110 ts << "hidden"; | 79 ts << "hidden"; |
111 break; | 80 break; |
112 case INSET: | 81 case INSET: |
(...skipping 744 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
857 element->document().updateLayout(); | 826 element->document().updateLayout(); |
858 | 827 |
859 RenderObject* renderer = element->renderer(); | 828 RenderObject* renderer = element->renderer(); |
860 if (!renderer || !renderer->isListItem()) | 829 if (!renderer || !renderer->isListItem()) |
861 return String(); | 830 return String(); |
862 | 831 |
863 return toRenderListItem(renderer)->markerText(); | 832 return toRenderListItem(renderer)->markerText(); |
864 } | 833 } |
865 | 834 |
866 } // namespace WebCore | 835 } // namespace WebCore |
OLD | NEW |