| 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 12 matching lines...) Expand all Loading... |
| 23 * | 23 * |
| 24 */ | 24 */ |
| 25 | 25 |
| 26 #include "core/layout/LayoutBoxModelObject.h" | 26 #include "core/layout/LayoutBoxModelObject.h" |
| 27 | 27 |
| 28 #include "core/frame/FrameView.h" | 28 #include "core/frame/FrameView.h" |
| 29 #include "core/frame/LocalFrame.h" | 29 #include "core/frame/LocalFrame.h" |
| 30 #include "core/html/HTMLBodyElement.h" | 30 #include "core/html/HTMLBodyElement.h" |
| 31 #include "core/layout/ImageQualityController.h" | 31 #include "core/layout/ImageQualityController.h" |
| 32 #include "core/layout/LayoutBlock.h" | 32 #include "core/layout/LayoutBlock.h" |
| 33 #include "core/layout/LayoutFlexibleBox.h" |
| 33 #include "core/layout/LayoutGeometryMap.h" | 34 #include "core/layout/LayoutGeometryMap.h" |
| 34 #include "core/layout/LayoutInline.h" | 35 #include "core/layout/LayoutInline.h" |
| 35 #include "core/layout/LayoutView.h" | 36 #include "core/layout/LayoutView.h" |
| 36 #include "core/layout/compositing/CompositedLayerMapping.h" | 37 #include "core/layout/compositing/CompositedLayerMapping.h" |
| 37 #include "core/layout/compositing/PaintLayerCompositor.h" | 38 #include "core/layout/compositing/PaintLayerCompositor.h" |
| 38 #include "core/paint/PaintLayer.h" | 39 #include "core/paint/PaintLayer.h" |
| 39 #include "core/style/ShadowList.h" | 40 #include "core/style/ShadowList.h" |
| 40 #include "platform/LengthFunctions.h" | 41 #include "platform/LengthFunctions.h" |
| 41 | 42 |
| 42 namespace blink { | 43 namespace blink { |
| (...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 570 return nullptr; | 571 return nullptr; |
| 571 | 572 |
| 572 if (cb->isOutOfFlowPositioned() && !cb->style()->logicalTop().isAuto() && !c
b->style()->logicalBottom().isAuto()) | 573 if (cb->isOutOfFlowPositioned() && !cb->style()->logicalTop().isAuto() && !c
b->style()->logicalBottom().isAuto()) |
| 573 return nullptr; | 574 return nullptr; |
| 574 | 575 |
| 575 return cb; | 576 return cb; |
| 576 } | 577 } |
| 577 | 578 |
| 578 bool LayoutBoxModelObject::hasAutoHeightOrContainingBlockWithAutoHeight() const | 579 bool LayoutBoxModelObject::hasAutoHeightOrContainingBlockWithAutoHeight() const |
| 579 { | 580 { |
| 581 const LayoutBox* thisBox = isBox() ? toLayoutBox(this) : nullptr; |
| 582 if (thisBox && thisBox->isFlexItem()) { |
| 583 LayoutFlexibleBox& flexBox = toLayoutFlexibleBox(*parent()); |
| 584 if (flexBox.childLogicalHeightForPercentageResolution(*thisBox) != Layou
tUnit(-1)) |
| 585 return false; |
| 586 } |
| 580 Length logicalHeightLength = style()->logicalHeight(); | 587 Length logicalHeightLength = style()->logicalHeight(); |
| 581 if (logicalHeightLength.isAuto()) | 588 if (logicalHeightLength.isAuto()) |
| 582 return true; | 589 return true; |
| 583 | 590 |
| 584 if (document().inQuirksMode()) | 591 if (document().inQuirksMode()) |
| 585 return false; | 592 return false; |
| 586 | 593 |
| 587 // If the height of the containing block computes to 'auto', then it hasn't
been 'specified explicitly'. | 594 // If the height of the containing block computes to 'auto', then it hasn't
been 'specified explicitly'. |
| 588 if (LayoutBlock* cb = containingBlockForAutoHeightDetection(logicalHeightLen
gth)) | 595 if (LayoutBlock* cb = containingBlockForAutoHeightDetection(logicalHeightLen
gth)) |
| 589 return cb->hasAutoHeightOrContainingBlockWithAutoHeight(); | 596 return cb->hasAutoHeightOrContainingBlockWithAutoHeight(); |
| (...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1126 if (rootElementStyle->hasBackground()) | 1133 if (rootElementStyle->hasBackground()) |
| 1127 return false; | 1134 return false; |
| 1128 | 1135 |
| 1129 if (node() != document().firstBodyElement()) | 1136 if (node() != document().firstBodyElement()) |
| 1130 return false; | 1137 return false; |
| 1131 | 1138 |
| 1132 return true; | 1139 return true; |
| 1133 } | 1140 } |
| 1134 | 1141 |
| 1135 } // namespace blink | 1142 } // namespace blink |
| OLD | NEW |