Chromium Code Reviews

Side by Side Diff: third_party/WebKit/Source/core/layout/ImageQualityController.cpp

Issue 1732563007: [NOT FOR COMMIT] Pass defaultObjectSize to get image size (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 186 matching lines...)
197 m_liveResizeOptimizationIsActive = true; 197 m_liveResizeOptimizationIsActive = true;
198 return true; 198 return true;
199 } 199 }
200 if (m_liveResizeOptimizationIsActive) { 200 if (m_liveResizeOptimizationIsActive) {
201 // Live resize has ended, paint in HQ and remove this object from th e list. 201 // Live resize has ended, paint in HQ and remove this object from th e list.
202 removeLayer(object, innerMap, layer); 202 removeLayer(object, innerMap, layer);
203 return false; 203 return false;
204 } 204 }
205 } 205 }
206 206
207 if (layoutSize == image->size()) { 207 if (layoutSize == image->defaultConcreteObjectSize()) {
208 // There is no scale in effect. If we had a scale in effect before, we c an just remove this object from the list. 208 // There is no scale in effect. If we had a scale in effect before, we c an just remove this object from the list.
209 removeLayer(object, innerMap, layer); 209 removeLayer(object, innerMap, layer);
210 return false; 210 return false;
211 } 211 }
212 212
213 // If an animated resize is active for this object, paint in low quality and kick the timer ahead. 213 // If an animated resize is active for this object, paint in low quality and kick the timer ahead.
214 if (objectIsResizing) { 214 if (objectIsResizing) {
215 bool sizesChanged = oldSize != layoutSize; 215 bool sizesChanged = oldSize != layoutSize;
216 set(object, innerMap, layer, layoutSize, sizesChanged); 216 set(object, innerMap, layer, layoutSize, sizesChanged);
217 if (sizesChanged) 217 if (sizesChanged)
(...skipping 16 matching lines...)
234 } 234 }
235 // This object has been resized to two different sizes while the timer 235 // This object has been resized to two different sizes while the timer
236 // is active, so draw at low quality, set the flag for animated resizes and 236 // is active, so draw at low quality, set the flag for animated resizes and
237 // the object to the list for high quality redraw. 237 // the object to the list for high quality redraw.
238 set(object, innerMap, layer, layoutSize, true); 238 set(object, innerMap, layer, layoutSize, true);
239 restartTimer(); 239 restartTimer();
240 return true; 240 return true;
241 } 241 }
242 242
243 } // namespace blink 243 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/input/EventHandler.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine