| 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 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 | 338 |
| 339 inline void ImageResource::clearImage() | 339 inline void ImageResource::clearImage() |
| 340 { | 340 { |
| 341 // If our Image has an observer, it's always us so we need to clear the back
pointer | 341 // If our Image has an observer, it's always us so we need to clear the back
pointer |
| 342 // before dropping our reference. | 342 // before dropping our reference. |
| 343 if (m_image) | 343 if (m_image) |
| 344 m_image->setImageObserver(0); | 344 m_image->setImageObserver(0); |
| 345 m_image.clear(); | 345 m_image.clear(); |
| 346 } | 346 } |
| 347 | 347 |
| 348 void ImageResource::appendData(const char* data, int length) | 348 void ImageResource::appendData(const char* data, unsigned length) |
| 349 { | 349 { |
| 350 Resource::appendData(data, length); | 350 Resource::appendData(data, length); |
| 351 if (!m_loadingMultipartContent) | 351 if (!m_loadingMultipartContent) |
| 352 updateImage(false); | 352 updateImage(false); |
| 353 } | 353 } |
| 354 | 354 |
| 355 void ImageResource::updateImage(bool allDataReceived) | 355 void ImageResource::updateImage(bool allDataReceived) |
| 356 { | 356 { |
| 357 TRACE_EVENT0("blink", "ImageResource::updateImage"); | 357 TRACE_EVENT0("blink", "ImageResource::updateImage"); |
| 358 | 358 |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 489 bool ImageResource::isAccessAllowed(SecurityOrigin* securityOrigin) | 489 bool ImageResource::isAccessAllowed(SecurityOrigin* securityOrigin) |
| 490 { | 490 { |
| 491 if (!image()->currentFrameHasSingleSecurityOrigin()) | 491 if (!image()->currentFrameHasSingleSecurityOrigin()) |
| 492 return false; | 492 return false; |
| 493 if (passesAccessControlCheck(securityOrigin)) | 493 if (passesAccessControlCheck(securityOrigin)) |
| 494 return true; | 494 return true; |
| 495 return !securityOrigin->taintsCanvas(response().url()); | 495 return !securityOrigin->taintsCanvas(response().url()); |
| 496 } | 496 } |
| 497 | 497 |
| 498 } // namespace blink | 498 } // namespace blink |
| OLD | NEW |