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

Side by Side Diff: Source/core/layout/MultiColumnFragmentainerGroup.cpp

Issue 988523003: Reimplement min-width: auto (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: review comments Created 5 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/layout/LayoutReplaced.cpp ('k') | Source/core/style/ComputedStyle.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 6
7 #include "core/layout/MultiColumnFragmentainerGroup.h" 7 #include "core/layout/MultiColumnFragmentainerGroup.h"
8 8
9 #include "core/layout/LayoutMultiColumnSet.h" 9 #include "core/layout/LayoutMultiColumnSet.h"
10 10
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 return max(height, LayoutUnit(1)); // Let's avoid zero height, as that would probably cause an infinite amount of columns to be created. 330 return max(height, LayoutUnit(1)); // Let's avoid zero height, as that would probably cause an infinite amount of columns to be created.
331 } 331 }
332 332
333 LayoutUnit MultiColumnFragmentainerGroup::calculateMaxColumnHeight() const 333 LayoutUnit MultiColumnFragmentainerGroup::calculateMaxColumnHeight() const
334 { 334 {
335 LayoutBlockFlow* multicolBlock = m_columnSet.multiColumnBlockFlow(); 335 LayoutBlockFlow* multicolBlock = m_columnSet.multiColumnBlockFlow();
336 const ComputedStyle& multicolStyle = multicolBlock->styleRef(); 336 const ComputedStyle& multicolStyle = multicolBlock->styleRef();
337 LayoutUnit availableHeight = m_columnSet.multiColumnFlowThread()->columnHeig htAvailable(); 337 LayoutUnit availableHeight = m_columnSet.multiColumnFlowThread()->columnHeig htAvailable();
338 LayoutUnit maxColumnHeight = availableHeight ? availableHeight : LayoutFlowT hread::maxLogicalHeight(); 338 LayoutUnit maxColumnHeight = availableHeight ? availableHeight : LayoutFlowT hread::maxLogicalHeight();
339 if (!multicolStyle.logicalMaxHeight().isMaxSizeNone()) { 339 if (!multicolStyle.logicalMaxHeight().isMaxSizeNone()) {
340 LayoutUnit logicalMaxHeight = multicolBlock->computeContentLogicalHeight (multicolStyle.logicalMaxHeight(), -1); 340 LayoutUnit logicalMaxHeight = multicolBlock->computeContentLogicalHeight (MaxSize, multicolStyle.logicalMaxHeight(), -1);
341 if (logicalMaxHeight != -1 && maxColumnHeight > logicalMaxHeight) 341 if (logicalMaxHeight != -1 && maxColumnHeight > logicalMaxHeight)
342 maxColumnHeight = logicalMaxHeight; 342 maxColumnHeight = logicalMaxHeight;
343 } 343 }
344 return heightAdjustedForRowOffset(maxColumnHeight); 344 return heightAdjustedForRowOffset(maxColumnHeight);
345 } 345 }
346 346
347 void MultiColumnFragmentainerGroup::setAndConstrainColumnHeight(LayoutUnit newHe ight) 347 void MultiColumnFragmentainerGroup::setAndConstrainColumnHeight(LayoutUnit newHe ight)
348 { 348 {
349 m_columnHeight = newHeight; 349 m_columnHeight = newHeight;
350 if (m_columnHeight > m_maxColumnHeight) 350 if (m_columnHeight > m_maxColumnHeight)
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
553 append(MultiColumnFragmentainerGroup(m_columnSet)); 553 append(MultiColumnFragmentainerGroup(m_columnSet));
554 return last(); 554 return last();
555 } 555 }
556 556
557 void MultiColumnFragmentainerGroupList::deleteExtraGroups() 557 void MultiColumnFragmentainerGroupList::deleteExtraGroups()
558 { 558 {
559 shrink(1); 559 shrink(1);
560 } 560 }
561 561
562 } // namespace blink 562 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutReplaced.cpp ('k') | Source/core/style/ComputedStyle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698