Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(80)

Side by Side Diff: Source/core/rendering/RenderFlowThread.h

Issue 481333005: Remove column set range map from RenderFlowThread. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/rendering/RenderFlexibleBox.cpp ('k') | Source/core/rendering/RenderFlowThread.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 87
88 virtual void setPageBreak(LayoutUnit /*offset*/, LayoutUnit /*spaceShortage* /) { } 88 virtual void setPageBreak(LayoutUnit /*offset*/, LayoutUnit /*spaceShortage* /) { }
89 virtual void updateMinimumPageHeight(LayoutUnit /*offset*/, LayoutUnit /*min Height*/) { } 89 virtual void updateMinimumPageHeight(LayoutUnit /*offset*/, LayoutUnit /*min Height*/) { }
90 90
91 bool regionsHaveUniformLogicalHeight() const { return m_regionsHaveUniformLo gicalHeight; } 91 bool regionsHaveUniformLogicalHeight() const { return m_regionsHaveUniformLo gicalHeight; }
92 92
93 // FIXME: These 2 functions should return a RenderMultiColumnSet. 93 // FIXME: These 2 functions should return a RenderMultiColumnSet.
94 RenderRegion* firstRegion() const; 94 RenderRegion* firstRegion() const;
95 RenderRegion* lastRegion() const; 95 RenderRegion* lastRegion() const;
96 96
97 void setRegionRangeForBox(const RenderBox*, LayoutUnit offsetFromLogicalTopO fFirstPage);
98
99 virtual bool addForcedRegionBreak(LayoutUnit, RenderObject* breakChild, bool isBefore, LayoutUnit* offsetBreakAdjustment = 0) { return false; } 97 virtual bool addForcedRegionBreak(LayoutUnit, RenderObject* breakChild, bool isBefore, LayoutUnit* offsetBreakAdjustment = 0) { return false; }
100 98
101 virtual bool isPageLogicalHeightKnown() const { return true; } 99 virtual bool isPageLogicalHeightKnown() const { return true; }
102 bool pageLogicalSizeChanged() const { return m_pageLogicalSizeChanged; } 100 bool pageLogicalSizeChanged() const { return m_pageLogicalSizeChanged; }
103 101
104 void collectLayerFragments(LayerFragments&, const LayoutRect& layerBoundingB ox, const LayoutRect& dirtyRect); 102 void collectLayerFragments(LayerFragments&, const LayoutRect& layerBoundingB ox, const LayoutRect& dirtyRect);
105 LayoutRect fragmentsBoundingBox(const LayoutRect& layerBoundingBox); 103 LayoutRect fragmentsBoundingBox(const LayoutRect& layerBoundingBox);
106 104
107 void pushFlowThreadLayoutState(const RenderObject&); 105 void pushFlowThreadLayoutState(const RenderObject&);
108 void popFlowThreadLayoutState(); 106 void popFlowThreadLayoutState();
109 LayoutUnit offsetFromLogicalTopOfFirstRegion(const RenderBlock*) const; 107 LayoutUnit offsetFromLogicalTopOfFirstRegion(const RenderBlock*) const;
110 108
111 // Used to estimate the maximum height of the flow thread. 109 // Used to estimate the maximum height of the flow thread.
112 static LayoutUnit maxLogicalHeight() { return LayoutUnit::max() / 2; } 110 static LayoutUnit maxLogicalHeight() { return LayoutUnit::max() / 2; }
113 111
114 protected: 112 protected:
115 virtual const char* renderName() const = 0; 113 virtual const char* renderName() const = 0;
116 114
117 void updateRegionsFlowThreadPortionRect(); 115 void updateRegionsFlowThreadPortionRect();
118 bool shouldIssuePaintInvalidations(const LayoutRect&) const; 116 bool shouldIssuePaintInvalidations(const LayoutRect&) const;
119 117
120 void getRegionRangeForBox(const RenderBox*, RenderMultiColumnSet*& startColu mnSet, RenderMultiColumnSet*& endColumnSet) const;
121
122 virtual RenderMultiColumnSet* columnSetAtBlockOffset(LayoutUnit) const = 0; 118 virtual RenderMultiColumnSet* columnSetAtBlockOffset(LayoutUnit) const = 0;
123 119
124 bool cachedOffsetFromLogicalTopOfFirstRegion(const RenderBox*, LayoutUnit&) const; 120 bool cachedOffsetFromLogicalTopOfFirstRegion(const RenderBox*, LayoutUnit&) const;
125 void setOffsetFromLogicalTopOfFirstRegion(const RenderBox*, LayoutUnit); 121 void setOffsetFromLogicalTopOfFirstRegion(const RenderBox*, LayoutUnit);
126 void clearOffsetFromLogicalTopOfFirstRegion(const RenderBox*); 122 void clearOffsetFromLogicalTopOfFirstRegion(const RenderBox*);
127 123
128 const RenderBox* currentStatePusherRenderBox() const; 124 const RenderBox* currentStatePusherRenderBox() const;
129 125
130 RenderMultiColumnSetList m_multiColumnSetList; 126 RenderMultiColumnSetList m_multiColumnSetList;
131 127
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 const LayoutUnit& highValue() const { return m_offset; } 166 const LayoutUnit& highValue() const { return m_offset; }
171 void collectIfNeeded(const MultiColumnSetInterval&); 167 void collectIfNeeded(const MultiColumnSetInterval&);
172 168
173 RenderRegion* result() const { return m_result; } 169 RenderRegion* result() const { return m_result; }
174 170
175 private: 171 private:
176 LayoutUnit m_offset; 172 LayoutUnit m_offset;
177 RenderRegion* m_result; 173 RenderRegion* m_result;
178 }; 174 };
179 175
180 // A maps from RenderBox
181 typedef HashMap<const RenderBox*, RenderMultiColumnSetRange> RenderMultiColu mnSetRangeMap;
182 RenderMultiColumnSetRangeMap m_multiColumnSetRangeMap;
183
184 // Stack of objects that pushed a LayoutState object on the RenderView. The 176 // 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 177 // objects on the stack are the ones that are curently in the process of bei ng
186 // laid out. 178 // laid out.
187 ListHashSet<const RenderObject*> m_statePusherObjectsStack; 179 ListHashSet<const RenderObject*> m_statePusherObjectsStack;
188 typedef HashMap<const RenderBox*, LayoutUnit> RenderBoxToOffsetMap; 180 typedef HashMap<const RenderBox*, LayoutUnit> RenderBoxToOffsetMap;
189 RenderBoxToOffsetMap m_boxesToOffsetMap; 181 RenderBoxToOffsetMap m_boxesToOffsetMap;
190 182
191 MultiColumnSetIntervalTree m_multiColumnSetIntervalTree; 183 MultiColumnSetIntervalTree m_multiColumnSetIntervalTree;
192 184
193 bool m_regionsInvalidated : 1; 185 bool m_regionsInvalidated : 1;
(...skipping 20 matching lines...) Expand all
214 }; 206 };
215 207
216 template <> struct ValueToString<RenderMultiColumnSet*> { 208 template <> struct ValueToString<RenderMultiColumnSet*> {
217 static String string(const RenderMultiColumnSet* value) { return String::for mat("%p", value); } 209 static String string(const RenderMultiColumnSet* value) { return String::for mat("%p", value); }
218 }; 210 };
219 #endif 211 #endif
220 212
221 } // namespace blink 213 } // namespace blink
222 214
223 #endif // RenderFlowThread_h 215 #endif // RenderFlowThread_h
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderFlexibleBox.cpp ('k') | Source/core/rendering/RenderFlowThread.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698