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 2500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2511 return -1; // Intrinsic height isn't available. | 2511 return -1; // Intrinsic height isn't available. |
2512 return computeIntrinsicLogicalContentHeightUsing(height, intrinsicConten
tHeight, borderAndPaddingLogicalHeight()) + scrollbarLogicalHeight(); | 2512 return computeIntrinsicLogicalContentHeightUsing(height, intrinsicConten
tHeight, borderAndPaddingLogicalHeight()) + scrollbarLogicalHeight(); |
2513 } | 2513 } |
2514 if (height.isFixed()) | 2514 if (height.isFixed()) |
2515 return height.value(); | 2515 return height.value(); |
2516 if (height.hasPercent()) | 2516 if (height.hasPercent()) |
2517 return computePercentageLogicalHeight(height); | 2517 return computePercentageLogicalHeight(height); |
2518 return -1; | 2518 return -1; |
2519 } | 2519 } |
2520 | 2520 |
| 2521 bool LayoutBox::stretchesToViewportInQuirksMode() const |
| 2522 { |
| 2523 if (!isDocumentElement() && !isBody()) |
| 2524 return false; |
| 2525 return style()->logicalHeight().isAuto() && !isFloatingOrOutOfFlowPositioned
() && !isInline() && !flowThreadContainingBlock(); |
| 2526 } |
| 2527 |
2521 bool LayoutBox::skipContainingBlockForPercentHeightCalculation(const LayoutBox*
containingBlock) const | 2528 bool LayoutBox::skipContainingBlockForPercentHeightCalculation(const LayoutBox*
containingBlock) const |
2522 { | 2529 { |
2523 // If the writing mode of the containing block is orthogonal to ours, it mea
ns that we shouldn't | 2530 // If the writing mode of the containing block is orthogonal to ours, it mea
ns that we shouldn't |
2524 // skip anything, since we're going to resolve the percentage height against
a containing block *width*. | 2531 // skip anything, since we're going to resolve the percentage height against
a containing block *width*. |
2525 if (isHorizontalWritingMode() != containingBlock->isHorizontalWritingMode()) | 2532 if (isHorizontalWritingMode() != containingBlock->isHorizontalWritingMode()) |
2526 return false; | 2533 return false; |
2527 | 2534 |
2528 // Anonymous blocks should not impede percentage resolution on a child. Exam
ples of such | 2535 // Anonymous blocks should not impede percentage resolution on a child. Exam
ples of such |
2529 // anonymous blocks are blocks wrapped around inlines that have block siblin
gs (from the CSS | 2536 // anonymous blocks are blocks wrapped around inlines that have block siblin
gs (from the CSS |
2530 // spec) and multicol flow threads (an implementation detail). Another imple
mentation detail, | 2537 // spec) and multicol flow threads (an implementation detail). Another imple
mentation detail, |
(...skipping 2336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4867 StyleImage* borderImage = style()->borderImage().image(); | 4874 StyleImage* borderImage = style()->borderImage().image(); |
4868 return borderImage && borderImage->canRender(*this, style()->effectiveZoom()
) && borderImage->isLoaded(); | 4875 return borderImage && borderImage->canRender(*this, style()->effectiveZoom()
) && borderImage->isLoaded(); |
4869 } | 4876 } |
4870 | 4877 |
4871 ShapeOutsideInfo* LayoutBox::shapeOutsideInfo() const | 4878 ShapeOutsideInfo* LayoutBox::shapeOutsideInfo() const |
4872 { | 4879 { |
4873 return ShapeOutsideInfo::isEnabledFor(*this) ? ShapeOutsideInfo::info(*this)
: nullptr; | 4880 return ShapeOutsideInfo::isEnabledFor(*this) ? ShapeOutsideInfo::info(*this)
: nullptr; |
4874 } | 4881 } |
4875 | 4882 |
4876 } // namespace blink | 4883 } // namespace blink |
OLD | NEW |