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 4247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4258 return computePercentageLogicalHeight(fakeLength) != -1; | 4258 return computePercentageLogicalHeight(fakeLength) != -1; |
4259 } | 4259 } |
4260 | 4260 |
4261 bool LayoutBox::hasUnsplittableScrollingOverflow() const | 4261 bool LayoutBox::hasUnsplittableScrollingOverflow() const |
4262 { | 4262 { |
4263 // We will paginate as long as we don't scroll overflow in the pagination di
rection. | 4263 // We will paginate as long as we don't scroll overflow in the pagination di
rection. |
4264 bool isHorizontal = isHorizontalWritingMode(); | 4264 bool isHorizontal = isHorizontalWritingMode(); |
4265 if ((isHorizontal && !scrollsOverflowY()) || (!isHorizontal && !scrollsOverf
lowX())) | 4265 if ((isHorizontal && !scrollsOverflowY()) || (!isHorizontal && !scrollsOverf
lowX())) |
4266 return false; | 4266 return false; |
4267 | 4267 |
| 4268 // Fragmenting scrollbars is only problematic in interactive media, e.g. mul
ticol on a |
| 4269 // screen. If we're printing, which is non-interactive media, we should allo
w objects with |
| 4270 // non-visible overflow to be paginated as normally. |
| 4271 if (document().printing()) |
| 4272 return false; |
| 4273 |
4268 // We do have overflow. We'll still be willing to paginate as long as the bl
ock | 4274 // We do have overflow. We'll still be willing to paginate as long as the bl
ock |
4269 // has auto logical height, auto or undefined max-logical-height and a zero
or auto min-logical-height. | 4275 // has auto logical height, auto or undefined max-logical-height and a zero
or auto min-logical-height. |
4270 // Note this is just a heuristic, and it's still possible to have overflow u
nder these | 4276 // Note this is just a heuristic, and it's still possible to have overflow u
nder these |
4271 // conditions, but it should work out to be good enough for common cases. Pa
ginating overflow | 4277 // conditions, but it should work out to be good enough for common cases. Pa
ginating overflow |
4272 // with scrollbars present is not the end of the world and is what we used t
o do in the old model anyway. | 4278 // with scrollbars present is not the end of the world and is what we used t
o do in the old model anyway. |
4273 return !style()->logicalHeight().isIntrinsicOrAuto() | 4279 return !style()->logicalHeight().isIntrinsicOrAuto() |
4274 || (!style()->logicalMaxHeight().isIntrinsicOrAuto() && !style()->logica
lMaxHeight().isMaxSizeNone() && (!style()->logicalMaxHeight().hasPercent() || pe
rcentageLogicalHeightIsResolvable())) | 4280 || (!style()->logicalMaxHeight().isIntrinsicOrAuto() && !style()->logica
lMaxHeight().isMaxSizeNone() && (!style()->logicalMaxHeight().hasPercent() || pe
rcentageLogicalHeightIsResolvable())) |
4275 || (!style()->logicalMinHeight().isIntrinsicOrAuto() && style()->logical
MinHeight().isPositive() && (!style()->logicalMinHeight().hasPercent() || percen
tageLogicalHeightIsResolvable())); | 4281 || (!style()->logicalMinHeight().isIntrinsicOrAuto() && style()->logical
MinHeight().isPositive() && (!style()->logicalMinHeight().hasPercent() || percen
tageLogicalHeightIsResolvable())); |
4276 } | 4282 } |
4277 | 4283 |
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4862 m_rareData->m_snapAreas->remove(&snapArea); | 4868 m_rareData->m_snapAreas->remove(&snapArea); |
4863 } | 4869 } |
4864 } | 4870 } |
4865 | 4871 |
4866 SnapAreaSet* LayoutBox::snapAreas() const | 4872 SnapAreaSet* LayoutBox::snapAreas() const |
4867 { | 4873 { |
4868 return m_rareData ? m_rareData->m_snapAreas.get() : nullptr; | 4874 return m_rareData ? m_rareData->m_snapAreas.get() : nullptr; |
4869 } | 4875 } |
4870 | 4876 |
4871 } // namespace blink | 4877 } // namespace blink |
OLD | NEW |