| 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 557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 568 | 568 |
| 569 // If the child has percentage padding or an embedded content box, we also | 569 // If the child has percentage padding or an embedded content box, we also |
| 570 // need to invalidate the childs pref widths. | 570 // need to invalidate the childs pref widths. |
| 571 if (child.needsPreferredWidthsRecalculation()) | 571 if (child.needsPreferredWidthsRecalculation()) |
| 572 child.setPreferredLogicalWidthsDirty(MarkOnlyThis); | 572 child.setPreferredLogicalWidthsDirty(MarkOnlyThis); |
| 573 } | 573 } |
| 574 } | 574 } |
| 575 | 575 |
| 576 void LayoutBlock::simplifiedNormalFlowLayout() { | 576 void LayoutBlock::simplifiedNormalFlowLayout() { |
| 577 if (childrenInline()) { | 577 if (childrenInline()) { |
| 578 ASSERT_WITH_SECURITY_IMPLICATION(isLayoutBlockFlow()); | 578 SECURITY_DCHECK(isLayoutBlockFlow()); |
| 579 LayoutBlockFlow* blockFlow = toLayoutBlockFlow(this); | 579 LayoutBlockFlow* blockFlow = toLayoutBlockFlow(this); |
| 580 blockFlow->simplifiedNormalFlowInlineLayout(); | 580 blockFlow->simplifiedNormalFlowInlineLayout(); |
| 581 } else { | 581 } else { |
| 582 for (LayoutBox* box = firstChildBox(); box; box = box->nextSiblingBox()) { | 582 for (LayoutBox* box = firstChildBox(); box; box = box->nextSiblingBox()) { |
| 583 if (!box->isOutOfFlowPositioned()) { | 583 if (!box->isOutOfFlowPositioned()) { |
| 584 if (box->isLayoutMultiColumnSpannerPlaceholder()) | 584 if (box->isLayoutMultiColumnSpannerPlaceholder()) |
| 585 toLayoutMultiColumnSpannerPlaceholder(box) | 585 toLayoutMultiColumnSpannerPlaceholder(box) |
| 586 ->markForLayoutIfObjectInFlowThreadNeedsLayout(); | 586 ->markForLayoutIfObjectInFlowThreadNeedsLayout(); |
| 587 box->layoutIfNeeded(); | 587 box->layoutIfNeeded(); |
| 588 } | 588 } |
| (...skipping 1189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1778 bool hasPseudo = false; | 1778 bool hasPseudo = false; |
| 1779 while (true) { | 1779 while (true) { |
| 1780 hasPseudo = firstLineBlock->style()->hasPseudoStyle(PseudoIdFirstLine); | 1780 hasPseudo = firstLineBlock->style()->hasPseudoStyle(PseudoIdFirstLine); |
| 1781 if (hasPseudo) | 1781 if (hasPseudo) |
| 1782 break; | 1782 break; |
| 1783 LayoutObject* parentBlock = firstLineBlock->parent(); | 1783 LayoutObject* parentBlock = firstLineBlock->parent(); |
| 1784 if (firstLineBlock->isAtomicInlineLevel() || | 1784 if (firstLineBlock->isAtomicInlineLevel() || |
| 1785 firstLineBlock->isFloatingOrOutOfFlowPositioned() || !parentBlock || | 1785 firstLineBlock->isFloatingOrOutOfFlowPositioned() || !parentBlock || |
| 1786 !parentBlock->behavesLikeBlockContainer()) | 1786 !parentBlock->behavesLikeBlockContainer()) |
| 1787 break; | 1787 break; |
| 1788 ASSERT_WITH_SECURITY_IMPLICATION(parentBlock->isLayoutBlock()); | 1788 SECURITY_DCHECK(parentBlock->isLayoutBlock()); |
| 1789 if (toLayoutBlock(parentBlock)->firstChild() != firstLineBlock) | 1789 if (toLayoutBlock(parentBlock)->firstChild() != firstLineBlock) |
| 1790 break; | 1790 break; |
| 1791 firstLineBlock = toLayoutBlock(parentBlock); | 1791 firstLineBlock = toLayoutBlock(parentBlock); |
| 1792 } | 1792 } |
| 1793 | 1793 |
| 1794 if (!hasPseudo) | 1794 if (!hasPseudo) |
| 1795 return nullptr; | 1795 return nullptr; |
| 1796 | 1796 |
| 1797 return firstLineBlock; | 1797 return firstLineBlock; |
| 1798 } | 1798 } |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2015 return toLayoutBlock(layoutObject)->recalcOverflowAfterStyleChange(); | 2015 return toLayoutBlock(layoutObject)->recalcOverflowAfterStyleChange(); |
| 2016 } | 2016 } |
| 2017 | 2017 |
| 2018 bool LayoutBlock::recalcChildOverflowAfterStyleChange() { | 2018 bool LayoutBlock::recalcChildOverflowAfterStyleChange() { |
| 2019 ASSERT(childNeedsOverflowRecalcAfterStyleChange()); | 2019 ASSERT(childNeedsOverflowRecalcAfterStyleChange()); |
| 2020 clearChildNeedsOverflowRecalcAfterStyleChange(); | 2020 clearChildNeedsOverflowRecalcAfterStyleChange(); |
| 2021 | 2021 |
| 2022 bool childrenOverflowChanged = false; | 2022 bool childrenOverflowChanged = false; |
| 2023 | 2023 |
| 2024 if (childrenInline()) { | 2024 if (childrenInline()) { |
| 2025 ASSERT_WITH_SECURITY_IMPLICATION(isLayoutBlockFlow()); | 2025 SECURITY_DCHECK(isLayoutBlockFlow()); |
| 2026 childrenOverflowChanged = | 2026 childrenOverflowChanged = |
| 2027 toLayoutBlockFlow(this)->recalcInlineChildrenOverflowAfterStyleChange(); | 2027 toLayoutBlockFlow(this)->recalcInlineChildrenOverflowAfterStyleChange(); |
| 2028 } else { | 2028 } else { |
| 2029 for (LayoutBox* box = firstChildBox(); box; box = box->nextSiblingBox()) { | 2029 for (LayoutBox* box = firstChildBox(); box; box = box->nextSiblingBox()) { |
| 2030 if (recalcNormalFlowChildOverflowIfNeeded(box)) | 2030 if (recalcNormalFlowChildOverflowIfNeeded(box)) |
| 2031 childrenOverflowChanged = true; | 2031 childrenOverflowChanged = true; |
| 2032 } | 2032 } |
| 2033 } | 2033 } |
| 2034 | 2034 |
| 2035 return recalcPositionedDescendantsOverflowAfterStyleChange() || | 2035 return recalcPositionedDescendantsOverflowAfterStyleChange() || |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2203 } | 2203 } |
| 2204 | 2204 |
| 2205 return availableHeight; | 2205 return availableHeight; |
| 2206 } | 2206 } |
| 2207 | 2207 |
| 2208 bool LayoutBlock::hasDefiniteLogicalHeight() const { | 2208 bool LayoutBlock::hasDefiniteLogicalHeight() const { |
| 2209 return availableLogicalHeightForPercentageComputation() != LayoutUnit(-1); | 2209 return availableLogicalHeightForPercentageComputation() != LayoutUnit(-1); |
| 2210 } | 2210 } |
| 2211 | 2211 |
| 2212 } // namespace blink | 2212 } // namespace blink |
| OLD | NEW |