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

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

Issue 1720853002: Remove Image::computeIntrinsicDimensions() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@add-and-use-updateconcretesize-upload
Patch Set: Avoid using the size of the error image. Null-check in ImageResource saved the day in previous patc… 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) 2006 Samuel Weinig (sam.weinig@gmail.com) 4 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
5 Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. 5 Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 // The device pixel ratio we got from the server for this image, or 1.0. 76 // The device pixel ratio we got from the server for this image, or 1.0.
77 float devicePixelRatioHeaderValue() const { return m_devicePixelRatioHeaderV alue; } 77 float devicePixelRatioHeaderValue() const { return m_devicePixelRatioHeaderV alue; }
78 bool hasDevicePixelRatioHeaderValue() const { return m_hasDevicePixelRatioHe aderValue; } 78 bool hasDevicePixelRatioHeaderValue() const { return m_hasDevicePixelRatioHe aderValue; }
79 79
80 enum SizeType { 80 enum SizeType {
81 IntrinsicSize, // Report the intrinsic size. 81 IntrinsicSize, // Report the intrinsic size.
82 IntrinsicCorrectedToDPR, // Report the intrinsic size corrected to accou nt for image density. 82 IntrinsicCorrectedToDPR, // Report the intrinsic size corrected to accou nt for image density.
83 }; 83 };
84 // This method takes a zoom multiplier that can be used to increase the natu ral size of the image by the zoom. 84 // This method takes a zoom multiplier that can be used to increase the natu ral size of the image by the zoom.
85 LayoutSize imageSize(RespectImageOrientationEnum shouldRespectImageOrientati on, float multiplier, SizeType = IntrinsicSize); 85 LayoutSize imageSize(RespectImageOrientationEnum shouldRespectImageOrientati on, float multiplier, SizeType = IntrinsicSize);
86 void computeIntrinsicDimensions(FloatSize& intrinsicSize, FloatSize& intrins icRatio);
87 86
88 bool isAccessAllowed(SecurityOrigin*); 87 bool isAccessAllowed(SecurityOrigin*);
89 88
90 void updateImageAnimationPolicy(); 89 void updateImageAnimationPolicy();
91 90
92 // If this ImageResource has the Lo-Fi response headers, reload it with 91 // If this ImageResource has the Lo-Fi response headers, reload it with
93 // the Lo-Fi state set to off and bypassing the cache. 92 // the Lo-Fi state set to off and bypassing the cache.
94 void reloadIfLoFi(ResourceFetcher*); 93 void reloadIfLoFi(ResourceFetcher*);
95 94
96 void didAddClient(ResourceClient*) override; 95 void didAddClient(ResourceClient*) override;
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 153
155 RefPtr<blink::Image> m_image; 154 RefPtr<blink::Image> m_image;
156 bool m_hasDevicePixelRatioHeaderValue; 155 bool m_hasDevicePixelRatioHeaderValue;
157 }; 156 };
158 157
159 DEFINE_RESOURCE_TYPE_CASTS(Image); 158 DEFINE_RESOURCE_TYPE_CASTS(Image);
160 159
161 } // namespace blink 160 } // namespace blink
162 161
163 #endif 162 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698