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 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
373 memoryCache()->remove(this); | 373 memoryCache()->remove(this); |
374 return; | 374 return; |
375 } | 375 } |
376 | 376 |
377 // It would be nice to only redraw the decoded band of the image, but wi
th the current design | 377 // It would be nice to only redraw the decoded band of the image, but wi
th the current design |
378 // (decoding delayed until painting) that seems hard. | 378 // (decoding delayed until painting) that seems hard. |
379 notifyObservers(); | 379 notifyObservers(); |
380 } | 380 } |
381 } | 381 } |
382 | 382 |
| 383 void ImageResource::updateBitmapImages(HashSet<ImageResource*>& images, bool red
ecodeImages) |
| 384 { |
| 385 for (HashSet<ImageResource*>::iterator it = images.begin(); it != images.end
(); ++it) { |
| 386 ImageResource* imageResource = *it; |
| 387 if (!imageResource->hasImage() || imageResource->image()->isNull()) |
| 388 continue; |
| 389 BitmapImage* image = toBitmapImage(imageResource->image()); |
| 390 if (redecodeImages) |
| 391 image->resetDecoder(); |
| 392 imageResource->updateImage(image->isAllDataReceived()); |
| 393 } |
| 394 } |
| 395 |
383 void ImageResource::finishOnePart() | 396 void ImageResource::finishOnePart() |
384 { | 397 { |
385 if (m_loadingMultipartContent) | 398 if (m_loadingMultipartContent) |
386 clear(); | 399 clear(); |
387 updateImage(true); | 400 updateImage(true); |
388 if (m_loadingMultipartContent) | 401 if (m_loadingMultipartContent) |
389 m_data.clear(); | 402 m_data.clear(); |
390 Resource::finishOnePart(); | 403 Resource::finishOnePart(); |
391 } | 404 } |
392 | 405 |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
467 bool ImageResource::isAccessAllowed(SecurityOrigin* securityOrigin) | 480 bool ImageResource::isAccessAllowed(SecurityOrigin* securityOrigin) |
468 { | 481 { |
469 if (!image()->currentFrameHasSingleSecurityOrigin()) | 482 if (!image()->currentFrameHasSingleSecurityOrigin()) |
470 return false; | 483 return false; |
471 if (passesAccessControlCheck(securityOrigin)) | 484 if (passesAccessControlCheck(securityOrigin)) |
472 return true; | 485 return true; |
473 return !securityOrigin->taintsCanvas(response().url()); | 486 return !securityOrigin->taintsCanvas(response().url()); |
474 } | 487 } |
475 | 488 |
476 } // namespace blink | 489 } // namespace blink |
OLD | NEW |