| 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 599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 610 | 610 |
| 611 // 10.6.2 Inline, replaced elements: http://www.w3.org/TR/CSS21/visudet.html
#inline-replaced-height | 611 // 10.6.2 Inline, replaced elements: http://www.w3.org/TR/CSS21/visudet.html
#inline-replaced-height |
| 612 IntrinsicSizingInfo intrinsicSizingInfo; | 612 IntrinsicSizingInfo intrinsicSizingInfo; |
| 613 computeIntrinsicSizingInfoForLayoutBox(contentLayoutObject, intrinsicSizingI
nfo); | 613 computeIntrinsicSizingInfoForLayoutBox(contentLayoutObject, intrinsicSizingI
nfo); |
| 614 FloatSize constrainedSize = constrainIntrinsicSizeToMinMax(intrinsicSizingIn
fo); | 614 FloatSize constrainedSize = constrainIntrinsicSizeToMinMax(intrinsicSizingIn
fo); |
| 615 | 615 |
| 616 bool widthIsAuto = style()->logicalWidth().isAuto(); | 616 bool widthIsAuto = style()->logicalWidth().isAuto(); |
| 617 | 617 |
| 618 // If 'height' and 'width' both have computed values of 'auto' and the eleme
nt also has an intrinsic height, then that intrinsic height is the used value of
'height'. | 618 // If 'height' and 'width' both have computed values of 'auto' and the eleme
nt also has an intrinsic height, then that intrinsic height is the used value of
'height'. |
| 619 if (widthIsAuto && intrinsicSizingInfo.hasHeight) | 619 if (widthIsAuto && intrinsicSizingInfo.hasHeight) |
| 620 return computeReplacedLogicalHeightRespectingMinMaxHeight(constrainedSiz
e.height()); | 620 return computeReplacedLogicalHeightRespectingMinMaxHeight(LayoutUnit(con
strainedSize.height())); |
| 621 | 621 |
| 622 // Otherwise, if 'height' has a computed value of 'auto', and the element ha
s an intrinsic ratio then the used value of 'height' is: | 622 // Otherwise, if 'height' has a computed value of 'auto', and the element ha
s an intrinsic ratio then the used value of 'height' is: |
| 623 // (used width) / (intrinsic ratio) | 623 // (used width) / (intrinsic ratio) |
| 624 if (intrinsicSizingInfo.aspectRatio) | 624 if (intrinsicSizingInfo.aspectRatio) |
| 625 return computeReplacedLogicalHeightRespectingMinMaxHeight(LayoutUnit(ava
ilableLogicalWidth() / intrinsicSizingInfo.aspectRatio)); | 625 return computeReplacedLogicalHeightRespectingMinMaxHeight(LayoutUnit(ava
ilableLogicalWidth() / intrinsicSizingInfo.aspectRatio)); |
| 626 | 626 |
| 627 // Otherwise, if 'height' has a computed value of 'auto', and the element ha
s an intrinsic height, then that intrinsic height is the used value of 'height'. | 627 // Otherwise, if 'height' has a computed value of 'auto', and the element ha
s an intrinsic height, then that intrinsic height is the used value of 'height'. |
| 628 if (intrinsicSizingInfo.hasHeight) | 628 if (intrinsicSizingInfo.hasHeight) |
| 629 return computeReplacedLogicalHeightRespectingMinMaxHeight(LayoutUnit(con
strainedSize.height())); | 629 return computeReplacedLogicalHeightRespectingMinMaxHeight(LayoutUnit(con
strainedSize.height())); |
| 630 | 630 |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 741 // We only include the space below the baseline in our layer's cached paint
invalidation rect if the | 741 // We only include the space below the baseline in our layer's cached paint
invalidation rect if the |
| 742 // image is selected. Since the selection state has changed update the rect. | 742 // image is selected. Since the selection state has changed update the rect. |
| 743 if (hasLayer()) | 743 if (hasLayer()) |
| 744 setPreviousPaintInvalidationRect(boundsRectForPaintInvalidation(containe
rForPaintInvalidation())); | 744 setPreviousPaintInvalidationRect(boundsRectForPaintInvalidation(containe
rForPaintInvalidation())); |
| 745 | 745 |
| 746 if (canUpdateSelectionOnRootLineBoxes()) | 746 if (canUpdateSelectionOnRootLineBoxes()) |
| 747 inlineBoxWrapper()->root().setHasSelectedChildren(state != SelectionNone
); | 747 inlineBoxWrapper()->root().setHasSelectedChildren(state != SelectionNone
); |
| 748 } | 748 } |
| 749 | 749 |
| 750 } // namespace blink | 750 } // namespace blink |
| OLD | NEW |