| 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 // Column spanners are moved out of the flow thread to live among column set
s. If |child| is |
| 71 // such a renderer, resolve it to the placeholder that lives at the original
location in the |
| 72 // tree. |
| 73 virtual RenderObject* resolveMovedChild(RenderObject* child) const { return
child; } |
| 74 |
| 75 virtual void flowThreadDescendantInserted(RenderObject*) { } |
| 76 virtual void flowThreadDescendantOrSiblingWillBeRemoved(RenderObject*) { } |
| 77 |
| 70 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTes
tLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAct
ion) OVERRIDE FINAL; | 78 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTes
tLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAct
ion) OVERRIDE FINAL; |
| 71 | 79 |
| 72 virtual void addRegionToThread(RenderMultiColumnSet*) = 0; | 80 virtual void addRegionToThread(RenderMultiColumnSet*) = 0; |
| 73 virtual void removeRegionFromThread(RenderMultiColumnSet*); | 81 virtual void removeRegionFromThread(RenderMultiColumnSet*); |
| 74 | 82 |
| 75 virtual void computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logic
alTop, LogicalExtentComputedValues&) const OVERRIDE; | 83 virtual void computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logic
alTop, LogicalExtentComputedValues&) const OVERRIDE; |
| 76 | 84 |
| 77 bool hasRegions() const { return m_multiColumnSetList.size(); } | 85 bool hasRegions() const { return m_multiColumnSetList.size(); } |
| 78 | 86 |
| 79 void validateRegions(); | 87 void validateRegions(); |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 RenderMultiColumnSet* endColumnSet() const { return m_endColumnSet; } | 159 RenderMultiColumnSet* endColumnSet() const { return m_endColumnSet; } |
| 152 | 160 |
| 153 private: | 161 private: |
| 154 RenderMultiColumnSet* m_startColumnSet; | 162 RenderMultiColumnSet* m_startColumnSet; |
| 155 RenderMultiColumnSet* m_endColumnSet; | 163 RenderMultiColumnSet* m_endColumnSet; |
| 156 }; | 164 }; |
| 157 | 165 |
| 158 typedef PODInterval<LayoutUnit, RenderMultiColumnSet*> MultiColumnSetInterva
l; | 166 typedef PODInterval<LayoutUnit, RenderMultiColumnSet*> MultiColumnSetInterva
l; |
| 159 typedef PODIntervalTree<LayoutUnit, RenderMultiColumnSet*> MultiColumnSetInt
ervalTree; | 167 typedef PODIntervalTree<LayoutUnit, RenderMultiColumnSet*> MultiColumnSetInt
ervalTree; |
| 160 | 168 |
| 161 class RegionSearchAdapter { | 169 class MultiColumnSetSearchAdapter { |
| 162 public: | 170 public: |
| 163 RegionSearchAdapter(LayoutUnit offset) | 171 MultiColumnSetSearchAdapter(LayoutUnit offset) |
| 164 : m_offset(offset) | 172 : m_offset(offset) |
| 165 , m_result(0) | 173 , m_result(0) |
| 166 { | 174 { |
| 167 } | 175 } |
| 168 | 176 |
| 169 const LayoutUnit& lowValue() const { return m_offset; } | 177 const LayoutUnit& lowValue() const { return m_offset; } |
| 170 const LayoutUnit& highValue() const { return m_offset; } | 178 const LayoutUnit& highValue() const { return m_offset; } |
| 171 void collectIfNeeded(const MultiColumnSetInterval&); | 179 void collectIfNeeded(const MultiColumnSetInterval&); |
| 172 | 180 |
| 173 RenderRegion* result() const { return m_result; } | 181 RenderMultiColumnSet* result() const { return m_result; } |
| 174 | 182 |
| 175 private: | 183 private: |
| 176 LayoutUnit m_offset; | 184 LayoutUnit m_offset; |
| 177 RenderRegion* m_result; | 185 RenderMultiColumnSet* m_result; |
| 178 }; | 186 }; |
| 179 | 187 |
| 180 // A maps from RenderBox | 188 // A maps from RenderBox |
| 181 typedef HashMap<const RenderBox*, RenderMultiColumnSetRange> RenderMultiColu
mnSetRangeMap; | 189 typedef HashMap<const RenderBox*, RenderMultiColumnSetRange> RenderMultiColu
mnSetRangeMap; |
| 182 RenderMultiColumnSetRangeMap m_multiColumnSetRangeMap; | 190 RenderMultiColumnSetRangeMap m_multiColumnSetRangeMap; |
| 183 | 191 |
| 184 // Stack of objects that pushed a LayoutState object on the RenderView. The | 192 // 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 | 193 // objects on the stack are the ones that are curently in the process of bei
ng |
| 186 // laid out. | 194 // laid out. |
| 187 ListHashSet<const RenderObject*> m_statePusherObjectsStack; | 195 ListHashSet<const RenderObject*> m_statePusherObjectsStack; |
| (...skipping 26 matching lines...) Expand all Loading... |
| 214 }; | 222 }; |
| 215 | 223 |
| 216 template <> struct ValueToString<RenderMultiColumnSet*> { | 224 template <> struct ValueToString<RenderMultiColumnSet*> { |
| 217 static String string(const RenderMultiColumnSet* value) { return String::for
mat("%p", value); } | 225 static String string(const RenderMultiColumnSet* value) { return String::for
mat("%p", value); } |
| 218 }; | 226 }; |
| 219 #endif | 227 #endif |
| 220 | 228 |
| 221 } // namespace blink | 229 } // namespace blink |
| 222 | 230 |
| 223 #endif // RenderFlowThread_h | 231 #endif // RenderFlowThread_h |
| OLD | NEW |