Bug 1270499 - Setting reflected unsigned long to out-of-range value should set to default; r=bz

This changes to match the spec, which also aligns the behavior of get
and set (get already maps out-of-range values to the default value).
There is currently no interoperable behavior here, but this aligns us
with IE -- tested in 11, hopefully true for Edge too.

On the way, I also fixed the fact that video's height and width were
being treated as signed.
This commit is contained in:
Aryeh Gregor
2016-05-05 21:29:54 +03:00
parent 065ff1dee3
commit 46067b8a0c
14 changed files with 41 additions and 131 deletions

View File

@@ -210,7 +210,7 @@ public:
}
void SetSize(uint32_t aSize, ErrorResult& aRv)
{
SetUnsignedIntAttr(nsGkAtoms::size, aSize, aRv);
SetUnsignedIntAttr(nsGkAtoms::size, aSize, 0, aRv);
}
// Uses XPCOM GetType.