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 4386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4397 // Note this is just a heuristic, and it's still possible to have overflow u
nder these | 4397 // Note this is just a heuristic, and it's still possible to have overflow u
nder these |
4398 // conditions, but it should work out to be good enough for common cases. Pa
ginating overflow | 4398 // conditions, but it should work out to be good enough for common cases. Pa
ginating overflow |
4399 // with scrollbars present is not the end of the world and is what we used t
o do in the old model anyway. | 4399 // with scrollbars present is not the end of the world and is what we used t
o do in the old model anyway. |
4400 return !style()->logicalHeight().isIntrinsicOrAuto() | 4400 return !style()->logicalHeight().isIntrinsicOrAuto() |
4401 || (!style()->logicalMaxHeight().isIntrinsicOrAuto() && !style()->logica
lMaxHeight().isMaxSizeNone() && (!style()->logicalMaxHeight().hasPercent() || pe
rcentageLogicalHeightIsResolvable())) | 4401 || (!style()->logicalMaxHeight().isIntrinsicOrAuto() && !style()->logica
lMaxHeight().isMaxSizeNone() && (!style()->logicalMaxHeight().hasPercent() || pe
rcentageLogicalHeightIsResolvable())) |
4402 || (!style()->logicalMinHeight().isIntrinsicOrAuto() && style()->logical
MinHeight().isPositive() && (!style()->logicalMinHeight().hasPercent() || percen
tageLogicalHeightIsResolvable())); | 4402 || (!style()->logicalMinHeight().isIntrinsicOrAuto() && style()->logical
MinHeight().isPositive() && (!style()->logicalMinHeight().hasPercent() || percen
tageLogicalHeightIsResolvable())); |
4403 } | 4403 } |
4404 | 4404 |
4405 bool LayoutBox::isUnsplittableForPagination() const | 4405 bool LayoutBox::isUnsplittableForPagination() const |
4406 { | 4406 { |
4407 return isReplaced() || hasUnsplittableScrollingOverflow() || (parent() && is
WritingModeRoot()); | 4407 return isReplaced() |
| 4408 || hasUnsplittableScrollingOverflow() |
| 4409 || (parent() && isWritingModeRoot()) |
| 4410 || (isOutOfFlowPositioned() && style()->position() == FixedPosition); |
4408 } | 4411 } |
4409 | 4412 |
4410 LayoutUnit LayoutBox::lineHeight(bool /*firstLine*/, LineDirectionMode direction
, LinePositionMode /*linePositionMode*/) const | 4413 LayoutUnit LayoutBox::lineHeight(bool /*firstLine*/, LineDirectionMode direction
, LinePositionMode /*linePositionMode*/) const |
4411 { | 4414 { |
4412 if (isReplaced()) | 4415 if (isReplaced()) |
4413 return direction == HorizontalLine ? marginHeight() + size().height() :
marginWidth() + size().width(); | 4416 return direction == HorizontalLine ? marginHeight() + size().height() :
marginWidth() + size().width(); |
4414 return LayoutUnit(); | 4417 return LayoutUnit(); |
4415 } | 4418 } |
4416 | 4419 |
4417 int LayoutBox::baselinePosition(FontBaseline baselineType, bool /*firstLine*/, L
ineDirectionMode direction, LinePositionMode linePositionMode) const | 4420 int LayoutBox::baselinePosition(FontBaseline baselineType, bool /*firstLine*/, L
ineDirectionMode direction, LinePositionMode linePositionMode) const |
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4836 StyleImage* borderImage = style()->borderImage().image(); | 4839 StyleImage* borderImage = style()->borderImage().image(); |
4837 return borderImage && borderImage->canRender(*this, style()->effectiveZoom()
) && borderImage->isLoaded(); | 4840 return borderImage && borderImage->canRender(*this, style()->effectiveZoom()
) && borderImage->isLoaded(); |
4838 } | 4841 } |
4839 | 4842 |
4840 ShapeOutsideInfo* LayoutBox::shapeOutsideInfo() const | 4843 ShapeOutsideInfo* LayoutBox::shapeOutsideInfo() const |
4841 { | 4844 { |
4842 return ShapeOutsideInfo::isEnabledFor(*this) ? ShapeOutsideInfo::info(*this)
: nullptr; | 4845 return ShapeOutsideInfo::isEnabledFor(*this) ? ShapeOutsideInfo::info(*this)
: nullptr; |
4843 } | 4846 } |
4844 | 4847 |
4845 } // namespace blink | 4848 } // namespace blink |
OLD | NEW |