Make sure dropdowns fit in the screen by allowing the list to be above when there is not enough space

Reviewed By: Vladislav
Differential Revision: D1061
fixes #4857

This was SVN commit r21379.
This commit is contained in:
bb
2018-02-25 22:26:31 +00:00
parent a1ddf6114a
commit 3698c134b5
7 changed files with 91 additions and 11 deletions
@@ -156,6 +156,17 @@ bool JSI_IGUIObject::getProperty(JSContext* cx, JS::HandleObject obj, JS::Handle
break;
}
case GUIST_uint:
{
u32 value;
GUI<u32>::GetSetting(e, propName, value);
if (value >= std::numeric_limits<u32>::max())
LOGERROR("Integer overflow on converting to GUIST_uint");
else
vp.set(JS::Int32Value(value));
break;
}
case GUIST_float:
{
float value;
@@ -452,6 +463,19 @@ bool JSI_IGUIObject::setProperty(JSContext* cx, JS::HandleObject obj, JS::Handle
break;
}
case GUIST_uint:
{
u32 value;
if (ScriptInterface::FromJSVal(cx, vp, value))
GUI<u32>::SetSetting(e, propName, value);
else
{
JS_ReportError(cx, "Cannot convert value to u32");
return false;
}
break;
}
case GUIST_float:
{
double value;