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 3375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3386 Length logicalRight = style()->logicalRight(); | 3386 Length logicalRight = style()->logicalRight(); |
3387 Length marginLogicalLeft = isHorizontal ? style()->marginLeft() : style()->m
arginTop(); | 3387 Length marginLogicalLeft = isHorizontal ? style()->marginLeft() : style()->m
arginTop(); |
3388 Length marginLogicalRight = isHorizontal ? style()->marginRight() : style()-
>marginBottom(); | 3388 Length marginLogicalRight = isHorizontal ? style()->marginRight() : style()-
>marginBottom(); |
3389 LayoutUnit& marginLogicalLeftAlias = style()->isLeftToRightDirection() ? com
putedValues.m_margins.m_start : computedValues.m_margins.m_end; | 3389 LayoutUnit& marginLogicalLeftAlias = style()->isLeftToRightDirection() ? com
putedValues.m_margins.m_start : computedValues.m_margins.m_end; |
3390 LayoutUnit& marginLogicalRightAlias = style()->isLeftToRightDirection() ? co
mputedValues.m_margins.m_end : computedValues.m_margins.m_start; | 3390 LayoutUnit& marginLogicalRightAlias = style()->isLeftToRightDirection() ? co
mputedValues.m_margins.m_end : computedValues.m_margins.m_start; |
3391 | 3391 |
3392 /*-----------------------------------------------------------------------*\ | 3392 /*-----------------------------------------------------------------------*\ |
3393 * 1. The used value of 'width' is determined as for inline replaced | 3393 * 1. The used value of 'width' is determined as for inline replaced |
3394 * elements. | 3394 * elements. |
3395 \*-----------------------------------------------------------------------*/ | 3395 \*-----------------------------------------------------------------------*/ |
3396 // NOTE: This value of width is FINAL in that the min/max width calculations | 3396 // NOTE: This value of width is final in that the min/max width calculations |
3397 // are dealt with in computeReplacedWidth(). This means that the steps to p
roduce | 3397 // are dealt with in computeReplacedWidth(). This means that the steps to p
roduce |
3398 // correct max/min in the non-replaced version, are not necessary. | 3398 // correct max/min in the non-replaced version, are not necessary. |
3399 computedValues.m_extent = computeReplacedLogicalWidth() + borderAndPaddingLo
gicalWidth(); | 3399 computedValues.m_extent = computeReplacedLogicalWidth() + borderAndPaddingLo
gicalWidth(); |
3400 | 3400 |
3401 const LayoutUnit availableSpace = containerLogicalWidth - computedValues.m_e
xtent; | 3401 const LayoutUnit availableSpace = containerLogicalWidth - computedValues.m_e
xtent; |
3402 | 3402 |
3403 /*-----------------------------------------------------------------------*\ | 3403 /*-----------------------------------------------------------------------*\ |
3404 * 2. If both 'left' and 'right' have the value 'auto', then if 'direction' | 3404 * 2. If both 'left' and 'right' have the value 'auto', then if 'direction' |
3405 * of the containing block is 'ltr', set 'left' to the static position; | 3405 * of the containing block is 'ltr', set 'left' to the static position; |
3406 * else if 'direction' is 'rtl', set 'right' to the static position. | 3406 * else if 'direction' is 'rtl', set 'right' to the static position. |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3550 LayoutUnit& marginBeforeAlias = computedValues.m_margins.m_before; | 3550 LayoutUnit& marginBeforeAlias = computedValues.m_margins.m_before; |
3551 LayoutUnit& marginAfterAlias = computedValues.m_margins.m_after; | 3551 LayoutUnit& marginAfterAlias = computedValues.m_margins.m_after; |
3552 | 3552 |
3553 Length logicalTop = style()->logicalTop(); | 3553 Length logicalTop = style()->logicalTop(); |
3554 Length logicalBottom = style()->logicalBottom(); | 3554 Length logicalBottom = style()->logicalBottom(); |
3555 | 3555 |
3556 /*-----------------------------------------------------------------------*\ | 3556 /*-----------------------------------------------------------------------*\ |
3557 * 1. The used value of 'height' is determined as for inline replaced | 3557 * 1. The used value of 'height' is determined as for inline replaced |
3558 * elements. | 3558 * elements. |
3559 \*-----------------------------------------------------------------------*/ | 3559 \*-----------------------------------------------------------------------*/ |
3560 // NOTE: This value of height is FINAL in that the min/max height calculatio
ns | 3560 // NOTE: This value of height is final in that the min/max height calculatio
ns |
3561 // are dealt with in computeReplacedHeight(). This means that the steps to
produce | 3561 // are dealt with in computeReplacedHeight(). This means that the steps to
produce |
3562 // correct max/min in the non-replaced version, are not necessary. | 3562 // correct max/min in the non-replaced version, are not necessary. |
3563 computedValues.m_extent = computeReplacedLogicalHeight() + borderAndPaddingL
ogicalHeight(); | 3563 computedValues.m_extent = computeReplacedLogicalHeight() + borderAndPaddingL
ogicalHeight(); |
3564 const LayoutUnit availableSpace = containerLogicalHeight - computedValues.m_
extent; | 3564 const LayoutUnit availableSpace = containerLogicalHeight - computedValues.m_
extent; |
3565 | 3565 |
3566 /*-----------------------------------------------------------------------*\ | 3566 /*-----------------------------------------------------------------------*\ |
3567 * 2. If both 'top' and 'bottom' have the value 'auto', replace 'top' | 3567 * 2. If both 'top' and 'bottom' have the value 'auto', replace 'top' |
3568 * with the element's static position. | 3568 * with the element's static position. |
3569 \*-----------------------------------------------------------------------*/ | 3569 \*-----------------------------------------------------------------------*/ |
3570 // see FIXME 1 | 3570 // see FIXME 1 |
(...skipping 938 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4509 ASSERT(style()->hasBackground() || style()->hasBoxDecorations()); | 4509 ASSERT(style()->hasBackground() || style()->hasBoxDecorations()); |
4510 | 4510 |
4511 if (m_rareData && m_rareData->m_previousBorderBoxSize.width() != -1) | 4511 if (m_rareData && m_rareData->m_previousBorderBoxSize.width() != -1) |
4512 return m_rareData->m_previousBorderBoxSize; | 4512 return m_rareData->m_previousBorderBoxSize; |
4513 | 4513 |
4514 // We didn't save the old border box size because it was the same as the siz
e of oldBounds. | 4514 // We didn't save the old border box size because it was the same as the siz
e of oldBounds. |
4515 return previousBoundsSize; | 4515 return previousBoundsSize; |
4516 } | 4516 } |
4517 | 4517 |
4518 } // namespace blink | 4518 } // namespace blink |
OLD | NEW |