| 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 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 546 } | 546 } |
| 547 | 547 |
| 548 DISABLE_CFI_PERF | 548 DISABLE_CFI_PERF |
| 549 bool LayoutBlock::createsNewFormattingContext() const { | 549 bool LayoutBlock::createsNewFormattingContext() const { |
| 550 return isInlineBlockOrInlineTable() || isFloatingOrOutOfFlowPositioned() || | 550 return isInlineBlockOrInlineTable() || isFloatingOrOutOfFlowPositioned() || |
| 551 hasOverflowClip() || isFlexItemIncludingDeprecated() || | 551 hasOverflowClip() || isFlexItemIncludingDeprecated() || |
| 552 style()->specifiesColumns() || isLayoutFlowThread() || isTableCell() || | 552 style()->specifiesColumns() || isLayoutFlowThread() || isTableCell() || |
| 553 isTableCaption() || isFieldset() || isWritingModeRoot() || | 553 isTableCaption() || isFieldset() || isWritingModeRoot() || |
| 554 isDocumentElement() || isColumnSpanAll() || isGridItem() || | 554 isDocumentElement() || isColumnSpanAll() || isGridItem() || |
| 555 style()->containsPaint() || style()->containsLayout() || | 555 style()->containsPaint() || style()->containsLayout() || |
| 556 isSVGForeignObject() || style()->display() == EDisplay::FlowRoot; | 556 isSVGForeignObject() || style()->display() == EDisplay::kFlowRoot; |
| 557 } | 557 } |
| 558 | 558 |
| 559 static inline bool changeInAvailableLogicalHeightAffectsChild( | 559 static inline bool changeInAvailableLogicalHeightAffectsChild( |
| 560 LayoutBlock* parent, | 560 LayoutBlock* parent, |
| 561 LayoutBox& child) { | 561 LayoutBox& child) { |
| 562 if (parent->style()->boxSizing() != EBoxSizing::kBorderBox) | 562 if (parent->style()->boxSizing() != EBoxSizing::kBorderBox) |
| 563 return false; | 563 return false; |
| 564 return parent->style()->isHorizontalWritingMode() && | 564 return parent->style()->isHorizontalWritingMode() && |
| 565 !child.style()->isHorizontalWritingMode(); | 565 !child.style()->isHorizontalWritingMode(); |
| 566 } | 566 } |
| (...skipping 1439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2006 return "LayoutBlock"; | 2006 return "LayoutBlock"; |
| 2007 } | 2007 } |
| 2008 | 2008 |
| 2009 LayoutBlock* LayoutBlock::createAnonymousWithParentAndDisplay( | 2009 LayoutBlock* LayoutBlock::createAnonymousWithParentAndDisplay( |
| 2010 const LayoutObject* parent, | 2010 const LayoutObject* parent, |
| 2011 EDisplay display) { | 2011 EDisplay display) { |
| 2012 // FIXME: Do we need to convert all our inline displays to block-type in the | 2012 // FIXME: Do we need to convert all our inline displays to block-type in the |
| 2013 // anonymous logic ? | 2013 // anonymous logic ? |
| 2014 EDisplay newDisplay; | 2014 EDisplay newDisplay; |
| 2015 LayoutBlock* newBox = nullptr; | 2015 LayoutBlock* newBox = nullptr; |
| 2016 if (display == EDisplay::Flex || display == EDisplay::InlineFlex) { | 2016 if (display == EDisplay::kFlex || display == EDisplay::kInlineFlex) { |
| 2017 newBox = LayoutFlexibleBox::createAnonymous(&parent->document()); | 2017 newBox = LayoutFlexibleBox::createAnonymous(&parent->document()); |
| 2018 newDisplay = EDisplay::Flex; | 2018 newDisplay = EDisplay::kFlex; |
| 2019 } else { | 2019 } else { |
| 2020 newBox = LayoutBlockFlow::createAnonymous(&parent->document()); | 2020 newBox = LayoutBlockFlow::createAnonymous(&parent->document()); |
| 2021 newDisplay = EDisplay::Block; | 2021 newDisplay = EDisplay::kBlock; |
| 2022 } | 2022 } |
| 2023 | 2023 |
| 2024 RefPtr<ComputedStyle> newStyle = | 2024 RefPtr<ComputedStyle> newStyle = |
| 2025 ComputedStyle::createAnonymousStyleWithDisplay(parent->styleRef(), | 2025 ComputedStyle::createAnonymousStyleWithDisplay(parent->styleRef(), |
| 2026 newDisplay); | 2026 newDisplay); |
| 2027 parent->updateAnonymousChildStyle(*newBox, *newStyle); | 2027 parent->updateAnonymousChildStyle(*newBox, *newStyle); |
| 2028 newBox->setStyle(std::move(newStyle)); | 2028 newBox->setStyle(std::move(newStyle)); |
| 2029 return newBox; | 2029 return newBox; |
| 2030 } | 2030 } |
| 2031 | 2031 |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2227 } | 2227 } |
| 2228 | 2228 |
| 2229 return availableHeight; | 2229 return availableHeight; |
| 2230 } | 2230 } |
| 2231 | 2231 |
| 2232 bool LayoutBlock::hasDefiniteLogicalHeight() const { | 2232 bool LayoutBlock::hasDefiniteLogicalHeight() const { |
| 2233 return availableLogicalHeightForPercentageComputation() != LayoutUnit(-1); | 2233 return availableLogicalHeightForPercentageComputation() != LayoutUnit(-1); |
| 2234 } | 2234 } |
| 2235 | 2235 |
| 2236 } // namespace blink | 2236 } // namespace blink |
| OLD | NEW |