| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010 Apple Inc. All rights | 4 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010 Apple Inc. All rights |
| 5 * reserved. | 5 * reserved. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 // Make sure to only decrement the count when we exit this function | 321 // Make sure to only decrement the count when we exit this function |
| 322 std::unique_ptr<IncrementLoadEventDelayCount> load_delay_counter; | 322 std::unique_ptr<IncrementLoadEventDelayCount> load_delay_counter; |
| 323 load_delay_counter.swap(delay_until_do_update_from_element_); | 323 load_delay_counter.swap(delay_until_do_update_from_element_); |
| 324 | 324 |
| 325 Document& document = element_->GetDocument(); | 325 Document& document = element_->GetDocument(); |
| 326 if (!document.IsActive()) | 326 if (!document.IsActive()) |
| 327 return; | 327 return; |
| 328 | 328 |
| 329 AtomicString image_source_url = element_->ImageSourceURL(); | 329 AtomicString image_source_url = element_->ImageSourceURL(); |
| 330 ImageResourceContent* new_image = nullptr; | 330 ImageResourceContent* new_image = nullptr; |
| 331 if (!url.IsNull()) { | 331 if (!url.IsNull() && !url.IsEmpty()) { |
| 332 // Unlike raw <img>, we block mixed content inside of <picture> or | 332 // Unlike raw <img>, we block mixed content inside of <picture> or |
| 333 // <img srcset>. | 333 // <img srcset>. |
| 334 ResourceLoaderOptions resource_loader_options = | 334 ResourceLoaderOptions resource_loader_options = |
| 335 ResourceFetcher::DefaultResourceOptions(); | 335 ResourceFetcher::DefaultResourceOptions(); |
| 336 ResourceRequest resource_request(url); | 336 ResourceRequest resource_request(url); |
| 337 if (update_behavior == kUpdateForcedReload) { | 337 if (update_behavior == kUpdateForcedReload) { |
| 338 resource_request.SetCachePolicy(WebCachePolicy::kBypassingCache); | 338 resource_request.SetCachePolicy(WebCachePolicy::kBypassingCache); |
| 339 resource_request.SetPreviewsState(WebURLRequest::kPreviewsNoTransform); | 339 resource_request.SetPreviewsState(WebURLRequest::kPreviewsNoTransform); |
| 340 } | 340 } |
| 341 | 341 |
| (...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 719 } | 719 } |
| 720 if (delay_until_image_notify_finished_) { | 720 if (delay_until_image_notify_finished_) { |
| 721 delay_until_image_notify_finished_->DocumentChanged( | 721 delay_until_image_notify_finished_->DocumentChanged( |
| 722 element_->GetDocument()); | 722 element_->GetDocument()); |
| 723 } | 723 } |
| 724 ClearFailedLoadURL(); | 724 ClearFailedLoadURL(); |
| 725 ClearImage(); | 725 ClearImage(); |
| 726 } | 726 } |
| 727 | 727 |
| 728 } // namespace blink | 728 } // namespace blink |
| OLD | NEW |