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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 { | 71 { |
72 } | 72 } |
73 | 73 |
74 void LayoutImage::willBeDestroyed() | 74 void LayoutImage::willBeDestroyed() |
75 { | 75 { |
76 ASSERT(m_imageResource); | 76 ASSERT(m_imageResource); |
77 m_imageResource->shutdown(); | 77 m_imageResource->shutdown(); |
78 LayoutReplaced::willBeDestroyed(); | 78 LayoutReplaced::willBeDestroyed(); |
79 } | 79 } |
80 | 80 |
| 81 void LayoutImage::styleDidChange(StyleDifference diff, const ComputedStyle* oldS
tyle) |
| 82 { |
| 83 LayoutReplaced::styleDidChange(diff, oldStyle); |
| 84 |
| 85 RespectImageOrientationEnum oldOrientation = oldStyle ? oldStyle->respectIma
geOrientation() : ComputedStyle::initialRespectImageOrientation(); |
| 86 if (style() && style()->respectImageOrientation() != oldOrientation) |
| 87 intrinsicSizeChanged(); |
| 88 } |
| 89 |
81 void LayoutImage::setImageResource(PassOwnPtr<LayoutImageResource> imageResource
) | 90 void LayoutImage::setImageResource(PassOwnPtr<LayoutImageResource> imageResource
) |
82 { | 91 { |
83 ASSERT(!m_imageResource); | 92 ASSERT(!m_imageResource); |
84 m_imageResource = imageResource; | 93 m_imageResource = imageResource; |
85 m_imageResource->initialize(this); | 94 m_imageResource->initialize(this); |
86 } | 95 } |
87 | 96 |
88 void LayoutImage::imageChanged(WrappedImagePtr newImage, const IntRect* rect) | 97 void LayoutImage::imageChanged(WrappedImagePtr newImage, const IntRect* rect) |
89 { | 98 { |
90 if (documentBeingDestroyed()) | 99 if (documentBeingDestroyed()) |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
353 return nullptr; | 362 return nullptr; |
354 | 363 |
355 ImageResource* cachedImage = m_imageResource->cachedImage(); | 364 ImageResource* cachedImage = m_imageResource->cachedImage(); |
356 if (cachedImage && cachedImage->image() && cachedImage->image()->isSVGImage(
)) | 365 if (cachedImage && cachedImage->image() && cachedImage->image()->isSVGImage(
)) |
357 return toSVGImage(cachedImage->image())->embeddedContentBox(); | 366 return toSVGImage(cachedImage->image())->embeddedContentBox(); |
358 | 367 |
359 return nullptr; | 368 return nullptr; |
360 } | 369 } |
361 | 370 |
362 } // namespace blink | 371 } // namespace blink |
OLD | NEW |