diff options
Diffstat (limited to 'WebCore/bindings/js/JSCanvasRenderingContext2DCustom.cpp')
-rw-r--r-- | WebCore/bindings/js/JSCanvasRenderingContext2DCustom.cpp | 222 |
1 files changed, 111 insertions, 111 deletions
diff --git a/WebCore/bindings/js/JSCanvasRenderingContext2DCustom.cpp b/WebCore/bindings/js/JSCanvasRenderingContext2DCustom.cpp index f8aa5a7..416f976 100644 --- a/WebCore/bindings/js/JSCanvasRenderingContext2DCustom.cpp +++ b/WebCore/bindings/js/JSCanvasRenderingContext2DCustom.cpp @@ -89,7 +89,7 @@ void JSCanvasRenderingContext2D::setFillStyle(ExecState* exec, JSValue value) context->setFillStyle(toHTMLCanvasStyle(exec, value)); } -JSValue JSCanvasRenderingContext2D::setFillColor(ExecState* exec, const ArgList& args) +JSValue JSCanvasRenderingContext2D::setFillColor(ExecState* exec) { CanvasRenderingContext2D* context = static_cast<CanvasRenderingContext2D*>(impl()); @@ -99,26 +99,26 @@ JSValue JSCanvasRenderingContext2D::setFillColor(ExecState* exec, const ArgList& // number arg, number arg = gray color, alpha // 4 args = r, g, b, a // 5 args = c, m, y, k, a - switch (args.size()) { + switch (exec->argumentCount()) { case 1: - if (args.at(0).isString()) - context->setFillColor(ustringToString(asString(args.at(0))->value(exec))); + if (exec->argument(0).isString()) + context->setFillColor(ustringToString(asString(exec->argument(0))->value(exec))); else - context->setFillColor(args.at(0).toFloat(exec)); + context->setFillColor(exec->argument(0).toFloat(exec)); break; case 2: - if (args.at(0).isString()) - context->setFillColor(ustringToString(asString(args.at(0))->value(exec)), args.at(1).toFloat(exec)); + if (exec->argument(0).isString()) + context->setFillColor(ustringToString(asString(exec->argument(0))->value(exec)), exec->argument(1).toFloat(exec)); else - context->setFillColor(args.at(0).toFloat(exec), args.at(1).toFloat(exec)); + context->setFillColor(exec->argument(0).toFloat(exec), exec->argument(1).toFloat(exec)); break; case 4: - context->setFillColor(args.at(0).toFloat(exec), args.at(1).toFloat(exec), - args.at(2).toFloat(exec), args.at(3).toFloat(exec)); + context->setFillColor(exec->argument(0).toFloat(exec), exec->argument(1).toFloat(exec), + exec->argument(2).toFloat(exec), exec->argument(3).toFloat(exec)); break; case 5: - context->setFillColor(args.at(0).toFloat(exec), args.at(1).toFloat(exec), - args.at(2).toFloat(exec), args.at(3).toFloat(exec), args.at(4).toFloat(exec)); + context->setFillColor(exec->argument(0).toFloat(exec), exec->argument(1).toFloat(exec), + exec->argument(2).toFloat(exec), exec->argument(3).toFloat(exec), exec->argument(4).toFloat(exec)); break; default: return throwError(exec, SyntaxError); @@ -126,7 +126,7 @@ JSValue JSCanvasRenderingContext2D::setFillColor(ExecState* exec, const ArgList& return jsUndefined(); } -JSValue JSCanvasRenderingContext2D::setStrokeColor(ExecState* exec, const ArgList& args) +JSValue JSCanvasRenderingContext2D::setStrokeColor(ExecState* exec) { CanvasRenderingContext2D* context = static_cast<CanvasRenderingContext2D*>(impl()); @@ -136,26 +136,26 @@ JSValue JSCanvasRenderingContext2D::setStrokeColor(ExecState* exec, const ArgLis // number arg, number arg = gray color, alpha // 4 args = r, g, b, a // 5 args = c, m, y, k, a - switch (args.size()) { + switch (exec->argumentCount()) { case 1: - if (args.at(0).isString()) - context->setStrokeColor(ustringToString(asString(args.at(0))->value(exec))); + if (exec->argument(0).isString()) + context->setStrokeColor(ustringToString(asString(exec->argument(0))->value(exec))); else - context->setStrokeColor(args.at(0).toFloat(exec)); + context->setStrokeColor(exec->argument(0).toFloat(exec)); break; case 2: - if (args.at(0).isString()) - context->setStrokeColor(ustringToString(asString(args.at(0))->value(exec)), args.at(1).toFloat(exec)); + if (exec->argument(0).isString()) + context->setStrokeColor(ustringToString(asString(exec->argument(0))->value(exec)), exec->argument(1).toFloat(exec)); else - context->setStrokeColor(args.at(0).toFloat(exec), args.at(1).toFloat(exec)); + context->setStrokeColor(exec->argument(0).toFloat(exec), exec->argument(1).toFloat(exec)); break; case 4: - context->setStrokeColor(args.at(0).toFloat(exec), args.at(1).toFloat(exec), - args.at(2).toFloat(exec), args.at(3).toFloat(exec)); + context->setStrokeColor(exec->argument(0).toFloat(exec), exec->argument(1).toFloat(exec), + exec->argument(2).toFloat(exec), exec->argument(3).toFloat(exec)); break; case 5: - context->setStrokeColor(args.at(0).toFloat(exec), args.at(1).toFloat(exec), - args.at(2).toFloat(exec), args.at(3).toFloat(exec), args.at(4).toFloat(exec)); + context->setStrokeColor(exec->argument(0).toFloat(exec), exec->argument(1).toFloat(exec), + exec->argument(2).toFloat(exec), exec->argument(3).toFloat(exec), exec->argument(4).toFloat(exec)); break; default: return throwError(exec, SyntaxError); @@ -164,21 +164,21 @@ JSValue JSCanvasRenderingContext2D::setStrokeColor(ExecState* exec, const ArgLis return jsUndefined(); } -JSValue JSCanvasRenderingContext2D::strokeRect(ExecState* exec, const ArgList& args) +JSValue JSCanvasRenderingContext2D::strokeRect(ExecState* exec) { CanvasRenderingContext2D* context = static_cast<CanvasRenderingContext2D*>(impl()); - if (args.size() <= 4) - context->strokeRect(args.at(0).toFloat(exec), args.at(1).toFloat(exec), - args.at(2).toFloat(exec), args.at(3).toFloat(exec)); + if (exec->argumentCount() <= 4) + context->strokeRect(exec->argument(0).toFloat(exec), exec->argument(1).toFloat(exec), + exec->argument(2).toFloat(exec), exec->argument(3).toFloat(exec)); else - context->strokeRect(args.at(0).toFloat(exec), args.at(1).toFloat(exec), - args.at(2).toFloat(exec), args.at(3).toFloat(exec), args.at(4).toFloat(exec)); + context->strokeRect(exec->argument(0).toFloat(exec), exec->argument(1).toFloat(exec), + exec->argument(2).toFloat(exec), exec->argument(3).toFloat(exec), exec->argument(4).toFloat(exec)); return jsUndefined(); } -JSValue JSCanvasRenderingContext2D::drawImage(ExecState* exec, const ArgList& args) +JSValue JSCanvasRenderingContext2D::drawImage(ExecState* exec) { CanvasRenderingContext2D* context = static_cast<CanvasRenderingContext2D*>(impl()); @@ -188,7 +188,7 @@ JSValue JSCanvasRenderingContext2D::drawImage(ExecState* exec, const ArgList& ar // drawImage(img, sx, sy, sw, sh, dx, dy, dw, dh) // Composite operation is specified with globalCompositeOperation. // The img parameter can be a <img> or <canvas> element. - JSValue value = args.at(0); + JSValue value = exec->argument(0); if (!value.isObject()) return throwError(exec, TypeError); JSObject* o = asObject(value); @@ -196,20 +196,20 @@ JSValue JSCanvasRenderingContext2D::drawImage(ExecState* exec, const ArgList& ar ExceptionCode ec = 0; if (o->inherits(&JSHTMLImageElement::s_info)) { HTMLImageElement* imgElt = static_cast<HTMLImageElement*>(static_cast<JSHTMLElement*>(o)->impl()); - switch (args.size()) { + switch (exec->argumentCount()) { case 3: - context->drawImage(imgElt, args.at(1).toFloat(exec), args.at(2).toFloat(exec), ec); + context->drawImage(imgElt, exec->argument(1).toFloat(exec), exec->argument(2).toFloat(exec), ec); break; case 5: - context->drawImage(imgElt, args.at(1).toFloat(exec), args.at(2).toFloat(exec), - args.at(3).toFloat(exec), args.at(4).toFloat(exec), ec); + context->drawImage(imgElt, exec->argument(1).toFloat(exec), exec->argument(2).toFloat(exec), + exec->argument(3).toFloat(exec), exec->argument(4).toFloat(exec), ec); setDOMException(exec, ec); break; case 9: - context->drawImage(imgElt, FloatRect(args.at(1).toFloat(exec), args.at(2).toFloat(exec), - args.at(3).toFloat(exec), args.at(4).toFloat(exec)), - FloatRect(args.at(5).toFloat(exec), args.at(6).toFloat(exec), - args.at(7).toFloat(exec), args.at(8).toFloat(exec)), ec); + context->drawImage(imgElt, FloatRect(exec->argument(1).toFloat(exec), exec->argument(2).toFloat(exec), + exec->argument(3).toFloat(exec), exec->argument(4).toFloat(exec)), + FloatRect(exec->argument(5).toFloat(exec), exec->argument(6).toFloat(exec), + exec->argument(7).toFloat(exec), exec->argument(8).toFloat(exec)), ec); setDOMException(exec, ec); break; default: @@ -217,20 +217,20 @@ JSValue JSCanvasRenderingContext2D::drawImage(ExecState* exec, const ArgList& ar } } else if (o->inherits(&JSHTMLCanvasElement::s_info)) { HTMLCanvasElement* canvas = static_cast<HTMLCanvasElement*>(static_cast<JSHTMLElement*>(o)->impl()); - switch (args.size()) { + switch (exec->argumentCount()) { case 3: - context->drawImage(canvas, args.at(1).toFloat(exec), args.at(2).toFloat(exec), ec); + context->drawImage(canvas, exec->argument(1).toFloat(exec), exec->argument(2).toFloat(exec), ec); break; case 5: - context->drawImage(canvas, args.at(1).toFloat(exec), args.at(2).toFloat(exec), - args.at(3).toFloat(exec), args.at(4).toFloat(exec), ec); + context->drawImage(canvas, exec->argument(1).toFloat(exec), exec->argument(2).toFloat(exec), + exec->argument(3).toFloat(exec), exec->argument(4).toFloat(exec), ec); setDOMException(exec, ec); break; case 9: - context->drawImage(canvas, FloatRect(args.at(1).toFloat(exec), args.at(2).toFloat(exec), - args.at(3).toFloat(exec), args.at(4).toFloat(exec)), - FloatRect(args.at(5).toFloat(exec), args.at(6).toFloat(exec), - args.at(7).toFloat(exec), args.at(8).toFloat(exec)), ec); + context->drawImage(canvas, FloatRect(exec->argument(1).toFloat(exec), exec->argument(2).toFloat(exec), + exec->argument(3).toFloat(exec), exec->argument(4).toFloat(exec)), + FloatRect(exec->argument(5).toFloat(exec), exec->argument(6).toFloat(exec), + exec->argument(7).toFloat(exec), exec->argument(8).toFloat(exec)), ec); setDOMException(exec, ec); break; default: @@ -239,20 +239,20 @@ JSValue JSCanvasRenderingContext2D::drawImage(ExecState* exec, const ArgList& ar #if ENABLE(VIDEO) } else if (o->inherits(&JSHTMLVideoElement::s_info)) { HTMLVideoElement* video = static_cast<HTMLVideoElement*>(static_cast<JSHTMLElement*>(o)->impl()); - switch (args.size()) { + switch (exec->argumentCount()) { case 3: - context->drawImage(video, args.at(1).toFloat(exec), args.at(2).toFloat(exec), ec); + context->drawImage(video, exec->argument(1).toFloat(exec), exec->argument(2).toFloat(exec), ec); break; case 5: - context->drawImage(video, args.at(1).toFloat(exec), args.at(2).toFloat(exec), - args.at(3).toFloat(exec), args.at(4).toFloat(exec), ec); + context->drawImage(video, exec->argument(1).toFloat(exec), exec->argument(2).toFloat(exec), + exec->argument(3).toFloat(exec), exec->argument(4).toFloat(exec), ec); setDOMException(exec, ec); break; case 9: - context->drawImage(video, FloatRect(args.at(1).toFloat(exec), args.at(2).toFloat(exec), - args.at(3).toFloat(exec), args.at(4).toFloat(exec)), - FloatRect(args.at(5).toFloat(exec), args.at(6).toFloat(exec), - args.at(7).toFloat(exec), args.at(8).toFloat(exec)), ec); + context->drawImage(video, FloatRect(exec->argument(1).toFloat(exec), exec->argument(2).toFloat(exec), + exec->argument(3).toFloat(exec), exec->argument(4).toFloat(exec)), + FloatRect(exec->argument(5).toFloat(exec), exec->argument(6).toFloat(exec), + exec->argument(7).toFloat(exec), exec->argument(8).toFloat(exec)), ec); setDOMException(exec, ec); break; default: @@ -266,11 +266,11 @@ JSValue JSCanvasRenderingContext2D::drawImage(ExecState* exec, const ArgList& ar return jsUndefined(); } -JSValue JSCanvasRenderingContext2D::drawImageFromRect(ExecState* exec, const ArgList& args) +JSValue JSCanvasRenderingContext2D::drawImageFromRect(ExecState* exec) { CanvasRenderingContext2D* context = static_cast<CanvasRenderingContext2D*>(impl()); - JSValue value = args.at(0); + JSValue value = exec->argument(0); if (!value.isObject()) return throwError(exec, TypeError); JSObject* o = asObject(value); @@ -278,52 +278,52 @@ JSValue JSCanvasRenderingContext2D::drawImageFromRect(ExecState* exec, const Arg if (!o->inherits(&JSHTMLImageElement::s_info)) return throwError(exec, TypeError); context->drawImageFromRect(static_cast<HTMLImageElement*>(static_cast<JSHTMLElement*>(o)->impl()), - args.at(1).toFloat(exec), args.at(2).toFloat(exec), - args.at(3).toFloat(exec), args.at(4).toFloat(exec), - args.at(5).toFloat(exec), args.at(6).toFloat(exec), - args.at(7).toFloat(exec), args.at(8).toFloat(exec), - ustringToString(args.at(9).toString(exec))); + exec->argument(1).toFloat(exec), exec->argument(2).toFloat(exec), + exec->argument(3).toFloat(exec), exec->argument(4).toFloat(exec), + exec->argument(5).toFloat(exec), exec->argument(6).toFloat(exec), + exec->argument(7).toFloat(exec), exec->argument(8).toFloat(exec), + ustringToString(exec->argument(9).toString(exec))); return jsUndefined(); } -JSValue JSCanvasRenderingContext2D::setShadow(ExecState* exec, const ArgList& args) +JSValue JSCanvasRenderingContext2D::setShadow(ExecState* exec) { CanvasRenderingContext2D* context = static_cast<CanvasRenderingContext2D*>(impl()); - switch (args.size()) { + switch (exec->argumentCount()) { case 3: - context->setShadow(args.at(0).toFloat(exec), args.at(1).toFloat(exec), - args.at(2).toFloat(exec)); + context->setShadow(exec->argument(0).toFloat(exec), exec->argument(1).toFloat(exec), + exec->argument(2).toFloat(exec)); break; case 4: - if (args.at(3).isString()) - context->setShadow(args.at(0).toFloat(exec), args.at(1).toFloat(exec), - args.at(2).toFloat(exec), ustringToString(asString(args.at(3))->value(exec))); + if (exec->argument(3).isString()) + context->setShadow(exec->argument(0).toFloat(exec), exec->argument(1).toFloat(exec), + exec->argument(2).toFloat(exec), ustringToString(asString(exec->argument(3))->value(exec))); else - context->setShadow(args.at(0).toFloat(exec), args.at(1).toFloat(exec), - args.at(2).toFloat(exec), args.at(3).toFloat(exec)); + context->setShadow(exec->argument(0).toFloat(exec), exec->argument(1).toFloat(exec), + exec->argument(2).toFloat(exec), exec->argument(3).toFloat(exec)); break; case 5: - if (args.at(3).isString()) - context->setShadow(args.at(0).toFloat(exec), args.at(1).toFloat(exec), - args.at(2).toFloat(exec), ustringToString(asString(args.at(3))->value(exec)), - args.at(4).toFloat(exec)); + if (exec->argument(3).isString()) + context->setShadow(exec->argument(0).toFloat(exec), exec->argument(1).toFloat(exec), + exec->argument(2).toFloat(exec), ustringToString(asString(exec->argument(3))->value(exec)), + exec->argument(4).toFloat(exec)); else - context->setShadow(args.at(0).toFloat(exec), args.at(1).toFloat(exec), - args.at(2).toFloat(exec), args.at(3).toFloat(exec), - args.at(4).toFloat(exec)); + context->setShadow(exec->argument(0).toFloat(exec), exec->argument(1).toFloat(exec), + exec->argument(2).toFloat(exec), exec->argument(3).toFloat(exec), + exec->argument(4).toFloat(exec)); break; case 7: - context->setShadow(args.at(0).toFloat(exec), args.at(1).toFloat(exec), - args.at(2).toFloat(exec), args.at(3).toFloat(exec), - args.at(4).toFloat(exec), args.at(5).toFloat(exec), - args.at(6).toFloat(exec)); + context->setShadow(exec->argument(0).toFloat(exec), exec->argument(1).toFloat(exec), + exec->argument(2).toFloat(exec), exec->argument(3).toFloat(exec), + exec->argument(4).toFloat(exec), exec->argument(5).toFloat(exec), + exec->argument(6).toFloat(exec)); break; case 8: - context->setShadow(args.at(0).toFloat(exec), args.at(1).toFloat(exec), - args.at(2).toFloat(exec), args.at(3).toFloat(exec), - args.at(4).toFloat(exec), args.at(5).toFloat(exec), - args.at(6).toFloat(exec), args.at(7).toFloat(exec)); + context->setShadow(exec->argument(0).toFloat(exec), exec->argument(1).toFloat(exec), + exec->argument(2).toFloat(exec), exec->argument(3).toFloat(exec), + exec->argument(4).toFloat(exec), exec->argument(5).toFloat(exec), + exec->argument(6).toFloat(exec), exec->argument(7).toFloat(exec)); break; default: return throwError(exec, SyntaxError); @@ -332,11 +332,11 @@ JSValue JSCanvasRenderingContext2D::setShadow(ExecState* exec, const ArgList& ar return jsUndefined(); } -JSValue JSCanvasRenderingContext2D::createPattern(ExecState* exec, const ArgList& args) +JSValue JSCanvasRenderingContext2D::createPattern(ExecState* exec) { CanvasRenderingContext2D* context = static_cast<CanvasRenderingContext2D*>(impl()); - JSValue value = args.at(0); + JSValue value = exec->argument(0); if (!value.isObject()) return throwError(exec, TypeError); JSObject* o = asObject(value); @@ -345,7 +345,7 @@ JSValue JSCanvasRenderingContext2D::createPattern(ExecState* exec, const ArgList ExceptionCode ec; JSValue pattern = toJS(exec, context->createPattern(static_cast<HTMLImageElement*>(static_cast<JSHTMLElement*>(o)->impl()), - valueToStringWithNullCheck(exec, args.at(1)), ec).get()); + valueToStringWithNullCheck(exec, exec->argument(1)), ec).get()); setDOMException(exec, ec); return pattern; } @@ -353,7 +353,7 @@ JSValue JSCanvasRenderingContext2D::createPattern(ExecState* exec, const ArgList ExceptionCode ec; JSValue pattern = toJS(exec, context->createPattern(static_cast<HTMLCanvasElement*>(static_cast<JSHTMLElement*>(o)->impl()), - valueToStringWithNullCheck(exec, args.at(1)), ec).get()); + valueToStringWithNullCheck(exec, exec->argument(1)), ec).get()); setDOMException(exec, ec); return pattern; } @@ -361,7 +361,7 @@ JSValue JSCanvasRenderingContext2D::createPattern(ExecState* exec, const ArgList return jsUndefined(); } -JSValue JSCanvasRenderingContext2D::createImageData(ExecState* exec, const ArgList& args) +JSValue JSCanvasRenderingContext2D::createImageData(ExecState* exec) { // createImageData has two variants // createImageData(ImageData) @@ -370,16 +370,16 @@ JSValue JSCanvasRenderingContext2D::createImageData(ExecState* exec, const ArgLi RefPtr<ImageData> imageData = 0; ExceptionCode ec = 0; - if (args.size() == 1) - imageData = context->createImageData(toImageData(args.at(0)), ec); - else if (args.size() == 2) - imageData = context->createImageData(args.at(0).toFloat(exec), args.at(1).toFloat(exec), ec); + if (exec->argumentCount() == 1) + imageData = context->createImageData(toImageData(exec->argument(0)), ec); + else if (exec->argumentCount() == 2) + imageData = context->createImageData(exec->argument(0).toFloat(exec), exec->argument(1).toFloat(exec), ec); setDOMException(exec, ec); return toJS(exec, globalObject(), WTF::getPtr(imageData)); } -JSValue JSCanvasRenderingContext2D::putImageData(ExecState* exec, const ArgList& args) +JSValue JSCanvasRenderingContext2D::putImageData(ExecState* exec) { // putImageData has two variants // putImageData(ImageData, x, y) @@ -387,17 +387,17 @@ JSValue JSCanvasRenderingContext2D::putImageData(ExecState* exec, const ArgList& CanvasRenderingContext2D* context = static_cast<CanvasRenderingContext2D*>(impl()); ExceptionCode ec = 0; - if (args.size() >= 7) - context->putImageData(toImageData(args.at(0)), args.at(1).toFloat(exec), args.at(2).toFloat(exec), - args.at(3).toFloat(exec), args.at(4).toFloat(exec), args.at(5).toFloat(exec), args.at(6).toFloat(exec), ec); + if (exec->argumentCount() >= 7) + context->putImageData(toImageData(exec->argument(0)), exec->argument(1).toFloat(exec), exec->argument(2).toFloat(exec), + exec->argument(3).toFloat(exec), exec->argument(4).toFloat(exec), exec->argument(5).toFloat(exec), exec->argument(6).toFloat(exec), ec); else - context->putImageData(toImageData(args.at(0)), args.at(1).toFloat(exec), args.at(2).toFloat(exec), ec); + context->putImageData(toImageData(exec->argument(0)), exec->argument(1).toFloat(exec), exec->argument(2).toFloat(exec), ec); setDOMException(exec, ec); return jsUndefined(); } -JSValue JSCanvasRenderingContext2D::fillText(ExecState* exec, const ArgList& args) +JSValue JSCanvasRenderingContext2D::fillText(ExecState* exec) { CanvasRenderingContext2D* context = static_cast<CanvasRenderingContext2D*>(impl()); @@ -405,17 +405,17 @@ JSValue JSCanvasRenderingContext2D::fillText(ExecState* exec, const ArgList& arg // number arg = x // number arg = y // optional number arg = maxWidth - if (args.size() < 3 || args.size() > 4) + if (exec->argumentCount() < 3 || exec->argumentCount() > 4) return throwError(exec, SyntaxError); - if (args.size() == 4) - context->fillText(ustringToString(args.at(0).toString(exec)), args.at(1).toFloat(exec), args.at(2).toFloat(exec), args.at(3).toFloat(exec)); + if (exec->argumentCount() == 4) + context->fillText(ustringToString(exec->argument(0).toString(exec)), exec->argument(1).toFloat(exec), exec->argument(2).toFloat(exec), exec->argument(3).toFloat(exec)); else - context->fillText(ustringToString(args.at(0).toString(exec)), args.at(1).toFloat(exec), args.at(2).toFloat(exec)); + context->fillText(ustringToString(exec->argument(0).toString(exec)), exec->argument(1).toFloat(exec), exec->argument(2).toFloat(exec)); return jsUndefined(); } -JSValue JSCanvasRenderingContext2D::strokeText(ExecState* exec, const ArgList& args) +JSValue JSCanvasRenderingContext2D::strokeText(ExecState* exec) { CanvasRenderingContext2D* context = static_cast<CanvasRenderingContext2D*>(impl()); @@ -423,13 +423,13 @@ JSValue JSCanvasRenderingContext2D::strokeText(ExecState* exec, const ArgList& a // number arg = x // number arg = y // optional number arg = maxWidth - if (args.size() < 3 || args.size() > 4) + if (exec->argumentCount() < 3 || exec->argumentCount() > 4) return throwError(exec, SyntaxError); - if (args.size() == 4) - context->strokeText(ustringToString(args.at(0).toString(exec)), args.at(1).toFloat(exec), args.at(2).toFloat(exec), args.at(3).toFloat(exec)); + if (exec->argumentCount() == 4) + context->strokeText(ustringToString(exec->argument(0).toString(exec)), exec->argument(1).toFloat(exec), exec->argument(2).toFloat(exec), exec->argument(3).toFloat(exec)); else - context->strokeText(ustringToString(args.at(0).toString(exec)), args.at(1).toFloat(exec), args.at(2).toFloat(exec)); + context->strokeText(ustringToString(exec->argument(0).toString(exec)), exec->argument(1).toFloat(exec), exec->argument(2).toFloat(exec)); return jsUndefined(); } |