| 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) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
| 5 * (C) 2006 Allan Sandfeld Jensen (kde@carewolf.com) | 5 * (C) 2006 Allan Sandfeld Jensen (kde@carewolf.com) |
| 6 * (C) 2006 Samuel Weinig (sam.weinig@gmail.com) | 6 * (C) 2006 Samuel Weinig (sam.weinig@gmail.com) |
| 7 * Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. | 7 * Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. |
| 8 * Copyright (C) 2010 Google Inc. All rights reserved. | 8 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 9 * Copyright (C) Research In Motion Limited 2011-2012. All rights reserved. | 9 * Copyright (C) Research In Motion Limited 2011-2012. All rights reserved. |
| 10 * | 10 * |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 return; | 215 return; |
| 216 | 216 |
| 217 bool shouldRepaint = true; | 217 bool shouldRepaint = true; |
| 218 if (intrinsicSizeChanged) { | 218 if (intrinsicSizeChanged) { |
| 219 if (!preferredLogicalWidthsDirty()) | 219 if (!preferredLogicalWidthsDirty()) |
| 220 setPreferredLogicalWidthsDirty(); | 220 setPreferredLogicalWidthsDirty(); |
| 221 | 221 |
| 222 bool hasOverrideSize = hasOverrideHeight() || hasOverrideWidth(); | 222 bool hasOverrideSize = hasOverrideHeight() || hasOverrideWidth(); |
| 223 if (!hasOverrideSize && !imageSizeChanged) { | 223 if (!hasOverrideSize && !imageSizeChanged) { |
| 224 LogicalExtentComputedValues computedValues; | 224 LogicalExtentComputedValues computedValues; |
| 225 computeLogicalWidthInRegion(computedValues); | 225 computeLogicalWidth(computedValues); |
| 226 LayoutUnit newWidth = computedValues.m_extent; | 226 LayoutUnit newWidth = computedValues.m_extent; |
| 227 computeLogicalHeight(height(), 0, computedValues); | 227 computeLogicalHeight(height(), 0, computedValues); |
| 228 LayoutUnit newHeight = computedValues.m_extent; | 228 LayoutUnit newHeight = computedValues.m_extent; |
| 229 | 229 |
| 230 imageSizeChanged = width() != newWidth || height() != newHeight; | 230 imageSizeChanged = width() != newWidth || height() != newHeight; |
| 231 } | 231 } |
| 232 | 232 |
| 233 // FIXME: We only need to recompute the containing block's preferred siz
e | 233 // FIXME: We only need to recompute the containing block's preferred siz
e |
| 234 // if the containing block's size depends on the image's size (i.e., the
container uses shrink-to-fit sizing). | 234 // if the containing block's size depends on the image's size (i.e., the
container uses shrink-to-fit sizing). |
| 235 // There's no easy way to detect that shrink-to-fit is needed, always fo
rce a layout. | 235 // There's no easy way to detect that shrink-to-fit is needed, always fo
rce a layout. |
| (...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 626 return 0; | 626 return 0; |
| 627 | 627 |
| 628 ImageResource* cachedImage = m_imageResource->cachedImage(); | 628 ImageResource* cachedImage = m_imageResource->cachedImage(); |
| 629 if (cachedImage && cachedImage->image() && cachedImage->image()->isSVGImage(
)) | 629 if (cachedImage && cachedImage->image() && cachedImage->image()->isSVGImage(
)) |
| 630 return toSVGImage(cachedImage->image())->embeddedContentBox(); | 630 return toSVGImage(cachedImage->image())->embeddedContentBox(); |
| 631 | 631 |
| 632 return 0; | 632 return 0; |
| 633 } | 633 } |
| 634 | 634 |
| 635 } // namespace WebCore | 635 } // namespace WebCore |
| OLD | NEW |