| 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 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 310 } | 310 } |
| 311 | 311 |
| 312 Node::InsertionNotificationRequest SVGSMILElement::insertedInto(ContainerNode* r
ootParent) | 312 Node::InsertionNotificationRequest SVGSMILElement::insertedInto(ContainerNode* r
ootParent) |
| 313 { | 313 { |
| 314 SVGElement::insertedInto(rootParent); | 314 SVGElement::insertedInto(rootParent); |
| 315 | 315 |
| 316 if (!rootParent->isConnected()) | 316 if (!rootParent->isConnected()) |
| 317 return InsertionDone; | 317 return InsertionDone; |
| 318 | 318 |
| 319 Deprecation::countDeprecation(document(), UseCounter::SVGSMILElementInDocume
nt); | 319 Deprecation::countDeprecation(document(), UseCounter::SVGSMILElementInDocume
nt); |
| 320 if (document().isLoadCompleted()) |
| 321 UseCounter::count(&document(), UseCounter::SVGSMILElementInsertedAfterLo
ad); |
| 320 | 322 |
| 321 setAttributeName(constructQualifiedName(this, fastGetAttribute(SVGNames::att
ributeNameAttr))); | 323 setAttributeName(constructQualifiedName(this, fastGetAttribute(SVGNames::att
ributeNameAttr))); |
| 322 SVGSVGElement* owner = ownerSVGElement(); | 324 SVGSVGElement* owner = ownerSVGElement(); |
| 323 if (!owner) | 325 if (!owner) |
| 324 return InsertionDone; | 326 return InsertionDone; |
| 325 | 327 |
| 326 m_timeContainer = owner->timeContainer(); | 328 m_timeContainer = owner->timeContainer(); |
| 327 ASSERT(m_timeContainer); | 329 ASSERT(m_timeContainer); |
| 328 m_timeContainer->setDocumentOrderIndexesDirty(); | 330 m_timeContainer->setDocumentOrderIndexesDirty(); |
| 329 | 331 |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 465 int repeat = -1; | 467 int repeat = -1; |
| 466 if (nameString.startsWith("repeat(") && nameString.endsWith(')')) { | 468 if (nameString.startsWith("repeat(") && nameString.endsWith(')')) { |
| 467 repeat = nameString.substring(7, nameString.length() - 8).toUIntStrict(&
ok); | 469 repeat = nameString.substring(7, nameString.length() - 8).toUIntStrict(&
ok); |
| 468 if (!ok) | 470 if (!ok) |
| 469 return false; | 471 return false; |
| 470 nameString = "repeatn"; | 472 nameString = "repeatn"; |
| 471 type = Condition::EventBase; | 473 type = Condition::EventBase; |
| 472 } else if (nameString == "begin" || nameString == "end") { | 474 } else if (nameString == "begin" || nameString == "end") { |
| 473 if (baseID.isEmpty()) | 475 if (baseID.isEmpty()) |
| 474 return false; | 476 return false; |
| 477 UseCounter::count(&document(), UseCounter::SVGSMILBeginOrEndSyncbaseValu
e); |
| 475 type = Condition::Syncbase; | 478 type = Condition::Syncbase; |
| 476 } else if (nameString.startsWith("accesskey(")) { | 479 } else if (nameString.startsWith("accesskey(")) { |
| 477 // FIXME: accesskey() support. | 480 // FIXME: accesskey() support. |
| 478 type = Condition::AccessKey; | 481 type = Condition::AccessKey; |
| 479 } else | 482 } else { |
| 483 UseCounter::count(&document(), UseCounter::SVGSMILBeginOrEndEventValue); |
| 480 type = Condition::EventBase; | 484 type = Condition::EventBase; |
| 485 } |
| 481 | 486 |
| 482 m_conditions.append(Condition::create(type, beginOrEnd, baseID, nameString,
offset, repeat)); | 487 m_conditions.append(Condition::create(type, beginOrEnd, baseID, nameString,
offset, repeat)); |
| 483 | 488 |
| 484 if (type == Condition::EventBase && beginOrEnd == End) | 489 if (type == Condition::EventBase && beginOrEnd == End) |
| 485 m_hasEndEventConditions = true; | 490 m_hasEndEventConditions = true; |
| 486 | 491 |
| 487 return true; | 492 return true; |
| 488 } | 493 } |
| 489 | 494 |
| 490 void SVGSMILElement::parseBeginOrEnd(const String& parseString, BeginOrEnd begin
OrEnd) | 495 void SVGSMILElement::parseBeginOrEnd(const String& parseString, BeginOrEnd begin
OrEnd) |
| (...skipping 866 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1357 { | 1362 { |
| 1358 visitor->trace(m_targetElement); | 1363 visitor->trace(m_targetElement); |
| 1359 visitor->trace(m_timeContainer); | 1364 visitor->trace(m_timeContainer); |
| 1360 visitor->trace(m_conditions); | 1365 visitor->trace(m_conditions); |
| 1361 visitor->trace(m_syncBaseDependents); | 1366 visitor->trace(m_syncBaseDependents); |
| 1362 SVGElement::trace(visitor); | 1367 SVGElement::trace(visitor); |
| 1363 SVGTests::trace(visitor); | 1368 SVGTests::trace(visitor); |
| 1364 } | 1369 } |
| 1365 | 1370 |
| 1366 } // namespace blink | 1371 } // namespace blink |
| OLD | NEW |