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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutMultiColumnSet.h

Issue 2874933005: Distinguish between row (fragmentainer group) height and column (fragmentainer) height. (Closed)
Patch Set: Created 3 years, 7 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2012 Apple Inc. 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 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 // Due to negative margins, logical bottom may actually end up above logical 152 // Due to negative margins, logical bottom may actually end up above logical
153 // top, but we never want to return negative logical heights. 153 // top, but we never want to return negative logical heights.
154 return (LogicalBottomInFlowThread() - LogicalTopInFlowThread()) 154 return (LogicalBottomInFlowThread() - LogicalTopInFlowThread())
155 .ClampNegativeToZero(); 155 .ClampNegativeToZero();
156 } 156 }
157 157
158 // Return the amount of flow thread contents that the specified fragmentainer 158 // Return the amount of flow thread contents that the specified fragmentainer
159 // group can hold without overflowing. 159 // group can hold without overflowing.
160 LayoutUnit FragmentainerGroupCapacity( 160 LayoutUnit FragmentainerGroupCapacity(
161 const MultiColumnFragmentainerGroup& group) const { 161 const MultiColumnFragmentainerGroup& group) const {
162 return group.LogicalHeight() * UsedColumnCount(); 162 return group.ColumnLogicalHeight() * UsedColumnCount();
163 } 163 }
164 164
165 LayoutRect FlowThreadPortionRect() const; 165 LayoutRect FlowThreadPortionRect() const;
166 166
167 // The used CSS value of column-count, i.e. how many columns there are room 167 // The used CSS value of column-count, i.e. how many columns there are room
168 // for without overflowing. 168 // for without overflowing.
169 unsigned UsedColumnCount() const { 169 unsigned UsedColumnCount() const {
170 return MultiColumnFlowThread()->ColumnCount(); 170 return MultiColumnFlowThread()->ColumnCount();
171 } 171 }
172 172
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 LayoutUnit old_logical_top_; 271 LayoutUnit old_logical_top_;
272 272
273 bool initial_height_calculated_; 273 bool initial_height_calculated_;
274 }; 274 };
275 275
276 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutMultiColumnSet, IsLayoutMultiColumnSet()); 276 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutMultiColumnSet, IsLayoutMultiColumnSet());
277 277
278 } // namespace blink 278 } // namespace blink
279 279
280 #endif // LayoutMultiColumnSet_h 280 #endif // LayoutMultiColumnSet_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698