Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 4267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4278 | 4278 |
| 4279 bool LayoutBox::percentageLogicalHeightIsResolvable() const | 4279 bool LayoutBox::percentageLogicalHeightIsResolvable() const |
| 4280 { | 4280 { |
| 4281 Length fakeLength(100, Percent); | 4281 Length fakeLength(100, Percent); |
| 4282 return computePercentageLogicalHeight(fakeLength) != -1; | 4282 return computePercentageLogicalHeight(fakeLength) != -1; |
| 4283 } | 4283 } |
| 4284 | 4284 |
| 4285 bool LayoutBox::hasDefiniteLogicalHeight() const | 4285 bool LayoutBox::hasDefiniteLogicalHeight() const |
| 4286 { | 4286 { |
| 4287 const Length& logicalHeight = style()->logicalHeight(); | 4287 const Length& logicalHeight = style()->logicalHeight(); |
| 4288 if (logicalHeight.isIntrinsicOrAuto()) | |
| 4289 return false; | |
| 4290 if (logicalHeight.isFixed()) | 4288 if (logicalHeight.isFixed()) |
| 4291 return true; | 4289 return true; |
| 4292 // The size of the containing block of an absolutely positioned element is a lways definite with respect to that | 4290 if (isOutOfFlowPositioned() && !style()->logicalTop().isAuto() && !style()-> logicalBottom().isAuto()) |
| 4293 // element (http://dev.w3.org/csswg/css-sizing-3/#definite). | |
| 4294 if (isOutOfFlowPositioned()) | |
| 4295 return true; | 4291 return true; |
| 4296 if (hasOverrideContainingBlockLogicalHeight()) | 4292 if (hasOverrideContainingBlockLogicalHeight()) |
| 4297 return overrideContainingBlockContentLogicalHeight() != -1; | 4293 return overrideContainingBlockContentLogicalHeight() != -1; |
| 4294 if (logicalHeight.isIntrinsicOrAuto()) | |
| 4295 return false; | |
|
cbiesinger1
2016/06/06 16:46:02
This is not correct, if a grid is a flex item it c
Manuel Rego
2016/06/07 09:05:55
Yes, this is wrong for those cases.
But it was alr
| |
| 4298 | 4296 |
| 4299 return percentageLogicalHeightIsResolvable(); | 4297 return percentageLogicalHeightIsResolvable(); |
| 4300 } | 4298 } |
| 4301 | 4299 |
| 4302 bool LayoutBox::hasUnsplittableScrollingOverflow() const | 4300 bool LayoutBox::hasUnsplittableScrollingOverflow() const |
| 4303 { | 4301 { |
| 4304 // We will paginate as long as we don't scroll overflow in the pagination di rection. | 4302 // We will paginate as long as we don't scroll overflow in the pagination di rection. |
| 4305 bool isHorizontal = isHorizontalWritingMode(); | 4303 bool isHorizontal = isHorizontalWritingMode(); |
| 4306 if ((isHorizontal && !scrollsOverflowY()) || (!isHorizontal && !scrollsOverf lowX())) | 4304 if ((isHorizontal && !scrollsOverflowY()) || (!isHorizontal && !scrollsOverf lowX())) |
| 4307 return false; | 4305 return false; |
| (...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4921 m_rareData->m_snapAreas->remove(&snapArea); | 4919 m_rareData->m_snapAreas->remove(&snapArea); |
| 4922 } | 4920 } |
| 4923 } | 4921 } |
| 4924 | 4922 |
| 4925 SnapAreaSet* LayoutBox::snapAreas() const | 4923 SnapAreaSet* LayoutBox::snapAreas() const |
| 4926 { | 4924 { |
| 4927 return m_rareData ? m_rareData->m_snapAreas.get() : nullptr; | 4925 return m_rareData ? m_rareData->m_snapAreas.get() : nullptr; |
| 4928 } | 4926 } |
| 4929 | 4927 |
| 4930 } // namespace blink | 4928 } // namespace blink |
| OLD | NEW |