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

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

Issue 427613006: Add SVGTests attrs to SVGSMILElement to support SVGDiscardElement (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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/animation/SVGSMILElement.h ('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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 , m_beginOrEnd(beginOrEnd) 163 , m_beginOrEnd(beginOrEnd)
164 , m_baseID(baseID) 164 , m_baseID(baseID)
165 , m_name(name) 165 , m_name(name)
166 , m_offset(offset) 166 , m_offset(offset)
167 , m_repeat(repeat) 167 , m_repeat(repeat)
168 { 168 {
169 } 169 }
170 170
171 SVGSMILElement::SVGSMILElement(const QualifiedName& tagName, Document& doc) 171 SVGSMILElement::SVGSMILElement(const QualifiedName& tagName, Document& doc)
172 : SVGElement(tagName, doc) 172 : SVGElement(tagName, doc)
173 , SVGTests(this)
173 , m_attributeName(anyQName()) 174 , m_attributeName(anyQName())
174 , m_targetElement(nullptr) 175 , m_targetElement(nullptr)
175 , m_syncBaseConditionsConnected(false) 176 , m_syncBaseConditionsConnected(false)
176 , m_hasEndEventConditions(false) 177 , m_hasEndEventConditions(false)
177 , m_isWaitingForFirstInterval(true) 178 , m_isWaitingForFirstInterval(true)
178 , m_interval(SMILInterval(SMILTime::unresolved(), SMILTime::unresolved())) 179 , m_interval(SMILInterval(SMILTime::unresolved(), SMILTime::unresolved()))
179 , m_previousIntervalBegin(SMILTime::unresolved()) 180 , m_previousIntervalBegin(SMILTime::unresolved())
180 , m_activeState(Inactive) 181 , m_activeState(Inactive)
181 , m_lastPercent(0) 182 , m_lastPercent(0)
182 , m_lastRepeat(0) 183 , m_lastRepeat(0)
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 else if (!existing.contains(value.value())) 499 else if (!existing.contains(value.value()))
499 timeList.append(SMILTimeWithOrigin(value, SMILTimeWithOrigin::Parser Origin)); 500 timeList.append(SMILTimeWithOrigin(value, SMILTimeWithOrigin::Parser Origin));
500 } 501 }
501 sortTimeList(timeList); 502 sortTimeList(timeList);
502 } 503 }
503 504
504 bool SVGSMILElement::isSupportedAttribute(const QualifiedName& attrName) 505 bool SVGSMILElement::isSupportedAttribute(const QualifiedName& attrName)
505 { 506 {
506 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); 507 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
507 if (supportedAttributes.isEmpty()) { 508 if (supportedAttributes.isEmpty()) {
509 SVGTests::addSupportedAttributes(supportedAttributes);
508 supportedAttributes.add(SVGNames::beginAttr); 510 supportedAttributes.add(SVGNames::beginAttr);
509 supportedAttributes.add(SVGNames::endAttr); 511 supportedAttributes.add(SVGNames::endAttr);
510 supportedAttributes.add(SVGNames::durAttr); 512 supportedAttributes.add(SVGNames::durAttr);
511 supportedAttributes.add(SVGNames::repeatDurAttr); 513 supportedAttributes.add(SVGNames::repeatDurAttr);
512 supportedAttributes.add(SVGNames::repeatCountAttr); 514 supportedAttributes.add(SVGNames::repeatCountAttr);
513 supportedAttributes.add(SVGNames::minAttr); 515 supportedAttributes.add(SVGNames::minAttr);
514 supportedAttributes.add(SVGNames::maxAttr); 516 supportedAttributes.add(SVGNames::maxAttr);
515 supportedAttributes.add(SVGNames::attributeNameAttr); 517 supportedAttributes.add(SVGNames::attributeNameAttr);
516 supportedAttributes.add(XLinkNames::hrefAttr); 518 supportedAttributes.add(XLinkNames::hrefAttr);
517 } 519 }
(...skipping 17 matching lines...) Expand all
535 } 537 }
536 parseBeginOrEnd(value.string(), End); 538 parseBeginOrEnd(value.string(), End);
537 if (inDocument()) 539 if (inDocument())
538 connectSyncBaseConditions(); 540 connectSyncBaseConditions();
539 } else if (name == SVGNames::onbeginAttr) { 541 } else if (name == SVGNames::onbeginAttr) {
540 setAttributeEventListener(EventTypeNames::beginEvent, createAttributeEve ntListener(this, name, value, eventParameterName())); 542 setAttributeEventListener(EventTypeNames::beginEvent, createAttributeEve ntListener(this, name, value, eventParameterName()));
541 } else if (name == SVGNames::onendAttr) { 543 } else if (name == SVGNames::onendAttr) {
542 setAttributeEventListener(EventTypeNames::endEvent, createAttributeEvent Listener(this, name, value, eventParameterName())); 544 setAttributeEventListener(EventTypeNames::endEvent, createAttributeEvent Listener(this, name, value, eventParameterName()));
543 } else if (name == SVGNames::onrepeatAttr) { 545 } else if (name == SVGNames::onrepeatAttr) {
544 setAttributeEventListener(EventTypeNames::repeatEvent, createAttributeEv entListener(this, name, value, eventParameterName())); 546 setAttributeEventListener(EventTypeNames::repeatEvent, createAttributeEv entListener(this, name, value, eventParameterName()));
545 } else 547 } else {
546 SVGElement::parseAttribute(name, value); 548 SVGElement::parseAttributeNew(name, value);
549 }
547 } 550 }
548 551
549 void SVGSMILElement::svgAttributeChanged(const QualifiedName& attrName) 552 void SVGSMILElement::svgAttributeChanged(const QualifiedName& attrName)
550 { 553 {
551 if (!isSupportedAttribute(attrName)) { 554 if (!isSupportedAttribute(attrName)) {
552 SVGElement::svgAttributeChanged(attrName); 555 SVGElement::svgAttributeChanged(attrName);
553 return; 556 return;
554 } 557 }
555 558
556 if (attrName == SVGNames::durAttr) 559 if (attrName == SVGNames::durAttr)
(...skipping 789 matching lines...) Expand 10 before | Expand all | Expand 10 after
1346 #if ENABLE(OILPAN) 1349 #if ENABLE(OILPAN)
1347 visitor->trace(m_targetElement); 1350 visitor->trace(m_targetElement);
1348 visitor->trace(m_timeContainer); 1351 visitor->trace(m_timeContainer);
1349 visitor->trace(m_conditions); 1352 visitor->trace(m_conditions);
1350 visitor->trace(m_syncBaseDependents); 1353 visitor->trace(m_syncBaseDependents);
1351 #endif 1354 #endif
1352 SVGElement::trace(visitor); 1355 SVGElement::trace(visitor);
1353 } 1356 }
1354 1357
1355 } 1358 }
OLDNEW
« no previous file with comments | « Source/core/svg/animation/SVGSMILElement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698