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

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

Issue 1314793010: Support fragment URLs for all kinds of SVG images (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Update DEPS to match Created 5 years, 3 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) 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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 } 166 }
167 167
168 void SVGImageElement::attach(const AttachContext& context) 168 void SVGImageElement::attach(const AttachContext& context)
169 { 169 {
170 SVGGraphicsElement::attach(context); 170 SVGGraphicsElement::attach(context);
171 171
172 if (LayoutSVGImage* imageObj = toLayoutSVGImage(layoutObject())) { 172 if (LayoutSVGImage* imageObj = toLayoutSVGImage(layoutObject())) {
173 if (imageObj->imageResource()->hasImage()) 173 if (imageObj->imageResource()->hasImage())
174 return; 174 return;
175 175
176 imageObj->imageResource()->setImageResource(imageLoader().image()); 176 imageObj->imageResource()->setImageResource(imageLoader().image(), docum ent().completeURL(imageSourceURL()));
177 } 177 }
178 } 178 }
179 179
180 Node::InsertionNotificationRequest SVGImageElement::insertedInto(ContainerNode* rootParent) 180 Node::InsertionNotificationRequest SVGImageElement::insertedInto(ContainerNode* rootParent)
181 { 181 {
182 SVGGraphicsElement::insertedInto(rootParent); 182 SVGGraphicsElement::insertedInto(rootParent);
183 if (!rootParent->inDocument()) 183 if (!rootParent->inDocument())
184 return InsertionDone; 184 return InsertionDone;
185 185
186 // We can only resolve base URIs properly after tree insertion - hence, URI mutations while 186 // We can only resolve base URIs properly after tree insertion - hence, URI mutations while
(...skipping 16 matching lines...) Expand all
203 return AtomicString(hrefString()); 203 return AtomicString(hrefString());
204 } 204 }
205 205
206 void SVGImageElement::didMoveToNewDocument(Document& oldDocument) 206 void SVGImageElement::didMoveToNewDocument(Document& oldDocument)
207 { 207 {
208 imageLoader().elementDidMoveToNewDocument(); 208 imageLoader().elementDidMoveToNewDocument();
209 SVGGraphicsElement::didMoveToNewDocument(oldDocument); 209 SVGGraphicsElement::didMoveToNewDocument(oldDocument);
210 } 210 }
211 211
212 } // namespace blink 212 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698