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

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

Issue 1694263003: Add Image::updateConcreteSize() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@refactor-size-calculation-in
Patch Set: Add some documentation and polish title of test. Created 4 years, 9 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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 } 204 }
205 205
206 bool ImageResource::imageHasRelativeSize() const 206 bool ImageResource::imageHasRelativeSize() const
207 { 207 {
208 if (m_image) 208 if (m_image)
209 return m_image->hasRelativeSize(); 209 return m_image->hasRelativeSize();
210 210
211 return false; 211 return false;
212 } 212 }
213 213
214 void ImageResource::updateConcreteObjectSize(const LayoutSize& defaultObjectSize )
215 {
216 if (!m_image)
217 return;
218
219 m_image->updateConcreteObjectSize(defaultObjectSize);
220 }
221
214 LayoutSize ImageResource::imageSize(RespectImageOrientationEnum shouldRespectIma geOrientation, float multiplier, SizeType sizeType) 222 LayoutSize ImageResource::imageSize(RespectImageOrientationEnum shouldRespectIma geOrientation, float multiplier, SizeType sizeType)
215 { 223 {
216 ASSERT(!isPurgeable()); 224 ASSERT(!isPurgeable());
217 225
218 if (!m_image) 226 if (!m_image)
219 return LayoutSize(); 227 return LayoutSize();
220 228
221 LayoutSize size; 229 LayoutSize size;
222 230
223 if (m_image->isBitmapImage() && shouldRespectImageOrientation == RespectImag eOrientation) 231 if (m_image->isBitmapImage() && shouldRespectImageOrientation == RespectImag eOrientation)
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 return true; 472 return true;
465 return !securityOrigin->taintsCanvas(response().url()); 473 return !securityOrigin->taintsCanvas(response().url());
466 } 474 }
467 475
468 bool ImageResource::loadingMultipartContent() const 476 bool ImageResource::loadingMultipartContent() const
469 { 477 {
470 return m_loader && m_loader->loadingMultipartContent(); 478 return m_loader && m_loader->loadingMultipartContent();
471 } 479 }
472 480
473 } // namespace blink 481 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698