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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutBox.cpp

Issue 2047093004: [css-grid] Fix definite/indefinite size detection for abspos elements (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fix-height-definite
Patch Set: Created 4 years, 6 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 | « third_party/WebKit/LayoutTests/fast/css-grid-layout/positioned-grid-container-percentage-tracks.html ('k') | no next file » | 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com)
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com)
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed.
7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. 7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 2713 matching lines...) Expand 10 before | Expand all | Expand 10 after
2724 bool includeBorderPadding = isTable(); 2724 bool includeBorderPadding = isTable();
2725 2725
2726 LayoutUnit stretchedFlexHeight(-1); 2726 LayoutUnit stretchedFlexHeight(-1);
2727 if (cb->isFlexItem()) 2727 if (cb->isFlexItem())
2728 stretchedFlexHeight = toLayoutFlexibleBox(cb->parent())->childLogicalHei ghtForPercentageResolution(*cb); 2728 stretchedFlexHeight = toLayoutFlexibleBox(cb->parent())->childLogicalHei ghtForPercentageResolution(*cb);
2729 2729
2730 if (isHorizontalWritingMode() != cb->isHorizontalWritingMode()) { 2730 if (isHorizontalWritingMode() != cb->isHorizontalWritingMode()) {
2731 availableHeight = containingBlockChild->containingBlockLogicalWidthForCo ntent(); 2731 availableHeight = containingBlockChild->containingBlockLogicalWidthForCo ntent();
2732 } else if (stretchedFlexHeight != LayoutUnit(-1)) { 2732 } else if (stretchedFlexHeight != LayoutUnit(-1)) {
2733 availableHeight = stretchedFlexHeight; 2733 availableHeight = stretchedFlexHeight;
2734 } else if (hasOverrideContainingBlockLogicalHeight()) { 2734 } else if (hasOverrideContainingBlockLogicalHeight() && !isOutOfFlowPosition edWithSpecifiedHeight) {
2735 availableHeight = overrideContainingBlockContentLogicalHeight(); 2735 availableHeight = overrideContainingBlockContentLogicalHeight();
2736 } else if (cbstyle.logicalHeight().isFixed()) { 2736 } else if (cbstyle.logicalHeight().isFixed()) {
2737 LayoutUnit contentBoxHeight = cb->adjustContentBoxLogicalHeightForBoxSiz ing(cbstyle.logicalHeight().value()); 2737 LayoutUnit contentBoxHeight = cb->adjustContentBoxLogicalHeightForBoxSiz ing(cbstyle.logicalHeight().value());
2738 availableHeight = cb->constrainContentBoxLogicalHeightByMinMax( 2738 availableHeight = cb->constrainContentBoxLogicalHeightByMinMax(
2739 contentBoxHeight - cb->scrollbarLogicalHeight(), LayoutUnit(-1)).cla mpNegativeToZero(); 2739 contentBoxHeight - cb->scrollbarLogicalHeight(), LayoutUnit(-1)).cla mpNegativeToZero();
2740 if (cb->isTableCell()) { 2740 if (cb->isTableCell()) {
2741 includeBorderPadding = true; 2741 includeBorderPadding = true;
2742 // We're sizing content to the height from the cell's style so don't involve the intrinsic padding used to align the content. 2742 // We're sizing content to the height from the cell's style so don't involve the intrinsic padding used to align the content.
2743 availableHeight -= cb->computedCSSPaddingBefore() + cb->computedCSSP addingAfter() + cb->borderBefore() + cb->borderAfter(); 2743 availableHeight -= cb->computedCSSPaddingBefore() + cb->computedCSSP addingAfter() + cb->borderBefore() + cb->borderAfter();
2744 } 2744 }
(...skipping 2130 matching lines...) Expand 10 before | Expand all | Expand 10 after
4875 m_rareData->m_snapAreas->remove(&snapArea); 4875 m_rareData->m_snapAreas->remove(&snapArea);
4876 } 4876 }
4877 } 4877 }
4878 4878
4879 SnapAreaSet* LayoutBox::snapAreas() const 4879 SnapAreaSet* LayoutBox::snapAreas() const
4880 { 4880 {
4881 return m_rareData ? m_rareData->m_snapAreas.get() : nullptr; 4881 return m_rareData ? m_rareData->m_snapAreas.get() : nullptr;
4882 } 4882 }
4883 4883
4884 } // namespace blink 4884 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/css-grid-layout/positioned-grid-container-percentage-tracks.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698