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 case CSSPropertyBackgroundImage: { | 127 case CSSPropertyBackgroundImage: { |
128 for (FillLayer* backgroundLayer = &style->accessBackgroundLayers();
backgroundLayer; backgroundLayer = backgroundLayer->next()) { | 128 for (FillLayer* backgroundLayer = &style->accessBackgroundLayers();
backgroundLayer; backgroundLayer = backgroundLayer->next()) { |
129 if (backgroundLayer->image() && backgroundLayer->image()->isPend
ingImage()) | 129 if (backgroundLayer->image() && backgroundLayer->image()->isPend
ingImage()) |
130 backgroundLayer->setImage(loadPendingImage(toStylePendingIma
ge(backgroundLayer->image()), elementStyleResources.deviceScaleFactor())); | 130 backgroundLayer->setImage(loadPendingImage(toStylePendingIma
ge(backgroundLayer->image()), elementStyleResources.deviceScaleFactor())); |
131 } | 131 } |
132 break; | 132 break; |
133 } | 133 } |
134 case CSSPropertyContent: { | 134 case CSSPropertyContent: { |
135 for (ContentData* contentData = const_cast<ContentData*>(style->cont
entData()); contentData; contentData = contentData->next()) { | 135 for (ContentData* contentData = const_cast<ContentData*>(style->cont
entData()); contentData; contentData = contentData->next()) { |
136 if (contentData->isImage()) { | 136 if (contentData->isImage()) { |
137 StyleImage* image = static_cast<ImageContentData*>(contentDa
ta)->image(); | 137 StyleImage* image = toImageContentData(contentData)->image()
; |
138 if (image->isPendingImage()) { | 138 if (image->isPendingImage()) { |
139 RefPtr<StyleImage> loadedImage = loadPendingImage(toStyl
ePendingImage(image), elementStyleResources.deviceScaleFactor()); | 139 RefPtr<StyleImage> loadedImage = loadPendingImage(toStyl
ePendingImage(image), elementStyleResources.deviceScaleFactor()); |
140 if (loadedImage) | 140 if (loadedImage) |
141 static_cast<ImageContentData*>(contentData)->setImag
e(loadedImage.release()); | 141 toImageContentData(contentData)->setImage(loadedImag
e.release()); |
142 } | 142 } |
143 } | 143 } |
144 } | 144 } |
145 break; | 145 break; |
146 } | 146 } |
147 case CSSPropertyCursor: { | 147 case CSSPropertyCursor: { |
148 if (CursorList* cursorList = style->cursors()) { | 148 if (CursorList* cursorList = style->cursors()) { |
149 for (size_t i = 0; i < cursorList->size(); ++i) { | 149 for (size_t i = 0; i < cursorList->size(); ++i) { |
150 CursorData& currentCursor = cursorList->at(i); | 150 CursorData& currentCursor = cursorList->at(i); |
151 if (StyleImage* image = currentCursor.image()) { | 151 if (StyleImage* image = currentCursor.image()) { |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 void StyleResourceLoader::loadPendingResources(RenderStyle* renderStyle, Element
StyleResources& elementStyleResources) | 202 void StyleResourceLoader::loadPendingResources(RenderStyle* renderStyle, Element
StyleResources& elementStyleResources) |
203 { | 203 { |
204 // Start loading images referenced by this style. | 204 // Start loading images referenced by this style. |
205 loadPendingImages(renderStyle, elementStyleResources); | 205 loadPendingImages(renderStyle, elementStyleResources); |
206 | 206 |
207 // Start loading the SVG Documents referenced by this style. | 207 // Start loading the SVG Documents referenced by this style. |
208 loadPendingSVGDocuments(renderStyle, elementStyleResources); | 208 loadPendingSVGDocuments(renderStyle, elementStyleResources); |
209 } | 209 } |
210 | 210 |
211 } | 211 } |
OLD | NEW |