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

Side by Side Diff: Source/core/svg/animation/SVGSMILElement.cpp

Issue 23685007: Have SVGURIReference API deal with Document references, not pointers (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/svg/SVGUseElement.cpp ('k') | Source/core/svg/graphics/filters/SVGFEImage.h » ('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) 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2008 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 setTargetElement(0); 174 setTargetElement(0);
175 return; 175 return;
176 } 176 }
177 177
178 String id; 178 String id;
179 String href = getAttribute(XLinkNames::hrefAttr); 179 String href = getAttribute(XLinkNames::hrefAttr);
180 Element* target; 180 Element* target;
181 if (href.isEmpty()) 181 if (href.isEmpty())
182 target = parentNode() && parentNode()->isElementNode() ? toElement(paren tNode()) : 0; 182 target = parentNode() && parentNode()->isElementNode() ? toElement(paren tNode()) : 0;
183 else 183 else
184 target = SVGURIReference::targetElementFromIRIString(href, &document(), &id); 184 target = SVGURIReference::targetElementFromIRIString(href, document(), & id);
185 SVGElement* svgTarget = target && target->isSVGElement() ? toSVGElement(targ et) : 0; 185 SVGElement* svgTarget = target && target->isSVGElement() ? toSVGElement(targ et) : 0;
186 186
187 if (svgTarget && !svgTarget->inDocument()) 187 if (svgTarget && !svgTarget->inDocument())
188 svgTarget = 0; 188 svgTarget = 0;
189 189
190 if (svgTarget != targetElement()) 190 if (svgTarget != targetElement())
191 setTargetElement(svgTarget); 191 setTargetElement(svgTarget);
192 192
193 if (!svgTarget) { 193 if (!svgTarget) {
194 // Do not register as pending if we are already pending this resource. 194 // Do not register as pending if we are already pending this resource.
(...skipping 1038 matching lines...) Expand 10 before | Expand all | Expand 10 after
1233 } 1233 }
1234 1234
1235 void SVGSMILElement::dispatchPendingEvent(SMILEventSender* eventSender) 1235 void SVGSMILElement::dispatchPendingEvent(SMILEventSender* eventSender)
1236 { 1236 {
1237 ASSERT(eventSender == &smilEndEventSender() || eventSender == &smilBeginEven tSender() || eventSender == &smilRepeatEventSender()); 1237 ASSERT(eventSender == &smilEndEventSender() || eventSender == &smilBeginEven tSender() || eventSender == &smilRepeatEventSender());
1238 const AtomicString& eventType = eventSender->eventType(); 1238 const AtomicString& eventType = eventSender->eventType();
1239 dispatchEvent(Event::create(eventType)); 1239 dispatchEvent(Event::create(eventType));
1240 } 1240 }
1241 1241
1242 } 1242 }
OLDNEW
« no previous file with comments | « Source/core/svg/SVGUseElement.cpp ('k') | Source/core/svg/graphics/filters/SVGFEImage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698