| 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 = pendingImage->cssImageGene
ratorValue()) { |
| 88 CSSImageGeneratorValue* imageGeneratorValue = pendingImage->cssImageGene
ratorValue(); | |
| 89 imageGeneratorValue->loadSubimages(m_fetcher); | 86 imageGeneratorValue->loadSubimages(m_fetcher); |
| 90 return StyleGeneratedImage::create(imageGeneratorValue); | 87 return StyleGeneratedImage::create(imageGeneratorValue); |
| 91 } | 88 } |
| 92 | 89 |
| 93 if (pendingImage->cssCursorImageValue()) { | 90 if (CSSCursorImageValue* cursorImageValue = pendingImage->cssCursorImageValu
e()) |
| 94 CSSCursorImageValue* cursorImageValue = pendingImage->cssCursorImageValu
e(); | |
| 95 return cursorImageValue->cachedImage(m_fetcher, deviceScaleFactor); | 91 return cursorImageValue->cachedImage(m_fetcher, deviceScaleFactor); |
| 96 } | |
| 97 | 92 |
| 98 if (pendingImage->cssImageSetValue()) { | 93 if (CSSImageSetValue* imageSetValue = pendingImage->cssImageSetValue()) |
| 99 CSSImageSetValue* imageSetValue = pendingImage->cssImageSetValue(); | |
| 100 return imageSetValue->cachedImageSet(m_fetcher, deviceScaleFactor); | 94 return imageSetValue->cachedImageSet(m_fetcher, deviceScaleFactor); |
| 101 } | |
| 102 | 95 |
| 103 return 0; | 96 return 0; |
| 104 } | 97 } |
| 105 | 98 |
| 106 void StyleResourceLoader::loadPendingShapeImage(RenderStyle* renderStyle, ShapeV
alue* shapeValue) | 99 void StyleResourceLoader::loadPendingShapeImage(RenderStyle* renderStyle, ShapeV
alue* shapeValue) |
| 107 { | 100 { |
| 108 if (!shapeValue) | 101 if (!shapeValue) |
| 109 return; | 102 return; |
| 110 | 103 |
| 111 StyleImage* image = shapeValue->image(); | 104 StyleImage* image = shapeValue->image(); |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 loadPendingImages(renderStyle, elementStyleResources); | 241 loadPendingImages(renderStyle, elementStyleResources); |
| 249 | 242 |
| 250 // Start loading the shaders referenced by this style. | 243 // Start loading the shaders referenced by this style. |
| 251 loadPendingShaders(renderStyle, elementStyleResources); | 244 loadPendingShaders(renderStyle, elementStyleResources); |
| 252 | 245 |
| 253 // Start loading the SVG Documents referenced by this style. | 246 // Start loading the SVG Documents referenced by this style. |
| 254 loadPendingSVGDocuments(renderStyle, elementStyleResources); | 247 loadPendingSVGDocuments(renderStyle, elementStyleResources); |
| 255 } | 248 } |
| 256 | 249 |
| 257 } | 250 } |
| OLD | NEW |