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 610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
621 | 621 |
622 // 10.6.2 Inline, replaced elements: http://www.w3.org/TR/CSS21/visudet.html
#inline-replaced-height | 622 // 10.6.2 Inline, replaced elements: http://www.w3.org/TR/CSS21/visudet.html
#inline-replaced-height |
623 IntrinsicSizingInfo intrinsicSizingInfo; | 623 IntrinsicSizingInfo intrinsicSizingInfo; |
624 computeIntrinsicSizingInfoForLayoutBox(contentLayoutObject, intrinsicSizingI
nfo); | 624 computeIntrinsicSizingInfoForLayoutBox(contentLayoutObject, intrinsicSizingI
nfo); |
625 FloatSize constrainedSize = constrainIntrinsicSizeToMinMax(intrinsicSizingIn
fo); | 625 FloatSize constrainedSize = constrainIntrinsicSizeToMinMax(intrinsicSizingIn
fo); |
626 | 626 |
627 bool widthIsAuto = style()->logicalWidth().isAuto(); | 627 bool widthIsAuto = style()->logicalWidth().isAuto(); |
628 | 628 |
629 // 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'. | 629 // 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'. |
630 if (widthIsAuto && intrinsicSizingInfo.hasHeight) | 630 if (widthIsAuto && intrinsicSizingInfo.hasHeight) |
631 return computeReplacedLogicalHeightRespectingMinMaxHeight(constrainedSiz
e.height()); | 631 return computeReplacedLogicalHeightRespectingMinMaxHeight(LayoutUnit(con
strainedSize.height())); |
632 | 632 |
633 // Otherwise, if 'height' has a computed value of 'auto', and the element ha
s an intrinsic ratio then the used value of 'height' is: | 633 // Otherwise, if 'height' has a computed value of 'auto', and the element ha
s an intrinsic ratio then the used value of 'height' is: |
634 // (used width) / (intrinsic ratio) | 634 // (used width) / (intrinsic ratio) |
635 if (!intrinsicSizingInfo.aspectRatio.isEmpty()) | 635 if (!intrinsicSizingInfo.aspectRatio.isEmpty()) |
636 return computeReplacedLogicalHeightRespectingMinMaxHeight(resolveHeightF
orRatio(availableLogicalWidth(), intrinsicSizingInfo.aspectRatio)); | 636 return computeReplacedLogicalHeightRespectingMinMaxHeight(resolveHeightF
orRatio(availableLogicalWidth(), intrinsicSizingInfo.aspectRatio)); |
637 | 637 |
638 // 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'. | 638 // 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'. |
639 if (intrinsicSizingInfo.hasHeight) | 639 if (intrinsicSizingInfo.hasHeight) |
640 return computeReplacedLogicalHeightRespectingMinMaxHeight(LayoutUnit(con
strainedSize.height())); | 640 return computeReplacedLogicalHeightRespectingMinMaxHeight(LayoutUnit(con
strainedSize.height())); |
641 | 641 |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
752 // We only include the space below the baseline in our layer's cached paint
invalidation rect if the | 752 // We only include the space below the baseline in our layer's cached paint
invalidation rect if the |
753 // image is selected. Since the selection state has changed update the rect. | 753 // image is selected. Since the selection state has changed update the rect. |
754 if (hasLayer()) | 754 if (hasLayer()) |
755 setPreviousPaintInvalidationRect(boundsRectForPaintInvalidation(containe
rForPaintInvalidation())); | 755 setPreviousPaintInvalidationRect(boundsRectForPaintInvalidation(containe
rForPaintInvalidation())); |
756 | 756 |
757 if (canUpdateSelectionOnRootLineBoxes()) | 757 if (canUpdateSelectionOnRootLineBoxes()) |
758 inlineBoxWrapper()->root().setHasSelectedChildren(state != SelectionNone
); | 758 inlineBoxWrapper()->root().setHasSelectedChildren(state != SelectionNone
); |
759 } | 759 } |
760 | 760 |
761 } // namespace blink | 761 } // namespace blink |
OLD | NEW |