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 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
429 if (data()) | 429 if (data()) |
430 updateImageAndClearBuffer(); | 430 updateImageAndClearBuffer(); |
431 } else { | 431 } else { |
432 updateImage(true); | 432 updateImage(true); |
433 // As encoded image data can be created from m_image (see | 433 // As encoded image data can be created from m_image (see |
434 // ImageResource::resourceBuffer(), we don't have to keep m_data. Let's | 434 // ImageResource::resourceBuffer(), we don't have to keep m_data. Let's |
435 // clear this. As for the lifetimes of m_image and m_data, see this | 435 // clear this. As for the lifetimes of m_image and m_data, see this |
436 // document: | 436 // document: |
437 // https://docs.google.com/document/d/1v0yTAZ6wkqX2U_M6BNIGUJpM1s0TIw1Vsqpxo
L7aciY/edit?usp=sharing | 437 // https://docs.google.com/document/d/1v0yTAZ6wkqX2U_M6BNIGUJpM1s0TIw1Vsqpxo
L7aciY/edit?usp=sharing |
438 clearData(); | 438 clearData(); |
| 439 setEncodedSizeMemoryUsage(0); |
439 } | 440 } |
440 Resource::finish(loadFinishTime); | 441 Resource::finish(loadFinishTime); |
441 } | 442 } |
442 | 443 |
443 void ImageResource::error(const ResourceError& error) { | 444 void ImageResource::error(const ResourceError& error) { |
444 if (m_multipartParser) | 445 if (m_multipartParser) |
445 m_multipartParser->cancel(); | 446 m_multipartParser->cancel(); |
446 clear(); | 447 clear(); |
447 Resource::error(error); | 448 Resource::error(error); |
448 notifyObservers(); | 449 notifyObservers(); |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
613 WebServiceWorkerResponseTypeOpaque; | 614 WebServiceWorkerResponseTypeOpaque; |
614 } | 615 } |
615 if (!getImage()->currentFrameHasSingleSecurityOrigin()) | 616 if (!getImage()->currentFrameHasSingleSecurityOrigin()) |
616 return false; | 617 return false; |
617 if (passesAccessControlCheck(securityOrigin)) | 618 if (passesAccessControlCheck(securityOrigin)) |
618 return true; | 619 return true; |
619 return !securityOrigin->taintsCanvas(response().url()); | 620 return !securityOrigin->taintsCanvas(response().url()); |
620 } | 621 } |
621 | 622 |
622 } // namespace blink | 623 } // namespace blink |
OLD | NEW |