OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. | 2 * Copyright (C) 2011 Adobe Systems Incorporated. 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 * | 7 * |
8 * 1. Redistributions of source code must retain the above | 8 * 1. Redistributions of source code must retain the above |
9 * copyright notice, this list of conditions and the following | 9 * copyright notice, this list of conditions and the following |
10 * disclaimer. | 10 * disclaimer. |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 virtual bool isRenderFlowThread() const OVERRIDE FINAL { return true; } | 60 virtual bool isRenderFlowThread() const OVERRIDE FINAL { return true; } |
61 virtual bool isRenderMultiColumnFlowThread() const { return false; } | 61 virtual bool isRenderMultiColumnFlowThread() const { return false; } |
62 virtual bool isRenderPagedFlowThread() const { return false; } | 62 virtual bool isRenderPagedFlowThread() const { return false; } |
63 | 63 |
64 virtual void layout() OVERRIDE; | 64 virtual void layout() OVERRIDE; |
65 | 65 |
66 // Always create a RenderLayer for the RenderFlowThread so that we | 66 // Always create a RenderLayer for the RenderFlowThread so that we |
67 // can easily avoid drawing the children directly. | 67 // can easily avoid drawing the children directly. |
68 virtual LayerType layerTypeRequired() const OVERRIDE FINAL { return NormalLa
yer; } | 68 virtual LayerType layerTypeRequired() const OVERRIDE FINAL { return NormalLa
yer; } |
69 | 69 |
| 70 virtual bool isColumnSpanner(const RenderObject*) const { return false; } |
| 71 |
| 72 // Is the specified renderer a column spanner or inside one? |
| 73 virtual bool isInsideColumnSpanner(const RenderObject*) const { return false
; } |
| 74 |
| 75 // Enter the specified column spanner for layout. |
| 76 virtual LayoutUnit enterColumnSpanner(RenderBox*, LayoutUnit logicalTop) { r
eturn LayoutUnit(); } |
| 77 |
| 78 // Leave the specified column spanner when layout has finished. |
| 79 virtual void leaveColumnSpanner(RenderBox*, LayoutUnit logicalBottom) { } |
| 80 |
| 81 virtual void flowThreadDescendantInserted(RenderObject*) { } |
| 82 virtual void flowThreadDescendantWillBeRemoved(RenderObject*) { } |
| 83 virtual void flowThreadDescendantStyleDidChange(RenderObject*) { } |
| 84 |
70 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTes
tLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAct
ion) OVERRIDE FINAL; | 85 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTes
tLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAct
ion) OVERRIDE FINAL; |
71 | 86 |
72 virtual void addRegionToThread(RenderMultiColumnSet*) = 0; | 87 virtual void addRegionToThread(RenderMultiColumnSet*) = 0; |
73 virtual void removeRegionFromThread(RenderMultiColumnSet*); | 88 virtual void removeRegionFromThread(RenderMultiColumnSet*); |
74 | 89 |
75 virtual void computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logic
alTop, LogicalExtentComputedValues&) const OVERRIDE; | 90 virtual void computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logic
alTop, LogicalExtentComputedValues&) const OVERRIDE; |
76 | 91 |
77 bool hasRegions() const { return m_multiColumnSetList.size(); } | 92 bool hasRegions() const { return m_multiColumnSetList.size(); } |
78 | 93 |
79 void validateRegions(); | 94 void validateRegions(); |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 RenderMultiColumnSet* endColumnSet() const { return m_endColumnSet; } | 166 RenderMultiColumnSet* endColumnSet() const { return m_endColumnSet; } |
152 | 167 |
153 private: | 168 private: |
154 RenderMultiColumnSet* m_startColumnSet; | 169 RenderMultiColumnSet* m_startColumnSet; |
155 RenderMultiColumnSet* m_endColumnSet; | 170 RenderMultiColumnSet* m_endColumnSet; |
156 }; | 171 }; |
157 | 172 |
158 typedef PODInterval<LayoutUnit, RenderMultiColumnSet*> MultiColumnSetInterva
l; | 173 typedef PODInterval<LayoutUnit, RenderMultiColumnSet*> MultiColumnSetInterva
l; |
159 typedef PODIntervalTree<LayoutUnit, RenderMultiColumnSet*> MultiColumnSetInt
ervalTree; | 174 typedef PODIntervalTree<LayoutUnit, RenderMultiColumnSet*> MultiColumnSetInt
ervalTree; |
160 | 175 |
161 class RegionSearchAdapter { | 176 class MultiColumnSetSearchAdapter { |
162 public: | 177 public: |
163 RegionSearchAdapter(LayoutUnit offset) | 178 MultiColumnSetSearchAdapter(LayoutUnit offset) |
164 : m_offset(offset) | 179 : m_offset(offset) |
165 , m_result(0) | 180 , m_result(0) |
166 { | 181 { |
167 } | 182 } |
168 | 183 |
169 const LayoutUnit& lowValue() const { return m_offset; } | 184 const LayoutUnit& lowValue() const { return m_offset; } |
170 const LayoutUnit& highValue() const { return m_offset; } | 185 const LayoutUnit& highValue() const { return m_offset; } |
171 void collectIfNeeded(const MultiColumnSetInterval&); | 186 void collectIfNeeded(const MultiColumnSetInterval&); |
172 | 187 |
173 RenderRegion* result() const { return m_result; } | 188 RenderMultiColumnSet* result() const { return m_result; } |
174 | 189 |
175 private: | 190 private: |
176 LayoutUnit m_offset; | 191 LayoutUnit m_offset; |
177 RenderRegion* m_result; | 192 RenderMultiColumnSet* m_result; |
178 }; | 193 }; |
179 | 194 |
180 // A maps from RenderBox | 195 // A maps from RenderBox |
181 typedef HashMap<const RenderBox*, RenderMultiColumnSetRange> RenderMultiColu
mnSetRangeMap; | 196 typedef HashMap<const RenderBox*, RenderMultiColumnSetRange> RenderMultiColu
mnSetRangeMap; |
182 RenderMultiColumnSetRangeMap m_multiColumnSetRangeMap; | 197 RenderMultiColumnSetRangeMap m_multiColumnSetRangeMap; |
183 | 198 |
184 // Stack of objects that pushed a LayoutState object on the RenderView. The | 199 // Stack of objects that pushed a LayoutState object on the RenderView. The |
185 // objects on the stack are the ones that are curently in the process of bei
ng | 200 // objects on the stack are the ones that are curently in the process of bei
ng |
186 // laid out. | 201 // laid out. |
187 ListHashSet<const RenderObject*> m_statePusherObjectsStack; | 202 ListHashSet<const RenderObject*> m_statePusherObjectsStack; |
(...skipping 26 matching lines...) Expand all Loading... |
214 }; | 229 }; |
215 | 230 |
216 template <> struct ValueToString<RenderMultiColumnSet*> { | 231 template <> struct ValueToString<RenderMultiColumnSet*> { |
217 static String string(const RenderMultiColumnSet* value) { return String::for
mat("%p", value); } | 232 static String string(const RenderMultiColumnSet* value) { return String::for
mat("%p", value); } |
218 }; | 233 }; |
219 #endif | 234 #endif |
220 | 235 |
221 } // namespace blink | 236 } // namespace blink |
222 | 237 |
223 #endif // RenderFlowThread_h | 238 #endif // RenderFlowThread_h |
OLD | NEW |