| 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 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 482 | 482 |
| 483 // Use computed values to calculate the vertical position. | 483 // Use computed values to calculate the vertical position. |
| 484 LayoutUnit logicalTopPos = logicalTopValue + marginBeforeAlias; | 484 LayoutUnit logicalTopPos = logicalTopValue + marginBeforeAlias; |
| 485 computeLogicalTopPositionedOffset(logicalTopPos, this, computedValues.m_exte
nt, containerBlock, containerLogicalHeight); | 485 computeLogicalTopPositionedOffset(logicalTopPos, this, computedValues.m_exte
nt, containerBlock, containerLogicalHeight); |
| 486 computedValues.m_position = logicalTopPos; | 486 computedValues.m_position = logicalTopPos; |
| 487 } | 487 } |
| 488 | 488 |
| 489 LayoutRect LayoutReplaced::replacedContentRect(const LayoutSize* overriddenIntri
nsicSize) const | 489 LayoutRect LayoutReplaced::replacedContentRect(const LayoutSize* overriddenIntri
nsicSize) const |
| 490 { | 490 { |
| 491 LayoutRect contentRect = contentBoxRect(); | 491 LayoutRect contentRect = contentBoxRect(); |
| 492 ObjectFit objectFit = style()->objectFit(); | 492 ObjectFit objectFit = style()->getObjectFit(); |
| 493 | 493 |
| 494 if (objectFit == ObjectFitFill && style()->objectPosition() == ComputedStyle
::initialObjectPosition()) { | 494 if (objectFit == ObjectFitFill && style()->objectPosition() == ComputedStyle
::initialObjectPosition()) { |
| 495 return contentRect; | 495 return contentRect; |
| 496 } | 496 } |
| 497 | 497 |
| 498 // TODO(davve): intrinsicSize doubles as both intrinsic size and intrinsic r
atio. In the case of | 498 // TODO(davve): intrinsicSize doubles as both intrinsic size and intrinsic r
atio. In the case of |
| 499 // SVG images this isn't correct since they can have intrinsic ratio but no
intrinsic size. In | 499 // SVG images this isn't correct since they can have intrinsic ratio but no
intrinsic size. In |
| 500 // order to maintain aspect ratio, the intrinsic size for SVG might be faked
from the aspect | 500 // order to maintain aspect ratio, the intrinsic size for SVG might be faked
from the aspect |
| 501 // ratio, see SVGImage::containerSize(). | 501 // ratio, see SVGImage::containerSize(). |
| 502 LayoutSize intrinsicSize = overriddenIntrinsicSize ? *overriddenIntrinsicSiz
e : this->intrinsicSize(); | 502 LayoutSize intrinsicSize = overriddenIntrinsicSize ? *overriddenIntrinsicSiz
e : this->intrinsicSize(); |
| (...skipping 249 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 |