Web Inspector: Allow users to log any tracked canvas context
authordrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 5 Jul 2017 20:13:56 +0000 (20:13 +0000)
committerdrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 5 Jul 2017 20:13:56 +0000 (20:13 +0000)
commitb5d00f1df1c365f8ea04c1a625b7372679763876
tree1bd054bdfa0d62d860259f8a7d4b4135b648a4e5
parent06082d511ea7e48449b2bb11faf9e5041e15220a
Web Inspector: Allow users to log any tracked canvas context
https://bugs.webkit.org/show_bug.cgi?id=173397
<rdar://problem/33111581>

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

* inspector/protocol/Canvas.json:
Add `resolveCanvasContext` command that returns a RemoteObject for the given canvas context.

Source/WebCore:

Tests: inspector/canvas/resolveCanvasContext-2d.html
       inspector/canvas/resolveCanvasContext-webgl.html
       inspector/canvas/resolveCanvasContext-webgl2.html
       inspector/canvas/resolveCanvasContext-webgpu.html

* inspector/InspectorCanvasAgent.h:
* inspector/InspectorCanvasAgent.cpp:
(WebCore::InspectorCanvasAgent::InspectorCanvasAgent):
(WebCore::contextAsScriptValue):
(WebCore::InspectorCanvasAgent::resolveCanvasContext):

Source/WebInspectorUI:

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Protocol/RemoteObject.js:
(WebInspector.RemoteObject.resolveCanvasContext):
* UserInterface/Views/CanvasTreeElement.js:
(WebInspector.CanvasTreeElement.prototype.populateContextMenu):

LayoutTests:

* inspector/canvas/resolveCanvasContext-2d-expected.txt: Added.
* inspector/canvas/resolveCanvasContext-2d.html: Added.
* inspector/canvas/resolveCanvasContext-webgl-expected.txt: Added.
* inspector/canvas/resolveCanvasContext-webgl.html: Added.
* inspector/canvas/resolveCanvasContext-webgl2-expected.txt: Added.
* inspector/canvas/resolveCanvasContext-webgl2.html: Added.
* inspector/canvas/resolveCanvasContext-webgpu-expected.txt: Added.
* inspector/canvas/resolveCanvasContext-webgpu.html: Added.
* platform/gtk/TestExpectations:
* platform/ios/TestExpectations:
* platform/win/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@219150 268f45cc-cd09-0410-ab3c-d52691b4dbfc
21 files changed:
LayoutTests/ChangeLog
LayoutTests/inspector/canvas/resolveCanvasContext-2d-expected.txt [new file with mode: 0644]
LayoutTests/inspector/canvas/resolveCanvasContext-2d.html [new file with mode: 0644]
LayoutTests/inspector/canvas/resolveCanvasContext-webgl-expected.txt [new file with mode: 0644]
LayoutTests/inspector/canvas/resolveCanvasContext-webgl.html [new file with mode: 0644]
LayoutTests/inspector/canvas/resolveCanvasContext-webgl2-expected.txt [new file with mode: 0644]
LayoutTests/inspector/canvas/resolveCanvasContext-webgl2.html [new file with mode: 0644]
LayoutTests/inspector/canvas/resolveCanvasContext-webgpu-expected.txt [new file with mode: 0644]
LayoutTests/inspector/canvas/resolveCanvasContext-webgpu.html [new file with mode: 0644]
LayoutTests/platform/gtk/TestExpectations
LayoutTests/platform/ios/TestExpectations
LayoutTests/platform/win/TestExpectations
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/inspector/protocol/Canvas.json
Source/WebCore/ChangeLog
Source/WebCore/inspector/InspectorCanvasAgent.cpp
Source/WebCore/inspector/InspectorCanvasAgent.h
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js
Source/WebInspectorUI/UserInterface/Protocol/RemoteObject.js
Source/WebInspectorUI/UserInterface/Views/CanvasTreeElement.js