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

Side by Side Diff: Source/core/svg/SVGImageElement.cpp

Issue 977113003: Rename renderer() to layoutObject(). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/svg/SVGGraphicsElement.cpp ('k') | Source/core/svg/SVGLengthContext.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Rob Buis <buis@kde.org>
4 * Copyright (C) 2006 Alexander Kellett <lypanov@kde.org> 4 * Copyright (C) 2006 Alexander Kellett <lypanov@kde.org>
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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 visitor->trace(m_width); 58 visitor->trace(m_width);
59 visitor->trace(m_height); 59 visitor->trace(m_height);
60 visitor->trace(m_preserveAspectRatio); 60 visitor->trace(m_preserveAspectRatio);
61 visitor->trace(m_imageLoader); 61 visitor->trace(m_imageLoader);
62 SVGGraphicsElement::trace(visitor); 62 SVGGraphicsElement::trace(visitor);
63 SVGURIReference::trace(visitor); 63 SVGURIReference::trace(visitor);
64 } 64 }
65 65
66 bool SVGImageElement::currentFrameHasSingleSecurityOrigin() const 66 bool SVGImageElement::currentFrameHasSingleSecurityOrigin() const
67 { 67 {
68 if (LayoutSVGImage* renderSVGImage = toLayoutSVGImage(renderer())) { 68 if (LayoutSVGImage* renderSVGImage = toLayoutSVGImage(layoutObject())) {
69 if (renderSVGImage->imageResource()->hasImage()) { 69 if (renderSVGImage->imageResource()->hasImage()) {
70 if (Image* image = renderSVGImage->imageResource()->cachedImage()->i mage()) 70 if (Image* image = renderSVGImage->imageResource()->cachedImage()->i mage())
71 return image->currentFrameHasSingleSecurityOrigin(); 71 return image->currentFrameHasSingleSecurityOrigin();
72 } 72 }
73 } 73 }
74 74
75 return true; 75 return true;
76 } 76 }
77 77
78 bool SVGImageElement::isSupportedAttribute(const QualifiedName& attrName) 78 bool SVGImageElement::isSupportedAttribute(const QualifiedName& attrName)
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 } 148 }
149 149
150 if (SVGURIReference::isKnownAttribute(attrName)) { 150 if (SVGURIReference::isKnownAttribute(attrName)) {
151 if (inDocument()) 151 if (inDocument())
152 imageLoader().updateFromElement(ImageLoader::UpdateIgnorePreviousErr or); 152 imageLoader().updateFromElement(ImageLoader::UpdateIgnorePreviousErr or);
153 else 153 else
154 m_needsLoaderURIUpdate = true; 154 m_needsLoaderURIUpdate = true;
155 return; 155 return;
156 } 156 }
157 157
158 LayoutObject* renderer = this->renderer(); 158 LayoutObject* renderer = this->layoutObject();
159 if (!renderer) 159 if (!renderer)
160 return; 160 return;
161 161
162 if (isLengthAttribute) { 162 if (isLengthAttribute) {
163 if (toLayoutSVGImage(renderer)->updateImageViewport()) 163 if (toLayoutSVGImage(renderer)->updateImageViewport())
164 markForLayoutAndParentResourceInvalidation(renderer); 164 markForLayoutAndParentResourceInvalidation(renderer);
165 return; 165 return;
166 } 166 }
167 167
168 if (attrName == SVGNames::preserveAspectRatioAttr) { 168 if (attrName == SVGNames::preserveAspectRatioAttr) {
(...skipping 19 matching lines...) Expand all
188 188
189 bool SVGImageElement::haveLoadedRequiredResources() 189 bool SVGImageElement::haveLoadedRequiredResources()
190 { 190 {
191 return !m_needsLoaderURIUpdate && !imageLoader().hasPendingActivity(); 191 return !m_needsLoaderURIUpdate && !imageLoader().hasPendingActivity();
192 } 192 }
193 193
194 void SVGImageElement::attach(const AttachContext& context) 194 void SVGImageElement::attach(const AttachContext& context)
195 { 195 {
196 SVGGraphicsElement::attach(context); 196 SVGGraphicsElement::attach(context);
197 197
198 if (LayoutSVGImage* imageObj = toLayoutSVGImage(renderer())) { 198 if (LayoutSVGImage* imageObj = toLayoutSVGImage(layoutObject())) {
199 if (imageObj->imageResource()->hasImage()) 199 if (imageObj->imageResource()->hasImage())
200 return; 200 return;
201 201
202 imageObj->imageResource()->setImageResource(imageLoader().image()); 202 imageObj->imageResource()->setImageResource(imageLoader().image());
203 } 203 }
204 } 204 }
205 205
206 Node::InsertionNotificationRequest SVGImageElement::insertedInto(ContainerNode* rootParent) 206 Node::InsertionNotificationRequest SVGImageElement::insertedInto(ContainerNode* rootParent)
207 { 207 {
208 SVGGraphicsElement::insertedInto(rootParent); 208 SVGGraphicsElement::insertedInto(rootParent);
(...skipping 20 matching lines...) Expand all
229 return AtomicString(hrefString()); 229 return AtomicString(hrefString());
230 } 230 }
231 231
232 void SVGImageElement::didMoveToNewDocument(Document& oldDocument) 232 void SVGImageElement::didMoveToNewDocument(Document& oldDocument)
233 { 233 {
234 imageLoader().elementDidMoveToNewDocument(); 234 imageLoader().elementDidMoveToNewDocument();
235 SVGGraphicsElement::didMoveToNewDocument(oldDocument); 235 SVGGraphicsElement::didMoveToNewDocument(oldDocument);
236 } 236 }
237 237
238 } // namespace blink 238 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/svg/SVGGraphicsElement.cpp ('k') | Source/core/svg/SVGLengthContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698