| 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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 continue; | 127 continue; |
| 128 | 128 |
| 129 // Stash the DocumentResource on the reference filter. | 129 // Stash the DocumentResource on the reference filter. |
| 130 ReferenceFilterBuilder::setDocumentResourceReference(referenceFilter
, adoptPtr(new DocumentResourceReference(resource))); | 130 ReferenceFilterBuilder::setDocumentResourceReference(referenceFilter
, adoptPtr(new DocumentResourceReference(resource))); |
| 131 } | 131 } |
| 132 } | 132 } |
| 133 } | 133 } |
| 134 | 134 |
| 135 RawPtr<StyleImage> ElementStyleResources::loadPendingImage(StylePendingImage* pe
ndingImage, CrossOriginAttributeValue crossOrigin) | 135 RawPtr<StyleImage> ElementStyleResources::loadPendingImage(StylePendingImage* pe
ndingImage, CrossOriginAttributeValue crossOrigin) |
| 136 { | 136 { |
| 137 if (CSSImageValue* imageValue = pendingImage->cssImageValue()) { | 137 if (CSSImageValue* imageValue = pendingImage->cssImageValue()) |
| 138 if (RawPtr<StyleImage> cachedImage = imageValue->cacheImage(m_document,
crossOrigin)) | 138 return imageValue->cacheImage(m_document, crossOrigin); |
| 139 return cachedImage.release(); | |
| 140 return StyleInvalidImage::create(imageValue->url()); | |
| 141 } | |
| 142 | 139 |
| 143 if (CSSImageGeneratorValue* imageGeneratorValue = pendingImage->cssImageGene
ratorValue()) { | 140 if (CSSImageGeneratorValue* imageGeneratorValue = pendingImage->cssImageGene
ratorValue()) { |
| 144 imageGeneratorValue->loadSubimages(m_document); | 141 imageGeneratorValue->loadSubimages(m_document); |
| 145 return StyleGeneratedImage::create(*imageGeneratorValue); | 142 return StyleGeneratedImage::create(*imageGeneratorValue); |
| 146 } | 143 } |
| 147 | 144 |
| 148 if (CSSCursorImageValue* cursorImageValue = pendingImage->cssCursorImageValu
e()) | 145 if (CSSCursorImageValue* cursorImageValue = pendingImage->cssCursorImageValu
e()) |
| 149 return cursorImageValue->cacheImage(m_document, m_deviceScaleFactor); | 146 return cursorImageValue->cacheImage(m_document, m_deviceScaleFactor); |
| 150 | 147 |
| 151 if (CSSImageSetValue* imageSetValue = pendingImage->cssImageSetValue()) | 148 if (CSSImageSetValue* imageSetValue = pendingImage->cssImageSetValue()) |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 } | 245 } |
| 249 } | 246 } |
| 250 | 247 |
| 251 void ElementStyleResources::loadPendingResources(ComputedStyle* computedStyle) | 248 void ElementStyleResources::loadPendingResources(ComputedStyle* computedStyle) |
| 252 { | 249 { |
| 253 loadPendingImages(computedStyle); | 250 loadPendingImages(computedStyle); |
| 254 loadPendingSVGDocuments(computedStyle); | 251 loadPendingSVGDocuments(computedStyle); |
| 255 } | 252 } |
| 256 | 253 |
| 257 } // namespace blink | 254 } // namespace blink |
| OLD | NEW |