[Webkit-unassigned] [Bug 32698] [JSC] Date binding support
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Dec 17 23:07:11 PST 2009
https://bugs.webkit.org/show_bug.cgi?id=32698
TAMURA, Kent <tkent at chromium.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #45128| |review?
Flag| |
--- Comment #1 from TAMURA, Kent <tkent at chromium.org> 2009-12-17 23:07:10 PST ---
Created an attachment (id=45128)
--> (https://bugs.webkit.org/attachment.cgi?id=45128)
Proposed patch
Generated code will be:
JSValue jsHTMLInputElementValueAsDate(ExecState* exec, const Identifier&, const
PropertySlot& slot)
{
JSHTMLInputElement* castedThis =
static_cast<JSHTMLInputElement*>(asObject(slot.slotBase()));
UNUSED_PARAM(exec);
HTMLInputElement* imp = static_cast<HTMLInputElement*>(castedThis->impl());
return (isnan(imp->valueAsDate()) || isinf(imp->valueAsDate())) ? jsNull()
: new (exec) DateInstance(exec, imp->valueAsDate());
}
void setJSHTMLInputElementValueAsDate(ExecState* exec, JSObject* thisObject,
JSValue value)
{
HTMLInputElement* imp =
static_cast<HTMLInputElement*>(static_cast<JSHTMLInputElement*>(thisObject)->impl());
ExceptionCode ec = 0;
imp->setValueAsDate(value.isUndefinedOrNull() ?
std::numeric_limits<double>::quiet_NaN() :
static_cast<DateInstance*>(value.toObject(exec))->internalNumber(), ec);
setDOMException(exec, ec);
}
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list