Web Inspector: provide reasons why a layer was composited in the LayerTreeAgent
https://bugs.webkit.org/show_bug.cgi?id=111703

Source/WebCore:

Introduce a new LayerTree.reasonsForCompositingLayer(layerId) method which returns
the list of reasons why the provided layer was composited as an object with an
optional property for each possible reason. The RenderLayerCompositor already knows
how to provide this information via its own reasonsForCompositing() method, and we
process the returned bitmask to populate the object sent to the front-end.

Reviewed by Timothy Hatcher.

Test: inspector-protocol/layers/layers-compositing-reasons.html

* inspector/Inspector.json:
* inspector/InspectorLayerTreeAgent.cpp:
(WebCore::InspectorLayerTreeAgent::reasonsForCompositingLayer):
(WebCore):
* inspector/InspectorLayerTreeAgent.h:
(InspectorLayerTreeAgent):

LayoutTests:

New test for LayerTree.reasonsForCompositingLayer(layerId).

Reviewed by Timothy Hatcher.

* inspector-protocol/layers/layers-compositing-reasons-expected.txt: Added.
* inspector-protocol/layers/layers-compositing-reasons.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145136 268f45cc-cd09-0410-ab3c-d52691b4dbfc