| 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 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 446 DCHECK(m_isSchedulingReload); | 446 DCHECK(m_isSchedulingReload); |
| 447 m_isSchedulingReload = false; | 447 m_isSchedulingReload = false; |
| 448 | 448 |
| 449 fetcher->startLoad(this); | 449 fetcher->startLoad(this); |
| 450 } | 450 } |
| 451 | 451 |
| 452 void ImageResource::onePartInMultipartReceived( | 452 void ImageResource::onePartInMultipartReceived( |
| 453 const ResourceResponse& response) { | 453 const ResourceResponse& response) { |
| 454 DCHECK(m_multipartParser); | 454 DCHECK(m_multipartParser); |
| 455 | 455 |
| 456 setResponse(response); | |
| 457 if (m_multipartParsingState == MultipartParsingState::WaitingForFirstPart) { | 456 if (m_multipartParsingState == MultipartParsingState::WaitingForFirstPart) { |
| 458 // We have nothing to do because we don't have any data. | 457 // We have nothing to do because we don't have any data. |
| 458 setResponse(response); |
| 459 m_multipartParsingState = MultipartParsingState::ParsingFirstPart; | 459 m_multipartParsingState = MultipartParsingState::ParsingFirstPart; |
| 460 return; | 460 return; |
| 461 } | 461 } |
| 462 updateImageAndClearBuffer(); | 462 updateImageAndClearBuffer(); |
| 463 setResponse(response); |
| 463 | 464 |
| 464 if (m_multipartParsingState == MultipartParsingState::ParsingFirstPart) { | 465 if (m_multipartParsingState == MultipartParsingState::ParsingFirstPart) { |
| 465 m_multipartParsingState = MultipartParsingState::FinishedParsingFirstPart; | 466 m_multipartParsingState = MultipartParsingState::FinishedParsingFirstPart; |
| 466 // Notify finished when the first part ends. | 467 // Notify finished when the first part ends. |
| 467 if (!errorOccurred()) | 468 if (!errorOccurred()) |
| 468 setStatus(Cached); | 469 setStatus(Cached); |
| 469 // We notify clients and observers of finish in checkNotify() and | 470 // We notify clients and observers of finish in checkNotify() and |
| 470 // updateImageAndClearBuffer(), respectively, and they will not be | 471 // updateImageAndClearBuffer(), respectively, and they will not be |
| 471 // notified again in Resource::finish()/error(). | 472 // notified again in Resource::finish()/error(). |
| 472 checkNotify(); | 473 checkNotify(); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 502 | 503 |
| 503 const ImageResourceContent* ImageResource::getContent() const { | 504 const ImageResourceContent* ImageResource::getContent() const { |
| 504 return m_content; | 505 return m_content; |
| 505 } | 506 } |
| 506 | 507 |
| 507 ResourcePriority ImageResource::priorityFromObservers() { | 508 ResourcePriority ImageResource::priorityFromObservers() { |
| 508 return getContent()->priorityFromObservers(); | 509 return getContent()->priorityFromObservers(); |
| 509 } | 510 } |
| 510 | 511 |
| 511 } // namespace blink | 512 } // namespace blink |
| OLD | NEW |