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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 continue; | 72 continue; |
73 | 73 |
74 // Stash the DocumentResource on the reference filter. | 74 // Stash the DocumentResource on the reference filter. |
75 ReferenceFilterBuilder::setDocumentResourceReference(referenceFilter
, adoptPtr(new DocumentResourceReference(resource))); | 75 ReferenceFilterBuilder::setDocumentResourceReference(referenceFilter
, adoptPtr(new DocumentResourceReference(resource))); |
76 } | 76 } |
77 } | 77 } |
78 } | 78 } |
79 | 79 |
80 PassRefPtr<StyleImage> StyleResourceLoader::loadPendingImage(StylePendingImage*
pendingImage, float deviceScaleFactor) | 80 PassRefPtr<StyleImage> StyleResourceLoader::loadPendingImage(StylePendingImage*
pendingImage, float deviceScaleFactor) |
81 { | 81 { |
82 if (pendingImage->cssImageValue()) { | 82 if (CSSImageValue* imageValue = pendingImage->cssImageValue()) |
83 CSSImageValue* imageValue = pendingImage->cssImageValue(); | |
84 return imageValue->cachedImage(m_fetcher); | 83 return imageValue->cachedImage(m_fetcher); |
85 } | |
86 | 84 |
87 if (pendingImage->cssImageGeneratorValue()) { | 85 if (CSSImageGeneratorValue* imageGeneratorValue |
88 CSSImageGeneratorValue* imageGeneratorValue = pendingImage->cssImageGene
ratorValue(); | 86 = pendingImage->cssImageGeneratorValue()) { |
89 imageGeneratorValue->loadSubimages(m_fetcher); | 87 imageGeneratorValue->loadSubimages(m_fetcher); |
90 return StyleGeneratedImage::create(imageGeneratorValue); | 88 return StyleGeneratedImage::create(imageGeneratorValue); |
91 } | 89 } |
92 | 90 |
93 if (pendingImage->cssCursorImageValue()) { | 91 if (CSSCursorImageValue* cursorImageValue |
94 CSSCursorImageValue* cursorImageValue = pendingImage->cssCursorImageValu
e(); | 92 = pendingImage->cssCursorImageValue()) |
95 return cursorImageValue->cachedImage(m_fetcher, deviceScaleFactor); | 93 return cursorImageValue->cachedImage(m_fetcher, deviceScaleFactor); |
96 } | |
97 | 94 |
98 if (pendingImage->cssImageSetValue()) { | 95 if (CSSImageSetValue* imageSetValue = pendingImage->cssImageSetValue()) |
99 CSSImageSetValue* imageSetValue = pendingImage->cssImageSetValue(); | |
100 return imageSetValue->cachedImageSet(m_fetcher, deviceScaleFactor); | 96 return imageSetValue->cachedImageSet(m_fetcher, deviceScaleFactor); |
101 } | |
102 | 97 |
103 return 0; | 98 return 0; |
104 } | 99 } |
105 | 100 |
106 void StyleResourceLoader::loadPendingShapeImage(RenderStyle* renderStyle, ShapeV
alue* shapeValue) | 101 void StyleResourceLoader::loadPendingShapeImage(RenderStyle* renderStyle, ShapeV
alue* shapeValue) |
107 { | 102 { |
108 if (!shapeValue) | 103 if (!shapeValue) |
109 return; | 104 return; |
110 | 105 |
111 StyleImage* image = shapeValue->image(); | 106 StyleImage* image = shapeValue->image(); |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 loadPendingImages(renderStyle, elementStyleResources); | 243 loadPendingImages(renderStyle, elementStyleResources); |
249 | 244 |
250 // Start loading the shaders referenced by this style. | 245 // Start loading the shaders referenced by this style. |
251 loadPendingShaders(renderStyle, elementStyleResources); | 246 loadPendingShaders(renderStyle, elementStyleResources); |
252 | 247 |
253 // Start loading the SVG Documents referenced by this style. | 248 // Start loading the SVG Documents referenced by this style. |
254 loadPendingSVGDocuments(renderStyle, elementStyleResources); | 249 loadPendingSVGDocuments(renderStyle, elementStyleResources); |
255 } | 250 } |
256 | 251 |
257 } | 252 } |
OLD | NEW |