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:
@@ -113,7 +113,7 @@ public:
|
||||
}
|
||||
void SetWidth(uint32_t aWidth, ErrorResult& aError)
|
||||
{
|
||||
SetUnsignedIntAttr(nsGkAtoms::width, aWidth, aError);
|
||||
SetUnsignedIntAttr(nsGkAtoms::width, aWidth, 0, aError);
|
||||
}
|
||||
uint32_t Height()
|
||||
{
|
||||
@@ -121,7 +121,7 @@ public:
|
||||
}
|
||||
void SetHeight(uint32_t aHeight, ErrorResult& aError)
|
||||
{
|
||||
SetUnsignedIntAttr(nsGkAtoms::height, aHeight, aError);
|
||||
SetUnsignedIntAttr(nsGkAtoms::height, aHeight, 0, aError);
|
||||
}
|
||||
uint32_t NaturalWidth();
|
||||
uint32_t NaturalHeight();
|
||||
@@ -132,7 +132,7 @@ public:
|
||||
}
|
||||
void SetHspace(uint32_t aHspace, ErrorResult& aError)
|
||||
{
|
||||
SetUnsignedIntAttr(nsGkAtoms::hspace, aHspace, aError);
|
||||
SetUnsignedIntAttr(nsGkAtoms::hspace, aHspace, 0, aError);
|
||||
}
|
||||
uint32_t Vspace()
|
||||
{
|
||||
@@ -140,7 +140,7 @@ public:
|
||||
}
|
||||
void SetVspace(uint32_t aVspace, ErrorResult& aError)
|
||||
{
|
||||
SetUnsignedIntAttr(nsGkAtoms::vspace, aVspace, aError);
|
||||
SetUnsignedIntAttr(nsGkAtoms::vspace, aVspace, 0, aError);
|
||||
}
|
||||
|
||||
// The XPCOM versions of the following getters work for Web IDL bindings as well
|
||||
|
||||
Reference in New Issue
Block a user