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

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

Issue 2797993007: Show image placeholders on dimension decode error (Closed)
Patch Set: Created 3 years, 8 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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 // Indicates if the ImageResource is currently scheduling a reload, e.g. 153 // Indicates if the ImageResource is currently scheduling a reload, e.g.
154 // because reloadIfLoFi() was called. 154 // because reloadIfLoFi() was called.
155 bool m_isSchedulingReload; 155 bool m_isSchedulingReload;
156 156
157 // Indicates if this ImageResource is either attempting to load a placeholder 157 // Indicates if this ImageResource is either attempting to load a placeholder
158 // image, or is a (possibly broken) placeholder image. 158 // image, or is a (possibly broken) placeholder image.
159 enum class PlaceholderOption { 159 enum class PlaceholderOption {
160 // Do not show or reload placeholder. 160 // Do not show or reload placeholder.
161 DoNotReloadPlaceholder, 161 DoNotReloadPlaceholder,
162 162
163 // Show placeholder, and do not reload.
sclittle 2017/04/06 21:58:06 nit: could you clarify in the comment here that th
164 ShowAndDoNotReloadPlaceholder,
165
163 // Do not show placeholder, reload only when decode error occurs. 166 // Do not show placeholder, reload only when decode error occurs.
164 ReloadPlaceholderOnDecodeError, 167 ReloadPlaceholderOnDecodeError,
165 168
166 // Show placeholder and reload. 169 // Show placeholder and reload.
167 ShowAndReloadPlaceholderAlways, 170 ShowAndReloadPlaceholderAlways,
168 }; 171 };
169 PlaceholderOption m_placeholderOption; 172 PlaceholderOption m_placeholderOption;
170 173
171 Timer<ImageResource> m_flushTimer; 174 Timer<ImageResource> m_flushTimer;
172 double m_lastFlushTime = 0.; 175 double m_lastFlushTime = 0.;
173 }; 176 };
174 177
175 DEFINE_RESOURCE_TYPE_CASTS(Image); 178 DEFINE_RESOURCE_TYPE_CASTS(Image);
176 179
177 } // namespace blink 180 } // namespace blink
178 181
179 #endif 182 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698