| 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. All r
ight reserved. | 3 * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ight reserved. |
| 4 * Copyright (C) 2010 Google Inc. All rights reserved. | 4 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 1266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1277 if (startMargin.isFixed()) | 1277 if (startMargin.isFixed()) |
| 1278 margins += adjustFloatForSubPixelLayout(startMargin.value()); | 1278 margins += adjustFloatForSubPixelLayout(startMargin.value()); |
| 1279 if (endMargin.isFixed()) | 1279 if (endMargin.isFixed()) |
| 1280 margins += adjustFloatForSubPixelLayout(endMargin.value()); | 1280 margins += adjustFloatForSubPixelLayout(endMargin.value()); |
| 1281 childMin += margins; | 1281 childMin += margins; |
| 1282 childMax += margins; | 1282 childMax += margins; |
| 1283 } | 1283 } |
| 1284 | 1284 |
| 1285 // FIXME: This function should be broken into something less monolithic. | 1285 // FIXME: This function should be broken into something less monolithic. |
| 1286 // FIXME: The main loop here is very similar to LineBreaker::nextSegmentBreak. T
hey can probably reuse code. | 1286 // FIXME: The main loop here is very similar to LineBreaker::nextSegmentBreak. T
hey can probably reuse code. |
| 1287 DISABLE_CFI_PERF |
| 1287 void LayoutBlockFlow::computeInlinePreferredLogicalWidths(LayoutUnit& minLogical
Width, LayoutUnit& maxLogicalWidth) | 1288 void LayoutBlockFlow::computeInlinePreferredLogicalWidths(LayoutUnit& minLogical
Width, LayoutUnit& maxLogicalWidth) |
| 1288 { | 1289 { |
| 1289 LayoutUnit inlineMax; | 1290 LayoutUnit inlineMax; |
| 1290 LayoutUnit inlineMin; | 1291 LayoutUnit inlineMin; |
| 1291 | 1292 |
| 1292 const ComputedStyle& styleToUse = styleRef(); | 1293 const ComputedStyle& styleToUse = styleRef(); |
| 1293 LayoutBlock* containingBlock = this->containingBlock(); | 1294 LayoutBlock* containingBlock = this->containingBlock(); |
| 1294 LayoutUnit cw = containingBlock ? containingBlock->contentLogicalWidth() : L
ayoutUnit(); | 1295 LayoutUnit cw = containingBlock ? containingBlock->contentLogicalWidth() : L
ayoutUnit(); |
| 1295 | 1296 |
| 1296 // If we are at the start of a line, we want to ignore all white-space. | 1297 // If we are at the start of a line, we want to ignore all white-space. |
| (...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1578 const LayoutObject* objectToCheck = block; | 1579 const LayoutObject* objectToCheck = block; |
| 1579 if (block->isAnonymousBlock()) { | 1580 if (block->isAnonymousBlock()) { |
| 1580 const LayoutObject* parent = block->parent(); | 1581 const LayoutObject* parent = block->parent(); |
| 1581 if (!parent || !parent->behavesLikeBlockContainer()) | 1582 if (!parent || !parent->behavesLikeBlockContainer()) |
| 1582 return false; | 1583 return false; |
| 1583 objectToCheck = parent; | 1584 objectToCheck = parent; |
| 1584 } | 1585 } |
| 1585 return objectToCheck->hasOverflowClip() && objectToCheck->style()->getTextOv
erflow(); | 1586 return objectToCheck->hasOverflowClip() && objectToCheck->style()->getTextOv
erflow(); |
| 1586 } | 1587 } |
| 1587 | 1588 |
| 1589 DISABLE_CFI_PERF |
| 1588 void LayoutBlockFlow::layoutInlineChildren(bool relayoutChildren, LayoutUnit aft
erEdge) | 1590 void LayoutBlockFlow::layoutInlineChildren(bool relayoutChildren, LayoutUnit aft
erEdge) |
| 1589 { | 1591 { |
| 1590 // Figure out if we should clear out our line boxes. | 1592 // Figure out if we should clear out our line boxes. |
| 1591 // FIXME: Handle resize eventually! | 1593 // FIXME: Handle resize eventually! |
| 1592 bool isFullLayout = !firstLineBox() || selfNeedsLayout() || relayoutChildren
; | 1594 bool isFullLayout = !firstLineBox() || selfNeedsLayout() || relayoutChildren
; |
| 1593 LineLayoutState layoutState(isFullLayout); | 1595 LineLayoutState layoutState(isFullLayout); |
| 1594 | 1596 |
| 1595 if (isFullLayout) { | 1597 if (isFullLayout) { |
| 1596 // Ensure the old line boxes will be erased. | 1598 // Ensure the old line boxes will be erased. |
| 1597 if (firstLineBox()) | 1599 if (firstLineBox()) |
| (...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2115 bool LayoutBlockFlow::paintedOutputOfObjectHasNoEffectRegardlessOfSize() const | 2117 bool LayoutBlockFlow::paintedOutputOfObjectHasNoEffectRegardlessOfSize() const |
| 2116 { | 2118 { |
| 2117 // LayoutBlockFlow is in charge of paint invalidation of the first line. | 2119 // LayoutBlockFlow is in charge of paint invalidation of the first line. |
| 2118 if (firstLineBox()) | 2120 if (firstLineBox()) |
| 2119 return false; | 2121 return false; |
| 2120 | 2122 |
| 2121 return LayoutBlock::paintedOutputOfObjectHasNoEffectRegardlessOfSize(); | 2123 return LayoutBlock::paintedOutputOfObjectHasNoEffectRegardlessOfSize(); |
| 2122 } | 2124 } |
| 2123 | 2125 |
| 2124 } // namespace blink | 2126 } // namespace blink |
| OLD | NEW |