Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) | 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) |
| 3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) | 3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) |
| 4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) | 4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) |
| 5 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) | 5 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) |
| 6 Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. | 6 Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. |
| 7 | 7 |
| 8 This library is free software; you can redistribute it and/or | 8 This library is free software; you can redistribute it and/or |
| 9 modify it under the terms of the GNU Library General Public | 9 modify it under the terms of the GNU Library General Public |
| 10 License as published by the Free Software Foundation; either | 10 License as published by the Free Software Foundation; either |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 221 | 221 |
| 222 if (sizeType == IntrinsicCorrectedToDPR && m_hasDevicePixelRatioHeaderValue && m_devicePixelRatioHeaderValue > 0) | 222 if (sizeType == IntrinsicCorrectedToDPR && m_hasDevicePixelRatioHeaderValue && m_devicePixelRatioHeaderValue > 0) |
| 223 multiplier = 1.0 / m_devicePixelRatioHeaderValue; | 223 multiplier = 1.0 / m_devicePixelRatioHeaderValue; |
| 224 | 224 |
| 225 if (multiplier == 1.0f) | 225 if (multiplier == 1.0f) |
| 226 return size; | 226 return size; |
| 227 | 227 |
| 228 // Don't let images that have a width/height >= 1 shrink below 1 when zoomed . | 228 // Don't let images that have a width/height >= 1 shrink below 1 when zoomed . |
| 229 float widthScale = m_image->hasRelativeSize() ? 1.0f : multiplier; | 229 float widthScale = m_image->hasRelativeSize() ? 1.0f : multiplier; |
| 230 float heightScale = m_image->hasRelativeSize() ? 1.0f : multiplier; | 230 float heightScale = m_image->hasRelativeSize() ? 1.0f : multiplier; |
| 231 LayoutSize minimumSize(size.width() > 0 ? 1 : 0, size.height() > 0 ? 1 : 0); | 231 LayoutSize minimumSize(LayoutUnit(size.width() > 0 ? 1 : 0), LayoutUnit(size .height() > 0 ? 1 : 0)); |
|
eae
2016/01/30 05:18:36
LayoutSize minimumSize(size.width() > LayoutUnit()
leviw_travelin_and_unemployed
2016/01/30 05:36:06
Works for me :)
| |
| 232 size.scale(widthScale, heightScale); | 232 size.scale(widthScale, heightScale); |
| 233 size.clampToMinimumSize(minimumSize); | 233 size.clampToMinimumSize(minimumSize); |
| 234 ASSERT(multiplier != 1.0f || (size.width().fraction() == 0.0f && size.height ().fraction() == 0.0f)); | 234 ASSERT(multiplier != 1.0f || (size.width().fraction() == 0.0f && size.height ().fraction() == 0.0f)); |
| 235 return size; | 235 return size; |
| 236 } | 236 } |
| 237 | 237 |
| 238 void ImageResource::computeIntrinsicDimensions(Length& intrinsicWidth, Length& i ntrinsicHeight, FloatSize& intrinsicRatio) | 238 void ImageResource::computeIntrinsicDimensions(Length& intrinsicWidth, Length& i ntrinsicHeight, FloatSize& intrinsicRatio) |
| 239 { | 239 { |
| 240 if (m_image) | 240 if (m_image) |
| 241 m_image->computeIntrinsicDimensions(intrinsicWidth, intrinsicHeight, int rinsicRatio); | 241 m_image->computeIntrinsicDimensions(intrinsicWidth, intrinsicHeight, int rinsicRatio); |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 446 return true; | 446 return true; |
| 447 return !securityOrigin->taintsCanvas(response().url()); | 447 return !securityOrigin->taintsCanvas(response().url()); |
| 448 } | 448 } |
| 449 | 449 |
| 450 bool ImageResource::loadingMultipartContent() const | 450 bool ImageResource::loadingMultipartContent() const |
| 451 { | 451 { |
| 452 return m_loader && m_loader->loadingMultipartContent(); | 452 return m_loader && m_loader->loadingMultipartContent(); |
| 453 } | 453 } |
| 454 | 454 |
| 455 } // namespace blink | 455 } // namespace blink |
| OLD | NEW |