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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 { | 65 { |
66 FloatRect oldBoundaries = m_objectBoundingBox; | 66 FloatRect oldBoundaries = m_objectBoundingBox; |
67 | 67 |
68 SVGLengthContext lengthContext(element()); | 68 SVGLengthContext lengthContext(element()); |
69 m_objectBoundingBox = FloatRect( | 69 m_objectBoundingBox = FloatRect( |
70 lengthContext.valueForLength(styleRef().svgStyle().x(), styleRef(), SVGL
engthMode::Width), | 70 lengthContext.valueForLength(styleRef().svgStyle().x(), styleRef(), SVGL
engthMode::Width), |
71 lengthContext.valueForLength(styleRef().svgStyle().y(), styleRef(), SVGL
engthMode::Height), | 71 lengthContext.valueForLength(styleRef().svgStyle().y(), styleRef(), SVGL
engthMode::Height), |
72 lengthContext.valueForLength(styleRef().width(), styleRef(), SVGLengthMo
de::Width), | 72 lengthContext.valueForLength(styleRef().width(), styleRef(), SVGLengthMo
de::Width), |
73 lengthContext.valueForLength(styleRef().height(), styleRef(), SVGLengthM
ode::Height)); | 73 lengthContext.valueForLength(styleRef().height(), styleRef(), SVGLengthM
ode::Height)); |
74 m_needsBoundariesUpdate |= oldBoundaries != m_objectBoundingBox; | 74 m_needsBoundariesUpdate |= oldBoundaries != m_objectBoundingBox; |
| 75 if (element()) |
| 76 element()->setNeedsResizeObserverUpdate(); |
75 } | 77 } |
76 | 78 |
77 void LayoutSVGImage::layout() | 79 void LayoutSVGImage::layout() |
78 { | 80 { |
79 ASSERT(needsLayout()); | 81 ASSERT(needsLayout()); |
80 LayoutAnalyzer::Scope analyzer(*this); | 82 LayoutAnalyzer::Scope analyzer(*this); |
81 | 83 |
82 // Invalidate all resources of this client if our layout changed. | 84 // Invalidate all resources of this client if our layout changed. |
83 if (everHadLayout() && selfNeedsLayout()) | 85 if (everHadLayout() && selfNeedsLayout()) |
84 SVGResourcesCache::clientLayoutChanged(this); | 86 SVGResourcesCache::clientLayoutChanged(this); |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 setShouldDoFullPaintInvalidation(); | 151 setShouldDoFullPaintInvalidation(); |
150 } | 152 } |
151 | 153 |
152 void LayoutSVGImage::addOutlineRects(Vector<LayoutRect>& rects, const LayoutPoin
t&, IncludeBlockVisualOverflowOrNot) const | 154 void LayoutSVGImage::addOutlineRects(Vector<LayoutRect>& rects, const LayoutPoin
t&, IncludeBlockVisualOverflowOrNot) const |
153 { | 155 { |
154 // this is called from paint() after the localTransform has already been app
lied | 156 // this is called from paint() after the localTransform has already been app
lied |
155 rects.append(LayoutRect(paintInvalidationRectInLocalSVGCoordinates())); | 157 rects.append(LayoutRect(paintInvalidationRectInLocalSVGCoordinates())); |
156 } | 158 } |
157 | 159 |
158 } // namespace blink | 160 } // namespace blink |
OLD | NEW |