[Webkit-unassigned] [Bug 70117] Expose HTMLCanvasElement supportsContext

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jun 3 14:17:54 PDT 2013


https://bugs.webkit.org/show_bug.cgi?id=70117





--- Comment #31 from Dean Jackson <dino at apple.com>  2013-06-03 14:16:26 PST ---
(From update of attachment 203625)
View in context: https://bugs.webkit.org/attachment.cgi?id=203625&action=review

I’m ok with this, although I’d like to see some tests for the attributes. I’ll leave it open for Sam to review the custom binding part.

> Source/WebCore/bindings/js/JSHTMLCanvasElementCustom.cpp:126
> +            GraphicsContext3D::Attributes graphicattrs;
> +            if (!dictionary.tryGetProperty("alpha", graphicattrs.alpha))
> +                return jsUndefined();
> +            if (!dictionary.tryGetProperty("depth", graphicattrs.depth))
> +                return jsUndefined();
> +            if (!dictionary.tryGetProperty("stencil", graphicattrs.stencil))
> +                return jsUndefined();
> +            if (!dictionary.tryGetProperty("antialias", graphicattrs.antialias))
> +                return jsUndefined();
> +            if (!dictionary.tryGetProperty("premultipliedAlpha", graphicattrs.premultipliedAlpha))
> +                return jsUndefined();
> +            if (!dictionary.tryGetProperty("preserveDrawingBuffer", graphicattrs.preserveDrawingBuffer))
> +                return jsUndefined();

Is there any way we can test this code?

> Source/WebCore/html/HTMLCanvasElement.cpp:228
> +        // Accept the legacy "webkit-3d" name as well as the provisional "experimental-webgl" name.
> +        bool is3dContext = (type == "webkit-3d") || (type == "experimental-webgl");
> +        if (is3dContext)

Sorry, now that I see this.. it might as well be just an if statement - no need for local variable.

-- 
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