OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) |
3 * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ight reserved. | 3 * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ight reserved. |
4 * Copyright (C) 2010 Google Inc. All rights reserved. | 4 * Copyright (C) 2010 Google Inc. All rights reserved. |
5 * Copyright (C) 2014 Adobe Systems Incorporated. All rights reserved. | 5 * Copyright (C) 2014 Adobe Systems Incorporated. All rights reserved. |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 17 matching lines...) Expand all Loading... |
28 #include "platform/geometry/LayoutRect.h" | 28 #include "platform/geometry/LayoutRect.h" |
29 | 29 |
30 namespace WebCore { | 30 namespace WebCore { |
31 | 31 |
32 class RenderBlockFlow; | 32 class RenderBlockFlow; |
33 | 33 |
34 // Like LayoutState for layout(), LineLayoutState keeps track of global informat
ion | 34 // Like LayoutState for layout(), LineLayoutState keeps track of global informat
ion |
35 // during an entire linebox tree layout pass (aka layoutInlineChildren). | 35 // during an entire linebox tree layout pass (aka layoutInlineChildren). |
36 class LineLayoutState { | 36 class LineLayoutState { |
37 public: | 37 public: |
38 LineLayoutState(bool fullLayout, LayoutUnit& repaintLogicalTop, LayoutUnit&
repaintLogicalBottom, RenderFlowThread* flowThread) | 38 LineLayoutState(bool fullLayout, LayoutUnit& repaintLogicalTop, LayoutUnit&
repaintLogicalBottom) |
39 : m_lastFloat(0) | 39 : m_lastFloat(0) |
40 , m_endLine(0) | 40 , m_endLine(0) |
41 , m_floatIndex(0) | 41 , m_floatIndex(0) |
42 , m_endLineLogicalTop(0) | 42 , m_endLineLogicalTop(0) |
43 , m_endLineMatched(false) | 43 , m_endLineMatched(false) |
44 , m_checkForFloatsFromLastLine(false) | 44 , m_checkForFloatsFromLastLine(false) |
45 , m_isFullLayout(fullLayout) | 45 , m_isFullLayout(fullLayout) |
46 , m_repaintLogicalTop(repaintLogicalTop) | 46 , m_repaintLogicalTop(repaintLogicalTop) |
47 , m_repaintLogicalBottom(repaintLogicalBottom) | 47 , m_repaintLogicalBottom(repaintLogicalBottom) |
48 , m_adjustedLogicalLineTop(0) | 48 , m_adjustedLogicalLineTop(0) |
49 , m_usesRepaintBounds(false) | 49 , m_usesRepaintBounds(false) |
50 , m_flowThread(flowThread) | |
51 { } | 50 { } |
52 | 51 |
53 void markForFullLayout() { m_isFullLayout = true; } | 52 void markForFullLayout() { m_isFullLayout = true; } |
54 bool isFullLayout() const { return m_isFullLayout; } | 53 bool isFullLayout() const { return m_isFullLayout; } |
55 | 54 |
56 bool usesRepaintBounds() const { return m_usesRepaintBounds; } | 55 bool usesRepaintBounds() const { return m_usesRepaintBounds; } |
57 | 56 |
58 void setRepaintRange(LayoutUnit logicalHeight) | 57 void setRepaintRange(LayoutUnit logicalHeight) |
59 { | 58 { |
60 m_usesRepaintBounds = true; | 59 m_usesRepaintBounds = true; |
(...skipping 26 matching lines...) Expand all Loading... |
87 void setLastFloat(FloatingObject* lastFloat) { m_lastFloat = lastFloat; } | 86 void setLastFloat(FloatingObject* lastFloat) { m_lastFloat = lastFloat; } |
88 | 87 |
89 Vector<RenderBlockFlow::FloatWithRect>& floats() { return m_floats; } | 88 Vector<RenderBlockFlow::FloatWithRect>& floats() { return m_floats; } |
90 | 89 |
91 unsigned floatIndex() const { return m_floatIndex; } | 90 unsigned floatIndex() const { return m_floatIndex; } |
92 void setFloatIndex(unsigned floatIndex) { m_floatIndex = floatIndex; } | 91 void setFloatIndex(unsigned floatIndex) { m_floatIndex = floatIndex; } |
93 | 92 |
94 LayoutUnit adjustedLogicalLineTop() const { return m_adjustedLogicalLineTop;
} | 93 LayoutUnit adjustedLogicalLineTop() const { return m_adjustedLogicalLineTop;
} |
95 void setAdjustedLogicalLineTop(LayoutUnit value) { m_adjustedLogicalLineTop
= value; } | 94 void setAdjustedLogicalLineTop(LayoutUnit value) { m_adjustedLogicalLineTop
= value; } |
96 | 95 |
97 RenderFlowThread* flowThread() const { return m_flowThread; } | |
98 void setFlowThread(RenderFlowThread* thread) { m_flowThread = thread; } | |
99 | |
100 private: | 96 private: |
101 Vector<RenderBlockFlow::FloatWithRect> m_floats; | 97 Vector<RenderBlockFlow::FloatWithRect> m_floats; |
102 FloatingObject* m_lastFloat; | 98 FloatingObject* m_lastFloat; |
103 RootInlineBox* m_endLine; | 99 RootInlineBox* m_endLine; |
104 LineInfo m_lineInfo; | 100 LineInfo m_lineInfo; |
105 unsigned m_floatIndex; | 101 unsigned m_floatIndex; |
106 LayoutUnit m_endLineLogicalTop; | 102 LayoutUnit m_endLineLogicalTop; |
107 bool m_endLineMatched; | 103 bool m_endLineMatched; |
108 bool m_checkForFloatsFromLastLine; | 104 bool m_checkForFloatsFromLastLine; |
109 | 105 |
110 bool m_isFullLayout; | 106 bool m_isFullLayout; |
111 | 107 |
112 // FIXME: Should this be a range object instead of two ints? | 108 // FIXME: Should this be a range object instead of two ints? |
113 LayoutUnit& m_repaintLogicalTop; | 109 LayoutUnit& m_repaintLogicalTop; |
114 LayoutUnit& m_repaintLogicalBottom; | 110 LayoutUnit& m_repaintLogicalBottom; |
115 | 111 |
116 LayoutUnit m_adjustedLogicalLineTop; | 112 LayoutUnit m_adjustedLogicalLineTop; |
117 | 113 |
118 bool m_usesRepaintBounds; | 114 bool m_usesRepaintBounds; |
119 | |
120 RenderFlowThread* m_flowThread; | |
121 }; | 115 }; |
122 | 116 |
123 } | 117 } |
124 | 118 |
125 #endif // LineLayoutState_h | 119 #endif // LineLayoutState_h |
OLD | NEW |