| 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. | 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. |
| 7 * All rights reserved. | 7 * All rights reserved. |
| 8 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. | 8 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. |
| 9 * | 9 * |
| 10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
| (...skipping 3251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3262 ShouldComputePreferred shouldComputePreferred) const { | 3262 ShouldComputePreferred shouldComputePreferred) const { |
| 3263 return computeReplacedLogicalWidthRespectingMinMaxWidth( | 3263 return computeReplacedLogicalWidthRespectingMinMaxWidth( |
| 3264 computeReplacedLogicalWidthUsing(MainOrPreferredSize, | 3264 computeReplacedLogicalWidthUsing(MainOrPreferredSize, |
| 3265 style()->logicalWidth()), | 3265 style()->logicalWidth()), |
| 3266 shouldComputePreferred); | 3266 shouldComputePreferred); |
| 3267 } | 3267 } |
| 3268 | 3268 |
| 3269 LayoutUnit LayoutBox::computeReplacedLogicalWidthRespectingMinMaxWidth( | 3269 LayoutUnit LayoutBox::computeReplacedLogicalWidthRespectingMinMaxWidth( |
| 3270 LayoutUnit logicalWidth, | 3270 LayoutUnit logicalWidth, |
| 3271 ShouldComputePreferred shouldComputePreferred) const { | 3271 ShouldComputePreferred shouldComputePreferred) const { |
| 3272 LayoutUnit minLogicalWidth = (shouldComputePreferred == ComputePreferred && | 3272 LayoutUnit minLogicalWidth = |
| 3273 style()->logicalMinWidth().isPercentOrCalc()) | 3273 shouldComputePreferred == ComputePreferred && |
| 3274 ? logicalWidth | 3274 style()->logicalMinWidth().isLayoutDependent() |
| 3275 : computeReplacedLogicalWidthUsing( | 3275 ? logicalWidth |
| 3276 MinSize, style()->logicalMinWidth()); | 3276 : computeReplacedLogicalWidthUsing(MinSize, |
| 3277 style()->logicalMinWidth()); |
| 3277 LayoutUnit maxLogicalWidth = | 3278 LayoutUnit maxLogicalWidth = |
| 3278 (shouldComputePreferred == ComputePreferred && | 3279 (shouldComputePreferred == ComputePreferred && |
| 3279 style()->logicalMaxWidth().isPercentOrCalc()) || | 3280 style()->logicalMaxWidth().isLayoutDependent()) || |
| 3280 style()->logicalMaxWidth().isMaxSizeNone() | 3281 style()->logicalMaxWidth().isMaxSizeNone() |
| 3281 ? logicalWidth | 3282 ? logicalWidth |
| 3282 : computeReplacedLogicalWidthUsing(MaxSize, | 3283 : computeReplacedLogicalWidthUsing(MaxSize, |
| 3283 style()->logicalMaxWidth()); | 3284 style()->logicalMaxWidth()); |
| 3284 return std::max(minLogicalWidth, std::min(logicalWidth, maxLogicalWidth)); | 3285 return std::max(minLogicalWidth, std::min(logicalWidth, maxLogicalWidth)); |
| 3285 } | 3286 } |
| 3286 | 3287 |
| 3287 LayoutUnit LayoutBox::computeReplacedLogicalWidthUsing( | 3288 LayoutUnit LayoutBox::computeReplacedLogicalWidthUsing( |
| 3288 SizeType sizeType, | 3289 SizeType sizeType, |
| 3289 const Length& logicalWidth) const { | 3290 const Length& logicalWidth) const { |
| (...skipping 2405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5695 block->adjustChildDebugRect(rect); | 5696 block->adjustChildDebugRect(rect); |
| 5696 | 5697 |
| 5697 return rect; | 5698 return rect; |
| 5698 } | 5699 } |
| 5699 | 5700 |
| 5700 bool LayoutBox::shouldClipOverflow() const { | 5701 bool LayoutBox::shouldClipOverflow() const { |
| 5701 return hasOverflowClip() || styleRef().containsPaint() || hasControlClip(); | 5702 return hasOverflowClip() || styleRef().containsPaint() || hasControlClip(); |
| 5702 } | 5703 } |
| 5703 | 5704 |
| 5704 } // namespace blink | 5705 } // namespace blink |
| OLD | NEW |