| 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 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 531 } | 531 } |
| 532 updateImageAndClearBuffer(); | 532 updateImageAndClearBuffer(); |
| 533 | 533 |
| 534 if (m_multipartParsingState == MultipartParsingState::ParsingFirstPart) { | 534 if (m_multipartParsingState == MultipartParsingState::ParsingFirstPart) { |
| 535 m_multipartParsingState = MultipartParsingState::FinishedParsingFirstPar
t; | 535 m_multipartParsingState = MultipartParsingState::FinishedParsingFirstPar
t; |
| 536 // Notify finished when the first part ends. | 536 // Notify finished when the first part ends. |
| 537 if (!errorOccurred()) | 537 if (!errorOccurred()) |
| 538 setStatus(Cached); | 538 setStatus(Cached); |
| 539 checkNotify(); | 539 checkNotify(); |
| 540 if (m_loader) | 540 if (m_loader) |
| 541 m_loader->didFinishLoadingOnePart(0, WebURLLoaderClient::kUnknownEnc
odedDataLength); | 541 m_loader->didFinishLoadingFirstPartInMultipart(); |
| 542 } | 542 } |
| 543 } | 543 } |
| 544 | 544 |
| 545 void ImageResource::multipartDataReceived(const char* bytes, size_t size) | 545 void ImageResource::multipartDataReceived(const char* bytes, size_t size) |
| 546 { | 546 { |
| 547 ASSERT(m_multipartParser); | 547 ASSERT(m_multipartParser); |
| 548 Resource::appendData(bytes, size); | 548 Resource::appendData(bytes, size); |
| 549 } | 549 } |
| 550 | 550 |
| 551 bool ImageResource::isAccessAllowed(SecurityOrigin* securityOrigin) | 551 bool ImageResource::isAccessAllowed(SecurityOrigin* securityOrigin) |
| 552 { | 552 { |
| 553 if (response().wasFetchedViaServiceWorker()) | 553 if (response().wasFetchedViaServiceWorker()) |
| 554 return response().serviceWorkerResponseType() != WebServiceWorkerRespons
eTypeOpaque; | 554 return response().serviceWorkerResponseType() != WebServiceWorkerRespons
eTypeOpaque; |
| 555 if (!getImage()->currentFrameHasSingleSecurityOrigin()) | 555 if (!getImage()->currentFrameHasSingleSecurityOrigin()) |
| 556 return false; | 556 return false; |
| 557 if (passesAccessControlCheck(securityOrigin)) | 557 if (passesAccessControlCheck(securityOrigin)) |
| 558 return true; | 558 return true; |
| 559 return !securityOrigin->taintsCanvas(response().url()); | 559 return !securityOrigin->taintsCanvas(response().url()); |
| 560 } | 560 } |
| 561 | 561 |
| 562 } // namespace blink | 562 } // namespace blink |
| OLD | NEW |