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 2048 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2059 return false; | 2059 return false; |
| 2060 | 2060 |
| 2061 LayoutUnit old_client_after_edge = HasOverflowModel() | 2061 LayoutUnit old_client_after_edge = HasOverflowModel() |
| 2062 ? overflow_->LayoutClientAfterEdge() | 2062 ? overflow_->LayoutClientAfterEdge() |
| 2063 : ClientLogicalBottom(); | 2063 : ClientLogicalBottom(); |
| 2064 ComputeOverflow(old_client_after_edge, true); | 2064 ComputeOverflow(old_client_after_edge, true); |
| 2065 | 2065 |
| 2066 if (HasOverflowClip()) | 2066 if (HasOverflowClip()) |
| 2067 Layer()->GetScrollableArea()->UpdateAfterOverflowRecalc(); | 2067 Layer()->GetScrollableArea()->UpdateAfterOverflowRecalc(); |
| 2068 | 2068 |
| 2069 return !HasOverflowClip(); | 2069 return true; |
|
Xianzhu
2017/05/23 20:35:42
To keep the optimization for child overflow change
rhogan
2017/05/23 21:32:17
OK, done!
| |
| 2070 } | 2070 } |
| 2071 | 2071 |
| 2072 // Called when a positioned object moves but doesn't necessarily change size. | 2072 // Called when a positioned object moves but doesn't necessarily change size. |
| 2073 // A simplified layout is attempted that just updates the object's position. | 2073 // A simplified layout is attempted that just updates the object's position. |
| 2074 // If the size does change, the object remains dirty. | 2074 // If the size does change, the object remains dirty. |
| 2075 bool LayoutBlock::TryLayoutDoingPositionedMovementOnly() { | 2075 bool LayoutBlock::TryLayoutDoingPositionedMovementOnly() { |
| 2076 LayoutUnit old_width = LogicalWidth(); | 2076 LayoutUnit old_width = LogicalWidth(); |
| 2077 LogicalExtentComputedValues computed_values; | 2077 LogicalExtentComputedValues computed_values; |
| 2078 LogicalExtentAfterUpdatingLogicalWidth(LogicalTop(), computed_values); | 2078 LogicalExtentAfterUpdatingLogicalWidth(LogicalTop(), computed_values); |
| 2079 // If we shrink to fit our width may have changed, so we still need full | 2079 // If we shrink to fit our width may have changed, so we still need full |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2195 bool LayoutBlock::HasDefiniteLogicalHeight() const { | 2195 bool LayoutBlock::HasDefiniteLogicalHeight() const { |
| 2196 return AvailableLogicalHeightForPercentageComputation() != LayoutUnit(-1); | 2196 return AvailableLogicalHeightForPercentageComputation() != LayoutUnit(-1); |
| 2197 } | 2197 } |
| 2198 | 2198 |
| 2199 bool LayoutBlock::NeedsPreferredWidthsRecalculation() const { | 2199 bool LayoutBlock::NeedsPreferredWidthsRecalculation() const { |
| 2200 return (HasRelativeLogicalHeight() && Style()->LogicalWidth().IsAuto()) || | 2200 return (HasRelativeLogicalHeight() && Style()->LogicalWidth().IsAuto()) || |
| 2201 LayoutBox::NeedsPreferredWidthsRecalculation(); | 2201 LayoutBox::NeedsPreferredWidthsRecalculation(); |
| 2202 } | 2202 } |
| 2203 | 2203 |
| 2204 } // namespace blink | 2204 } // namespace blink |
| OLD | NEW |