| 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 2660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2671 return result; | 2671 return result; |
| 2672 } | 2672 } |
| 2673 | 2673 |
| 2674 LayoutUnit LayoutBox::computeReplacedLogicalWidth(ShouldComputePreferred shouldC
omputePreferred) const | 2674 LayoutUnit LayoutBox::computeReplacedLogicalWidth(ShouldComputePreferred shouldC
omputePreferred) const |
| 2675 { | 2675 { |
| 2676 return computeReplacedLogicalWidthRespectingMinMaxWidth(computeReplacedLogic
alWidthUsing(MainOrPreferredSize, style()->logicalWidth()), shouldComputePreferr
ed); | 2676 return computeReplacedLogicalWidthRespectingMinMaxWidth(computeReplacedLogic
alWidthUsing(MainOrPreferredSize, style()->logicalWidth()), shouldComputePreferr
ed); |
| 2677 } | 2677 } |
| 2678 | 2678 |
| 2679 LayoutUnit LayoutBox::computeReplacedLogicalWidthRespectingMinMaxWidth(LayoutUni
t logicalWidth, ShouldComputePreferred shouldComputePreferred) const | 2679 LayoutUnit LayoutBox::computeReplacedLogicalWidthRespectingMinMaxWidth(LayoutUni
t logicalWidth, ShouldComputePreferred shouldComputePreferred) const |
| 2680 { | 2680 { |
| 2681 LayoutUnit minLogicalWidth = (shouldComputePreferred == ComputePreferred &&
style()->logicalMinWidth().hasPercent()) || style()->logicalMinWidth().isMaxSize
None() ? logicalWidth : computeReplacedLogicalWidthUsing(MinSize, style()->logic
alMinWidth()); | 2681 LayoutUnit minLogicalWidth = (shouldComputePreferred == ComputePreferred &&
style()->logicalMinWidth().hasPercent()) ? logicalWidth : computeReplacedLogical
WidthUsing(MinSize, style()->logicalMinWidth()); |
| 2682 LayoutUnit maxLogicalWidth = (shouldComputePreferred == ComputePreferred &&
style()->logicalMaxWidth().hasPercent()) || style()->logicalMaxWidth().isMaxSize
None() ? logicalWidth : computeReplacedLogicalWidthUsing(MaxSize, style()->logic
alMaxWidth()); | 2682 LayoutUnit maxLogicalWidth = (shouldComputePreferred == ComputePreferred &&
style()->logicalMaxWidth().hasPercent()) || style()->logicalMaxWidth().isMaxSize
None() ? logicalWidth : computeReplacedLogicalWidthUsing(MaxSize, style()->logic
alMaxWidth()); |
| 2683 return std::max(minLogicalWidth, std::min(logicalWidth, maxLogicalWidth)); | 2683 return std::max(minLogicalWidth, std::min(logicalWidth, maxLogicalWidth)); |
| 2684 } | 2684 } |
| 2685 | 2685 |
| 2686 LayoutUnit LayoutBox::computeReplacedLogicalWidthUsing(SizeType sizeType, const
Length& logicalWidth) const | 2686 LayoutUnit LayoutBox::computeReplacedLogicalWidthUsing(SizeType sizeType, const
Length& logicalWidth) const |
| 2687 { | 2687 { |
| 2688 ASSERT(sizeType == MinSize || sizeType == MainOrPreferredSize || !logicalWid
th.isAuto()); | 2688 ASSERT(sizeType == MinSize || sizeType == MainOrPreferredSize || !logicalWid
th.isAuto()); |
| 2689 if (sizeType == MinSize && logicalWidth.isAuto()) | 2689 if (sizeType == MinSize && logicalWidth.isAuto()) |
| 2690 return adjustContentBoxLogicalWidthForBoxSizing(0); | 2690 return adjustContentBoxLogicalWidthForBoxSizing(0); |
| 2691 | 2691 |
| (...skipping 1913 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4605 } | 4605 } |
| 4606 | 4606 |
| 4607 void LayoutBox::clearPreviousPaintInvalidationRects() | 4607 void LayoutBox::clearPreviousPaintInvalidationRects() |
| 4608 { | 4608 { |
| 4609 LayoutBoxModelObject::clearPreviousPaintInvalidationRects(); | 4609 LayoutBoxModelObject::clearPreviousPaintInvalidationRects(); |
| 4610 if (PaintLayerScrollableArea* scrollableArea = this->scrollableArea()) | 4610 if (PaintLayerScrollableArea* scrollableArea = this->scrollableArea()) |
| 4611 scrollableArea->clearPreviousPaintInvalidationRects(); | 4611 scrollableArea->clearPreviousPaintInvalidationRects(); |
| 4612 } | 4612 } |
| 4613 | 4613 |
| 4614 } // namespace blink | 4614 } // namespace blink |
| OLD | NEW |