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.
All rights reserved. | 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
All rights reserved. |
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 1739 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1750 { | 1750 { |
1751 ASSERT_NOT_REACHED(); | 1751 ASSERT_NOT_REACHED(); |
1752 return "LayoutBlock"; | 1752 return "LayoutBlock"; |
1753 } | 1753 } |
1754 | 1754 |
1755 LayoutBlock* LayoutBlock::createAnonymousWithParentAndDisplay(const LayoutObject
* parent, EDisplay display) | 1755 LayoutBlock* LayoutBlock::createAnonymousWithParentAndDisplay(const LayoutObject
* parent, EDisplay display) |
1756 { | 1756 { |
1757 // FIXME: Do we need to convert all our inline displays to block-type in the
anonymous logic ? | 1757 // FIXME: Do we need to convert all our inline displays to block-type in the
anonymous logic ? |
1758 EDisplay newDisplay; | 1758 EDisplay newDisplay; |
1759 LayoutBlock* newBox = nullptr; | 1759 LayoutBlock* newBox = nullptr; |
1760 if (display == FLEX || display == INLINE_FLEX) { | 1760 if (display == EDisplay::Flex || display == EDisplay::InlineFlex) { |
1761 newBox = LayoutFlexibleBox::createAnonymous(&parent->document()); | 1761 newBox = LayoutFlexibleBox::createAnonymous(&parent->document()); |
1762 newDisplay = FLEX; | 1762 newDisplay = EDisplay::Flex; |
1763 } else if (display == GRID || display == INLINE_GRID) { | 1763 } else if (display == EDisplay::Grid || display == EDisplay::InlineGrid) { |
1764 newBox = LayoutGrid::createAnonymous(&parent->document()); | 1764 newBox = LayoutGrid::createAnonymous(&parent->document()); |
1765 newDisplay = GRID; | 1765 newDisplay = EDisplay::Grid; |
1766 } else { | 1766 } else { |
1767 newBox = LayoutBlockFlow::createAnonymous(&parent->document()); | 1767 newBox = LayoutBlockFlow::createAnonymous(&parent->document()); |
1768 newDisplay = BLOCK; | 1768 newDisplay = EDisplay::Block; |
1769 } | 1769 } |
1770 | 1770 |
1771 RefPtr<ComputedStyle> newStyle = ComputedStyle::createAnonymousStyleWithDisp
lay(parent->styleRef(), newDisplay); | 1771 RefPtr<ComputedStyle> newStyle = ComputedStyle::createAnonymousStyleWithDisp
lay(parent->styleRef(), newDisplay); |
1772 parent->updateAnonymousChildStyle(*newBox, *newStyle); | 1772 parent->updateAnonymousChildStyle(*newBox, *newStyle); |
1773 newBox->setStyle(newStyle.release()); | 1773 newBox->setStyle(newStyle.release()); |
1774 return newBox; | 1774 return newBox; |
1775 } | 1775 } |
1776 | 1776 |
1777 bool LayoutBlock::recalcNormalFlowChildOverflowIfNeeded(LayoutObject* layoutObje
ct) | 1777 bool LayoutBlock::recalcNormalFlowChildOverflowIfNeeded(LayoutObject* layoutObje
ct) |
1778 { | 1778 { |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1948 | 1948 |
1949 return availableHeight; | 1949 return availableHeight; |
1950 } | 1950 } |
1951 | 1951 |
1952 bool LayoutBlock::hasDefiniteLogicalHeight() const | 1952 bool LayoutBlock::hasDefiniteLogicalHeight() const |
1953 { | 1953 { |
1954 return availableLogicalHeightForPercentageComputation() != LayoutUnit(-1); | 1954 return availableLogicalHeightForPercentageComputation() != LayoutUnit(-1); |
1955 } | 1955 } |
1956 | 1956 |
1957 } // namespace blink | 1957 } // namespace blink |
OLD | NEW |