| 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 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 417 // As encoded image data can be created from m_image (see | 417 // As encoded image data can be created from m_image (see |
| 418 // ImageResource::resourceBuffer(), we don't have to keep m_data. Let's | 418 // ImageResource::resourceBuffer(), we don't have to keep m_data. Let's |
| 419 // clear this. As for the lifetimes of m_image and m_data, see this | 419 // clear this. As for the lifetimes of m_image and m_data, see this |
| 420 // document: | 420 // document: |
| 421 // https://docs.google.com/document/d/1v0yTAZ6wkqX2U_M6BNIGUJpM1s0TIw1Vsqpxo
L7aciY/edit?usp=sharing | 421 // https://docs.google.com/document/d/1v0yTAZ6wkqX2U_M6BNIGUJpM1s0TIw1Vsqpxo
L7aciY/edit?usp=sharing |
| 422 clearData(); | 422 clearData(); |
| 423 } | 423 } |
| 424 Resource::finish(loadFinishTime); | 424 Resource::finish(loadFinishTime); |
| 425 } | 425 } |
| 426 | 426 |
| 427 void ImageResource::onMemoryDump(WebMemoryDumpLevelOfDetail levelOfDetail, | |
| 428 WebProcessMemoryDump* memoryDump) const { | |
| 429 Resource::onMemoryDump(levelOfDetail, memoryDump); | |
| 430 const String name = getMemoryDumpName() + "/encoded_data"; | |
| 431 if (m_image && !m_image->isNull()) | |
| 432 m_image->data()->onMemoryDump(name, memoryDump); | |
| 433 } | |
| 434 | |
| 435 void ImageResource::error(const ResourceError& error) { | 427 void ImageResource::error(const ResourceError& error) { |
| 436 if (m_multipartParser) | 428 if (m_multipartParser) |
| 437 m_multipartParser->cancel(); | 429 m_multipartParser->cancel(); |
| 438 clear(); | 430 clear(); |
| 439 Resource::error(error); | 431 Resource::error(error); |
| 440 notifyObservers(); | 432 notifyObservers(); |
| 441 } | 433 } |
| 442 | 434 |
| 443 void ImageResource::responseReceived( | 435 void ImageResource::responseReceived( |
| 444 const ResourceResponse& response, | 436 const ResourceResponse& response, |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 586 return response().serviceWorkerResponseType() != | 578 return response().serviceWorkerResponseType() != |
| 587 WebServiceWorkerResponseTypeOpaque; | 579 WebServiceWorkerResponseTypeOpaque; |
| 588 if (!getImage()->currentFrameHasSingleSecurityOrigin()) | 580 if (!getImage()->currentFrameHasSingleSecurityOrigin()) |
| 589 return false; | 581 return false; |
| 590 if (passesAccessControlCheck(securityOrigin)) | 582 if (passesAccessControlCheck(securityOrigin)) |
| 591 return true; | 583 return true; |
| 592 return !securityOrigin->taintsCanvas(response().url()); | 584 return !securityOrigin->taintsCanvas(response().url()); |
| 593 } | 585 } |
| 594 | 586 |
| 595 } // namespace blink | 587 } // namespace blink |
| OLD | NEW |