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:
@@ -484,7 +484,7 @@ public:
|
||||
|
||||
void SetHeight(uint32_t aValue, ErrorResult& aRv)
|
||||
{
|
||||
SetUnsignedIntAttr(nsGkAtoms::height, aValue, aRv);
|
||||
SetUnsignedIntAttr(nsGkAtoms::height, aValue, 0, aRv);
|
||||
}
|
||||
|
||||
bool Indeterminate() const
|
||||
@@ -588,7 +588,7 @@ public:
|
||||
return;
|
||||
}
|
||||
|
||||
SetUnsignedIntAttr(nsGkAtoms::size, aValue, aRv);
|
||||
SetUnsignedIntAttr(nsGkAtoms::size, aValue, DEFAULT_COLS, aRv);
|
||||
}
|
||||
|
||||
// XPCOM GetSrc() is OK
|
||||
@@ -641,7 +641,7 @@ public:
|
||||
|
||||
void SetWidth(uint32_t aValue, ErrorResult& aRv)
|
||||
{
|
||||
SetUnsignedIntAttr(nsGkAtoms::width, aValue, aRv);
|
||||
SetUnsignedIntAttr(nsGkAtoms::width, aValue, 0, aRv);
|
||||
}
|
||||
|
||||
void StepUp(int32_t aN, ErrorResult& aRv)
|
||||
|
||||
Reference in New Issue
Block a user