OLD | NEW |
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 Loading... |
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 Loading... |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |