Web Inspector: Send context attributes for tracked canvases
authordrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 21 Jun 2017 00:07:41 +0000 (00:07 +0000)
committerdrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 21 Jun 2017 00:07:41 +0000 (00:07 +0000)
commitbbb0543d0ee4392eb6634d89365f01b7fbc4520e
treef39a93d9d6ea6f38a3625922c3a9d5f444891fda
parentc9895a31c70bd670489653be7e71a09944e7f60e
Web Inspector: Send context attributes for tracked canvases
https://bugs.webkit.org/show_bug.cgi?id=173327

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

* inspector/protocol/Canvas.json:
Add ContextAttributes object type that is optionally used for WebGL canvases.

Source/WebCore:

Test: inspector/canvas/context-attributes.html

* inspector/InspectorCanvasAgent.cpp:
(WebCore::InspectorCanvasAgent::buildObjectForCanvas):

Source/WebInspectorUI:

* UserInterface/Models/Canvas.js:
(WebInspector.Canvas.fromPayload):
(WebInspector.Canvas.prototype.get contextAttributes):
* UserInterface/Views/CanvasDetailsSidebarPanel.js:
(WebInspector.CanvasDetailsSidebarPanel.prototype.initialLayout):
(WebInspector.CanvasDetailsSidebarPanel.prototype.layout):
(WebInspector.CanvasDetailsSidebarPanel.prototype.sizeDidChange):
(WebInspector.CanvasDetailsSidebarPanel.prototype._refreshAttributesSection):

* UserInterface/Views/DataGridNode.js:
(WebInspector.DataGridNode.prototype.createCellContent):
Instead of checking if the value of the cell is falsy, check that the key exists in the data.
This allows values like `false` to be displayed.

LayoutTests:

* inspector/canvas/context-attributes-expected.txt: Added.
* inspector/canvas/context-attributes.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218618 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/inspector/canvas/context-attributes-expected.txt [new file with mode: 0644]
LayoutTests/inspector/canvas/context-attributes.html [new file with mode: 0644]
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/inspector/protocol/Canvas.json
Source/WebCore/ChangeLog
Source/WebCore/inspector/InspectorCanvasAgent.cpp
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Models/Canvas.js
Source/WebInspectorUI/UserInterface/Views/CanvasDetailsSidebarPanel.js
Source/WebInspectorUI/UserInterface/Views/DataGridNode.js