зеркало из https://github.com/mozilla/pjs.git
Bug 711958 - Add a 'length' property to DOMSVGStringList. r=dholbert.
This commit is contained in:
Родитель
739705418d
Коммит
1f4cc602f1
|
@ -99,6 +99,12 @@ DOMSVGStringList::GetNumberOfItems(PRUint32 *aNumberOfItems)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
DOMSVGStringList::GetLength(PRUint32 *aLength)
|
||||
{
|
||||
return GetNumberOfItems(aLength);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
DOMSVGStringList::Clear()
|
||||
{
|
||||
|
|
|
@ -13,7 +13,8 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=631437
|
|||
<text id="text" x="10 20 30" rotate="40 50 60">abcde</text>
|
||||
<path id="path" d="M0,0 L100,100"/>
|
||||
<polygon id="poly" points="50,50 70,70 90,50"/>
|
||||
<g id="g" transform="translate(20 30) rotate(50 60 70) scale(2)"/>
|
||||
<g id="g" transform="translate(20 30) rotate(50 60 70) scale(2)"
|
||||
requiredFeatures="foo bar baz"/>
|
||||
</svg>
|
||||
<script type="text/javascript;version=1.8"><![CDATA[
|
||||
var text = document.getElementById("text"),
|
||||
|
@ -69,6 +70,13 @@ var tests = [
|
|||
{ values: "skewX(45)", length: 1 },
|
||||
{ values: "translate(1 2) rotate(3) scale(4) skewY(5) skewX(6)",
|
||||
length: 5 } ] }
|
||||
{ element: g,
|
||||
attribute: "requiredFeatures",
|
||||
listProperty: "requiredFeatures",
|
||||
type: "SVGStringList",
|
||||
subtests: [ { values: null, length: 3 },
|
||||
{ values: "foo", length: 1 },
|
||||
{ values: "foo bar baz qux", length: 4 } ] }
|
||||
];
|
||||
|
||||
for each (let test in tests) {
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
interface nsIDOMSVGStringList : nsISupports
|
||||
{
|
||||
readonly attribute unsigned long numberOfItems;
|
||||
readonly attribute unsigned long length;
|
||||
|
||||
void clear();
|
||||
// raises(nsIDOMDOMException);
|
||||
|
|
Загрузка…
Ссылка в новой задаче