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

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

Issue 584033002: [New Multicolumn] Add support for column-span:all (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix ref in test. Tables don't do subpixel, and that made a difference on Windows and Mac. Created 6 years, 2 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/RenderBox.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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
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, Sub treeLayoutScope&) { return 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 void setOffsetFromLogicalTopOfFirstRegion(const RenderBox*, LayoutUnit); 141 void setOffsetFromLogicalTopOfFirstRegion(const RenderBox*, LayoutUnit);
127 void clearOffsetFromLogicalTopOfFirstRegion(const RenderBox*); 142 void clearOffsetFromLogicalTopOfFirstRegion(const RenderBox*);
128 143
129 const RenderBox* currentStatePusherRenderBox() const; 144 const RenderBox* currentStatePusherRenderBox() const;
130 145
131 RenderMultiColumnSetList m_multiColumnSetList; 146 RenderMultiColumnSetList m_multiColumnSetList;
132 147
133 typedef PODInterval<LayoutUnit, RenderMultiColumnSet*> MultiColumnSetInterva l; 148 typedef PODInterval<LayoutUnit, RenderMultiColumnSet*> MultiColumnSetInterva l;
134 typedef PODIntervalTree<LayoutUnit, RenderMultiColumnSet*> MultiColumnSetInt ervalTree; 149 typedef PODIntervalTree<LayoutUnit, RenderMultiColumnSet*> MultiColumnSetInt ervalTree;
135 150
136 class RegionSearchAdapter { 151 class MultiColumnSetSearchAdapter {
137 public: 152 public:
138 RegionSearchAdapter(LayoutUnit offset) 153 MultiColumnSetSearchAdapter(LayoutUnit offset)
139 : m_offset(offset) 154 : m_offset(offset)
140 , m_result(0) 155 , m_result(0)
141 { 156 {
142 } 157 }
143 158
144 const LayoutUnit& lowValue() const { return m_offset; } 159 const LayoutUnit& lowValue() const { return m_offset; }
145 const LayoutUnit& highValue() const { return m_offset; } 160 const LayoutUnit& highValue() const { return m_offset; }
146 void collectIfNeeded(const MultiColumnSetInterval&); 161 void collectIfNeeded(const MultiColumnSetInterval&);
147 162
148 RenderRegion* result() const { return m_result; } 163 RenderMultiColumnSet* result() const { return m_result; }
149 164
150 private: 165 private:
151 LayoutUnit m_offset; 166 LayoutUnit m_offset;
152 RenderRegion* m_result; 167 RenderMultiColumnSet* m_result;
153 }; 168 };
154 169
155 // Stack of objects that pushed a LayoutState object on the RenderView. The 170 // Stack of objects that pushed a LayoutState object on the RenderView. The
156 // objects on the stack are the ones that are curently in the process of bei ng 171 // objects on the stack are the ones that are curently in the process of bei ng
157 // laid out. 172 // laid out.
158 ListHashSet<const RenderObject*> m_statePusherObjectsStack; 173 ListHashSet<const RenderObject*> m_statePusherObjectsStack;
159 typedef HashMap<const RenderBox*, LayoutUnit> RenderBoxToOffsetMap; 174 typedef HashMap<const RenderBox*, LayoutUnit> RenderBoxToOffsetMap;
160 RenderBoxToOffsetMap m_boxesToOffsetMap; 175 RenderBoxToOffsetMap m_boxesToOffsetMap;
161 176
162 MultiColumnSetIntervalTree m_multiColumnSetIntervalTree; 177 MultiColumnSetIntervalTree m_multiColumnSetIntervalTree;
(...skipping 22 matching lines...) Expand all
185 }; 200 };
186 201
187 template <> struct ValueToString<RenderMultiColumnSet*> { 202 template <> struct ValueToString<RenderMultiColumnSet*> {
188 static String string(const RenderMultiColumnSet* value) { return String::for mat("%p", value); } 203 static String string(const RenderMultiColumnSet* value) { return String::for mat("%p", value); }
189 }; 204 };
190 #endif 205 #endif
191 206
192 } // namespace blink 207 } // namespace blink
193 208
194 #endif // RenderFlowThread_h 209 #endif // RenderFlowThread_h
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderBox.cpp ('k') | Source/core/rendering/RenderFlowThread.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698