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

Side by Side Diff: sky/engine/core/rendering/RenderReplaced.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
« no previous file with comments | « sky/engine/core/rendering/RenderImage.cpp ('k') | sky/engine/core/rendering/RenderView.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2000 Dirk Mueller (mueller@kde.org) 3 * Copyright (C) 2000 Dirk Mueller (mueller@kde.org)
4 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved. 4 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved.
5 * Copyright (C) Research In Motion Limited 2011-2012. All rights reserved. 5 * Copyright (C) Research In Motion Limited 2011-2012. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 229
230 // Now constrain the intrinsic size along each axis according to minimum and maximum width/heights along the 230 // Now constrain the intrinsic size along each axis according to minimum and maximum width/heights along the
231 // opposite axis. So for example a maximum width that shrinks our width will result in the height we compute here 231 // opposite axis. So for example a maximum width that shrinks our width will result in the height we compute here
232 // having to shrink in order to preserve the aspect ratio. Because we comput e these values independently along 232 // having to shrink in order to preserve the aspect ratio. Because we comput e these values independently along
233 // each axis, the final returned size may in fact not preserve the aspect ra tio. 233 // each axis, the final returned size may in fact not preserve the aspect ra tio.
234 // FIXME: In the long term, it might be better to just return this code more to the way it used to be before this 234 // FIXME: In the long term, it might be better to just return this code more to the way it used to be before this
235 // function was added, since all it has done is make the code more unclear. 235 // function was added, since all it has done is make the code more unclear.
236 constrainedSize = intrinsicSize; 236 constrainedSize = intrinsicSize;
237 if (intrinsicRatio && !intrinsicSize.isEmpty() && style()->logicalWidth().is Auto() && style()->logicalHeight().isAuto()) { 237 if (intrinsicRatio && !intrinsicSize.isEmpty() && style()->logicalWidth().is Auto() && style()->logicalHeight().isAuto()) {
238 // We can't multiply or divide by 'intrinsicRatio' here, it breaks tests , like fast/images/zoomed-img-size.html, which 238 // We can't multiply or divide by 'intrinsicRatio' here, it breaks tests , like fast/images/zoomed-img-size.html, which
239 // can only be fixed once subpixel precision is available for things lik e intrinsicWidth/Height - which include zoom! 239 // can only be fixed once subpixel precision is available for things lik e intrinsicWidth/Height.
240 constrainedSize.setWidth(RenderBox::computeReplacedLogicalHeight() * int rinsicSize.width() / intrinsicSize.height()); 240 constrainedSize.setWidth(RenderBox::computeReplacedLogicalHeight() * int rinsicSize.width() / intrinsicSize.height());
241 constrainedSize.setHeight(RenderBox::computeReplacedLogicalWidth() * int rinsicSize.height() / intrinsicSize.width()); 241 constrainedSize.setHeight(RenderBox::computeReplacedLogicalWidth() * int rinsicSize.height() / intrinsicSize.width());
242 } 242 }
243 } 243 }
244 244
245 LayoutRect RenderReplaced::replacedContentRect(const LayoutSize* overriddenIntri nsicSize) const 245 LayoutRect RenderReplaced::replacedContentRect(const LayoutSize* overriddenIntri nsicSize) const
246 { 246 {
247 LayoutRect contentRect = contentBoxRect(); 247 LayoutRect contentRect = contentBoxRect();
248 ObjectFit objectFit = style()->objectFit(); 248 ObjectFit objectFit = style()->objectFit();
249 249
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 LayoutRect RenderReplaced::clippedOverflowRectForPaintInvalidation(const RenderL ayerModelObject* paintInvalidationContainer, const PaintInvalidationState* paint InvalidationState) const 522 LayoutRect RenderReplaced::clippedOverflowRectForPaintInvalidation(const RenderL ayerModelObject* paintInvalidationContainer, const PaintInvalidationState* paint InvalidationState) const
523 { 523 {
524 // The selectionRect can project outside of the overflowRect, so take their union 524 // The selectionRect can project outside of the overflowRect, so take their union
525 // for paint invalidation to avoid selection painting glitches. 525 // for paint invalidation to avoid selection painting glitches.
526 LayoutRect r = isSelected() ? localSelectionRect() : visualOverflowRect(); 526 LayoutRect r = isSelected() ? localSelectionRect() : visualOverflowRect();
527 mapRectToPaintInvalidationBacking(paintInvalidationContainer, r, paintInvali dationState); 527 mapRectToPaintInvalidationBacking(paintInvalidationContainer, r, paintInvali dationState);
528 return r; 528 return r;
529 } 529 }
530 530
531 } 531 }
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/RenderImage.cpp ('k') | sky/engine/core/rendering/RenderView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698