| 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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 case CSSPropertyListStyleImage: { | 95 case CSSPropertyListStyleImage: { |
| 96 if (style->listStyleImage() && style->listStyleImage()->isPendingIma
ge()) | 96 if (style->listStyleImage() && style->listStyleImage()->isPendingIma
ge()) |
| 97 style->setListStyleImage(loadPendingImage(toStylePendingImage(st
yle->listStyleImage()), elementStyleResources.deviceScaleFactor())); | 97 style->setListStyleImage(loadPendingImage(toStylePendingImage(st
yle->listStyleImage()), elementStyleResources.deviceScaleFactor())); |
| 98 break; | 98 break; |
| 99 } | 99 } |
| 100 case CSSPropertyBorderImageSource: { | 100 case CSSPropertyBorderImageSource: { |
| 101 if (style->borderImageSource() && style->borderImageSource()->isPend
ingImage()) | 101 if (style->borderImageSource() && style->borderImageSource()->isPend
ingImage()) |
| 102 style->setBorderImageSource(loadPendingImage(toStylePendingImage
(style->borderImageSource()), elementStyleResources.deviceScaleFactor())); | 102 style->setBorderImageSource(loadPendingImage(toStylePendingImage
(style->borderImageSource()), elementStyleResources.deviceScaleFactor())); |
| 103 break; | 103 break; |
| 104 } | 104 } |
| 105 case CSSPropertyWebkitMaskBoxImageSource: { | |
| 106 if (style->maskBoxImageSource() && style->maskBoxImageSource()->isPe
ndingImage()) | |
| 107 style->setMaskBoxImageSource(loadPendingImage(toStylePendingImag
e(style->maskBoxImageSource()), elementStyleResources.deviceScaleFactor())); | |
| 108 break; | |
| 109 } | |
| 110 case CSSPropertyWebkitMaskImage: { | |
| 111 for (FillLayer* maskLayer = &style->accessMaskLayers(); maskLayer; m
askLayer = maskLayer->next()) { | |
| 112 if (maskLayer->image() && maskLayer->image()->isPendingImage()) | |
| 113 maskLayer->setImage(loadPendingImage(toStylePendingImage(mas
kLayer->image()), elementStyleResources.deviceScaleFactor())); | |
| 114 } | |
| 115 break; | |
| 116 } | |
| 117 default: | 105 default: |
| 118 ASSERT_NOT_REACHED(); | 106 ASSERT_NOT_REACHED(); |
| 119 } | 107 } |
| 120 } | 108 } |
| 121 | 109 |
| 122 elementStyleResources.clearPendingImageProperties(); | 110 elementStyleResources.clearPendingImageProperties(); |
| 123 } | 111 } |
| 124 | 112 |
| 125 void StyleResourceLoader::loadPendingResources(RenderStyle* renderStyle, Element
StyleResources& elementStyleResources) | 113 void StyleResourceLoader::loadPendingResources(RenderStyle* renderStyle, Element
StyleResources& elementStyleResources) |
| 126 { | 114 { |
| 127 // Start loading images referenced by this style. | 115 // Start loading images referenced by this style. |
| 128 loadPendingImages(renderStyle, elementStyleResources); | 116 loadPendingImages(renderStyle, elementStyleResources); |
| 129 } | 117 } |
| 130 | 118 |
| 131 } | 119 } |
| OLD | NEW |