| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  * Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann <zimmermann@kde
      .org> | 2  * Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann <zimmermann@kde
      .org> | 
| 3  * Copyright (C) 2004, 2005, 2006, 2008 Rob Buis <buis@kde.org> | 3  * Copyright (C) 2004, 2005, 2006, 2008 Rob Buis <buis@kde.org> | 
| 4  * Copyright (C) 2008 Apple Inc. All rights reserved. | 4  * Copyright (C) 2008 Apple Inc. All rights reserved. | 
| 5  * Copyright (C) 2008 Alp Toker <alp@atoker.com> | 5  * Copyright (C) 2008 Alp Toker <alp@atoker.com> | 
| 6  * Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> | 6  * Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> | 
| 7  * | 7  * | 
| 8  * This library is free software; you can redistribute it and/or | 8  * This library is free software; you can redistribute it and/or | 
| 9  * modify it under the terms of the GNU Library General Public | 9  * modify it under the terms of the GNU Library General Public | 
| 10  * License as published by the Free Software Foundation; either | 10  * License as published by the Free Software Foundation; either | 
| 11  * version 2 of the License, or (at your option) any later version. | 11  * version 2 of the License, or (at your option) any later version. | 
| 12  * | 12  * | 
| 13  * This library is distributed in the hope that it will be useful, | 13  * This library is distributed in the hope that it will be useful, | 
| 14  * but WITHOUT ANY WARRANTY; without even the implied warranty of | 14  * but WITHOUT ANY WARRANTY; without even the implied warranty of | 
| 15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU | 15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU | 
| 16  * Library General Public License for more details. | 16  * Library General Public License for more details. | 
| 17  * | 17  * | 
| 18  * You should have received a copy of the GNU Library General Public License | 18  * You should have received a copy of the GNU Library General Public License | 
| 19  * along with this library; see the file COPYING.LIB.  If not, write to | 19  * along with this library; see the file COPYING.LIB.  If not, write to | 
| 20  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 20  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 
| 21  * Boston, MA 02110-1301, USA. | 21  * Boston, MA 02110-1301, USA. | 
| 22  */ | 22  */ | 
| 23 | 23 | 
| 24 #include "core/svg/SVGElement.h" | 24 #include "core/svg/SVGElement.h" | 
| 25 | 25 | 
| 26 #include "bindings/core/v8/ScriptEventListener.h" | 26 #include "bindings/core/v8/ScriptEventListener.h" | 
| 27 #include "core/HTMLNames.h" | 27 #include "core/HTMLNames.h" | 
| 28 #include "core/SVGNames.h" | 28 #include "core/SVGNames.h" | 
|  | 29 #include "core/XLinkNames.h" | 
| 29 #include "core/XMLNames.h" | 30 #include "core/XMLNames.h" | 
| 30 #include "core/animation/AnimationStack.h" | 31 #include "core/animation/AnimationStack.h" | 
| 31 #include "core/animation/DocumentAnimations.h" | 32 #include "core/animation/DocumentAnimations.h" | 
| 32 #include "core/animation/ElementAnimations.h" | 33 #include "core/animation/ElementAnimations.h" | 
| 33 #include "core/animation/InterpolationEnvironment.h" | 34 #include "core/animation/InterpolationEnvironment.h" | 
| 34 #include "core/animation/InvalidatableInterpolation.h" | 35 #include "core/animation/InvalidatableInterpolation.h" | 
| 35 #include "core/css/CSSCursorImageValue.h" | 36 #include "core/css/CSSCursorImageValue.h" | 
| 36 #include "core/css/resolver/StyleResolver.h" | 37 #include "core/css/resolver/StyleResolver.h" | 
| 37 #include "core/dom/Document.h" | 38 #include "core/dom/Document.h" | 
| 38 #include "core/dom/ElementTraversal.h" | 39 #include "core/dom/ElementTraversal.h" | 
| (...skipping 998 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1037 | 1038 | 
| 1038 #if ENABLE(ASSERT) | 1039 #if ENABLE(ASSERT) | 
| 1039 bool SVGElement::isAnimatableAttribute(const QualifiedName& name) const | 1040 bool SVGElement::isAnimatableAttribute(const QualifiedName& name) const | 
| 1040 { | 1041 { | 
| 1041     // This static is atomically initialized to dodge a warning about | 1042     // This static is atomically initialized to dodge a warning about | 
| 1042     // a race when dumping debug data for a layer. | 1043     // a race when dumping debug data for a layer. | 
| 1043     DEFINE_THREAD_SAFE_STATIC_LOCAL(HashSet<QualifiedName>, animatableAttributes
      , new HashSet<QualifiedName>()); | 1044     DEFINE_THREAD_SAFE_STATIC_LOCAL(HashSet<QualifiedName>, animatableAttributes
      , new HashSet<QualifiedName>()); | 
| 1044 | 1045 | 
| 1045     if (animatableAttributes.isEmpty()) { | 1046     if (animatableAttributes.isEmpty()) { | 
| 1046         const QualifiedName* const animatableAttrs[] = { | 1047         const QualifiedName* const animatableAttrs[] = { | 
|  | 1048             &XLinkNames::hrefAttr, | 
| 1047             &SVGNames::amplitudeAttr, | 1049             &SVGNames::amplitudeAttr, | 
| 1048             &SVGNames::azimuthAttr, | 1050             &SVGNames::azimuthAttr, | 
| 1049             &SVGNames::baseFrequencyAttr, | 1051             &SVGNames::baseFrequencyAttr, | 
| 1050             &SVGNames::biasAttr, | 1052             &SVGNames::biasAttr, | 
| 1051             &SVGNames::clipPathUnitsAttr, | 1053             &SVGNames::clipPathUnitsAttr, | 
| 1052             &SVGNames::cxAttr, | 1054             &SVGNames::cxAttr, | 
| 1053             &SVGNames::cyAttr, | 1055             &SVGNames::cyAttr, | 
| 1054             &SVGNames::diffuseConstantAttr, | 1056             &SVGNames::diffuseConstantAttr, | 
| 1055             &SVGNames::divisorAttr, | 1057             &SVGNames::divisorAttr, | 
| 1056             &SVGNames::dxAttr, | 1058             &SVGNames::dxAttr, | 
| 1057             &SVGNames::dyAttr, | 1059             &SVGNames::dyAttr, | 
| 1058             &SVGNames::edgeModeAttr, | 1060             &SVGNames::edgeModeAttr, | 
| 1059             &SVGNames::elevationAttr, | 1061             &SVGNames::elevationAttr, | 
| 1060             &SVGNames::exponentAttr, | 1062             &SVGNames::exponentAttr, | 
| 1061             &SVGNames::filterUnitsAttr, | 1063             &SVGNames::filterUnitsAttr, | 
| 1062             &SVGNames::fxAttr, | 1064             &SVGNames::fxAttr, | 
| 1063             &SVGNames::fyAttr, | 1065             &SVGNames::fyAttr, | 
| 1064             &SVGNames::gradientTransformAttr, | 1066             &SVGNames::gradientTransformAttr, | 
| 1065             &SVGNames::gradientUnitsAttr, | 1067             &SVGNames::gradientUnitsAttr, | 
| 1066             &SVGNames::heightAttr, | 1068             &SVGNames::heightAttr, | 
| 1067             &SVGNames::hrefAttr, |  | 
| 1068             &SVGNames::in2Attr, | 1069             &SVGNames::in2Attr, | 
| 1069             &SVGNames::inAttr, | 1070             &SVGNames::inAttr, | 
| 1070             &SVGNames::interceptAttr, | 1071             &SVGNames::interceptAttr, | 
| 1071             &SVGNames::k1Attr, | 1072             &SVGNames::k1Attr, | 
| 1072             &SVGNames::k2Attr, | 1073             &SVGNames::k2Attr, | 
| 1073             &SVGNames::k3Attr, | 1074             &SVGNames::k3Attr, | 
| 1074             &SVGNames::k4Attr, | 1075             &SVGNames::k4Attr, | 
| 1075             &SVGNames::kernelMatrixAttr, | 1076             &SVGNames::kernelMatrixAttr, | 
| 1076             &SVGNames::kernelUnitLengthAttr, | 1077             &SVGNames::kernelUnitLengthAttr, | 
| 1077             &SVGNames::lengthAdjustAttr, | 1078             &SVGNames::lengthAdjustAttr, | 
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1170     const SVGElementSet& incomingReferences = svgRareData()->incomingReferences(
      ); | 1171     const SVGElementSet& incomingReferences = svgRareData()->incomingReferences(
      ); | 
| 1171 | 1172 | 
| 1172     // Iterate on a snapshot as |incomingReferences| may be altered inside loop. | 1173     // Iterate on a snapshot as |incomingReferences| may be altered inside loop. | 
| 1173     WillBeHeapVector<RawPtrWillBeMember<SVGElement>> incomingReferencesSnapshot; | 1174     WillBeHeapVector<RawPtrWillBeMember<SVGElement>> incomingReferencesSnapshot; | 
| 1174     copyToVector(incomingReferences, incomingReferencesSnapshot); | 1175     copyToVector(incomingReferences, incomingReferencesSnapshot); | 
| 1175 | 1176 | 
| 1176     // Force rebuilding the |sourceElement| so it knows about this change. | 1177     // Force rebuilding the |sourceElement| so it knows about this change. | 
| 1177     for (SVGElement* sourceElement : incomingReferencesSnapshot) { | 1178     for (SVGElement* sourceElement : incomingReferencesSnapshot) { | 
| 1178         // Before rebuilding |sourceElement| ensure it was not removed from unde
      r us. | 1179         // Before rebuilding |sourceElement| ensure it was not removed from unde
      r us. | 
| 1179         if (incomingReferences.contains(sourceElement)) | 1180         if (incomingReferences.contains(sourceElement)) | 
| 1180             sourceElement->svgAttributeChanged(SVGNames::hrefAttr); | 1181             sourceElement->svgAttributeChanged(XLinkNames::hrefAttr); | 
| 1181     } | 1182     } | 
| 1182 } | 1183 } | 
| 1183 | 1184 | 
| 1184 void SVGElement::removeAllIncomingReferences() | 1185 void SVGElement::removeAllIncomingReferences() | 
| 1185 { | 1186 { | 
| 1186     if (!hasSVGRareData()) | 1187     if (!hasSVGRareData()) | 
| 1187         return; | 1188         return; | 
| 1188 | 1189 | 
| 1189     SVGElementSet& incomingReferences = svgRareData()->incomingReferences(); | 1190     SVGElementSet& incomingReferences = svgRareData()->incomingReferences(); | 
| 1190     for (SVGElement* sourceElement: incomingReferences) { | 1191     for (SVGElement* sourceElement: incomingReferences) { | 
| (...skipping 27 matching lines...) Expand all  Loading... | 
| 1218     Element::trace(visitor); | 1219     Element::trace(visitor); | 
| 1219 } | 1220 } | 
| 1220 | 1221 | 
| 1221 const AtomicString& SVGElement::eventParameterName() | 1222 const AtomicString& SVGElement::eventParameterName() | 
| 1222 { | 1223 { | 
| 1223     DEFINE_STATIC_LOCAL(const AtomicString, evtString, ("evt", AtomicString::Con
      structFromLiteral)); | 1224     DEFINE_STATIC_LOCAL(const AtomicString, evtString, ("evt", AtomicString::Con
      structFromLiteral)); | 
| 1224     return evtString; | 1225     return evtString; | 
| 1225 } | 1226 } | 
| 1226 | 1227 | 
| 1227 } // namespace blink | 1228 } // namespace blink | 
| OLD | NEW | 
|---|