Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 108 return; | 108 return; |
| 109 | 109 |
| 110 StyleImage* image = shapeValue->image(); | 110 StyleImage* image = shapeValue->image(); |
| 111 if (!image || !image->isPendingImage()) | 111 if (!image || !image->isPendingImage()) |
| 112 return; | 112 return; |
| 113 | 113 |
| 114 StylePendingImage* pendingImage = static_cast<StylePendingImage*>(image); | 114 StylePendingImage* pendingImage = static_cast<StylePendingImage*>(image); |
| 115 CSSImageValue* cssImageValue = pendingImage->cssImageValue(); | 115 CSSImageValue* cssImageValue = pendingImage->cssImageValue(); |
| 116 | 116 |
| 117 ResourceLoaderOptions options = ResourceFetcher::defaultResourceOptions(); | 117 ResourceLoaderOptions options = ResourceFetcher::defaultResourceOptions(); |
| 118 options.requestOriginPolicy = PotentiallyCrossOriginEnabled; | |
| 119 options.allowCredentials = DoNotAllowStoredCredentials; | 118 options.allowCredentials = DoNotAllowStoredCredentials; |
| 120 | 119 |
| 121 shapeValue->setImage(cssImageValue->cachedImage(m_fetcher, options)); | 120 shapeValue->setImage(cssImageValue->cachedImage(m_fetcher, options, FetchReq uest::UseDefaultOriginRestrictionForType)); |
|
abarth-chromium
2013/11/20 05:12:31
Should setImage take a FetchRequest?
sof
2013/11/20 10:10:31
I could well be misunderstanding, but do you mean
| |
| 122 } | 121 } |
| 123 | 122 |
| 124 void StyleResourceLoader::loadPendingImages(RenderStyle* style, const ElementSty leResources& elementStyleResources) | 123 void StyleResourceLoader::loadPendingImages(RenderStyle* style, const ElementSty leResources& elementStyleResources) |
| 125 { | 124 { |
| 126 if (elementStyleResources.pendingImageProperties().isEmpty()) | 125 if (elementStyleResources.pendingImageProperties().isEmpty()) |
| 127 return; | 126 return; |
| 128 | 127 |
| 129 PendingImagePropertyMap::const_iterator::Keys end = elementStyleResources.pe ndingImageProperties().end().keys(); | 128 PendingImagePropertyMap::const_iterator::Keys end = elementStyleResources.pe ndingImageProperties().end().keys(); |
| 130 for (PendingImagePropertyMap::const_iterator::Keys it = elementStyleResource s.pendingImageProperties().begin().keys(); it != end; ++it) { | 129 for (PendingImagePropertyMap::const_iterator::Keys it = elementStyleResource s.pendingImageProperties().begin().keys(); it != end; ++it) { |
| 131 CSSPropertyID currentProperty = *it; | 130 CSSPropertyID currentProperty = *it; |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 248 loadPendingImages(renderStyle, elementStyleResources); | 247 loadPendingImages(renderStyle, elementStyleResources); |
| 249 | 248 |
| 250 // Start loading the shaders referenced by this style. | 249 // Start loading the shaders referenced by this style. |
| 251 loadPendingShaders(renderStyle, elementStyleResources); | 250 loadPendingShaders(renderStyle, elementStyleResources); |
| 252 | 251 |
| 253 // Start loading the SVG Documents referenced by this style. | 252 // Start loading the SVG Documents referenced by this style. |
| 254 loadPendingSVGDocuments(renderStyle, elementStyleResources); | 253 loadPendingSVGDocuments(renderStyle, elementStyleResources); |
| 255 } | 254 } |
| 256 | 255 |
| 257 } | 256 } |
| OLD | NEW |