| 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 536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 547 } | 547 } |
| 548 p = p->parent(); | 548 p = p->parent(); |
| 549 } | 549 } |
| 550 return offset; | 550 return offset; |
| 551 } | 551 } |
| 552 | 552 |
| 553 LayoutBlock* LayoutBoxModelObject::containingBlockForAutoHeightDetection(Length
logicalHeight) const | 553 LayoutBlock* LayoutBoxModelObject::containingBlockForAutoHeightDetection(Length
logicalHeight) const |
| 554 { | 554 { |
| 555 // For percentage heights: The percentage is calculated with respect to the
height of the generated box's | 555 // For percentage heights: The percentage is calculated with respect to the
height of the generated box's |
| 556 // containing block. If the height of the containing block is not specified
explicitly (i.e., it depends | 556 // containing block. If the height of the containing block is not specified
explicitly (i.e., it depends |
| 557 // on content height), and this element is not absolutely positioned, the va
lue computes to 'auto'. | 557 // on content height), and this element is not absolutely positioned, the u
sed height is calculated |
| 558 // as if 'auto' was specified. |
| 558 if (!logicalHeight.hasPercent() || isOutOfFlowPositioned()) | 559 if (!logicalHeight.hasPercent() || isOutOfFlowPositioned()) |
| 559 return nullptr; | 560 return nullptr; |
| 560 | 561 |
| 561 // Anonymous block boxes are ignored when resolving percentage values that w
ould refer to it: | 562 // Anonymous block boxes are ignored when resolving percentage values that w
ould refer to it: |
| 562 // the closest non-anonymous ancestor box is used instead. | 563 // the closest non-anonymous ancestor box is used instead. |
| 563 LayoutBlock* cb = containingBlock(); | 564 LayoutBlock* cb = containingBlock(); |
| 564 while (cb->isAnonymous()) | 565 while (cb->isAnonymous()) |
| 565 cb = cb->containingBlock(); | 566 cb = cb->containingBlock(); |
| 566 | 567 |
| 567 // Matching LayoutBox::percentageLogicalHeightIsResolvableFromBlock() by | 568 // Matching LayoutBox::percentageLogicalHeightIsResolvableFromBlock() by |
| (...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1132 if (rootElementStyle->hasBackground()) | 1133 if (rootElementStyle->hasBackground()) |
| 1133 return false; | 1134 return false; |
| 1134 | 1135 |
| 1135 if (node() != document().firstBodyElement()) | 1136 if (node() != document().firstBodyElement()) |
| 1136 return false; | 1137 return false; |
| 1137 | 1138 |
| 1138 return true; | 1139 return true; |
| 1139 } | 1140 } |
| 1140 | 1141 |
| 1141 } // namespace blink | 1142 } // namespace blink |
| OLD | NEW |