| 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 4235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4246 | 4246 |
| 4247 m_overflow->setLayoutOverflow(noOverflowRect()); | 4247 m_overflow->setLayoutOverflow(noOverflowRect()); |
| 4248 } | 4248 } |
| 4249 | 4249 |
| 4250 bool LayoutBox::percentageLogicalHeightIsResolvable() const | 4250 bool LayoutBox::percentageLogicalHeightIsResolvable() const |
| 4251 { | 4251 { |
| 4252 Length fakeLength(100, Percent); | 4252 Length fakeLength(100, Percent); |
| 4253 return computePercentageLogicalHeight(fakeLength) != -1; | 4253 return computePercentageLogicalHeight(fakeLength) != -1; |
| 4254 } | 4254 } |
| 4255 | 4255 |
| 4256 bool LayoutBox::hasDefiniteLogicalHeight() const | |
| 4257 { | |
| 4258 const Length& logicalHeight = style()->logicalHeight(); | |
| 4259 if (logicalHeight.isIntrinsicOrAuto()) | |
| 4260 return false; | |
| 4261 if (logicalHeight.isFixed()) | |
| 4262 return true; | |
| 4263 // The size of the containing block of an absolutely positioned element is a
lways definite with respect to that | |
| 4264 // element (http://dev.w3.org/csswg/css-sizing-3/#definite). | |
| 4265 if (isOutOfFlowPositioned()) | |
| 4266 return true; | |
| 4267 if (hasOverrideContainingBlockLogicalHeight()) | |
| 4268 return overrideContainingBlockContentLogicalHeight() != -1; | |
| 4269 | |
| 4270 return percentageLogicalHeightIsResolvable(); | |
| 4271 } | |
| 4272 | |
| 4273 bool LayoutBox::hasUnsplittableScrollingOverflow() const | 4256 bool LayoutBox::hasUnsplittableScrollingOverflow() const |
| 4274 { | 4257 { |
| 4275 // We will paginate as long as we don't scroll overflow in the pagination di
rection. | 4258 // We will paginate as long as we don't scroll overflow in the pagination di
rection. |
| 4276 bool isHorizontal = isHorizontalWritingMode(); | 4259 bool isHorizontal = isHorizontalWritingMode(); |
| 4277 if ((isHorizontal && !scrollsOverflowY()) || (!isHorizontal && !scrollsOverf
lowX())) | 4260 if ((isHorizontal && !scrollsOverflowY()) || (!isHorizontal && !scrollsOverf
lowX())) |
| 4278 return false; | 4261 return false; |
| 4279 | 4262 |
| 4280 // We do have overflow. We'll still be willing to paginate as long as the bl
ock | 4263 // We do have overflow. We'll still be willing to paginate as long as the bl
ock |
| 4281 // has auto logical height, auto or undefined max-logical-height and a zero
or auto min-logical-height. | 4264 // has auto logical height, auto or undefined max-logical-height and a zero
or auto min-logical-height. |
| 4282 // Note this is just a heuristic, and it's still possible to have overflow u
nder these | 4265 // Note this is just a heuristic, and it's still possible to have overflow u
nder these |
| (...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4892 m_rareData->m_snapAreas->remove(&snapArea); | 4875 m_rareData->m_snapAreas->remove(&snapArea); |
| 4893 } | 4876 } |
| 4894 } | 4877 } |
| 4895 | 4878 |
| 4896 SnapAreaSet* LayoutBox::snapAreas() const | 4879 SnapAreaSet* LayoutBox::snapAreas() const |
| 4897 { | 4880 { |
| 4898 return m_rareData ? m_rareData->m_snapAreas.get() : nullptr; | 4881 return m_rareData ? m_rareData->m_snapAreas.get() : nullptr; |
| 4899 } | 4882 } |
| 4900 | 4883 |
| 4901 } // namespace blink | 4884 } // namespace blink |
| OLD | NEW |