Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(409)

Side by Side Diff: third_party/WebKit/Source/core/layout/svg/LayoutSVGImage.cpp

Issue 1728313003: Split ImageResourceClient into ResourceClient and ImageResourceObserver [2/2] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and reflect comment Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 29 matching lines...) Expand all
40 #include "third_party/skia/include/core/SkPicture.h" 40 #include "third_party/skia/include/core/SkPicture.h"
41 41
42 namespace blink { 42 namespace blink {
43 43
44 LayoutSVGImage::LayoutSVGImage(SVGImageElement* impl) 44 LayoutSVGImage::LayoutSVGImage(SVGImageElement* impl)
45 : LayoutSVGModelObject(impl) 45 : LayoutSVGModelObject(impl)
46 , m_needsBoundariesUpdate(true) 46 , m_needsBoundariesUpdate(true)
47 , m_needsTransformUpdate(true) 47 , m_needsTransformUpdate(true)
48 , m_imageResource(LayoutImageResource::create()) 48 , m_imageResource(LayoutImageResource::create())
49 { 49 {
50 m_imageResource->initialize(this, nullptr); 50 m_imageResource->initialize(this);
51 } 51 }
52 52
53 LayoutSVGImage::~LayoutSVGImage() 53 LayoutSVGImage::~LayoutSVGImage()
54 { 54 {
55 } 55 }
56 56
57 void LayoutSVGImage::willBeDestroyed() 57 void LayoutSVGImage::willBeDestroyed()
58 { 58 {
59 ImageQualityController::remove(*this); 59 ImageQualityController::remove(*this);
60 m_imageResource->shutdown(); 60 m_imageResource->shutdown();
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 updateHitTestResult(result, localLayoutPoint); 131 updateHitTestResult(result, localLayoutPoint);
132 if (result.addNodeToListBasedTestResult(element(), localLayoutPo int) == StopHitTesting) 132 if (result.addNodeToListBasedTestResult(element(), localLayoutPo int) == StopHitTesting)
133 return true; 133 return true;
134 } 134 }
135 } 135 }
136 } 136 }
137 137
138 return false; 138 return false;
139 } 139 }
140 140
141 void LayoutSVGImage::imageChanged(WrappedImagePtr, const IntRect*) 141 void LayoutSVGImage::imageChanged(bool, WrappedImagePtr, const IntRect*)
142 { 142 {
143 // Notify parent resources that we've changed. This also invalidates 143 // Notify parent resources that we've changed. This also invalidates
144 // references from resources (filters) that may have a cached 144 // references from resources (filters) that may have a cached
145 // representation of this image/layout object. 145 // representation of this image/layout object.
146 LayoutSVGResourceContainer::markForLayoutAndParentResourceInvalidation(this, false); 146 LayoutSVGResourceContainer::markForLayoutAndParentResourceInvalidation(this, false);
147 147
148 m_bufferedForeground.clear(); 148 m_bufferedForeground.clear();
149 149
150 setShouldDoFullPaintInvalidation(); 150 setShouldDoFullPaintInvalidation();
151 } 151 }
152 152
153 void LayoutSVGImage::addOutlineRects(Vector<LayoutRect>& rects, const LayoutPoin t&, IncludeBlockVisualOverflowOrNot) const 153 void LayoutSVGImage::addOutlineRects(Vector<LayoutRect>& rects, const LayoutPoin t&, IncludeBlockVisualOverflowOrNot) const
154 { 154 {
155 // this is called from paint() after the localTransform has already been app lied 155 // this is called from paint() after the localTransform has already been app lied
156 rects.append(LayoutRect(paintInvalidationRectInLocalCoordinates())); 156 rects.append(LayoutRect(paintInvalidationRectInLocalCoordinates()));
157 } 157 }
158 158
159 } // namespace blink 159 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698