| 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 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 if (everHadLayout() && !selfNeedsLayout()) { | 216 if (everHadLayout() && !selfNeedsLayout()) { |
| 217 // The inner content rectangle is calculated during layout, but may need
an update now | 217 // The inner content rectangle is calculated during layout, but may need
an update now |
| 218 // (unless the box has already been scheduled for layout). In order to c
alculate it, we | 218 // (unless the box has already been scheduled for layout). In order to c
alculate it, we |
| 219 // may need values from the containing block, though, so make sure that
we're not too | 219 // may need values from the containing block, though, so make sure that
we're not too |
| 220 // early. It may be that layout hasn't even taken place once yet. | 220 // early. It may be that layout hasn't even taken place once yet. |
| 221 updateInnerContentRect(); | 221 updateInnerContentRect(); |
| 222 } | 222 } |
| 223 | 223 |
| 224 LayoutRect paintInvalidationRect; | 224 LayoutRect paintInvalidationRect; |
| 225 if (rect) { | 225 if (rect) { |
| 226 // The image changed rect is in source image coordinates (without zoom), | 226 // The image changed rect is in source image coordinates, |
| 227 // so map from the bounds of the image to the contentsBox. | 227 // so map from the bounds of the image to the contentsBox. |
| 228 const LayoutSize imageSizeWithoutZoom = m_imageResource->imageSize(); | 228 paintInvalidationRect = enclosingIntRect(mapRect(*rect, FloatRect(FloatP
oint(), m_imageResource->imageSize()), contentBoxRect())); |
| 229 paintInvalidationRect = enclosingIntRect(mapRect(*rect, FloatRect(FloatP
oint(), imageSizeWithoutZoom), contentBoxRect())); | |
| 230 // Guard against too-large changed rects. | 229 // Guard against too-large changed rects. |
| 231 paintInvalidationRect.intersect(contentBoxRect()); | 230 paintInvalidationRect.intersect(contentBoxRect()); |
| 232 } else { | 231 } else { |
| 233 paintInvalidationRect = contentBoxRect(); | 232 paintInvalidationRect = contentBoxRect(); |
| 234 } | 233 } |
| 235 | 234 |
| 236 { | 235 { |
| 237 // FIXME: We should not be allowing paint invalidations during layout. c
rbug.com/339584 | 236 // FIXME: We should not be allowing paint invalidations during layout. c
rbug.com/339584 |
| 238 AllowPaintInvalidationScope scoper(frameView()); | 237 AllowPaintInvalidationScope scoper(frameView()); |
| 239 DisableCompositingQueryAsserts disabler; | 238 DisableCompositingQueryAsserts disabler; |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 522 return; | 521 return; |
| 523 } | 522 } |
| 524 } | 523 } |
| 525 | 524 |
| 526 bool RenderImage::needsPreferredWidthsRecalculation() const | 525 bool RenderImage::needsPreferredWidthsRecalculation() const |
| 527 { | 526 { |
| 528 return RenderReplaced::needsPreferredWidthsRecalculation(); | 527 return RenderReplaced::needsPreferredWidthsRecalculation(); |
| 529 } | 528 } |
| 530 | 529 |
| 531 } // namespace blink | 530 } // namespace blink |
| OLD | NEW |