| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. |
| 3 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. | 3 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 // sizes. This does NOT differ from size() for GIF, since decoding GIFs | 248 // sizes. This does NOT differ from size() for GIF, since decoding GIFs |
| 249 // composites any smaller frames against previous frames to create full- | 249 // composites any smaller frames against previous frames to create full- |
| 250 // size frames. | 250 // size frames. |
| 251 virtual IntSize frameSizeAtIndex(size_t) const | 251 virtual IntSize frameSizeAtIndex(size_t) const |
| 252 { | 252 { |
| 253 return size(); | 253 return size(); |
| 254 } | 254 } |
| 255 | 255 |
| 256 // Returns whether the size is legal (i.e. not going to result in | 256 // Returns whether the size is legal (i.e. not going to result in |
| 257 // overflow elsewhere). If not, marks decoding as failed. | 257 // overflow elsewhere). If not, marks decoding as failed. |
| 258 virtual bool setSize(unsigned width, unsigned height) | 258 bool setSize(unsigned width, unsigned height) |
| 259 { | 259 { |
| 260 if (isOverSize(width, height)) | 260 if (isOverSize(width, height)) |
| 261 return setFailed(); | 261 return setFailed(); |
| 262 m_size = IntSize(width, height); | 262 m_size = IntSize(width, height); |
| 263 m_sizeAvailable = true; | 263 m_sizeAvailable = true; |
| 264 return true; | 264 return true; |
| 265 } | 265 } |
| 266 | 266 |
| 267 // Lazily-decodes enough of the image to get the frame count (if | 267 // Lazily-decodes enough of the image to get the frame count (if |
| 268 // possible), without decoding the individual frames. | 268 // possible), without decoding the individual frames. |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 396 | 396 |
| 397 IntSize m_size; | 397 IntSize m_size; |
| 398 bool m_sizeAvailable; | 398 bool m_sizeAvailable; |
| 399 bool m_isAllDataReceived; | 399 bool m_isAllDataReceived; |
| 400 bool m_failed; | 400 bool m_failed; |
| 401 }; | 401 }; |
| 402 | 402 |
| 403 } // namespace WebCore | 403 } // namespace WebCore |
| 404 | 404 |
| 405 #endif | 405 #endif |
| OLD | NEW |