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 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
504 } | 504 } |
505 | 505 |
506 if (m_image->animationPolicy() != newPolicy) { | 506 if (m_image->animationPolicy() != newPolicy) { |
507 m_image->resetAnimation(); | 507 m_image->resetAnimation(); |
508 m_image->setAnimationPolicy(newPolicy); | 508 m_image->setAnimationPolicy(newPolicy); |
509 } | 509 } |
510 } | 510 } |
511 | 511 |
512 void ImageResource::reloadIfLoFi(ResourceFetcher* fetcher) | 512 void ImageResource::reloadIfLoFi(ResourceFetcher* fetcher) |
513 { | 513 { |
514 if (!m_response.httpHeaderField("chrome-proxy").contains("q=low")) | 514 if (m_resourceRequest.loFiState() != WebURLRequest::LoFiOn) |
hiroshige
2016/07/07 05:21:58
nit: two whitespaces after |!=|.
megjablon
2016/07/07 19:31:52
Done.
| |
515 return; | |
516 if (isLoaded() && !m_response.httpHeaderField("chrome-proxy").contains("q=lo w")) | |
515 return; | 517 return; |
516 m_resourceRequest.setCachePolicy(WebCachePolicy::BypassingCache); | 518 m_resourceRequest.setCachePolicy(WebCachePolicy::BypassingCache); |
517 m_resourceRequest.setLoFiState(WebURLRequest::LoFiOff); | 519 m_resourceRequest.setLoFiState(WebURLRequest::LoFiOff); |
518 if (isLoading()) | 520 if (isLoading()) |
519 m_loader->cancel(); | 521 m_loader->cancel(); |
520 else | 522 clear(); |
521 updateImageAndClearBuffer(); | 523 m_data.clear(); |
524 notifyObservers(); | |
522 setStatus(NotStarted); | 525 setStatus(NotStarted); |
523 fetcher->startLoad(this); | 526 fetcher->startLoad(this); |
524 } | 527 } |
525 | 528 |
526 void ImageResource::changedInRect(const blink::Image* image, const IntRect& rect ) | 529 void ImageResource::changedInRect(const blink::Image* image, const IntRect& rect ) |
527 { | 530 { |
528 if (!image || image != m_image) | 531 if (!image || image != m_image) |
529 return; | 532 return; |
530 notifyObservers(&rect); | 533 notifyObservers(&rect); |
531 } | 534 } |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
564 if (response().wasFetchedViaServiceWorker()) | 567 if (response().wasFetchedViaServiceWorker()) |
565 return response().serviceWorkerResponseType() != WebServiceWorkerRespons eTypeOpaque; | 568 return response().serviceWorkerResponseType() != WebServiceWorkerRespons eTypeOpaque; |
566 if (!getImage()->currentFrameHasSingleSecurityOrigin()) | 569 if (!getImage()->currentFrameHasSingleSecurityOrigin()) |
567 return false; | 570 return false; |
568 if (passesAccessControlCheck(securityOrigin)) | 571 if (passesAccessControlCheck(securityOrigin)) |
569 return true; | 572 return true; |
570 return !securityOrigin->taintsCanvas(response().url()); | 573 return !securityOrigin->taintsCanvas(response().url()); |
571 } | 574 } |
572 | 575 |
573 } // namespace blink | 576 } // namespace blink |
OLD | NEW |