| 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, 2010 Apple Inc. All rights reserv
      ed. | 6  * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv
      ed. | 
| 7  * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. | 7  * Copyright (C) 2013 Adobe Systems Incorporated. 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 4161 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 4172     const LayoutBox* box = &layoutBox; | 4172     const LayoutBox* box = &layoutBox; | 
| 4173     while (!box->isLayoutView() && !box->isOutOfFlowPositioned() | 4173     while (!box->isLayoutView() && !box->isOutOfFlowPositioned() | 
| 4174         && (box->style()->logicalWidth().isAuto() || box->isAnonymousBlock()) | 4174         && (box->style()->logicalWidth().isAuto() || box->isAnonymousBlock()) | 
| 4175         && !box->hasOverrideContainingBlockLogicalWidth()) | 4175         && !box->hasOverrideContainingBlockLogicalWidth()) | 
| 4176         box = box->containingBlock(); | 4176         box = box->containingBlock(); | 
| 4177 | 4177 | 
| 4178     if (box->style()->logicalWidth().isFixed()) | 4178     if (box->style()->logicalWidth().isFixed()) | 
| 4179         return true; | 4179         return true; | 
| 4180     if (box->isLayoutView()) | 4180     if (box->isLayoutView()) | 
| 4181         return true; | 4181         return true; | 
| 4182     if (box->isOutOfFlowPositioned() && !box->style()->logicalLeft().isAuto() &&
       !box->style()->logicalRight().isAuto()) | 4182     // The size of the containing block of an absolutely positioned element is a
      lways definite with respect to that | 
|  | 4183     // element (http://dev.w3.org/csswg/css-sizing-3/#definite). | 
|  | 4184     if (box->isOutOfFlowPositioned()) | 
| 4183         return true; | 4185         return true; | 
| 4184     if (box->hasOverrideContainingBlockLogicalWidth()) | 4186     if (box->hasOverrideContainingBlockLogicalWidth()) | 
| 4185         return box->overrideContainingBlockContentLogicalWidth() != -1; | 4187         return box->overrideContainingBlockContentLogicalWidth() != -1; | 
| 4186     if (box->style()->logicalWidth().hasPercent()) | 4188     if (box->style()->logicalWidth().hasPercent()) | 
| 4187         return logicalWidthIsResolvable(*box->containingBlock()); | 4189         return logicalWidthIsResolvable(*box->containingBlock()); | 
| 4188 | 4190 | 
| 4189     return false; | 4191     return false; | 
| 4190 } | 4192 } | 
| 4191 | 4193 | 
| 4192 bool LayoutBox::hasDefiniteLogicalWidth() const | 4194 bool LayoutBox::hasDefiniteLogicalWidth() const | 
| 4193 { | 4195 { | 
| 4194     return logicalWidthIsResolvable(*this); | 4196     return logicalWidthIsResolvable(*this); | 
| 4195 } | 4197 } | 
| 4196 | 4198 | 
| 4197 bool LayoutBox::percentageLogicalHeightIsResolvable() const | 4199 bool LayoutBox::percentageLogicalHeightIsResolvable() const | 
| 4198 { | 4200 { | 
| 4199     Length fakeLength(100, Percent); | 4201     Length fakeLength(100, Percent); | 
| 4200     return computePercentageLogicalHeight(fakeLength) != -1; | 4202     return computePercentageLogicalHeight(fakeLength) != -1; | 
| 4201 } | 4203 } | 
| 4202 | 4204 | 
| 4203 bool LayoutBox::hasDefiniteLogicalHeight() const | 4205 bool LayoutBox::hasDefiniteLogicalHeight() const | 
| 4204 { | 4206 { | 
| 4205     const Length& logicalHeight = style()->logicalHeight(); | 4207     const Length& logicalHeight = style()->logicalHeight(); | 
|  | 4208     if (logicalHeight.isIntrinsicOrAuto()) | 
|  | 4209         return false; | 
| 4206     if (logicalHeight.isFixed()) | 4210     if (logicalHeight.isFixed()) | 
| 4207         return true; | 4211         return true; | 
| 4208     if (isOutOfFlowPositioned() && !style()->logicalTop().isAuto() && !style()->
      logicalBottom().isAuto()) | 4212     // The size of the containing block of an absolutely positioned element is a
      lways definite with respect to that | 
|  | 4213     // element (http://dev.w3.org/csswg/css-sizing-3/#definite). | 
|  | 4214     if (isOutOfFlowPositioned()) | 
| 4209         return true; | 4215         return true; | 
| 4210     if (hasOverrideContainingBlockLogicalHeight()) | 4216     if (hasOverrideContainingBlockLogicalHeight()) | 
| 4211         return overrideContainingBlockContentLogicalHeight() != -1; | 4217         return overrideContainingBlockContentLogicalHeight() != -1; | 
| 4212     if (logicalHeight.isIntrinsicOrAuto()) |  | 
| 4213         return false; |  | 
| 4214 | 4218 | 
| 4215     return percentageLogicalHeightIsResolvable(); | 4219     return percentageLogicalHeightIsResolvable(); | 
| 4216 } | 4220 } | 
| 4217 | 4221 | 
| 4218 bool LayoutBox::hasUnsplittableScrollingOverflow() const | 4222 bool LayoutBox::hasUnsplittableScrollingOverflow() const | 
| 4219 { | 4223 { | 
| 4220     // We will paginate as long as we don't scroll overflow in the pagination di
      rection. | 4224     // We will paginate as long as we don't scroll overflow in the pagination di
      rection. | 
| 4221     bool isHorizontal = isHorizontalWritingMode(); | 4225     bool isHorizontal = isHorizontalWritingMode(); | 
| 4222     if ((isHorizontal && !scrollsOverflowY()) || (!isHorizontal && !scrollsOverf
      lowX())) | 4226     if ((isHorizontal && !scrollsOverflowY()) || (!isHorizontal && !scrollsOverf
      lowX())) | 
| 4223         return false; | 4227         return false; | 
| (...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 4733 | 4737 | 
| 4734 void LayoutBox::clearPercentHeightDescendants() | 4738 void LayoutBox::clearPercentHeightDescendants() | 
| 4735 { | 4739 { | 
| 4736     for (LayoutObject* curr = slowFirstChild(); curr; curr = curr->nextInPreOrde
      r(this)) { | 4740     for (LayoutObject* curr = slowFirstChild(); curr; curr = curr->nextInPreOrde
      r(this)) { | 
| 4737         if (curr->isBox()) | 4741         if (curr->isBox()) | 
| 4738             toLayoutBox(curr)->removeFromPercentHeightContainer(); | 4742             toLayoutBox(curr)->removeFromPercentHeightContainer(); | 
| 4739     } | 4743     } | 
| 4740 } | 4744 } | 
| 4741 | 4745 | 
| 4742 } // namespace blink | 4746 } // namespace blink | 
| OLD | NEW | 
|---|