| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * Copyright (C) 2000 Dirk Mueller (mueller@kde.org) | 3 * Copyright (C) 2000 Dirk Mueller (mueller@kde.org) |
| 4 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved. | 4 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved. |
| 5 * Copyright (C) Research In Motion Limited 2011-2012. All rights reserved. | 5 * Copyright (C) Research In Motion Limited 2011-2012. All rights reserved. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 // Solve for 'margin-right' | 314 // Solve for 'margin-right' |
| 315 marginLogicalRightAlias = availableSpace - (logicalLeftValue + logicalRi
ghtValue + marginLogicalLeftAlias); | 315 marginLogicalRightAlias = availableSpace - (logicalLeftValue + logicalRi
ghtValue + marginLogicalLeftAlias); |
| 316 } else { | 316 } else { |
| 317 // Nothing is 'auto', just calculate the values. | 317 // Nothing is 'auto', just calculate the values. |
| 318 marginLogicalLeftAlias = valueForLength(marginLogicalLeft, containerRela
tiveLogicalWidth); | 318 marginLogicalLeftAlias = valueForLength(marginLogicalLeft, containerRela
tiveLogicalWidth); |
| 319 marginLogicalRightAlias = valueForLength(marginLogicalRight, containerRe
lativeLogicalWidth); | 319 marginLogicalRightAlias = valueForLength(marginLogicalRight, containerRe
lativeLogicalWidth); |
| 320 logicalRightValue = valueForLength(logicalRight, containerLogicalWidth); | 320 logicalRightValue = valueForLength(logicalRight, containerLogicalWidth); |
| 321 logicalLeftValue = valueForLength(logicalLeft, containerLogicalWidth); | 321 logicalLeftValue = valueForLength(logicalLeft, containerLogicalWidth); |
| 322 // If the containing block is right-to-left, then push the left position
as far to the right as possible | 322 // If the containing block is right-to-left, then push the left position
as far to the right as possible |
| 323 if (containerDirection == RTL) { | 323 if (containerDirection == RTL) { |
| 324 int totalLogicalWidth = computedValues.m_extent + logicalLeftValue +
logicalRightValue + marginLogicalLeftAlias + marginLogicalRightAlias; | 324 int totalLogicalWidth = (computedValues.m_extent + logicalLeftValue
+ logicalRightValue + marginLogicalLeftAlias + marginLogicalRightAlias).toInt()
; |
| 325 logicalLeftValue = containerLogicalWidth - (totalLogicalWidth - logi
calLeftValue); | 325 logicalLeftValue = containerLogicalWidth - (totalLogicalWidth - logi
calLeftValue); |
| 326 } | 326 } |
| 327 } | 327 } |
| 328 | 328 |
| 329 /*-----------------------------------------------------------------------*\ | 329 /*-----------------------------------------------------------------------*\ |
| 330 * 6. If at this point the values are over-constrained, ignore the value | 330 * 6. If at this point the values are over-constrained, ignore the value |
| 331 * for either 'left' (in case the 'direction' property of the | 331 * for either 'left' (in case the 'direction' property of the |
| 332 * containing block is 'rtl') or 'right' (in case 'direction' is | 332 * containing block is 'rtl') or 'right' (in case 'direction' is |
| 333 * 'ltr') and solve for that value. | 333 * 'ltr') and solve for that value. |
| 334 \*-----------------------------------------------------------------------*/ | 334 \*-----------------------------------------------------------------------*/ |
| (...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 760 } | 760 } |
| 761 | 761 |
| 762 void LayoutReplaced::IntrinsicSizingInfo::transpose() | 762 void LayoutReplaced::IntrinsicSizingInfo::transpose() |
| 763 { | 763 { |
| 764 size = size.transposedSize(); | 764 size = size.transposedSize(); |
| 765 aspectRatio = aspectRatio.transposedSize(); | 765 aspectRatio = aspectRatio.transposedSize(); |
| 766 std::swap(hasWidth, hasHeight); | 766 std::swap(hasWidth, hasHeight); |
| 767 } | 767 } |
| 768 | 768 |
| 769 } // namespace blink | 769 } // namespace blink |
| OLD | NEW |