Chromium Code Reviews| 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) 2007 David Smith (catfish.man@gmail.com) | 4 * (C) 2007 David Smith (catfish.man@gmail.com) |
| 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. | 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. |
| 6 * All rights reserved. | 6 * All rights reserved. |
| 7 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 7 * Copyright (C) Research In Motion Limited 2010. 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 587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 598 child.HasRelativeLogicalHeight() || | 598 child.HasRelativeLogicalHeight() || |
| 599 (child.IsAnonymous() && this->HasRelativeLogicalHeight()) || | 599 (child.IsAnonymous() && this->HasRelativeLogicalHeight()) || |
| 600 child.StretchesToViewport(); | 600 child.StretchesToViewport(); |
| 601 if (relayout_children || (has_relative_logical_height && !IsLayoutView()) || | 601 if (relayout_children || (has_relative_logical_height && !IsLayoutView()) || |
| 602 (height_available_to_children_changed_ && | 602 (height_available_to_children_changed_ && |
| 603 ChangeInAvailableLogicalHeightAffectsChild(this, child))) { | 603 ChangeInAvailableLogicalHeightAffectsChild(this, child))) { |
| 604 child.SetChildNeedsLayout(kMarkOnlyThis); | 604 child.SetChildNeedsLayout(kMarkOnlyThis); |
| 605 | 605 |
| 606 // If the child has percentage padding or an embedded content box, we also | 606 // If the child has percentage padding or an embedded content box, we also |
| 607 // need to invalidate the childs pref widths. | 607 // need to invalidate the childs pref widths. |
| 608 if (child.NeedsPreferredWidthsRecalculation()) | 608 if (child.NeedsPreferredWidthsRecalculation()) { |
| 609 child.SetPreferredLogicalWidthsDirty(kMarkOnlyThis); | 609 child.SetPreferredLogicalWidthsDirty( |
| 610 IsInlineBlockOrInlineTable() ? kMarkContainerChain : kMarkOnlyThis); | |
|
mstensho (USE GERRIT)
2017/04/19 10:58:47
Marking the container chain during layout seems wr
| |
| 611 } | |
| 610 } | 612 } |
| 611 } | 613 } |
| 612 | 614 |
| 613 void LayoutBlock::SimplifiedNormalFlowLayout() { | 615 void LayoutBlock::SimplifiedNormalFlowLayout() { |
| 614 if (ChildrenInline()) { | 616 if (ChildrenInline()) { |
| 615 SECURITY_DCHECK(IsLayoutBlockFlow()); | 617 SECURITY_DCHECK(IsLayoutBlockFlow()); |
| 616 LayoutBlockFlow* block_flow = ToLayoutBlockFlow(this); | 618 LayoutBlockFlow* block_flow = ToLayoutBlockFlow(this); |
| 617 block_flow->SimplifiedNormalFlowInlineLayout(); | 619 block_flow->SimplifiedNormalFlowInlineLayout(); |
| 618 } else { | 620 } else { |
| 619 for (LayoutBox* box = FirstChildBox(); box; box = box->NextSiblingBox()) { | 621 for (LayoutBox* box = FirstChildBox(); box; box = box->NextSiblingBox()) { |
| (...skipping 1581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2201 } | 2203 } |
| 2202 | 2204 |
| 2203 return available_height; | 2205 return available_height; |
| 2204 } | 2206 } |
| 2205 | 2207 |
| 2206 bool LayoutBlock::HasDefiniteLogicalHeight() const { | 2208 bool LayoutBlock::HasDefiniteLogicalHeight() const { |
| 2207 return AvailableLogicalHeightForPercentageComputation() != LayoutUnit(-1); | 2209 return AvailableLogicalHeightForPercentageComputation() != LayoutUnit(-1); |
| 2208 } | 2210 } |
| 2209 | 2211 |
| 2210 } // namespace blink | 2212 } // namespace blink |
| OLD | NEW |