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 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 return; | 229 return; |
230 | 230 |
231 bool shouldRepaint = true; | 231 bool shouldRepaint = true; |
232 if (intrinsicSizeChanged) { | 232 if (intrinsicSizeChanged) { |
233 if (!preferredLogicalWidthsDirty()) | 233 if (!preferredLogicalWidthsDirty()) |
234 setPreferredLogicalWidthsDirty(); | 234 setPreferredLogicalWidthsDirty(); |
235 | 235 |
236 bool hasOverrideSize = hasOverrideHeight() || hasOverrideWidth(); | 236 bool hasOverrideSize = hasOverrideHeight() || hasOverrideWidth(); |
237 if (!hasOverrideSize && !imageSizeChanged) { | 237 if (!hasOverrideSize && !imageSizeChanged) { |
238 LogicalExtentComputedValues computedValues; | 238 LogicalExtentComputedValues computedValues; |
239 computeLogicalWidthInRegion(computedValues); | 239 computeLogicalWidth(computedValues); |
240 LayoutUnit newWidth = computedValues.m_extent; | 240 LayoutUnit newWidth = computedValues.m_extent; |
241 computeLogicalHeight(height(), 0, computedValues); | 241 computeLogicalHeight(height(), 0, computedValues); |
242 LayoutUnit newHeight = computedValues.m_extent; | 242 LayoutUnit newHeight = computedValues.m_extent; |
243 | 243 |
244 imageSizeChanged = width() != newWidth || height() != newHeight; | 244 imageSizeChanged = width() != newWidth || height() != newHeight; |
245 } | 245 } |
246 | 246 |
247 // FIXME: We only need to recompute the containing block's preferred siz
e | 247 // FIXME: We only need to recompute the containing block's preferred siz
e |
248 // if the containing block's size depends on the image's size (i.e., the
container uses shrink-to-fit sizing). | 248 // if the containing block's size depends on the image's size (i.e., the
container uses shrink-to-fit sizing). |
249 // There's no easy way to detect that shrink-to-fit is needed, always fo
rce a layout. | 249 // There's no easy way to detect that shrink-to-fit is needed, always fo
rce a layout. |
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
646 return 0; | 646 return 0; |
647 | 647 |
648 ImageResource* cachedImage = m_imageResource->cachedImage(); | 648 ImageResource* cachedImage = m_imageResource->cachedImage(); |
649 if (cachedImage && cachedImage->image() && cachedImage->image()->isSVGImage(
)) | 649 if (cachedImage && cachedImage->image() && cachedImage->image()->isSVGImage(
)) |
650 return toSVGImage(cachedImage->image())->embeddedContentBox(); | 650 return toSVGImage(cachedImage->image())->embeddedContentBox(); |
651 | 651 |
652 return 0; | 652 return 0; |
653 } | 653 } |
654 | 654 |
655 } // namespace WebCore | 655 } // namespace WebCore |
OLD | NEW |