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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 SVGLengthMode::kHeight), | 99 SVGLengthMode::kHeight), |
100 length_context.ValueForLength(StyleRef().Width(), StyleRef(), | 100 length_context.ValueForLength(StyleRef().Width(), StyleRef(), |
101 SVGLengthMode::kWidth), | 101 SVGLengthMode::kWidth), |
102 length_context.ValueForLength(StyleRef().Height(), StyleRef(), | 102 length_context.ValueForLength(StyleRef().Height(), StyleRef(), |
103 SVGLengthMode::kHeight)); | 103 SVGLengthMode::kHeight)); |
104 | 104 |
105 if (StyleRef().Width().IsAuto() || StyleRef().Height().IsAuto()) | 105 if (StyleRef().Width().IsAuto() || StyleRef().Height().IsAuto()) |
106 object_bounding_box_.SetSize(CalculateObjectSize()); | 106 object_bounding_box_.SetSize(CalculateObjectSize()); |
107 | 107 |
108 if (old_object_bounding_box != object_bounding_box_) { | 108 if (old_object_bounding_box != object_bounding_box_) { |
109 SetShouldDoFullPaintInvalidation(); | 109 SetShouldDoFullPaintInvalidation(PaintInvalidationReason::kImage); |
110 needs_boundaries_update_ = true; | 110 needs_boundaries_update_ = true; |
111 } | 111 } |
112 | 112 |
113 if (GetElement()) | 113 if (GetElement()) |
114 GetElement()->SetNeedsResizeObserverUpdate(); | 114 GetElement()->SetNeedsResizeObserverUpdate(); |
115 | 115 |
116 return old_object_bounding_box.Size() != object_bounding_box_.Size(); | 116 return old_object_bounding_box.Size() != object_bounding_box_.Size(); |
117 } | 117 } |
118 | 118 |
119 void LayoutSVGImage::UpdateLayout() { | 119 void LayoutSVGImage::UpdateLayout() { |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 // references from resources (filters) that may have a cached | 192 // references from resources (filters) that may have a cached |
193 // representation of this image/layout object. | 193 // representation of this image/layout object. |
194 LayoutSVGResourceContainer::MarkForLayoutAndParentResourceInvalidation(this, | 194 LayoutSVGResourceContainer::MarkForLayoutAndParentResourceInvalidation(this, |
195 false); | 195 false); |
196 | 196 |
197 if (StyleRef().Width().IsAuto() || StyleRef().Height().IsAuto()) { | 197 if (StyleRef().Width().IsAuto() || StyleRef().Height().IsAuto()) { |
198 if (UpdateBoundingBox()) | 198 if (UpdateBoundingBox()) |
199 SetNeedsLayout(LayoutInvalidationReason::kSizeChanged); | 199 SetNeedsLayout(LayoutInvalidationReason::kSizeChanged); |
200 } | 200 } |
201 | 201 |
202 SetShouldDoFullPaintInvalidation(); | 202 SetShouldDoFullPaintInvalidation(PaintInvalidationReason::kImage); |
203 } | 203 } |
204 | 204 |
205 void LayoutSVGImage::AddOutlineRects(Vector<LayoutRect>& rects, | 205 void LayoutSVGImage::AddOutlineRects(Vector<LayoutRect>& rects, |
206 const LayoutPoint&, | 206 const LayoutPoint&, |
207 IncludeBlockVisualOverflowOrNot) const { | 207 IncludeBlockVisualOverflowOrNot) const { |
208 // this is called from paint() after the localTransform has already been | 208 // this is called from paint() after the localTransform has already been |
209 // applied | 209 // applied |
210 rects.push_back(LayoutRect(VisualRectInLocalSVGCoordinates())); | 210 rects.push_back(LayoutRect(VisualRectInLocalSVGCoordinates())); |
211 } | 211 } |
212 | 212 |
213 } // namespace blink | 213 } // namespace blink |
OLD | NEW |