| OLD | NEW |
| 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 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 | 288 |
| 289 inline void ImageResource::clearImage() | 289 inline void ImageResource::clearImage() |
| 290 { | 290 { |
| 291 // If our Image has an observer, it's always us so we need to clear the back
pointer | 291 // If our Image has an observer, it's always us so we need to clear the back
pointer |
| 292 // before dropping our reference. | 292 // before dropping our reference. |
| 293 if (m_image) | 293 if (m_image) |
| 294 m_image->setImageObserver(nullptr); | 294 m_image->setImageObserver(nullptr); |
| 295 m_image.clear(); | 295 m_image.clear(); |
| 296 } | 296 } |
| 297 | 297 |
| 298 void ImageResource::appendData(const char* data, unsigned length) | 298 void ImageResource::appendData(const char* data, size_t length) |
| 299 { | 299 { |
| 300 Resource::appendData(data, length); | 300 Resource::appendData(data, length); |
| 301 if (!loadingMultipartContent()) | 301 if (!loadingMultipartContent()) |
| 302 updateImage(false); | 302 updateImage(false); |
| 303 } | 303 } |
| 304 | 304 |
| 305 void ImageResource::updateImage(bool allDataReceived) | 305 void ImageResource::updateImage(bool allDataReceived) |
| 306 { | 306 { |
| 307 TRACE_EVENT0("blink", "ImageResource::updateImage"); | 307 TRACE_EVENT0("blink", "ImageResource::updateImage"); |
| 308 | 308 |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 454 return true; | 454 return true; |
| 455 return !securityOrigin->taintsCanvas(response().url()); | 455 return !securityOrigin->taintsCanvas(response().url()); |
| 456 } | 456 } |
| 457 | 457 |
| 458 bool ImageResource::loadingMultipartContent() const | 458 bool ImageResource::loadingMultipartContent() const |
| 459 { | 459 { |
| 460 return m_loader && m_loader->loadingMultipartContent(); | 460 return m_loader && m_loader->loadingMultipartContent(); |
| 461 } | 461 } |
| 462 | 462 |
| 463 } // namespace blink | 463 } // namespace blink |
| OLD | NEW |