| 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) 2007 David Smith (catfish.man@gmail.com) | 4 * (C) 2007 David Smith (catfish.man@gmail.com) |
| 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. | 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. |
| 6 * All rights reserved. | 6 * All rights reserved. |
| 7 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 7 * Copyright (C) Research In Motion Limited 2010. 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 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 421 bool LayoutBlock::widthAvailableToChildrenHasChanged() { | 421 bool LayoutBlock::widthAvailableToChildrenHasChanged() { |
| 422 // TODO(robhogan): Does m_widthAvailableToChildrenChanged always get reset | 422 // TODO(robhogan): Does m_widthAvailableToChildrenChanged always get reset |
| 423 // when it needs to? | 423 // when it needs to? |
| 424 bool widthAvailableToChildrenHasChanged = m_widthAvailableToChildrenChanged; | 424 bool widthAvailableToChildrenHasChanged = m_widthAvailableToChildrenChanged; |
| 425 m_widthAvailableToChildrenChanged = false; | 425 m_widthAvailableToChildrenChanged = false; |
| 426 | 426 |
| 427 // If we use border-box sizing, have percentage padding, and our parent has | 427 // If we use border-box sizing, have percentage padding, and our parent has |
| 428 // changed width then the width available to our children has changed even | 428 // changed width then the width available to our children has changed even |
| 429 // though our own width has remained the same. | 429 // though our own width has remained the same. |
| 430 widthAvailableToChildrenHasChanged |= | 430 widthAvailableToChildrenHasChanged |= |
| 431 style()->boxSizing() == BoxSizingBorderBox && | 431 style()->boxSizing() == EBoxSizing::kBorderBox && |
| 432 needsPreferredWidthsRecalculation() && | 432 needsPreferredWidthsRecalculation() && |
| 433 view()->layoutState()->containingBlockLogicalWidthChanged(); | 433 view()->layoutState()->containingBlockLogicalWidthChanged(); |
| 434 | 434 |
| 435 return widthAvailableToChildrenHasChanged; | 435 return widthAvailableToChildrenHasChanged; |
| 436 } | 436 } |
| 437 | 437 |
| 438 DISABLE_CFI_PERF | 438 DISABLE_CFI_PERF |
| 439 bool LayoutBlock::updateLogicalWidthAndColumnWidth() { | 439 bool LayoutBlock::updateLogicalWidthAndColumnWidth() { |
| 440 LayoutUnit oldWidth = logicalWidth(); | 440 LayoutUnit oldWidth = logicalWidth(); |
| 441 updateLogicalWidth(); | 441 updateLogicalWidth(); |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 534 style()->specifiesColumns() || isLayoutFlowThread() || isTableCell() || | 534 style()->specifiesColumns() || isLayoutFlowThread() || isTableCell() || |
| 535 isTableCaption() || isFieldset() || isWritingModeRoot() || | 535 isTableCaption() || isFieldset() || isWritingModeRoot() || |
| 536 isDocumentElement() || isColumnSpanAll() || isGridItem() || | 536 isDocumentElement() || isColumnSpanAll() || isGridItem() || |
| 537 style()->containsPaint() || style()->containsLayout() || | 537 style()->containsPaint() || style()->containsLayout() || |
| 538 isSVGForeignObject(); | 538 isSVGForeignObject(); |
| 539 } | 539 } |
| 540 | 540 |
| 541 static inline bool changeInAvailableLogicalHeightAffectsChild( | 541 static inline bool changeInAvailableLogicalHeightAffectsChild( |
| 542 LayoutBlock* parent, | 542 LayoutBlock* parent, |
| 543 LayoutBox& child) { | 543 LayoutBox& child) { |
| 544 if (parent->style()->boxSizing() != BoxSizingBorderBox) | 544 if (parent->style()->boxSizing() != EBoxSizing::kBorderBox) |
| 545 return false; | 545 return false; |
| 546 return parent->style()->isHorizontalWritingMode() && | 546 return parent->style()->isHorizontalWritingMode() && |
| 547 !child.style()->isHorizontalWritingMode(); | 547 !child.style()->isHorizontalWritingMode(); |
| 548 } | 548 } |
| 549 | 549 |
| 550 void LayoutBlock::updateBlockChildDirtyBitsBeforeLayout(bool relayoutChildren, | 550 void LayoutBlock::updateBlockChildDirtyBitsBeforeLayout(bool relayoutChildren, |
| 551 LayoutBox& child) { | 551 LayoutBox& child) { |
| 552 if (child.isOutOfFlowPositioned()) { | 552 if (child.isOutOfFlowPositioned()) { |
| 553 // It's rather useless to mark out-of-flow children at this point. We may | 553 // It's rather useless to mark out-of-flow children at this point. We may |
| 554 // not be their containing block (and if we are, it's just pure luck), so | 554 // not be their containing block (and if we are, it's just pure luck), so |
| (...skipping 1645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2200 } | 2200 } |
| 2201 | 2201 |
| 2202 return availableHeight; | 2202 return availableHeight; |
| 2203 } | 2203 } |
| 2204 | 2204 |
| 2205 bool LayoutBlock::hasDefiniteLogicalHeight() const { | 2205 bool LayoutBlock::hasDefiniteLogicalHeight() const { |
| 2206 return availableLogicalHeightForPercentageComputation() != LayoutUnit(-1); | 2206 return availableLogicalHeightForPercentageComputation() != LayoutUnit(-1); |
| 2207 } | 2207 } |
| 2208 | 2208 |
| 2209 } // namespace blink | 2209 } // namespace blink |
| OLD | NEW |