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

Side by Side Diff: Source/core/rendering/RenderBox.cpp

Issue 331203002: Blink doesn't honor percent heights on children of "align-self:stretch" flex items in a fixed-height (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Addresses changes asked in comments in patch 4 Created 6 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
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 2658 matching lines...) Expand 10 before | Expand all | Expand 10 after
2669 // A positioned element that specified both top/bottom or that specifies hei ght should be treated as though it has a height 2669 // A positioned element that specified both top/bottom or that specifies hei ght should be treated as though it has a height
2670 // explicitly specified that can be used for any percentage computations. 2670 // explicitly specified that can be used for any percentage computations.
2671 bool isOutOfFlowPositionedWithSpecifiedHeight = cb->isOutOfFlowPositioned() && (!cbstyle->logicalHeight().isAuto() || (!cbstyle->logicalTop().isAuto() && !c bstyle->logicalBottom().isAuto())); 2671 bool isOutOfFlowPositionedWithSpecifiedHeight = cb->isOutOfFlowPositioned() && (!cbstyle->logicalHeight().isAuto() || (!cbstyle->logicalTop().isAuto() && !c bstyle->logicalBottom().isAuto()));
2672 2672
2673 bool includeBorderPadding = isTable(); 2673 bool includeBorderPadding = isTable();
2674 2674
2675 if (isHorizontalWritingMode() != cb->isHorizontalWritingMode()) 2675 if (isHorizontalWritingMode() != cb->isHorizontalWritingMode())
2676 availableHeight = containingBlockChild->containingBlockLogicalWidthForCo ntent(); 2676 availableHeight = containingBlockChild->containingBlockLogicalWidthForCo ntent();
2677 else if (hasOverrideContainingBlockLogicalHeight()) 2677 else if (hasOverrideContainingBlockLogicalHeight())
2678 availableHeight = overrideContainingBlockContentLogicalHeight(); 2678 availableHeight = overrideContainingBlockContentLogicalHeight();
2679 else if (cb->hasOverrideContainingBlockLogicalHeight())
cbiesinger 2014/06/24 03:01:28 So, we're now giving overrideContainingBlockLogica
harpreet.sk 2014/06/24 07:56:59 We simply cannot change the code as else if (cb-
2680 availableHeight = cb->overrideContainingBlockContentLogicalHeight();
2679 else if (cb->isTableCell()) { 2681 else if (cb->isTableCell()) {
2680 if (!skippedAutoHeightContainingBlock) { 2682 if (!skippedAutoHeightContainingBlock) {
2681 // Table cells violate what the CSS spec says to do with heights. Ba sically we 2683 // Table cells violate what the CSS spec says to do with heights. Ba sically we
2682 // don't care if the cell specified a height or not. We just always make ourselves 2684 // don't care if the cell specified a height or not. We just always make ourselves
2683 // be a percentage of the cell's current content height. 2685 // be a percentage of the cell's current content height.
2684 if (!cb->hasOverrideHeight()) { 2686 if (!cb->hasOverrideHeight()) {
2685 // Normally we would let the cell size intrinsically, but scroll ing overflow has to be 2687 // Normally we would let the cell size intrinsically, but scroll ing overflow has to be
2686 // treated differently, since WinIE lets scrolled overflow regio ns shrink as needed. 2688 // treated differently, since WinIE lets scrolled overflow regio ns shrink as needed.
2687 // While we can't get all cases right, we can at least detect wh en the cell has a specified 2689 // While we can't get all cases right, we can at least detect wh en the cell has a specified
2688 // height or when the table has a specified height. In these cas es we want to initially have 2690 // height or when the table has a specified height. In these cas es we want to initially have
(...skipping 1957 matching lines...) Expand 10 before | Expand all | Expand 10 after
4646 return 0; 4648 return 0;
4647 4649
4648 if (!layoutState && !flowThreadContainingBlock()) 4650 if (!layoutState && !flowThreadContainingBlock())
4649 return 0; 4651 return 0;
4650 4652
4651 RenderBlock* containerBlock = containingBlock(); 4653 RenderBlock* containerBlock = containingBlock();
4652 return containerBlock->offsetFromLogicalTopOfFirstPage() + logicalTop(); 4654 return containerBlock->offsetFromLogicalTopOfFirstPage() + logicalTop();
4653 } 4655 }
4654 4656
4655 } // namespace WebCore 4657 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698