Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(60)

Side by Side Diff: sky/engine/core/rendering/RenderImage.cpp

Issue 714783003: Remove some straggling zoom-related code. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/RenderBoxModelObject.cpp ('k') | sky/engine/core/rendering/RenderReplaced.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698