Changeset 244270 in webkit


Ignore:
Timestamp:
Apr 15, 2019 10:29:26 AM (5 years ago)
Author:
Devin Rousso
Message:

Web Inspector: Uncaught Exception: Can't find variable: WebGL2RenderingContext
https://bugs.webkit.org/show_bug.cgi?id=196874
<rdar://problem/49858912>

Reviewed by Timothy Hatcher.

  • UserInterface/Models/Recording.js:

(WI.Recording.prototype.createContext):

  • UserInterface/Models/RecordingAction.js:

(WI.RecordingAction.prototype.process.getContent):

Location:
trunk/Source/WebInspectorUI
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r244268 r244270  
     12019-04-15  Devin Rousso  <drousso@apple.com>
     2
     3        Web Inspector: Uncaught Exception: Can't find variable: WebGL2RenderingContext
     4        https://bugs.webkit.org/show_bug.cgi?id=196874
     5        <rdar://problem/49858912>
     6
     7        Reviewed by Timothy Hatcher.
     8
     9        * UserInterface/Models/Recording.js:
     10        (WI.Recording.prototype.createContext):
     11
     12        * UserInterface/Models/RecordingAction.js:
     13        (WI.RecordingAction.prototype.process.getContent):
     14
    1152019-04-15  Devin Rousso  <drousso@apple.com>
    216
  • trunk/Source/WebInspectorUI/UserInterface/Models/Recording.js

    r242809 r244270  
    452452            return createCanvasContext("2d");
    453453
    454         if (this._type === WI.Recording.Type.BitmapRenderer)
     454        if (this._type === WI.Recording.Type.CanvasBitmapRenderer)
    455455            return createCanvasContext("bitmaprenderer");
    456456
  • trunk/Source/WebInspectorUI/UserInterface/Models/RecordingAction.js

    r241616 r244270  
    212212                return context.getImageData(0, 0, context.canvas.width, context.canvas.height).data;
    213213
    214             if (context instanceof WebGLRenderingContext || context instanceof WebGL2RenderingContext) {
     214            if (context instanceof WebGLRenderingContext || (window.WebGL2RenderingContext && context instanceof WebGL2RenderingContext)) {
    215215                let pixels = new Uint8Array(context.drawingBufferWidth * context.drawingBufferHeight * 4);
    216216                context.readPixels(0, 0, context.canvas.width, context.canvas.height, context.RGBA, context.UNSIGNED_BYTE, pixels);
Note: See TracChangeset for help on using the changeset viewer.