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 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 return; | 211 return; |
212 | 212 |
213 bool shouldRepaint = true; | 213 bool shouldRepaint = true; |
214 if (intrinsicSizeChanged) { | 214 if (intrinsicSizeChanged) { |
215 if (!preferredLogicalWidthsDirty()) | 215 if (!preferredLogicalWidthsDirty()) |
216 setPreferredLogicalWidthsDirty(); | 216 setPreferredLogicalWidthsDirty(); |
217 | 217 |
218 bool hasOverrideSize = hasOverrideHeight() || hasOverrideWidth(); | 218 bool hasOverrideSize = hasOverrideHeight() || hasOverrideWidth(); |
219 if (!hasOverrideSize && !imageSizeChanged) { | 219 if (!hasOverrideSize && !imageSizeChanged) { |
220 LogicalExtentComputedValues computedValues; | 220 LogicalExtentComputedValues computedValues; |
221 computeLogicalWidthInRegion(computedValues); | 221 computeLogicalWidth(computedValues); |
222 LayoutUnit newWidth = computedValues.m_extent; | 222 LayoutUnit newWidth = computedValues.m_extent; |
223 computeLogicalHeight(height(), 0, computedValues); | 223 computeLogicalHeight(height(), 0, computedValues); |
224 LayoutUnit newHeight = computedValues.m_extent; | 224 LayoutUnit newHeight = computedValues.m_extent; |
225 | 225 |
226 imageSizeChanged = width() != newWidth || height() != newHeight; | 226 imageSizeChanged = width() != newWidth || height() != newHeight; |
227 } | 227 } |
228 | 228 |
229 // FIXME: We only need to recompute the containing block's preferred siz
e | 229 // FIXME: We only need to recompute the containing block's preferred siz
e |
230 // if the containing block's size depends on the image's size (i.e., the
container uses shrink-to-fit sizing). | 230 // if the containing block's size depends on the image's size (i.e., the
container uses shrink-to-fit sizing). |
231 // There's no easy way to detect that shrink-to-fit is needed, always fo
rce a layout. | 231 // There's no easy way to detect that shrink-to-fit is needed, always fo
rce a layout. |
(...skipping 394 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 |