| 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) 2005 Allan Sandfeld Jensen (kde@carewolf.com) | 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) |
| 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) | 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) |
| 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
| 7 * Copyright (C) 2010 Google Inc. All rights reserved. | 7 * Copyright (C) 2010 Google Inc. 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 539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 550 return nullptr; | 550 return nullptr; |
| 551 | 551 |
| 552 if (cb->isOutOfFlowPositioned() && !cb->style()->logicalTop().isAuto() && !c
b->style()->logicalBottom().isAuto()) | 552 if (cb->isOutOfFlowPositioned() && !cb->style()->logicalTop().isAuto() && !c
b->style()->logicalBottom().isAuto()) |
| 553 return nullptr; | 553 return nullptr; |
| 554 | 554 |
| 555 return cb; | 555 return cb; |
| 556 } | 556 } |
| 557 | 557 |
| 558 bool LayoutBoxModelObject::hasAutoHeightOrContainingBlockWithAutoHeight(bool che
ckingContainingBlock) const | 558 bool LayoutBoxModelObject::hasAutoHeightOrContainingBlockWithAutoHeight(bool che
ckingContainingBlock) const |
| 559 { | 559 { |
| 560 // TODO(rego): Check if we can somehow reuse LayoutBlock::availableLogicalHe
ightForPercentageComputation(). |
| 560 const LayoutBox* thisBox = isBox() ? toLayoutBox(this) : nullptr; | 561 const LayoutBox* thisBox = isBox() ? toLayoutBox(this) : nullptr; |
| 561 Length logicalHeightLength = style()->logicalHeight(); | 562 Length logicalHeightLength = style()->logicalHeight(); |
| 562 LayoutBlock* cb = containingBlockForAutoHeightDetection(logicalHeightLength)
; | 563 LayoutBlock* cb = containingBlockForAutoHeightDetection(logicalHeightLength)
; |
| 563 if (logicalHeightLength.hasPercent() && cb && isBox()) | 564 if (logicalHeightLength.hasPercent() && cb && isBox()) |
| 564 cb->addPercentHeightDescendant(const_cast<LayoutBox*>(toLayoutBox(this))
); | 565 cb->addPercentHeightDescendant(const_cast<LayoutBox*>(toLayoutBox(this))
); |
| 565 if (thisBox && thisBox->isFlexItem()) { | 566 if (thisBox && thisBox->isFlexItem()) { |
| 566 LayoutFlexibleBox& flexBox = toLayoutFlexibleBox(*parent()); | 567 LayoutFlexibleBox& flexBox = toLayoutFlexibleBox(*parent()); |
| 567 if (flexBox.childLogicalHeightForPercentageResolution(*thisBox) != Layou
tUnit(-1)) | 568 if (flexBox.childLogicalHeightForPercentageResolution(*thisBox) != Layou
tUnit(-1)) |
| 568 return false; | 569 return false; |
| 569 } | 570 } |
| (...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1134 if (rootElementStyle->hasBackground()) | 1135 if (rootElementStyle->hasBackground()) |
| 1135 return false; | 1136 return false; |
| 1136 | 1137 |
| 1137 if (node() != document().firstBodyElement()) | 1138 if (node() != document().firstBodyElement()) |
| 1138 return false; | 1139 return false; |
| 1139 | 1140 |
| 1140 return true; | 1141 return true; |
| 1141 } | 1142 } |
| 1142 | 1143 |
| 1143 } // namespace blink | 1144 } // namespace blink |
| OLD | NEW |