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

Side by Side Diff: Source/core/css/resolver/StyleResourceLoader.cpp

Issue 47923008: Block execution of failed 'crossorigin' <script>s. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased Created 7 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « Source/core/css/CSSImageValue.cpp ('k') | Source/core/dom/ScriptLoader.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
4 * Copyright (C) 2013 Google Inc. All rights reserved. 4 * Copyright (C) 2013 Google Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 return; 109 return;
110 110
111 StyleImage* image = shapeValue->image(); 111 StyleImage* image = shapeValue->image();
112 if (!image || !image->isPendingImage()) 112 if (!image || !image->isPendingImage())
113 return; 113 return;
114 114
115 StylePendingImage* pendingImage = toStylePendingImage(image); 115 StylePendingImage* pendingImage = toStylePendingImage(image);
116 CSSImageValue* cssImageValue = pendingImage->cssImageValue(); 116 CSSImageValue* cssImageValue = pendingImage->cssImageValue();
117 117
118 ResourceLoaderOptions options = ResourceFetcher::defaultResourceOptions(); 118 ResourceLoaderOptions options = ResourceFetcher::defaultResourceOptions();
119 options.requestOriginPolicy = PotentiallyCrossOriginEnabled;
120 options.allowCredentials = DoNotAllowStoredCredentials; 119 options.allowCredentials = DoNotAllowStoredCredentials;
121 120
122 shapeValue->setImage(cssImageValue->cachedImage(m_fetcher, options)); 121 shapeValue->setImage(cssImageValue->cachedImage(m_fetcher, options, Potentia llyCORSEnabled));
123 } 122 }
124 123
125 void StyleResourceLoader::loadPendingImages(RenderStyle* style, const ElementSty leResources& elementStyleResources) 124 void StyleResourceLoader::loadPendingImages(RenderStyle* style, const ElementSty leResources& elementStyleResources)
126 { 125 {
127 if (elementStyleResources.pendingImageProperties().isEmpty()) 126 if (elementStyleResources.pendingImageProperties().isEmpty())
128 return; 127 return;
129 128
130 PendingImagePropertyMap::const_iterator::Keys end = elementStyleResources.pe ndingImageProperties().end().keys(); 129 PendingImagePropertyMap::const_iterator::Keys end = elementStyleResources.pe ndingImageProperties().end().keys();
131 for (PendingImagePropertyMap::const_iterator::Keys it = elementStyleResource s.pendingImageProperties().begin().keys(); it != end; ++it) { 130 for (PendingImagePropertyMap::const_iterator::Keys it = elementStyleResource s.pendingImageProperties().begin().keys(); it != end; ++it) {
132 CSSPropertyID currentProperty = *it; 131 CSSPropertyID currentProperty = *it;
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 loadPendingImages(renderStyle, elementStyleResources); 248 loadPendingImages(renderStyle, elementStyleResources);
250 249
251 // Start loading the shaders referenced by this style. 250 // Start loading the shaders referenced by this style.
252 loadPendingShaders(renderStyle, elementStyleResources); 251 loadPendingShaders(renderStyle, elementStyleResources);
253 252
254 // Start loading the SVG Documents referenced by this style. 253 // Start loading the SVG Documents referenced by this style.
255 loadPendingSVGDocuments(renderStyle, elementStyleResources); 254 loadPendingSVGDocuments(renderStyle, elementStyleResources);
256 } 255 }
257 256
258 } 257 }
OLDNEW
« no previous file with comments | « Source/core/css/CSSImageValue.cpp ('k') | Source/core/dom/ScriptLoader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698