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

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

Issue 9562022: Merge 109345 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1025/
Patch Set: Created 8 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
« no previous file with comments | « LayoutTests/svg/animations/smil-element-target-crash-main-expected.txt ('k') | no next file » | 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 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 } 208 }
209 } 209 }
210 210
211 void SVGSMILElement::removedFromDocument() 211 void SVGSMILElement::removedFromDocument()
212 { 212 {
213 m_attributeName = anyQName(); 213 m_attributeName = anyQName();
214 if (m_timeContainer) { 214 if (m_timeContainer) {
215 m_timeContainer->unschedule(this); 215 m_timeContainer->unschedule(this);
216 m_timeContainer = 0; 216 m_timeContainer = 0;
217 } 217 }
218 if (m_targetElement) {
219 document()->accessSVGExtensions()->removeAnimationElementFromTarget(this , m_targetElement);
220 m_targetElement = 0;
221 }
222 // Calling disconnectConditions() may kill us if there are syncbase conditio ns. 218 // Calling disconnectConditions() may kill us if there are syncbase conditio ns.
223 // OK, but we don't want to die inside the call. 219 // OK, but we don't want to die inside the call.
224 RefPtr<SVGSMILElement> keepAlive(this); 220 RefPtr<SVGSMILElement> keepAlive(this);
225 disconnectConditions(); 221 disconnectConditions();
222
223 // Clear target now, because disconnectConditions calls targetElement() whic h will recreate the target if we removed it sooner.
224 if (m_targetElement) {
225 document()->accessSVGExtensions()->removeAnimationElementFromTarget(this , m_targetElement);
226 m_targetElement = 0;
227 }
228
226 SVGElement::removedFromDocument(); 229 SVGElement::removedFromDocument();
227 } 230 }
228 231
229 SMILTime SVGSMILElement::parseOffsetValue(const String& data) 232 SMILTime SVGSMILElement::parseOffsetValue(const String& data)
230 { 233 {
231 bool ok; 234 bool ok;
232 double result = 0; 235 double result = 0;
233 String parse = data.stripWhiteSpace(); 236 String parse = data.stripWhiteSpace();
234 if (parse.endsWith("h")) 237 if (parse.endsWith("h"))
235 result = parse.left(parse.length() - 1).toDouble(&ok) * 60 * 60; 238 result = parse.left(parse.length() - 1).toDouble(&ok) * 60 * 60;
(...skipping 817 matching lines...) Expand 10 before | Expand all | Expand 10 after
1053 1056
1054 void SVGSMILElement::beginByLinkActivation() 1057 void SVGSMILElement::beginByLinkActivation()
1055 { 1058 {
1056 SMILTime elapsed = this->elapsed(); 1059 SMILTime elapsed = this->elapsed();
1057 addBeginTime(elapsed, elapsed); 1060 addBeginTime(elapsed, elapsed);
1058 } 1061 }
1059 1062
1060 } 1063 }
1061 1064
1062 #endif 1065 #endif
OLDNEW
« no previous file with comments | « LayoutTests/svg/animations/smil-element-target-crash-main-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698