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 28 matching lines...) Expand all Loading... | |
39 #include "core/html/HTMLFrameOwnerElement.h" | 39 #include "core/html/HTMLFrameOwnerElement.h" |
40 #include "core/page/AutoscrollController.h" | 40 #include "core/page/AutoscrollController.h" |
41 #include "core/page/EventHandler.h" | 41 #include "core/page/EventHandler.h" |
42 #include "core/page/Page.h" | 42 #include "core/page/Page.h" |
43 #include "core/paint/BackgroundImageGeometry.h" | 43 #include "core/paint/BackgroundImageGeometry.h" |
44 #include "core/paint/BoxPainter.h" | 44 #include "core/paint/BoxPainter.h" |
45 #include "core/rendering/HitTestResult.h" | 45 #include "core/rendering/HitTestResult.h" |
46 #include "core/rendering/PaintInfo.h" | 46 #include "core/rendering/PaintInfo.h" |
47 #include "core/rendering/RenderDeprecatedFlexibleBox.h" | 47 #include "core/rendering/RenderDeprecatedFlexibleBox.h" |
48 #include "core/rendering/RenderFlexibleBox.h" | 48 #include "core/rendering/RenderFlexibleBox.h" |
49 #include "core/rendering/RenderFlowThread.h" | |
49 #include "core/rendering/RenderGeometryMap.h" | 50 #include "core/rendering/RenderGeometryMap.h" |
50 #include "core/rendering/RenderGrid.h" | 51 #include "core/rendering/RenderGrid.h" |
51 #include "core/rendering/RenderInline.h" | 52 #include "core/rendering/RenderInline.h" |
52 #include "core/rendering/RenderLayer.h" | 53 #include "core/rendering/RenderLayer.h" |
53 #include "core/rendering/RenderListBox.h" | 54 #include "core/rendering/RenderListBox.h" |
54 #include "core/rendering/RenderListMarker.h" | 55 #include "core/rendering/RenderListMarker.h" |
55 #include "core/rendering/RenderTableCell.h" | 56 #include "core/rendering/RenderTableCell.h" |
56 #include "core/rendering/RenderView.h" | 57 #include "core/rendering/RenderView.h" |
57 #include "core/rendering/compositing/RenderLayerCompositor.h" | 58 #include "core/rendering/compositing/RenderLayerCompositor.h" |
58 #include "platform/LengthFunctions.h" | 59 #include "platform/LengthFunctions.h" |
(...skipping 1361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1420 width += portionOfMarginNotConsumedByFloat(childMarginStart, startOffsetForC ontent, startOffsetForLine); | 1421 width += portionOfMarginNotConsumedByFloat(childMarginStart, startOffsetForC ontent, startOffsetForLine); |
1421 width += portionOfMarginNotConsumedByFloat(childMarginEnd, endOffsetForConte nt, endOffsetForLine); | 1422 width += portionOfMarginNotConsumedByFloat(childMarginEnd, endOffsetForConte nt, endOffsetForLine); |
1422 return width; | 1423 return width; |
1423 } | 1424 } |
1424 | 1425 |
1425 LayoutUnit RenderBox::containingBlockLogicalWidthForContent() const | 1426 LayoutUnit RenderBox::containingBlockLogicalWidthForContent() const |
1426 { | 1427 { |
1427 if (hasOverrideContainingBlockLogicalWidth()) | 1428 if (hasOverrideContainingBlockLogicalWidth()) |
1428 return overrideContainingBlockContentLogicalWidth(); | 1429 return overrideContainingBlockContentLogicalWidth(); |
1429 | 1430 |
1430 RenderBlock* cb = containingBlock(); | 1431 RenderBlock* cb; |
1432 if (isColumnSpanAll()) | |
1433 cb = flowThreadContainingBlock()->containingBlock(); | |
1434 else | |
1435 cb = containingBlock(); | |
Julien - ping for review
2014/11/17 23:47:11
Why don't we patch containingBlock to return the r
mstensho (USE GERRIT)
2014/11/18 13:29:26
Done. A patch for this particular issue is uploade
| |
1431 return cb->availableLogicalWidth(); | 1436 return cb->availableLogicalWidth(); |
1432 } | 1437 } |
1433 | 1438 |
1434 LayoutUnit RenderBox::containingBlockLogicalHeightForContent(AvailableLogicalHei ghtType heightType) const | 1439 LayoutUnit RenderBox::containingBlockLogicalHeightForContent(AvailableLogicalHei ghtType heightType) const |
1435 { | 1440 { |
1436 if (hasOverrideContainingBlockLogicalHeight()) | 1441 if (hasOverrideContainingBlockLogicalHeight()) |
1437 return overrideContainingBlockContentLogicalHeight(); | 1442 return overrideContainingBlockContentLogicalHeight(); |
1438 | 1443 |
1439 RenderBlock* cb = containingBlock(); | 1444 RenderBlock* cb; |
1445 if (isColumnSpanAll()) | |
1446 cb = flowThreadContainingBlock()->containingBlock(); | |
1447 else | |
1448 cb = containingBlock(); | |
1440 return cb->availableLogicalHeight(heightType); | 1449 return cb->availableLogicalHeight(heightType); |
1441 } | 1450 } |
1442 | 1451 |
1443 LayoutUnit RenderBox::containingBlockAvailableLineWidth() const | 1452 LayoutUnit RenderBox::containingBlockAvailableLineWidth() const |
1444 { | 1453 { |
1445 RenderBlock* cb = containingBlock(); | 1454 RenderBlock* cb = containingBlock(); |
1446 if (cb->isRenderBlockFlow()) | 1455 if (cb->isRenderBlockFlow()) |
1447 return toRenderBlockFlow(cb)->availableLogicalWidthForLine(logicalTop(), false, availableLogicalHeight(IncludeMarginBorderPadding)); | 1456 return toRenderBlockFlow(cb)->availableLogicalWidthForLine(logicalTop(), false, availableLogicalHeight(IncludeMarginBorderPadding)); |
1448 return 0; | 1457 return 0; |
1449 } | 1458 } |
(...skipping 2664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4114 // Note this is just a heuristic, and it's still possible to have overflow u nder these | 4123 // Note this is just a heuristic, and it's still possible to have overflow u nder these |
4115 // conditions, but it should work out to be good enough for common cases. Pa ginating overflow | 4124 // conditions, but it should work out to be good enough for common cases. Pa ginating overflow |
4116 // with scrollbars present is not the end of the world and is what we used t o do in the old model anyway. | 4125 // with scrollbars present is not the end of the world and is what we used t o do in the old model anyway. |
4117 return !style()->logicalHeight().isIntrinsicOrAuto() | 4126 return !style()->logicalHeight().isIntrinsicOrAuto() |
4118 || (!style()->logicalMaxHeight().isIntrinsicOrAuto() && !style()->logica lMaxHeight().isMaxSizeNone() && (!style()->logicalMaxHeight().isPercent() || per centageLogicalHeightIsResolvable(this))) | 4127 || (!style()->logicalMaxHeight().isIntrinsicOrAuto() && !style()->logica lMaxHeight().isMaxSizeNone() && (!style()->logicalMaxHeight().isPercent() || per centageLogicalHeightIsResolvable(this))) |
4119 || (!style()->logicalMinHeight().isIntrinsicOrAuto() && style()->logical MinHeight().isPositive() && (!style()->logicalMinHeight().isPercent() || percent ageLogicalHeightIsResolvable(this))); | 4128 || (!style()->logicalMinHeight().isIntrinsicOrAuto() && style()->logical MinHeight().isPositive() && (!style()->logicalMinHeight().isPercent() || percent ageLogicalHeightIsResolvable(this))); |
4120 } | 4129 } |
4121 | 4130 |
4122 bool RenderBox::isUnsplittableForPagination() const | 4131 bool RenderBox::isUnsplittableForPagination() const |
4123 { | 4132 { |
4124 return isReplaced() || hasUnsplittableScrollingOverflow() || (parent() && is WritingModeRoot()); | 4133 // FIXME: column spanners are only unsplittable (or rather: they do not part icipate in |
Julien - ping for review
2014/11/17 23:47:11
It's unclear what action needs to be taken to clos
mstensho (USE GERRIT)
2014/11/18 13:29:26
Done.
I just removed the column spanner condition
| |
4134 // fragmentation) in their nearest ancestor multicol container. If there are additional | |
4135 // fragmentation contexts further up in the tree, spanners still need to tak e those into | |
4136 // account. | |
4137 return isReplaced() || hasUnsplittableScrollingOverflow() || (parent() && is WritingModeRoot()) || isColumnSpanAll(); | |
4125 } | 4138 } |
4126 | 4139 |
4127 LayoutUnit RenderBox::lineHeight(bool /*firstLine*/, LineDirectionMode direction , LinePositionMode /*linePositionMode*/) const | 4140 LayoutUnit RenderBox::lineHeight(bool /*firstLine*/, LineDirectionMode direction , LinePositionMode /*linePositionMode*/) const |
4128 { | 4141 { |
4129 if (isReplaced()) | 4142 if (isReplaced()) |
4130 return direction == HorizontalLine ? m_marginBox.top() + height() + m_ma rginBox.bottom() : m_marginBox.right() + width() + m_marginBox.left(); | 4143 return direction == HorizontalLine ? m_marginBox.top() + height() + m_ma rginBox.bottom() : m_marginBox.right() + width() + m_marginBox.left(); |
4131 return 0; | 4144 return 0; |
4132 } | 4145 } |
4133 | 4146 |
4134 int RenderBox::baselinePosition(FontBaseline baselineType, bool /*firstLine*/, L ineDirectionMode direction, LinePositionMode linePositionMode) const | 4147 int RenderBox::baselinePosition(FontBaseline baselineType, bool /*firstLine*/, L ineDirectionMode direction, LinePositionMode linePositionMode) const |
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4439 | 4452 |
4440 setLogicalTop(oldLogicalTop); | 4453 setLogicalTop(oldLogicalTop); |
4441 setLogicalWidth(oldLogicalWidth); | 4454 setLogicalWidth(oldLogicalWidth); |
4442 setMarginLeft(oldMarginLeft); | 4455 setMarginLeft(oldMarginLeft); |
4443 setMarginRight(oldMarginRight); | 4456 setMarginRight(oldMarginRight); |
4444 | 4457 |
4445 return borderBox; | 4458 return borderBox; |
4446 } | 4459 } |
4447 | 4460 |
4448 } // namespace blink | 4461 } // namespace blink |
OLD | NEW |