OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006 Alexander Kellett <lypanov@kde.org> | 2 * Copyright (C) 2006 Alexander Kellett <lypanov@kde.org> |
3 * Copyright (C) 2006 Apple Computer, Inc. | 3 * Copyright (C) 2006 Apple Computer, Inc. |
4 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> | 4 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> |
5 * Copyright (C) 2007, 2008, 2009 Rob Buis <buis@kde.org> | 5 * Copyright (C) 2007, 2008, 2009 Rob Buis <buis@kde.org> |
6 * Copyright (C) 2009 Google, Inc. | 6 * Copyright (C) 2009 Google, Inc. |
7 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> | 7 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> |
8 * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com> | 8 * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com> |
9 * | 9 * |
10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
(...skipping 13 matching lines...) Expand all Loading... |
24 */ | 24 */ |
25 | 25 |
26 #include "config.h" | 26 #include "config.h" |
27 | 27 |
28 #include "core/rendering/svg/RenderSVGImage.h" | 28 #include "core/rendering/svg/RenderSVGImage.h" |
29 | 29 |
30 #include "core/paint/SVGImagePainter.h" | 30 #include "core/paint/SVGImagePainter.h" |
31 #include "core/rendering/ImageQualityController.h" | 31 #include "core/rendering/ImageQualityController.h" |
32 #include "core/rendering/PointerEventsHitRules.h" | 32 #include "core/rendering/PointerEventsHitRules.h" |
33 #include "core/rendering/RenderImageResource.h" | 33 #include "core/rendering/RenderImageResource.h" |
34 #include "core/rendering/svg/RenderSVGResource.h" | 34 #include "core/rendering/svg/RenderSVGResourceContainer.h" |
35 #include "core/rendering/svg/SVGRenderSupport.h" | 35 #include "core/rendering/svg/SVGRenderSupport.h" |
36 #include "core/rendering/svg/SVGResources.h" | 36 #include "core/rendering/svg/SVGResources.h" |
37 #include "core/rendering/svg/SVGResourcesCache.h" | 37 #include "core/rendering/svg/SVGResourcesCache.h" |
38 #include "core/svg/SVGImageElement.h" | 38 #include "core/svg/SVGImageElement.h" |
39 #include "platform/LengthFunctions.h" | 39 #include "platform/LengthFunctions.h" |
40 | 40 |
41 namespace blink { | 41 namespace blink { |
42 | 42 |
43 RenderSVGImage::RenderSVGImage(SVGImageElement* impl) | 43 RenderSVGImage::RenderSVGImage(SVGImageElement* impl) |
44 : RenderSVGModelObject(impl) | 44 : RenderSVGModelObject(impl) |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 } | 179 } |
180 | 180 |
181 void RenderSVGImage::imageChanged(WrappedImagePtr, const IntRect*) | 181 void RenderSVGImage::imageChanged(WrappedImagePtr, const IntRect*) |
182 { | 182 { |
183 // The image resource defaults to nullImage until the resource arrives. | 183 // The image resource defaults to nullImage until the resource arrives. |
184 // This empty image may be cached by SVG resources which must be invalidated
. | 184 // This empty image may be cached by SVG resources which must be invalidated
. |
185 if (SVGResources* resources = SVGResourcesCache::cachedResourcesForRenderObj
ect(this)) | 185 if (SVGResources* resources = SVGResourcesCache::cachedResourcesForRenderObj
ect(this)) |
186 resources->removeClientFromCache(this); | 186 resources->removeClientFromCache(this); |
187 | 187 |
188 // Eventually notify parent resources, that we've changed. | 188 // Eventually notify parent resources, that we've changed. |
189 RenderSVGResource::markForLayoutAndParentResourceInvalidation(this, false); | 189 RenderSVGResourceContainer::markForLayoutAndParentResourceInvalidation(this,
false); |
190 | 190 |
191 // Update the SVGImageCache sizeAndScales entry in case image loading finish
ed after layout. | 191 // Update the SVGImageCache sizeAndScales entry in case image loading finish
ed after layout. |
192 // (https://bugs.webkit.org/show_bug.cgi?id=99489) | 192 // (https://bugs.webkit.org/show_bug.cgi?id=99489) |
193 m_objectBoundingBox = FloatRect(); | 193 m_objectBoundingBox = FloatRect(); |
194 updateImageViewport(); | 194 updateImageViewport(); |
195 | 195 |
196 invalidateBufferedForeground(); | 196 invalidateBufferedForeground(); |
197 | 197 |
198 setShouldDoFullPaintInvalidation(); | 198 setShouldDoFullPaintInvalidation(); |
199 } | 199 } |
200 | 200 |
201 void RenderSVGImage::addFocusRingRects(Vector<LayoutRect>& rects, const LayoutPo
int&, const RenderLayerModelObject*) const | 201 void RenderSVGImage::addFocusRingRects(Vector<LayoutRect>& rects, const LayoutPo
int&, const RenderLayerModelObject*) const |
202 { | 202 { |
203 // this is called from paint() after the localTransform has already been app
lied | 203 // this is called from paint() after the localTransform has already been app
lied |
204 LayoutRect contentRect = LayoutRect(paintInvalidationRectInLocalCoordinates(
)); | 204 LayoutRect contentRect = LayoutRect(paintInvalidationRectInLocalCoordinates(
)); |
205 if (!contentRect.isEmpty()) | 205 if (!contentRect.isEmpty()) |
206 rects.append(contentRect); | 206 rects.append(contentRect); |
207 } | 207 } |
208 | 208 |
209 } // namespace blink | 209 } // namespace blink |
OLD | NEW |