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:
@@ -179,7 +179,7 @@ public:
|
||||
if (aCols == 0) {
|
||||
aError.Throw(NS_ERROR_DOM_INDEX_SIZE_ERR);
|
||||
} else {
|
||||
SetUnsignedIntAttr(nsGkAtoms::cols, aCols, aError);
|
||||
SetUnsignedIntAttr(nsGkAtoms::cols, aCols, DEFAULT_COLS, aError);
|
||||
}
|
||||
}
|
||||
bool Disabled()
|
||||
@@ -247,7 +247,7 @@ public:
|
||||
if (aRows == 0) {
|
||||
aError.Throw(NS_ERROR_DOM_INDEX_SIZE_ERR);
|
||||
} else {
|
||||
SetUnsignedIntAttr(nsGkAtoms::rows, aRows, aError);
|
||||
SetUnsignedIntAttr(nsGkAtoms::rows, aRows, DEFAULT_ROWS_TEXTAREA, aError);
|
||||
}
|
||||
}
|
||||
// XPCOM GetWrap is fine
|
||||
|
||||
Reference in New Issue
Block a user