OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2003, 2006, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2003, 2006, 2008 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 10 matching lines...) Expand all Loading... |
21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
24 */ | 24 */ |
25 | 25 |
26 #ifndef LayoutTreeAsText_h | 26 #ifndef LayoutTreeAsText_h |
27 #define LayoutTreeAsText_h | 27 #define LayoutTreeAsText_h |
28 | 28 |
29 #include "core/CoreExport.h" | 29 #include "core/CoreExport.h" |
30 #include "platform/text/TextStream.h" | 30 #include "platform/text/TextStream.h" |
| 31 #include "wtf/Allocator.h" |
31 #include "wtf/Forward.h" | 32 #include "wtf/Forward.h" |
32 | 33 |
33 namespace blink { | 34 namespace blink { |
34 | 35 |
35 class Color; | 36 class Color; |
36 class DeprecatedPaintLayer; | 37 class DeprecatedPaintLayer; |
37 class Element; | 38 class Element; |
38 class LayoutRect; | 39 class LayoutRect; |
39 class LocalFrame; | 40 class LocalFrame; |
40 class Node; | 41 class Node; |
(...skipping 14 matching lines...) Expand all Loading... |
55 LayoutAsTextShowLineTrees = 1 << 8 // Dump the line trees for each LayoutBlo
ckFlow. | 56 LayoutAsTextShowLineTrees = 1 << 8 // Dump the line trees for each LayoutBlo
ckFlow. |
56 }; | 57 }; |
57 typedef unsigned LayoutAsTextBehavior; | 58 typedef unsigned LayoutAsTextBehavior; |
58 | 59 |
59 // You don't need pageWidthInPixels if you don't specify LayoutAsTextInPrintingM
ode. | 60 // You don't need pageWidthInPixels if you don't specify LayoutAsTextInPrintingM
ode. |
60 CORE_EXPORT String externalRepresentation(LocalFrame*, LayoutAsTextBehavior = La
youtAsTextBehaviorNormal); | 61 CORE_EXPORT String externalRepresentation(LocalFrame*, LayoutAsTextBehavior = La
youtAsTextBehaviorNormal); |
61 CORE_EXPORT String externalRepresentation(Element*, LayoutAsTextBehavior = Layou
tAsTextBehaviorNormal); | 62 CORE_EXPORT String externalRepresentation(Element*, LayoutAsTextBehavior = Layou
tAsTextBehaviorNormal); |
62 void write(TextStream&, const LayoutObject&, int indent = 0, LayoutAsTextBehavio
r = LayoutAsTextBehaviorNormal); | 63 void write(TextStream&, const LayoutObject&, int indent = 0, LayoutAsTextBehavio
r = LayoutAsTextBehaviorNormal); |
63 | 64 |
64 class LayoutTreeAsText { | 65 class LayoutTreeAsText { |
| 66 STATIC_ONLY(LayoutTreeAsText); |
65 // FIXME: This is a cheesy hack to allow easy access to ComputedStyle colors. I
t won't be needed if we convert | 67 // FIXME: This is a cheesy hack to allow easy access to ComputedStyle colors. I
t won't be needed if we convert |
66 // it to use visitedDependentColor instead. (This just involves rebaselining man
y results though, so for now it's | 68 // it to use visitedDependentColor instead. (This just involves rebaselining man
y results though, so for now it's |
67 // not being done). | 69 // not being done). |
68 public: | 70 public: |
69 static void writeLayoutObject(TextStream&, const LayoutObject&, LayoutAsTextBeha
vior); | 71 static void writeLayoutObject(TextStream&, const LayoutObject&, LayoutAsTextBeha
vior); |
70 static void writeLayers(TextStream&, const DeprecatedPaintLayer* rootLayer, Depr
ecatedPaintLayer*, const LayoutRect& paintDirtyRect, int indent = 0, LayoutAsTex
tBehavior = LayoutAsTextBehaviorNormal); | 72 static void writeLayers(TextStream&, const DeprecatedPaintLayer* rootLayer, Depr
ecatedPaintLayer*, const LayoutRect& paintDirtyRect, int indent = 0, LayoutAsTex
tBehavior = LayoutAsTextBehaviorNormal); |
71 static void writeLineBoxTree(TextStream&, const LayoutBlockFlow&, int indent = 0
); | 73 static void writeLineBoxTree(TextStream&, const LayoutBlockFlow&, int indent = 0
); |
72 }; | 74 }; |
73 | 75 |
74 // Helper function shared with SVGLayoutTreeAsText | 76 // Helper function shared with SVGLayoutTreeAsText |
75 String quoteAndEscapeNonPrintables(const String&); | 77 String quoteAndEscapeNonPrintables(const String&); |
76 | 78 |
77 CORE_EXPORT String counterValueForElement(Element*); | 79 CORE_EXPORT String counterValueForElement(Element*); |
78 | 80 |
79 CORE_EXPORT String markerTextForListItem(Element*); | 81 CORE_EXPORT String markerTextForListItem(Element*); |
80 | 82 |
81 CORE_EXPORT String nodePositionAsStringForTesting(Node*); | 83 CORE_EXPORT String nodePositionAsStringForTesting(Node*); |
82 | 84 |
83 TextStream& operator<<(TextStream&, const Color&); | 85 TextStream& operator<<(TextStream&, const Color&); |
84 | 86 |
85 } // namespace blink | 87 } // namespace blink |
86 | 88 |
87 #endif // LayoutTreeAsText_h | 89 #endif // LayoutTreeAsText_h |
OLD | NEW |