OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) |
3 * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. | 3 * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. |
4 * All right reserved. | 4 * All right reserved. |
5 * Copyright (C) 2010 Google Inc. All rights reserved. | 5 * Copyright (C) 2010 Google Inc. All rights reserved. |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 1657 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1668 childMaxPreferredLogicalWidth); | 1668 childMaxPreferredLogicalWidth); |
1669 childMin += childMinPreferredLogicalWidth; | 1669 childMin += childMinPreferredLogicalWidth; |
1670 childMax += childMaxPreferredLogicalWidth; | 1670 childMax += childMaxPreferredLogicalWidth; |
1671 | 1671 |
1672 bool clearPreviousFloat; | 1672 bool clearPreviousFloat; |
1673 if (child->isFloating()) { | 1673 if (child->isFloating()) { |
1674 const ComputedStyle& childStyle = child->styleRef(); | 1674 const ComputedStyle& childStyle = child->styleRef(); |
1675 clearPreviousFloat = | 1675 clearPreviousFloat = |
1676 (prevFloat && | 1676 (prevFloat && |
1677 ((prevFloat->styleRef().floating() == EFloat::kLeft && | 1677 ((prevFloat->styleRef().floating() == EFloat::kLeft && |
1678 (childStyle.clear() == ClearBoth || | 1678 (childStyle.clear() == EClear::kBoth || |
1679 childStyle.clear() == ClearLeft)) || | 1679 childStyle.clear() == EClear::kLeft)) || |
1680 (prevFloat->styleRef().floating() == EFloat::kRight && | 1680 (prevFloat->styleRef().floating() == EFloat::kRight && |
1681 (childStyle.clear() == ClearBoth || | 1681 (childStyle.clear() == EClear::kBoth || |
1682 childStyle.clear() == ClearRight)))); | 1682 childStyle.clear() == EClear::kRight)))); |
1683 prevFloat = child; | 1683 prevFloat = child; |
1684 } else { | 1684 } else { |
1685 clearPreviousFloat = false; | 1685 clearPreviousFloat = false; |
1686 } | 1686 } |
1687 | 1687 |
1688 bool canBreakReplacedElement = !child->isImage() || allowImagesToBreak; | 1688 bool canBreakReplacedElement = !child->isImage() || allowImagesToBreak; |
1689 if ((canBreakReplacedElement && (autoWrap || oldAutoWrap) && | 1689 if ((canBreakReplacedElement && (autoWrap || oldAutoWrap) && |
1690 (!isPrevChildInlineFlow || shouldBreakLineAfterText)) || | 1690 (!isPrevChildInlineFlow || shouldBreakLineAfterText)) || |
1691 clearPreviousFloat) { | 1691 clearPreviousFloat) { |
1692 minLogicalWidth = std::max(minLogicalWidth, inlineMin); | 1692 minLogicalWidth = std::max(minLogicalWidth, inlineMin); |
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2132 bool LayoutBlockFlow::lineBoxHasBRWithClearance(RootInlineBox* curr) { | 2132 bool LayoutBlockFlow::lineBoxHasBRWithClearance(RootInlineBox* curr) { |
2133 // If the linebox breaks cleanly and with clearance then dirty from at least | 2133 // If the linebox breaks cleanly and with clearance then dirty from at least |
2134 // this point onwards so that we can clear the correct floats without | 2134 // this point onwards so that we can clear the correct floats without |
2135 // difficulty. | 2135 // difficulty. |
2136 if (!curr->endsWithBreak()) | 2136 if (!curr->endsWithBreak()) |
2137 return false; | 2137 return false; |
2138 InlineBox* lastBox = style()->isLeftToRightDirection() | 2138 InlineBox* lastBox = style()->isLeftToRightDirection() |
2139 ? curr->lastLeafChild() | 2139 ? curr->lastLeafChild() |
2140 : curr->firstLeafChild(); | 2140 : curr->firstLeafChild(); |
2141 return lastBox && lastBox->getLineLayoutItem().isBR() && | 2141 return lastBox && lastBox->getLineLayoutItem().isBR() && |
2142 lastBox->getLineLayoutItem().style()->clear() != ClearNone; | 2142 lastBox->getLineLayoutItem().style()->clear() != EClear::kNone; |
2143 } | 2143 } |
2144 | 2144 |
2145 void LayoutBlockFlow::determineEndPosition(LineLayoutState& layoutState, | 2145 void LayoutBlockFlow::determineEndPosition(LineLayoutState& layoutState, |
2146 RootInlineBox* startLine, | 2146 RootInlineBox* startLine, |
2147 InlineIterator& cleanLineStart, | 2147 InlineIterator& cleanLineStart, |
2148 BidiStatus& cleanLineBidiStatus) { | 2148 BidiStatus& cleanLineBidiStatus) { |
2149 ASSERT(!layoutState.endLine()); | 2149 ASSERT(!layoutState.endLine()); |
2150 RootInlineBox* last = nullptr; | 2150 RootInlineBox* last = nullptr; |
2151 for (RootInlineBox* curr = startLine->nextRootBox(); curr; | 2151 for (RootInlineBox* curr = startLine->nextRootBox(); curr; |
2152 curr = curr->nextRootBox()) { | 2152 curr = curr->nextRootBox()) { |
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2515 | 2515 |
2516 bool LayoutBlockFlow::paintedOutputOfObjectHasNoEffectRegardlessOfSize() const { | 2516 bool LayoutBlockFlow::paintedOutputOfObjectHasNoEffectRegardlessOfSize() const { |
2517 // LayoutBlockFlow is in charge of paint invalidation of the first line. | 2517 // LayoutBlockFlow is in charge of paint invalidation of the first line. |
2518 if (firstLineBox()) | 2518 if (firstLineBox()) |
2519 return false; | 2519 return false; |
2520 | 2520 |
2521 return LayoutBlock::paintedOutputOfObjectHasNoEffectRegardlessOfSize(); | 2521 return LayoutBlock::paintedOutputOfObjectHasNoEffectRegardlessOfSize(); |
2522 } | 2522 } |
2523 | 2523 |
2524 } // namespace blink | 2524 } // namespace blink |
OLD | NEW |