| 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 469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 480 if (data()) | 480 if (data()) |
| 481 updateImageAndClearBuffer(); | 481 updateImageAndClearBuffer(); |
| 482 } else { | 482 } else { |
| 483 updateImage(true); | 483 updateImage(true); |
| 484 // As encoded image data can be created from m_image (see | 484 // As encoded image data can be created from m_image (see |
| 485 // ImageResource::resourceBuffer(), we don't have to keep m_data. Let's | 485 // ImageResource::resourceBuffer(), we don't have to keep m_data. Let's |
| 486 // clear this. As for the lifetimes of m_image and m_data, see this | 486 // clear this. As for the lifetimes of m_image and m_data, see this |
| 487 // document: | 487 // document: |
| 488 // https://docs.google.com/document/d/1v0yTAZ6wkqX2U_M6BNIGUJpM1s0TIw1Vsqpxo
L7aciY/edit?usp=sharing | 488 // https://docs.google.com/document/d/1v0yTAZ6wkqX2U_M6BNIGUJpM1s0TIw1Vsqpxo
L7aciY/edit?usp=sharing |
| 489 clearData(); | 489 clearData(); |
| 490 setEncodedSizeMemoryUsage(0); | |
| 491 } | 490 } |
| 492 Resource::finish(loadFinishTime); | 491 Resource::finish(loadFinishTime); |
| 493 } | 492 } |
| 494 | 493 |
| 495 void ImageResource::error(const ResourceError& error) { | 494 void ImageResource::error(const ResourceError& error) { |
| 496 if (m_multipartParser) | 495 if (m_multipartParser) |
| 497 m_multipartParser->cancel(); | 496 m_multipartParser->cancel(); |
| 498 clear(); | 497 clear(); |
| 499 Resource::error(error); | 498 Resource::error(error); |
| 500 notifyObservers(); | 499 notifyObservers(); |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 680 WebServiceWorkerResponseTypeOpaque; | 679 WebServiceWorkerResponseTypeOpaque; |
| 681 } | 680 } |
| 682 if (!getImage()->currentFrameHasSingleSecurityOrigin()) | 681 if (!getImage()->currentFrameHasSingleSecurityOrigin()) |
| 683 return false; | 682 return false; |
| 684 if (passesAccessControlCheck(securityOrigin)) | 683 if (passesAccessControlCheck(securityOrigin)) |
| 685 return true; | 684 return true; |
| 686 return !securityOrigin->taintsCanvas(response().url()); | 685 return !securityOrigin->taintsCanvas(response().url()); |
| 687 } | 686 } |
| 688 | 687 |
| 689 } // namespace blink | 688 } // namespace blink |
| OLD | NEW |