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

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

Issue 1033943002: Rename LayoutStyle to papayawhip (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: ensureComputedStyle 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
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 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 LayoutUnit contentLogicalTop = m_columnSet.logicalTop() - multicolBlock- >borderAndPaddingBefore(); 326 LayoutUnit contentLogicalTop = m_columnSet.logicalTop() - multicolBlock- >borderAndPaddingBefore();
327 height -= contentLogicalTop; 327 height -= contentLogicalTop;
328 } 328 }
329 height -= logicalTop(); 329 height -= logicalTop();
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 LayoutStyle& 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 (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
(...skipping 206 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/LayoutView.cpp ('k') | Source/core/layout/MultiColumnFragmentainerGroupTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698