Bug 421464. The 'type' attribute on <style> should be optional. r=longsonr@gmail.com, sr=roc@ocallahan.org, blocking1.9=me

This commit is contained in:
jwatt@jwatt.org 2008-03-07 02:16:05 -08:00
parent ef11919bb8
commit 1df60818bf
3 changed files with 26 additions and 0 deletions

View File

@ -341,6 +341,9 @@ nsSVGStyleElement::GetStyleSheetInfo(nsAString& aTitle,
ToLowerCase(aMedia);
GetAttr(kNameSpaceID_None, nsGkAtoms::type, aType);
if (aType.IsEmpty()) {
aType.AssignLiteral("text/css");
}
return;
}

View File

@ -49,6 +49,7 @@ fails-if(MOZ_WIDGET_TOOLKIT=="cocoa") == opacity-and-gradient-01.svg pass.svg #
== rootElement-null-01.svg pass.svg
== stroke-width-percentage-01.svg pass.svg
fails == style-property-not-on-script-element-01.svg pass.svg
== style-without-type-attribute.svg pass.svg
== svg-in-foreignObject-01.xhtml svg-in-foreignObject-01-ref.xhtml
== svg-in-foreignObject-02.xhtml svg-in-foreignObject-01-ref.xhtml # reuse -01-ref.xhtml
random-if(MOZ_WIDGET_TOOLKIT=="gtk2") == text-font-weight-01.svg text-font-weight-01-ref.svg # bug 386713

View File

@ -0,0 +1,22 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<svg xmlns="http://www.w3.org/2000/svg" >
<title>Testcase for defaulting of 'type' attribute on &lt;style&gt;</title>
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=421464 -->
<style>
#r1 { fill: lime; }
</style>
<style type="">
#r2 { fill: lime; }
</style>
<rect id="r1" width="50%" height="100%" fill="red"/>
<rect id="r2" x="50%" width="50%" height="100%" fill="red"/>
</svg>

After

Width:  |  Height:  |  Size: 543 B