| 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 509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 520 return nullptr; | 520 return nullptr; |
| 521 | 521 |
| 522 if (cb->isOutOfFlowPositioned() && !cb->style()->logicalTop().isAuto() && !c
b->style()->logicalBottom().isAuto()) | 522 if (cb->isOutOfFlowPositioned() && !cb->style()->logicalTop().isAuto() && !c
b->style()->logicalBottom().isAuto()) |
| 523 return nullptr; | 523 return nullptr; |
| 524 | 524 |
| 525 return cb; | 525 return cb; |
| 526 } | 526 } |
| 527 | 527 |
| 528 bool LayoutBoxModelObject::hasAutoHeightOrContainingBlockWithAutoHeight(bool che
ckingContainingBlock) const | 528 bool LayoutBoxModelObject::hasAutoHeightOrContainingBlockWithAutoHeight(bool che
ckingContainingBlock) const |
| 529 { | 529 { |
| 530 // TODO(rego): Check if we can somehow reuse LayoutBlock::availableLogicalHe
ightForPercentageComputation() (see http://crbug.com/635655). |
| 530 const LayoutBox* thisBox = isBox() ? toLayoutBox(this) : nullptr; | 531 const LayoutBox* thisBox = isBox() ? toLayoutBox(this) : nullptr; |
| 531 Length logicalHeightLength = style()->logicalHeight(); | 532 Length logicalHeightLength = style()->logicalHeight(); |
| 532 LayoutBlock* cb = containingBlockForAutoHeightDetection(logicalHeightLength)
; | 533 LayoutBlock* cb = containingBlockForAutoHeightDetection(logicalHeightLength)
; |
| 533 if (logicalHeightLength.hasPercent() && cb && isBox()) | 534 if (logicalHeightLength.hasPercent() && cb && isBox()) |
| 534 cb->addPercentHeightDescendant(const_cast<LayoutBox*>(toLayoutBox(this))
); | 535 cb->addPercentHeightDescendant(const_cast<LayoutBox*>(toLayoutBox(this))
); |
| 535 if (thisBox && thisBox->isFlexItem()) { | 536 if (thisBox && thisBox->isFlexItem()) { |
| 536 LayoutFlexibleBox& flexBox = toLayoutFlexibleBox(*parent()); | 537 LayoutFlexibleBox& flexBox = toLayoutFlexibleBox(*parent()); |
| 537 if (flexBox.childLogicalHeightForPercentageResolution(*thisBox) != Layou
tUnit(-1)) | 538 if (flexBox.childLogicalHeightForPercentageResolution(*thisBox) != Layou
tUnit(-1)) |
| 538 return false; | 539 return false; |
| 539 } | 540 } |
| (...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1105 if (rootElementStyle->hasBackground()) | 1106 if (rootElementStyle->hasBackground()) |
| 1106 return false; | 1107 return false; |
| 1107 | 1108 |
| 1108 if (node() != document().firstBodyElement()) | 1109 if (node() != document().firstBodyElement()) |
| 1109 return false; | 1110 return false; |
| 1110 | 1111 |
| 1111 return true; | 1112 return true; |
| 1112 } | 1113 } |
| 1113 | 1114 |
| 1114 } // namespace blink | 1115 } // namespace blink |
| OLD | NEW |