<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[164123] trunk/Source/WebCore</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/164123">164123</a></dd>
<dt>Author</dt> <dd>benjamin@webkit.org</dd>
<dt>Date</dt> <dd>2014-02-14 12:58:28 -0800 (Fri, 14 Feb 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Do not attempt to synchronize attributes when no Simple Selector could match an animatable attribute
https://bugs.webkit.org/show_bug.cgi?id=128728
Reviewed by Andreas Kling.
In most cases, we don't even need to test for the flag animatedSVGAttributesNotDirty.
If the selector filter could never match an animatable attribute, there is no point in testing for one.
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::canMatchStyleAttribute):
Skip the second test when the local name is equal to canonicalLocalName. That is the common case.
(WebCore::SelectorCompiler::canMatchAnimatableSVGAttribute):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributesMatching):
* svg/SVGElement.cpp:
(WebCore::addQualifiedName):
(WebCore::SVGElement::animatableAttributeForName):
(WebCore::SVGElement::isAnimatableAttribute):
(WebCore::SVGElement::filterOutAnimatableAttribute):
* svg/SVGElement.h:
* svg/SVGScriptElement.cpp:
(WebCore::SVGScriptElement::filterOutAnimatableAttribute):
* svg/SVGScriptElement.h:
Move the list of animatable attribute to a static function available in Release.
Selector matching is a lot more flexible than normal name matching. Since the local name must
always match, it is used as a key to get the full QualifiedName to compare to the selector.
Separating the list of animatable attributes between Selectors and SVGElement::isAnimatableAttribute
would be error prone. Instead, SVGElement::isAnimatableAttribute() is modified to use
SVGElement::animatableAttributeForName so that the two never get out of sync.
Since SVGScriptElement has one additional restriction to isAnimatableAttribute(), the function
filterOutAnimatableAttribute() is added to remove a qualified name from the complete list of animatable attributes.
This ensure SVGElement::animatableAttributeForName() always has the complete list, and subclasses of SVGElement
can only remove QualifiedNames, not add them.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorecssjitSelectorCompilercpp">trunk/Source/WebCore/cssjit/SelectorCompiler.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGElementcpp">trunk/Source/WebCore/svg/SVGElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGElementh">trunk/Source/WebCore/svg/SVGElement.h</a></li>
<li><a href="#trunkSourceWebCoresvgSVGScriptElementcpp">trunk/Source/WebCore/svg/SVGScriptElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGScriptElementh">trunk/Source/WebCore/svg/SVGScriptElement.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (164122 => 164123)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-02-14 20:57:45 UTC (rev 164122)
+++ trunk/Source/WebCore/ChangeLog        2014-02-14 20:58:28 UTC (rev 164123)
</span><span class="lines">@@ -1,5 +1,44 @@
</span><span class="cx"> 2014-02-14 Benjamin Poulain <benjamin@webkit.org>
</span><span class="cx">
</span><ins>+ Do not attempt to synchronize attributes when no Simple Selector could match an animatable attribute
+ https://bugs.webkit.org/show_bug.cgi?id=128728
+
+ Reviewed by Andreas Kling.
+
+ In most cases, we don't even need to test for the flag animatedSVGAttributesNotDirty.
+ If the selector filter could never match an animatable attribute, there is no point in testing for one.
+
+ * cssjit/SelectorCompiler.cpp:
+ (WebCore::SelectorCompiler::canMatchStyleAttribute):
+ Skip the second test when the local name is equal to canonicalLocalName. That is the common case.
+
+ (WebCore::SelectorCompiler::canMatchAnimatableSVGAttribute):
+ (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributesMatching):
+
+ * svg/SVGElement.cpp:
+ (WebCore::addQualifiedName):
+ (WebCore::SVGElement::animatableAttributeForName):
+ (WebCore::SVGElement::isAnimatableAttribute):
+ (WebCore::SVGElement::filterOutAnimatableAttribute):
+ * svg/SVGElement.h:
+ * svg/SVGScriptElement.cpp:
+ (WebCore::SVGScriptElement::filterOutAnimatableAttribute):
+ * svg/SVGScriptElement.h:
+ Move the list of animatable attribute to a static function available in Release.
+ Selector matching is a lot more flexible than normal name matching. Since the local name must
+ always match, it is used as a key to get the full QualifiedName to compare to the selector.
+
+ Separating the list of animatable attributes between Selectors and SVGElement::isAnimatableAttribute
+ would be error prone. Instead, SVGElement::isAnimatableAttribute() is modified to use
+ SVGElement::animatableAttributeForName so that the two never get out of sync.
+
+ Since SVGScriptElement has one additional restriction to isAnimatableAttribute(), the function
+ filterOutAnimatableAttribute() is added to remove a qualified name from the complete list of animatable attributes.
+ This ensure SVGElement::animatableAttributeForName() always has the complete list, and subclasses of SVGElement
+ can only remove QualifiedNames, not add them.
+
+2014-02-14 Benjamin Poulain <benjamin@webkit.org>
+
</ins><span class="cx"> Make code generation of the unoptimized pseudo classes separate
</span><span class="cx"> https://bugs.webkit.org/show_bug.cgi?id=128704
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorecssjitSelectorCompilercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/cssjit/SelectorCompiler.cpp (164122 => 164123)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/cssjit/SelectorCompiler.cpp        2014-02-14 20:57:45 UTC (rev 164122)
+++ trunk/Source/WebCore/cssjit/SelectorCompiler.cpp        2014-02-14 20:58:28 UTC (rev 164123)
</span><span class="lines">@@ -942,9 +942,13 @@
</span><span class="cx"> for (unsigned i = 0; i < fragment.attributes.size(); ++i) {
</span><span class="cx"> const CSSSelector* attributeSelector = fragment.attributes[i];
</span><span class="cx"> const QualifiedName& attributeName = attributeSelector->attribute();
</span><del>- if (Attribute::nameMatchesFilter(HTMLNames::styleAttr, attributeName.prefix(), attributeName.localName(), attributeName.namespaceURI())
- || Attribute::nameMatchesFilter(HTMLNames::styleAttr, attributeName.prefix(), attributeSelector->attributeCanonicalLocalName(), attributeName.namespaceURI())) {
</del><ins>+ if (Attribute::nameMatchesFilter(HTMLNames::styleAttr, attributeName.prefix(), attributeName.localName(), attributeName.namespaceURI()))
</ins><span class="cx"> return true;
</span><ins>+
+ const AtomicString& canonicalLocalName = attributeSelector->attributeCanonicalLocalName();
+ if (attributeName.localName() != canonicalLocalName
+ && Attribute::nameMatchesFilter(HTMLNames::styleAttr, attributeName.prefix(), attributeSelector->attributeCanonicalLocalName(), attributeName.namespaceURI())) {
+ return true;
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> return false;
</span><span class="lines">@@ -964,6 +968,26 @@
</span><span class="cx"> styleAttributeNotDirty.link(&m_assembler);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline bool canMatchAnimatableSVGAttribute(const SelectorFragment& fragment)
+{
+ for (unsigned i = 0; i < fragment.attributes.size(); ++i) {
+ const CSSSelector* attributeSelector = fragment.attributes[i];
+ const QualifiedName& selectorAttributeName = attributeSelector->attribute();
+
+ const QualifiedName& candidateForLocalName = SVGElement::animatableAttributeForName(selectorAttributeName.localName());
+ if (Attribute::nameMatchesFilter(candidateForLocalName, selectorAttributeName.prefix(), selectorAttributeName.localName(), selectorAttributeName.namespaceURI()))
+ return true;
+
+ const AtomicString& canonicalLocalName = attributeSelector->attributeCanonicalLocalName();
+ if (selectorAttributeName.localName() != canonicalLocalName) {
+ const QualifiedName& candidateForCanonicalLocalName = SVGElement::animatableAttributeForName(selectorAttributeName.localName());
+ if (Attribute::nameMatchesFilter(candidateForCanonicalLocalName, selectorAttributeName.prefix(), selectorAttributeName.localName(), selectorAttributeName.namespaceURI()))
+ return true;
+ }
+ }
+ return false;
+}
+
</ins><span class="cx"> void SelectorCodeGenerator::generateSynchronizeAllAnimatedSVGAttribute(Assembler::RegisterID elementDataArraySizeAndFlags)
</span><span class="cx"> {
</span><span class="cx"> // SVG attributes can be updated lazily depending on the flag AnimatedSVGAttributesAreDirty. We need to check
</span><span class="lines">@@ -990,9 +1014,8 @@
</span><span class="cx"> if (canMatchStyleAttribute(fragment))
</span><span class="cx"> generateSynchronizeStyleAttribute(elementDataArraySizeAndFlags);
</span><span class="cx">
</span><del>- // FIXME: Systematically generating the function call for animatable SVG attributes causes a runtime penaltly. We should instead
- // filter from the list of SVGElement::isAnimatableAttribute at runtime when compiling.
- generateSynchronizeAllAnimatedSVGAttribute(elementDataArraySizeAndFlags);
</del><ins>+ if (canMatchAnimatableSVGAttribute(fragment))
+ generateSynchronizeAllAnimatedSVGAttribute(elementDataArraySizeAndFlags);
</ins><span class="cx">
</span><span class="cx"> // Attributes can be stored either in a separate vector for UniqueElementData, or after the elementData itself
</span><span class="cx"> // for ShareableElementData.
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGElement.cpp (164122 => 164123)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGElement.cpp        2014-02-14 20:57:45 UTC (rev 164122)
+++ trunk/Source/WebCore/svg/SVGElement.cpp        2014-02-14 20:58:28 UTC (rev 164123)
</span><span class="lines">@@ -814,111 +814,128 @@
</span><span class="cx"> return m_svgRareData->overrideComputedStyle(this, parentStyle);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-#ifndef NDEBUG
-bool SVGElement::isAnimatableAttribute(const QualifiedName& name) const
</del><ins>+static void addQualifiedName(HashMap<AtomicString, QualifiedName>& map, const QualifiedName& name)
</ins><span class="cx"> {
</span><del>- static NeverDestroyed<HashSet<QualifiedName>> neverDestroyedAnimatableAttributes;
- HashSet<QualifiedName>& animatableAttributes = neverDestroyedAnimatableAttributes;
</del><ins>+ HashMap<AtomicString, QualifiedName>::AddResult addResult = map.add(name.localName(), name);
+ ASSERT_UNUSED(addResult, addResult.isNewEntry);
+}
</ins><span class="cx">
</span><ins>+QualifiedName SVGElement::animatableAttributeForName(const AtomicString& localName)
+{
+ static NeverDestroyed<HashMap<AtomicString, QualifiedName>> neverDestroyedAnimatableAttributes;
+ HashMap<AtomicString, QualifiedName>& animatableAttributes = neverDestroyedAnimatableAttributes;
+
</ins><span class="cx"> if (animatableAttributes.isEmpty()) {
</span><del>- animatableAttributes.add(HTMLNames::classAttr);
- animatableAttributes.add(SVGNames::amplitudeAttr);
- animatableAttributes.add(SVGNames::azimuthAttr);
- animatableAttributes.add(SVGNames::baseFrequencyAttr);
- animatableAttributes.add(SVGNames::biasAttr);
- animatableAttributes.add(SVGNames::clipPathUnitsAttr);
- animatableAttributes.add(SVGNames::cxAttr);
- animatableAttributes.add(SVGNames::cyAttr);
- animatableAttributes.add(SVGNames::diffuseConstantAttr);
- animatableAttributes.add(SVGNames::divisorAttr);
- animatableAttributes.add(SVGNames::dxAttr);
- animatableAttributes.add(SVGNames::dyAttr);
- animatableAttributes.add(SVGNames::edgeModeAttr);
- animatableAttributes.add(SVGNames::elevationAttr);
- animatableAttributes.add(SVGNames::exponentAttr);
- animatableAttributes.add(SVGNames::externalResourcesRequiredAttr);
- animatableAttributes.add(SVGNames::filterResAttr);
- animatableAttributes.add(SVGNames::filterUnitsAttr);
- animatableAttributes.add(SVGNames::fxAttr);
- animatableAttributes.add(SVGNames::fyAttr);
- animatableAttributes.add(SVGNames::gradientTransformAttr);
- animatableAttributes.add(SVGNames::gradientUnitsAttr);
- animatableAttributes.add(SVGNames::heightAttr);
- animatableAttributes.add(SVGNames::in2Attr);
- animatableAttributes.add(SVGNames::inAttr);
- animatableAttributes.add(SVGNames::interceptAttr);
- animatableAttributes.add(SVGNames::k1Attr);
- animatableAttributes.add(SVGNames::k2Attr);
- animatableAttributes.add(SVGNames::k3Attr);
- animatableAttributes.add(SVGNames::k4Attr);
- animatableAttributes.add(SVGNames::kernelMatrixAttr);
- animatableAttributes.add(SVGNames::kernelUnitLengthAttr);
- animatableAttributes.add(SVGNames::lengthAdjustAttr);
- animatableAttributes.add(SVGNames::limitingConeAngleAttr);
- animatableAttributes.add(SVGNames::markerHeightAttr);
- animatableAttributes.add(SVGNames::markerUnitsAttr);
- animatableAttributes.add(SVGNames::markerWidthAttr);
- animatableAttributes.add(SVGNames::maskContentUnitsAttr);
- animatableAttributes.add(SVGNames::maskUnitsAttr);
- animatableAttributes.add(SVGNames::methodAttr);
- animatableAttributes.add(SVGNames::modeAttr);
- animatableAttributes.add(SVGNames::numOctavesAttr);
- animatableAttributes.add(SVGNames::offsetAttr);
- animatableAttributes.add(SVGNames::operatorAttr);
- animatableAttributes.add(SVGNames::orderAttr);
- animatableAttributes.add(SVGNames::orientAttr);
- animatableAttributes.add(SVGNames::pathLengthAttr);
- animatableAttributes.add(SVGNames::patternContentUnitsAttr);
- animatableAttributes.add(SVGNames::patternTransformAttr);
- animatableAttributes.add(SVGNames::patternUnitsAttr);
- animatableAttributes.add(SVGNames::pointsAtXAttr);
- animatableAttributes.add(SVGNames::pointsAtYAttr);
- animatableAttributes.add(SVGNames::pointsAtZAttr);
- animatableAttributes.add(SVGNames::preserveAlphaAttr);
- animatableAttributes.add(SVGNames::preserveAspectRatioAttr);
- animatableAttributes.add(SVGNames::primitiveUnitsAttr);
- animatableAttributes.add(SVGNames::radiusAttr);
- animatableAttributes.add(SVGNames::rAttr);
- animatableAttributes.add(SVGNames::refXAttr);
- animatableAttributes.add(SVGNames::refYAttr);
- animatableAttributes.add(SVGNames::resultAttr);
- animatableAttributes.add(SVGNames::rotateAttr);
- animatableAttributes.add(SVGNames::rxAttr);
- animatableAttributes.add(SVGNames::ryAttr);
- animatableAttributes.add(SVGNames::scaleAttr);
- animatableAttributes.add(SVGNames::seedAttr);
- animatableAttributes.add(SVGNames::slopeAttr);
- animatableAttributes.add(SVGNames::spacingAttr);
- animatableAttributes.add(SVGNames::specularConstantAttr);
- animatableAttributes.add(SVGNames::specularExponentAttr);
- animatableAttributes.add(SVGNames::spreadMethodAttr);
- animatableAttributes.add(SVGNames::startOffsetAttr);
- animatableAttributes.add(SVGNames::stdDeviationAttr);
- animatableAttributes.add(SVGNames::stitchTilesAttr);
- animatableAttributes.add(SVGNames::surfaceScaleAttr);
- animatableAttributes.add(SVGNames::tableValuesAttr);
- animatableAttributes.add(SVGNames::targetAttr);
- animatableAttributes.add(SVGNames::targetXAttr);
- animatableAttributes.add(SVGNames::targetYAttr);
- animatableAttributes.add(SVGNames::transformAttr);
- animatableAttributes.add(SVGNames::typeAttr);
- animatableAttributes.add(SVGNames::valuesAttr);
- animatableAttributes.add(SVGNames::viewBoxAttr);
- animatableAttributes.add(SVGNames::widthAttr);
- animatableAttributes.add(SVGNames::x1Attr);
- animatableAttributes.add(SVGNames::x2Attr);
- animatableAttributes.add(SVGNames::xAttr);
- animatableAttributes.add(SVGNames::xChannelSelectorAttr);
- animatableAttributes.add(SVGNames::y1Attr);
- animatableAttributes.add(SVGNames::y2Attr);
- animatableAttributes.add(SVGNames::yAttr);
- animatableAttributes.add(SVGNames::yChannelSelectorAttr);
- animatableAttributes.add(SVGNames::zAttr);
- animatableAttributes.add(XLinkNames::hrefAttr);
</del><ins>+ addQualifiedName(animatableAttributes, HTMLNames::classAttr);
+ addQualifiedName(animatableAttributes, SVGNames::amplitudeAttr);
+ addQualifiedName(animatableAttributes, SVGNames::azimuthAttr);
+ addQualifiedName(animatableAttributes, SVGNames::baseFrequencyAttr);
+ addQualifiedName(animatableAttributes, SVGNames::biasAttr);
+ addQualifiedName(animatableAttributes, SVGNames::clipPathUnitsAttr);
+ addQualifiedName(animatableAttributes, SVGNames::cxAttr);
+ addQualifiedName(animatableAttributes, SVGNames::cyAttr);
+ addQualifiedName(animatableAttributes, SVGNames::diffuseConstantAttr);
+ addQualifiedName(animatableAttributes, SVGNames::divisorAttr);
+ addQualifiedName(animatableAttributes, SVGNames::dxAttr);
+ addQualifiedName(animatableAttributes, SVGNames::dyAttr);
+ addQualifiedName(animatableAttributes, SVGNames::edgeModeAttr);
+ addQualifiedName(animatableAttributes, SVGNames::elevationAttr);
+ addQualifiedName(animatableAttributes, SVGNames::exponentAttr);
+ addQualifiedName(animatableAttributes, SVGNames::externalResourcesRequiredAttr);
+ addQualifiedName(animatableAttributes, SVGNames::filterResAttr);
+ addQualifiedName(animatableAttributes, SVGNames::filterUnitsAttr);
+ addQualifiedName(animatableAttributes, SVGNames::fxAttr);
+ addQualifiedName(animatableAttributes, SVGNames::fyAttr);
+ addQualifiedName(animatableAttributes, SVGNames::gradientTransformAttr);
+ addQualifiedName(animatableAttributes, SVGNames::gradientUnitsAttr);
+ addQualifiedName(animatableAttributes, SVGNames::heightAttr);
+ addQualifiedName(animatableAttributes, SVGNames::in2Attr);
+ addQualifiedName(animatableAttributes, SVGNames::inAttr);
+ addQualifiedName(animatableAttributes, SVGNames::interceptAttr);
+ addQualifiedName(animatableAttributes, SVGNames::k1Attr);
+ addQualifiedName(animatableAttributes, SVGNames::k2Attr);
+ addQualifiedName(animatableAttributes, SVGNames::k3Attr);
+ addQualifiedName(animatableAttributes, SVGNames::k4Attr);
+ addQualifiedName(animatableAttributes, SVGNames::kernelMatrixAttr);
+ addQualifiedName(animatableAttributes, SVGNames::kernelUnitLengthAttr);
+ addQualifiedName(animatableAttributes, SVGNames::lengthAdjustAttr);
+ addQualifiedName(animatableAttributes, SVGNames::limitingConeAngleAttr);
+ addQualifiedName(animatableAttributes, SVGNames::markerHeightAttr);
+ addQualifiedName(animatableAttributes, SVGNames::markerUnitsAttr);
+ addQualifiedName(animatableAttributes, SVGNames::markerWidthAttr);
+ addQualifiedName(animatableAttributes, SVGNames::maskContentUnitsAttr);
+ addQualifiedName(animatableAttributes, SVGNames::maskUnitsAttr);
+ addQualifiedName(animatableAttributes, SVGNames::methodAttr);
+ addQualifiedName(animatableAttributes, SVGNames::modeAttr);
+ addQualifiedName(animatableAttributes, SVGNames::numOctavesAttr);
+ addQualifiedName(animatableAttributes, SVGNames::offsetAttr);
+ addQualifiedName(animatableAttributes, SVGNames::operatorAttr);
+ addQualifiedName(animatableAttributes, SVGNames::orderAttr);
+ addQualifiedName(animatableAttributes, SVGNames::orientAttr);
+ addQualifiedName(animatableAttributes, SVGNames::pathLengthAttr);
+ addQualifiedName(animatableAttributes, SVGNames::patternContentUnitsAttr);
+ addQualifiedName(animatableAttributes, SVGNames::patternTransformAttr);
+ addQualifiedName(animatableAttributes, SVGNames::patternUnitsAttr);
+ addQualifiedName(animatableAttributes, SVGNames::pointsAtXAttr);
+ addQualifiedName(animatableAttributes, SVGNames::pointsAtYAttr);
+ addQualifiedName(animatableAttributes, SVGNames::pointsAtZAttr);
+ addQualifiedName(animatableAttributes, SVGNames::preserveAlphaAttr);
+ addQualifiedName(animatableAttributes, SVGNames::preserveAspectRatioAttr);
+ addQualifiedName(animatableAttributes, SVGNames::primitiveUnitsAttr);
+ addQualifiedName(animatableAttributes, SVGNames::radiusAttr);
+ addQualifiedName(animatableAttributes, SVGNames::rAttr);
+ addQualifiedName(animatableAttributes, SVGNames::refXAttr);
+ addQualifiedName(animatableAttributes, SVGNames::refYAttr);
+ addQualifiedName(animatableAttributes, SVGNames::resultAttr);
+ addQualifiedName(animatableAttributes, SVGNames::rotateAttr);
+ addQualifiedName(animatableAttributes, SVGNames::rxAttr);
+ addQualifiedName(animatableAttributes, SVGNames::ryAttr);
+ addQualifiedName(animatableAttributes, SVGNames::scaleAttr);
+ addQualifiedName(animatableAttributes, SVGNames::seedAttr);
+ addQualifiedName(animatableAttributes, SVGNames::slopeAttr);
+ addQualifiedName(animatableAttributes, SVGNames::spacingAttr);
+ addQualifiedName(animatableAttributes, SVGNames::specularConstantAttr);
+ addQualifiedName(animatableAttributes, SVGNames::specularExponentAttr);
+ addQualifiedName(animatableAttributes, SVGNames::spreadMethodAttr);
+ addQualifiedName(animatableAttributes, SVGNames::startOffsetAttr);
+ addQualifiedName(animatableAttributes, SVGNames::stdDeviationAttr);
+ addQualifiedName(animatableAttributes, SVGNames::stitchTilesAttr);
+ addQualifiedName(animatableAttributes, SVGNames::surfaceScaleAttr);
+ addQualifiedName(animatableAttributes, SVGNames::tableValuesAttr);
+ addQualifiedName(animatableAttributes, SVGNames::targetAttr);
+ addQualifiedName(animatableAttributes, SVGNames::targetXAttr);
+ addQualifiedName(animatableAttributes, SVGNames::targetYAttr);
+ addQualifiedName(animatableAttributes, SVGNames::transformAttr);
+ addQualifiedName(animatableAttributes, SVGNames::typeAttr);
+ addQualifiedName(animatableAttributes, SVGNames::valuesAttr);
+ addQualifiedName(animatableAttributes, SVGNames::viewBoxAttr);
+ addQualifiedName(animatableAttributes, SVGNames::widthAttr);
+ addQualifiedName(animatableAttributes, SVGNames::x1Attr);
+ addQualifiedName(animatableAttributes, SVGNames::x2Attr);
+ addQualifiedName(animatableAttributes, SVGNames::xAttr);
+ addQualifiedName(animatableAttributes, SVGNames::xChannelSelectorAttr);
+ addQualifiedName(animatableAttributes, SVGNames::y1Attr);
+ addQualifiedName(animatableAttributes, SVGNames::y2Attr);
+ addQualifiedName(animatableAttributes, SVGNames::yAttr);
+ addQualifiedName(animatableAttributes, SVGNames::yChannelSelectorAttr);
+ addQualifiedName(animatableAttributes, SVGNames::zAttr);
+ addQualifiedName(animatableAttributes, XLinkNames::hrefAttr);
</ins><span class="cx"> }
</span><ins>+ return animatableAttributes.get(localName);
+}
</ins><span class="cx">
</span><del>- return animatableAttributes.contains(name);
</del><ins>+#ifndef NDEBUG
+bool SVGElement::isAnimatableAttribute(const QualifiedName& name) const
+{
+ if (SVGElement::animatableAttributeForName(name.localName()) == name)
+ return !filterOutAnimatableAttribute(name);
+ return false;
</ins><span class="cx"> }
</span><ins>+
+bool SVGElement::filterOutAnimatableAttribute(const QualifiedName&) const
+{
+ return false;
+}
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> String SVGElement::title() const
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGElement.h (164122 => 164123)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGElement.h        2014-02-14 20:57:45 UTC (rev 164122)
+++ trunk/Source/WebCore/svg/SVGElement.h        2014-02-14 20:58:28 UTC (rev 164123)
</span><span class="lines">@@ -122,8 +122,9 @@
</span><span class="cx"> virtual void synchronizeRequiredExtensions() { }
</span><span class="cx"> virtual void synchronizeSystemLanguage() { }
</span><span class="cx">
</span><ins>+ static QualifiedName animatableAttributeForName(const AtomicString&);
</ins><span class="cx"> #ifndef NDEBUG
</span><del>- virtual bool isAnimatableAttribute(const QualifiedName&) const;
</del><ins>+ bool isAnimatableAttribute(const QualifiedName&) const;
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> MutableStyleProperties* animatedSMILStyleProperties() const;
</span><span class="lines">@@ -184,6 +185,10 @@
</span><span class="cx"> virtual bool isMouseFocusable() const override;
</span><span class="cx"> virtual void accessKeyAction(bool sendMouseEvents) override;
</span><span class="cx">
</span><ins>+#ifndef NDEBUG
+ virtual bool filterOutAnimatableAttribute(const QualifiedName&) const;
+#endif
+
</ins><span class="cx"> std::unique_ptr<SVGElementRareData> m_svgRareData;
</span><span class="cx">
</span><span class="cx"> HashSet<SVGElement*> m_elementsWithRelativeLengths;
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGScriptElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGScriptElement.cpp (164122 => 164123)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGScriptElement.cpp        2014-02-14 20:57:45 UTC (rev 164122)
+++ trunk/Source/WebCore/svg/SVGScriptElement.cpp        2014-02-14 20:58:28 UTC (rev 164123)
</span><span class="lines">@@ -197,12 +197,9 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #ifndef NDEBUG
</span><del>-bool SVGScriptElement::isAnimatableAttribute(const QualifiedName& name) const
</del><ins>+bool SVGScriptElement::filterOutAnimatableAttribute(const QualifiedName& name) const
</ins><span class="cx"> {
</span><del>- if (name == SVGNames::typeAttr)
- return false;
-
- return SVGElement::isAnimatableAttribute(name);
</del><ins>+ return name == SVGNames::typeAttr;
</ins><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGScriptElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGScriptElement.h (164122 => 164123)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGScriptElement.h        2014-02-14 20:57:45 UTC (rev 164122)
+++ trunk/Source/WebCore/svg/SVGScriptElement.h        2014-02-14 20:58:28 UTC (rev 164123)
</span><span class="lines">@@ -37,10 +37,6 @@
</span><span class="cx"> public:
</span><span class="cx"> static PassRefPtr<SVGScriptElement> create(const QualifiedName&, Document&, bool wasInsertedByParser);
</span><span class="cx">
</span><del>-#ifndef NDEBUG
- virtual bool isAnimatableAttribute(const QualifiedName&) const override;
-#endif
-
</del><span class="cx"> private:
</span><span class="cx"> SVGScriptElement(const QualifiedName&, Document&, bool wasInsertedByParser, bool alreadyStarted);
</span><span class="cx">
</span><span class="lines">@@ -78,6 +74,10 @@
</span><span class="cx"> virtual bool haveFiredLoadEvent() const override { return ScriptElement::haveFiredLoadEvent(); }
</span><span class="cx"> virtual Timer<SVGElement>* svgLoadEventTimer() override { return &m_svgLoadEventTimer; }
</span><span class="cx">
</span><ins>+#ifndef NDEBUG
+ virtual bool filterOutAnimatableAttribute(const QualifiedName&) const override;
+#endif
+
</ins><span class="cx"> BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGScriptElement)
</span><span class="cx"> DECLARE_ANIMATED_STRING(Href, href)
</span><span class="cx"> DECLARE_ANIMATED_BOOLEAN(ExternalResourcesRequired, externalResourcesRequired)
</span></span></pre>
</div>
</div>
</body>
</html>