[Webkit-unassigned] [Bug 60770] New: QtWebKit bridge assignToHTMLImageElement() results in invalid Image

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri May 13 07:53:58 PDT 2011


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

           Summary: QtWebKit bridge assignToHTMLImageElement() results in
                    invalid Image
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: All
        OS/Version: All
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: WebKit Qt
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: rectalogic at rectalogic.com


Created an attachment (id=93451)
 --> (https://bugs.webkit.org/attachment.cgi?id=93451&action=review)
sample Qt app that uses gl.texImage2D on an image from assignToHTMLImageElement()

I'm trying to use an Image with WebGL populated via QtWebKit bridge assignToHTMLImageElement(). WebGL gl.texImage2D() validates the passed image, and since images created this way have no URL, they are treated as invalid. This is a similar issue to bug #59972

WebCore::WebGLRenderingContext::texImage2D() calls WebCore::WebGLRenderingContext::validateHTMLImageElement() which checks the image url:


Source/WebCore/html/canvas/WebGLRenderingContext.cpp:validateHTMLImageElement():

    const KURL& url = image->cachedImage()->response().url();
    if (url.isNull() || url.isEmpty() || !url.isValid()) {
        m_context->synthesizeGLError(GraphicsContext3D::INVALID_VALUE);
        return false;
    }

Attached sample application reproduces the bug.

Possibly Images populated via assignToHTMLImageElement() could have a placeholder qrc:/ or data: url assigned? There are probably other places in WebKit that will treat images with no url as invalid.

Or perhaps the bridge intermediate JS object could be extended to have toImageData() or toArrayBuffer() methods to access the image pixels, these would both be useable with gl.texImage2D()

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