Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1058)

Unified Diff: Source/core/loader/ImageLoader.cpp

Issue 467533002: Aligned srcset mixedContent blocking to the spec (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Added a separate test Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/http/tests/security/mixedContent/resources/frame-with-insecure-empty-srcset.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/loader/ImageLoader.cpp
diff --git a/Source/core/loader/ImageLoader.cpp b/Source/core/loader/ImageLoader.cpp
index 37af0a02ced31eded5a0cd5460e74bb77025e99b..343f289b415bc433c622204ed3a8daa5505dd4a9 100644
--- a/Source/core/loader/ImageLoader.cpp
+++ b/Source/core/loader/ImageLoader.cpp
@@ -242,7 +242,7 @@ void ImageLoader::doUpdateFromElement(BypassMainWorldBehavior bypassBehavior, Up
// Unlike raw <img>, we block mixed content inside of <picture> or <img srcset>.
ResourceLoaderOptions resourceLoaderOptions = ResourceFetcher::defaultResourceOptions();
ResourceRequest resourceRequest(url);
- if (isHTMLPictureElement(element()->parentNode()) || !element()->fastGetAttribute(HTMLNames::srcsetAttr).isEmpty()) {
+ if (isHTMLPictureElement(element()->parentNode()) || !element()->fastGetAttribute(HTMLNames::srcsetAttr).isNull()) {
resourceLoaderOptions.mixedContentBlockingTreatment = TreatAsActiveContent;
resourceRequest.setRequestContext(WebURLRequest::RequestContextImageSet);
}
« no previous file with comments | « LayoutTests/http/tests/security/mixedContent/resources/frame-with-insecure-empty-srcset.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698