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 3277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3288 } else if (logicalLeftIsAuto && !logicalWidthIsAuto && !logicalRightIsAu
to) { | 3288 } else if (logicalLeftIsAuto && !logicalWidthIsAuto && !logicalRightIsAu
to) { |
3289 // RULE 4: (solve for left) | 3289 // RULE 4: (solve for left) |
3290 computedValues.m_extent = adjustContentBoxLogicalWidthForBoxSizing(v
alueForLength(logicalWidth, containerLogicalWidth)); | 3290 computedValues.m_extent = adjustContentBoxLogicalWidthForBoxSizing(v
alueForLength(logicalWidth, containerLogicalWidth)); |
3291 logicalLeftValue = availableSpace - (computedValues.m_extent + value
ForLength(logicalRight, containerLogicalWidth)); | 3291 logicalLeftValue = availableSpace - (computedValues.m_extent + value
ForLength(logicalRight, containerLogicalWidth)); |
3292 } else if (!logicalLeftIsAuto && logicalWidthIsAuto && !logicalRightIsAu
to) { | 3292 } else if (!logicalLeftIsAuto && logicalWidthIsAuto && !logicalRightIsAu
to) { |
3293 // RULE 5: (solve for width) | 3293 // RULE 5: (solve for width) |
3294 logicalLeftValue = valueForLength(logicalLeft, containerLogicalWidth
); | 3294 logicalLeftValue = valueForLength(logicalLeft, containerLogicalWidth
); |
3295 if (autoWidthShouldFitContent()) | 3295 if (autoWidthShouldFitContent()) |
3296 shrinkToFitWidth(availableSpace, logicalLeftValue, bordersPlusPa
dding, computedValues); | 3296 shrinkToFitWidth(availableSpace, logicalLeftValue, bordersPlusPa
dding, computedValues); |
3297 else | 3297 else |
3298 computedValues.m_extent = availableSpace - (logicalLeftValue + v
alueForLength(logicalRight, containerLogicalWidth)); | 3298 computedValues.m_extent = std::max<LayoutUnit>(0, availableSpace
- (logicalLeftValue + valueForLength(logicalRight, containerLogicalWidth))); |
3299 } else if (!logicalLeftIsAuto && !logicalWidthIsAuto && logicalRightIsAu
to) { | 3299 } else if (!logicalLeftIsAuto && !logicalWidthIsAuto && logicalRightIsAu
to) { |
3300 // RULE 6: (no need solve for right) | 3300 // RULE 6: (no need solve for right) |
3301 logicalLeftValue = valueForLength(logicalLeft, containerLogicalWidth
); | 3301 logicalLeftValue = valueForLength(logicalLeft, containerLogicalWidth
); |
3302 computedValues.m_extent = adjustContentBoxLogicalWidthForBoxSizing(v
alueForLength(logicalWidth, containerLogicalWidth)); | 3302 computedValues.m_extent = adjustContentBoxLogicalWidthForBoxSizing(v
alueForLength(logicalWidth, containerLogicalWidth)); |
3303 } | 3303 } |
3304 } | 3304 } |
3305 | 3305 |
3306 // Use computed values to calculate the horizontal position. | 3306 // Use computed values to calculate the horizontal position. |
3307 | 3307 |
3308 // FIXME: This hack is needed to calculate the logical left position for a
'rtl' relatively | 3308 // FIXME: This hack is needed to calculate the logical left position for a
'rtl' relatively |
(...skipping 1426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4735 RenderBox::BoxDecorationData::BoxDecorationData(const RenderStyle& style) | 4735 RenderBox::BoxDecorationData::BoxDecorationData(const RenderStyle& style) |
4736 { | 4736 { |
4737 backgroundColor = style.visitedDependentColor(CSSPropertyBackgroundColor); | 4737 backgroundColor = style.visitedDependentColor(CSSPropertyBackgroundColor); |
4738 hasBackground = backgroundColor.alpha() || style.hasBackgroundImage(); | 4738 hasBackground = backgroundColor.alpha() || style.hasBackgroundImage(); |
4739 ASSERT(hasBackground == style.hasBackground()); | 4739 ASSERT(hasBackground == style.hasBackground()); |
4740 hasBorder = style.hasBorder(); | 4740 hasBorder = style.hasBorder(); |
4741 hasAppearance = style.hasAppearance(); | 4741 hasAppearance = style.hasAppearance(); |
4742 } | 4742 } |
4743 | 4743 |
4744 } // namespace blink | 4744 } // namespace blink |
OLD | NEW |