Last Comment Bug 658856 - implement drawingbufferWidth/Height
: implement drawingbufferWidth/Height
Status: VERIFIED FIXED
: addon-compat, dev-doc-complete
Product: Core
Classification: Components
Component: Canvas: WebGL (show other bugs)
: Trunk
: x86_64 Windows 7
: -- major (vote)
: mozilla9
Assigned To: Benoit Jacob [:bjacob] (mostly away)
:
Mentors:
https://cvs.khronos.org/svn/repos/reg...
Depends on: 656215
Blocks: webgl-conformance
  Show dependency treegraph
 
Reported: 2011-05-22 01:30 PDT by Virtual_ManPL [:Virtual] - (ni? me)
Modified: 2011-12-19 08:04 PST (History)
6 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
implement webgl attributes drawingBufferWidth and Height (1.91 KB, patch)
2011-05-25 10:33 PDT, Benoit Jacob [:bjacob] (mostly away)
jmuizelaar: review+
Details | Diff | Review

Description Virtual_ManPL [:Virtual] - (ni? me) 2011-05-22 01:30:41 PDT
User-Agent:       Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:6.0a1) Gecko/20110521 Firefox/6.0a1
Build Identifier: 

Graphics
Adapter Description - NVIDIA GeForce 8600 GT
Vendor ID - 10de
Device ID - 0402
Adapter RAM - 256
Adapter Drivers - nvd3dumx,nvwgf2umx,nvwgf2umx nvd3dum,nvwgf2um,nvwgf2um
Driver Version - 8.17.12.7073
Driver Date - 4-28-2011
Direct2D Enabled - true
DirectWrite Enabled - true (6.1.7601.17563)
ClearType Parameters - ClearType parameters not found
WebGL Renderer - NVIDIA Corporation -- GeForce 8600 GT/PCI/SSE2 -- 3.3.0GPU Accelerated Windows - 1/1 Direct3D 10

What I see on site:

This test ensures WebGL implementations correctly implement drawingbufferWidth/Height.

On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".

PASS context exists

Checking drawingBufferWidth/drawingBufferHeight
FAIL gl.drawingBufferWidth should be 300 (of type number). Was undefined (of type undefined).
FAIL gl.drawingBufferHeight should be 150 (of type number). Was undefined (of type undefined).
PASS maxSize[0] > 0 is true
PASS maxSize[1] > 0 is true
MAX_VIEWPORT_DIMS = 8192x8192
FAIL successfullyParsed should be true. Threw exception ReferenceError: successfullyParsed is not defined

TEST COMPLETE


Reproducible: Always
Comment 1 Boris Zbarsky [:bz] 2011-05-23 10:45:55 PDT
We don't implement drawingBufferWidth/Height at all.
Comment 2 Boris Zbarsky [:bz] 2011-05-23 10:47:25 PDT
In particular, looks like these were only recently added to the spec (Dec 2010).
Comment 3 Benoit Jacob [:bjacob] (mostly away) 2011-05-25 10:33:24 PDT
Created attachment 535118 [details] [diff] [review]
implement webgl attributes drawingBufferWidth and Height

At least that was easy to implement; but now the test is still failing further below at line 54:

  canvas.width = maxSize[0] * 4;

with this JS exception:

Error: uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHTMLCanvasElement.width]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: https://cvs.khronos.org/svn/repos/registry/trunk/public/webgl/sdk/tests/conformance/drawingbuffer-test.html :: <TOP_LEVEL> :: line 54"  data: no]
Comment 4 Benoit Jacob [:bjacob] (mostly away) 2011-08-24 12:41:53 PDT
holy ****, I just rewrote the exact same patch. will land asap.
Comment 5 Benoit Jacob [:bjacob] (mostly away) 2011-08-24 12:57:27 PDT
Try: http://tbpl.allizom.org/?tree=Try&usebuildbot=1&rev=fffeac58b3e7
Comment 6 Benoit Jacob [:bjacob] (mostly away) 2011-09-01 12:32:36 PDT
http://hg.mozilla.org/integration/mozilla-inbound/rev/f6180f12b7be
Comment 7 :Ehsan Akhgari (busy, don't ask for review please) 2011-09-02 08:32:40 PDT
http://hg.mozilla.org/mozilla-central/rev/f6180f12b7be
Comment 8 :Ms2ger 2011-09-02 11:14:10 PDT
Comment on attachment 535118 [details] [diff] [review]
implement webgl attributes drawingBufferWidth and Height

>--- a/dom/interfaces/canvas/nsIDOMWebGLRenderingContext.idl
>+++ b/dom/interfaces/canvas/nsIDOMWebGLRenderingContext.idl
>@@ -560,16 +560,18 @@ interface nsIDOMWebGLRenderingContext : 
>+  readonly attribute WebGLsizei drawingBufferWidth;
>+  readonly attribute WebGLsizei drawingBufferHeight;

Missing uuid rev.
Comment 9 Virtual_ManPL [:Virtual] - (ni? me) 2011-09-13 10:29:15 PDT
This test ensures WebGL implementations correctly implement drawingbufferWidth/Height.

On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".

PASS context exists

Checking drawingBufferWidth/drawingBufferHeight
PASS gl.drawingBufferWidth is canvas.width
PASS gl.drawingBufferHeight is canvas.height
PASS maxSize[0] > 0 is true
PASS maxSize[1] > 0 is true
FAIL successfullyParsed should be true. Threw exception ReferenceError: successfullyParsed is not defined

TEST COMPLETE

============================================
So it's probably acceptable, can someone look into this.
Using Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:9.0a1) Gecko/20110913 Firefox/9.0a1
Comment 10 Eric Shepherd [:sheppy] 2011-12-19 08:04:51 PST
Added an entry to the compatibility table:

https://developer.mozilla.org/en/WebGL

Mentioned on Firefox 9 for developers.

Note You need to log in before you can comment on or make changes to this bug.