No subject
Sun Dec 8 17:39:16 PST 2013
ement/script-set-href.svg and
svg/dom/svg-element-attribute-js-null.xhtml still hit an assert in Debug =
because SVGNames::typeAttr can't
be used with fastGetAttribute in all cases, because it can be animatable.=
However for SVGScriptElement
it is not animatable, so make isAnimatableAttribute virtual (note Debug o=
nly method) and allow typeAttr
in the SVGScriptElement case to be useable for fastGetAttribute.
Test: svg/dom/SVGScriptElement/script-type-attribute.svg
* svg/SVGElement.h:
* svg/SVGScriptElement.cpp:
(WebCore::SVGScriptElement::isAnimatableAttribute):
* svg/SVGScriptElement.h:
LayoutTests:
Add test to verify the new type getter/setter behavior on SVScriptElement=
.
Specifically, the old behavior was setting the JS type property did not r=
eflect in
the actual content attribute being set, the new behavior is to do set the=
content
attribute when setting the JS type property.
* svg/dom/SVGScriptElement/script-type-attribute-expected.txt: Added.
* svg/dom/SVGScriptElement/script-type-attribute.svg: Added.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href=3D"#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a=
></li>
<li><a href=3D"#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeL=
og</a></li>
<li><a href=3D"#trunkSourceWebCoresvgSVGElementh">trunk/Source/WebCore/sv=
g/SVGElement.h</a></li>
<li><a href=3D"#trunkSourceWebCoresvgSVGScriptElementcpp">trunk/Source/We=
bCore/svg/SVGScriptElement.cpp</a></li>
<li><a href=3D"#trunkSourceWebCoresvgSVGScriptElementh">trunk/Source/WebC=
ore/svg/SVGScriptElement.h</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href=3D"#trunkLayoutTestssvgdomSVGScriptElementscripttypeattribute=
expectedtxt">trunk/LayoutTests/svg/dom/SVGScriptElement/script-type-attri=
bute-expected.txt</a></li>
<li><a href=3D"#trunkLayoutTestssvgdomSVGScriptElementscripttypeattribute=
svg">trunk/LayoutTests/svg/dom/SVGScriptElement/script-type-attribute.svg=
</a></li>
</ul>
</div>
<div id=3D"patch">
<h3>Diff</h3>
<a id=3D"trunkLayoutTestsChangeLog"></a>
<div class=3D"modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (160543 =
=3D> 160544)</h4>
<pre class=3D"diff"><span>
<span class=3D"info">--- trunk/LayoutTests/ChangeLog 2013-12-13 12:40:06 =
UTC (rev 160543)
+++ trunk/LayoutTests/ChangeLog 2013-12-13 14:13:26 UTC (rev 160544)
</span><span class=3D"lines">@@ -1,3 +1,18 @@
</span><ins>+2013-12-13 Rob Buis <rob.buis at samsung.com>
+
+ Clean up SVGScriptElement
+ https://bugs.webkit.org/show_bug.cgi?id=3D125527
+
+ Reviewed by Darin Adler.
+
+ Add test to verify the new type getter/setter behavior on SVScri=
ptElement.
+ Specifically, the old behavior was setting the JS type property =
did not reflect in
+ the actual content attribute being set, the new behavior is to d=
o set the content
+ attribute when setting the JS type property.
+
+ * svg/dom/SVGScriptElement/script-type-attribute-expected.txt: A=
dded.
+ * svg/dom/SVGScriptElement/script-type-attribute.svg: Added.
+
</ins><span class=3D"cx"> 2013-12-13 Micha=C5=82 Paku=C5=82a vel Rutka =
<m.pakula at samsung.com>
</span><span class=3D"cx">=20
</span><span class=3D"cx"> Unreviewed EFL gardening
</span></span></pre></div>
<a id=3D"trunkLayoutTestssvgdomSVGScriptElementscripttypeattributeexpecte=
dtxt"></a>
<div class=3D"addfile"><h4>Added: trunk/LayoutTests/svg/dom/SVGScriptElem=
ent/script-type-attribute-expected.txt (0 =3D> 160544)</h4>
<pre class=3D"diff"><span>
<span class=3D"info">--- trunk/LayoutTests/svg/dom/SVGScriptElement/scrip=
t-type-attribute-expected.txt (rev 0)
+++ trunk/LayoutTests/svg/dom/SVGScriptElement/script-type-attribute-expe=
cted.txt 2013-12-13 14:13:26 UTC (rev 160544)
</span><span class=3D"lines">@@ -0,0 +1,3 @@
</span><ins>+Test that getting/setting the type JS property on SVGScriptE=
lement keeps sync with the type content attribute.
+
+PASS
</ins></span></pre></div>
<a id=3D"trunkLayoutTestssvgdomSVGScriptElementscripttypeattributesvg"></=
a>
<div class=3D"addfile"><h4>Added: trunk/LayoutTests/svg/dom/SVGScriptElem=
ent/script-type-attribute.svg (0 =3D> 160544)</h4>
<pre class=3D"diff"><span>
<span class=3D"info">--- trunk/LayoutTests/svg/dom/SVGScriptElement/scrip=
t-type-attribute.svg (rev 0)
+++ trunk/LayoutTests/svg/dom/SVGScriptElement/script-type-attribute.svg =
2013-12-13 14:13:26 UTC (rev 160544)
</span><span class=3D"lines">@@ -0,0 +1,24 @@
</span><ins>+<svg xmlns=3D"http://www.w3.org/2000/svg" xmlns=
:xhtml=3D"http://www.w3.org/1999/xhtml" onload=3D"test()&q=
uot;>
+<script type=3D"text/javascript">
+function test() {
+ if (window.testRunner) {
+ testRunner.dumpAsText();
+ }
+
+ var script =3D document.createElementNS("http://www.w3.org/2000=
/svg", "svg:script");
+ script.type =3D "text/javascript";
+ if (script.type !=3D "text/javascript" || script.getAttrib=
ute("type") !=3D "text/javascript") {
+ document.getElementById("p0").innerHTML =3D "FAIL=
";
+ return;
+ }
+
+ script.setAttribute("type", "text/fooscript");
+ if (script.type !=3D "text/fooscript" || script.getAttribu=
te("type") !=3D "text/fooscript")
+ document.getElementById("p0").innerHTML =3D "FAIL=
";
+}
+</script>
+<foreignObject>
+<xhtml:p>Test that getting/setting the type JS property on SVGScri=
ptElement keeps sync with the type content attribute.</xhtml:p>
+<xhtml:span id=3D"p0">PASS</xhtml:span>
+</foreignObject>
+</svg>
</ins></span></pre></div>
<a id=3D"trunkSourceWebCoreChangeLog"></a>
<div class=3D"modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (1605=
43 =3D> 160544)</h4>
<pre class=3D"diff"><span>
<span class=3D"info">--- trunk/Source/WebCore/ChangeLog 2013-12-13 12:40:=
06 UTC (rev 160543)
+++ trunk/Source/WebCore/ChangeLog 2013-12-13 14:13:26 UTC (rev 160544)
</span><span class=3D"lines">@@ -1,3 +1,23 @@
</span><ins>+2013-12-13 Rob Buis <rob.buis at samsung.com>
+
+ Clean up SVGScriptElement
+ https://bugs.webkit.org/show_bug.cgi?id=3D125527
+
+ Reviewed by Darin Adler.
+
+ From the Blink port of this bug it becomes clear that svg/dom/SV=
GScriptElement/script-set-href.svg and
+ svg/dom/svg-element-attribute-js-null.xhtml still hit an assert =
in Debug because SVGNames::typeAttr can't
+ be used with fastGetAttribute in all cases, because it can be an=
imatable. However for SVGScriptElement
+ it is not animatable, so make isAnimatableAttribute virtual (not=
e Debug only method) and allow typeAttr
+ in the SVGScriptElement case to be useable for fastGetAttribute.
+
+ Test: svg/dom/SVGScriptElement/script-type-attribute.svg
+
+ * svg/SVGElement.h:
+ * svg/SVGScriptElement.cpp:
+ (WebCore::SVGScriptElement::isAnimatableAttribute):
+ * svg/SVGScriptElement.h:
+
</ins><span class=3D"cx"> 2013-12-13 Carlos Garcia Campos <cgarcia at i=
galia.com>
</span><span class=3D"cx">=20
</span><span class=3D"cx"> [GTK] Expose also webkit_dom_document_=
get_url
</span></span></pre></div>
<a id=3D"trunkSourceWebCoresvgSVGElementh"></a>
<div class=3D"modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGElement.=
h (160543 =3D> 160544)</h4>
<pre class=3D"diff"><span>
<span class=3D"info">--- trunk/Source/WebCore/svg/SVGElement.h 2013-12-13=
12:40:06 UTC (rev 160543)
+++ trunk/Source/WebCore/svg/SVGElement.h 2013-12-13 14:13:26 UTC (rev 16=
0544)
</span><span class=3D"lines">@@ -123,7 +123,7 @@
</span><span class=3D"cx"> virtual void synchronizeSystemLanguage() {=
}
</span><span class=3D"cx">=20
</span><span class=3D"cx"> #ifndef NDEBUG
</span><del>- bool isAnimatableAttribute(const QualifiedName&) con=
st;
</del><ins>+ virtual bool isAnimatableAttribute(const QualifiedName&am=
p;) const;
</ins><span class=3D"cx"> #endif
</span><span class=3D"cx">=20
</span><span class=3D"cx"> MutableStyleProperties* animatedSMILStyleP=
roperties() const;
</span></span></pre></div>
<a id=3D"trunkSourceWebCoresvgSVGScriptElementcpp"></a>
<div class=3D"modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGScriptEl=
ement.cpp (160543 =3D> 160544)</h4>
<pre class=3D"diff"><span>
<span class=3D"info">--- trunk/Source/WebCore/svg/SVGScriptElement.cpp 20=
13-12-13 12:40:06 UTC (rev 160543)
+++ trunk/Source/WebCore/svg/SVGScriptElement.cpp 2013-12-13 14:13:26 UTC=
(rev 160544)
</span><span class=3D"lines">@@ -198,6 +198,16 @@
</span><span class=3D"cx"> return adoptRef(new SVGScriptElement(tagQN=
ame(), document(), false, alreadyStarted()));
</span><span class=3D"cx"> }
</span><span class=3D"cx">=20
</span><ins>+#ifndef NDEBUG
+bool SVGScriptElement::isAnimatableAttribute(const QualifiedName& na=
me) const
+{
+ if (name =3D=3D SVGNames::typeAttr)
+ return false;
+
+ return SVGElement::isAnimatableAttribute(name);
</ins><span class=3D"cx"> }
</span><ins>+#endif
</ins><span class=3D"cx">=20
</span><ins>+}
+
</ins><span class=3D"cx"> #endif // ENABLE(SVG)
</span></span></pre></div>
<a id=3D"trunkSourceWebCoresvgSVGScriptElementh"></a>
<div class=3D"modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGScriptEl=
ement.h (160543 =3D> 160544)</h4>
<pre class=3D"diff"><span>
<span class=3D"info">--- trunk/Source/WebCore/svg/SVGScriptElement.h 2013=
-12-13 12:40:06 UTC (rev 160543)
+++ trunk/Source/WebCore/svg/SVGScriptElement.h 2013-12-13 14:13:26 UTC (=
rev 160544)
</span><span class=3D"lines">@@ -38,6 +38,9 @@
</span><span class=3D"cx"> public:
</span><span class=3D"cx"> static PassRefPtr<SVGScriptElement> =
create(const QualifiedName&, Document&, bool wasInsertedByParser)=
;
</span><span class=3D"cx">=20
</span><ins>+#ifndef NDEBUG
+ virtual bool isAnimatableAttribute(const QualifiedName&) const;
+#endif
</ins><span class=3D"cx">=20
</span><span class=3D"cx"> private:
</span><span class=3D"cx"> SVGScriptElement(const QualifiedName&,=
Document&, bool wasInsertedByParser, bool alreadyStarted);
</span></span></pre>
</div>
</div>
</body>
</html>
More information about the webkit-changes
mailing list