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