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 402 matching lines...) Loading... | |
413 if (data()) | 413 if (data()) |
414 updateImageAndClearBuffer(); | 414 updateImageAndClearBuffer(); |
415 } else { | 415 } else { |
416 updateImage(true); | 416 updateImage(true); |
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 setEncodedSize(0); | |
haraken
2016/10/05 05:59:39
Would it be better to move setEncodedSize into cle
hajimehoshi
2016/10/05 06:04:31
I agree but hiroshige@ will do this in another CL.
| |
423 } | 424 } |
424 Resource::finish(loadFinishTime); | 425 Resource::finish(loadFinishTime); |
425 } | 426 } |
426 | 427 |
427 void ImageResource::onMemoryDump(WebMemoryDumpLevelOfDetail levelOfDetail, | 428 void ImageResource::onMemoryDump(WebMemoryDumpLevelOfDetail levelOfDetail, |
428 WebProcessMemoryDump* memoryDump) const { | 429 WebProcessMemoryDump* memoryDump) const { |
429 Resource::onMemoryDump(levelOfDetail, memoryDump); | 430 Resource::onMemoryDump(levelOfDetail, memoryDump); |
430 const String name = getMemoryDumpName() + "/encoded_data"; | 431 const String name = getMemoryDumpName() + "/encoded_data"; |
431 if (m_image && !m_image->isNull()) | 432 if (m_image && !m_image->isNull()) |
432 m_image->data()->onMemoryDump(name, memoryDump); | 433 m_image->data()->onMemoryDump(name, memoryDump); |
(...skipping 153 matching lines...) Loading... | |
586 return response().serviceWorkerResponseType() != | 587 return response().serviceWorkerResponseType() != |
587 WebServiceWorkerResponseTypeOpaque; | 588 WebServiceWorkerResponseTypeOpaque; |
588 if (!getImage()->currentFrameHasSingleSecurityOrigin()) | 589 if (!getImage()->currentFrameHasSingleSecurityOrigin()) |
589 return false; | 590 return false; |
590 if (passesAccessControlCheck(securityOrigin)) | 591 if (passesAccessControlCheck(securityOrigin)) |
591 return true; | 592 return true; |
592 return !securityOrigin->taintsCanvas(response().url()); | 593 return !securityOrigin->taintsCanvas(response().url()); |
593 } | 594 } |
594 | 595 |
595 } // namespace blink | 596 } // namespace blink |
OLD | NEW |