| Index: Source/core/rendering/RenderBox.cpp
|
| diff --git a/Source/core/rendering/RenderBox.cpp b/Source/core/rendering/RenderBox.cpp
|
| index 0eda85b297b14ee6bd05d903a5584d838902cc55..f52a95e8afdc1a07b4dd846c5f7f267f6895b285 100644
|
| --- a/Source/core/rendering/RenderBox.cpp
|
| +++ b/Source/core/rendering/RenderBox.cpp
|
| @@ -4194,6 +4194,40 @@ void RenderBox::clearLayoutOverflow()
|
| m_overflow->setLayoutOverflow(noOverflowRect());
|
| }
|
|
|
| +bool RenderBox::logicalWidthIsResolvableFromBlock(const RenderBlock* containingBlock)
|
| +{
|
| + const RenderBlock* cb = containingBlock;
|
| + while (!cb->isRenderView() && !cb->isOutOfFlowPositioned() && (cb->style()->logicalWidth().isAuto() || cb->isAnonymousBlock()))
|
| + cb = cb->containingBlock();
|
| + // Doesn't anonymousBlocks have all of them cb->style()->logicalWidth().isAuto()
|
| +
|
| + if (cb->style()->logicalWidth().isFixed())
|
| + return true;
|
| + if (cb->isRenderView())
|
| + return true;
|
| + if (cb->isOutOfFlowPositioned())
|
| + return true;
|
| + if (cb->style()->logicalWidth().isPercent())
|
| + return logicalWidthIsResolvableFromBlock(cb->containingBlock());
|
| +
|
| + return false;
|
| +}
|
| +
|
| +bool RenderBox::hasDefiniteLogicalWidth() const
|
| +{
|
| + const Length& logicalWidth = style()->logicalWidth();
|
| + if (logicalWidth.isIntrinsic() || logicalWidth.isLegacyIntrinsic())
|
| + return false;
|
| + if (logicalWidth.isFixed())
|
| + return true;
|
| + // The size of the containing block of an absolutely positioned element is always definite with respect to that
|
| + // element (http://dev.w3.org/csswg/css-sizing-3/#definite).
|
| + if (isOutOfFlowPositioned())
|
| + return true;
|
| +
|
| + return RenderBox::logicalWidthIsResolvableFromBlock(containingBlock());
|
| +}
|
| +
|
| inline static bool percentageLogicalHeightIsResolvable(const RenderBox* box)
|
| {
|
| return RenderBox::percentageLogicalHeightIsResolvableFromBlock(box->containingBlock(), box->isOutOfFlowPositioned());
|
| @@ -4243,6 +4277,21 @@ bool RenderBox::percentageLogicalHeightIsResolvableFromBlock(const RenderBlock*
|
| return false;
|
| }
|
|
|
| +bool RenderBox::hasDefiniteLogicalHeight() const
|
| +{
|
| + const Length& logicalHeight = style()->logicalHeight();
|
| + if (logicalHeight.isIntrinsicOrAuto())
|
| + return false;
|
| + if (logicalHeight.isFixed())
|
| + return true;
|
| + // The size of the containing block of an absolutely positioned element is always definite with respect to that
|
| + // element (http://dev.w3.org/csswg/css-sizing-3/#definite).
|
| + if (isOutOfFlowPositioned())
|
| + return true;
|
| +
|
| + return percentageLogicalHeightIsResolvable(this);
|
| +}
|
| +
|
| bool RenderBox::hasUnsplittableScrollingOverflow() const
|
| {
|
| // We will paginate as long as we don't scroll overflow in the pagination direction.
|
|
|