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

Side by Side Diff: third_party/WebKit/Source/core/fetch/ImageResource.cpp

Issue 1685353004: Clean up Image::computeIntrinsicDimensions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address nits Created 4 years, 10 months 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) 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 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 return size; 232 return size;
233 233
234 // Don't let images that have a width/height >= 1 shrink below 1 when zoomed . 234 // Don't let images that have a width/height >= 1 shrink below 1 when zoomed .
235 LayoutSize minimumSize(size.width() > LayoutUnit() ? LayoutUnit(1) : LayoutU nit(), 235 LayoutSize minimumSize(size.width() > LayoutUnit() ? LayoutUnit(1) : LayoutU nit(),
236 LayoutUnit(size.height() > LayoutUnit() ? LayoutUnit(1) : LayoutUnit())) ; 236 LayoutUnit(size.height() > LayoutUnit() ? LayoutUnit(1) : LayoutUnit())) ;
237 size.scale(multiplier); 237 size.scale(multiplier);
238 size.clampToMinimumSize(minimumSize); 238 size.clampToMinimumSize(minimumSize);
239 return size; 239 return size;
240 } 240 }
241 241
242 void ImageResource::computeIntrinsicDimensions(Length& intrinsicWidth, Length& i ntrinsicHeight, FloatSize& intrinsicRatio) 242 void ImageResource::computeIntrinsicDimensions(FloatSize& intrinsicSize, FloatSi ze& intrinsicRatio)
243 { 243 {
244 if (m_image) 244 if (m_image)
245 m_image->computeIntrinsicDimensions(intrinsicWidth, intrinsicHeight, int rinsicRatio); 245 m_image->computeIntrinsicDimensions(intrinsicSize, intrinsicRatio);
246 } 246 }
247 247
248 void ImageResource::notifyObservers(const IntRect* changeRect) 248 void ImageResource::notifyObservers(const IntRect* changeRect)
249 { 249 {
250 ResourceClientWalker<ImageResourceClient> w(m_clients); 250 ResourceClientWalker<ImageResourceClient> w(m_clients);
251 while (ImageResourceClient* c = w.next()) 251 while (ImageResourceClient* c = w.next())
252 c->imageChanged(this, changeRect); 252 c->imageChanged(this, changeRect);
253 253
254 ResourceClientWalker<ImageResourceClient> w2(m_finishedClients); 254 ResourceClientWalker<ImageResourceClient> w2(m_finishedClients);
255 while (ImageResourceClient* c = w2.next()) 255 while (ImageResourceClient* c = w2.next())
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 return true; 464 return true;
465 return !securityOrigin->taintsCanvas(response().url()); 465 return !securityOrigin->taintsCanvas(response().url());
466 } 466 }
467 467
468 bool ImageResource::loadingMultipartContent() const 468 bool ImageResource::loadingMultipartContent() const
469 { 469 {
470 return m_loader && m_loader->loadingMultipartContent(); 470 return m_loader && m_loader->loadingMultipartContent();
471 } 471 }
472 472
473 } // namespace blink 473 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/fetch/ImageResource.h ('k') | third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698