Web Inspector: identify reflection layers in LayerTreeAgent
authorgraouts@apple.com <graouts@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Mar 2013 22:48:54 +0000 (22:48 +0000)
committergraouts@apple.com <graouts@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Mar 2013 22:48:54 +0000 (22:48 +0000)
commit1eac2f3c6c342414285c5b1b8d9e63e3fa0669cc
tree9235b50e415849171b616d8277300f71c54164ee
parentda9e07154b0911ab4651cd89f4928cd56a5cde4f
Web Inspector: identify reflection layers in LayerTreeAgent
https://bugs.webkit.org/show_bug.cgi?id=111419

Source/WebCore:

We add a new property "isReflection" to the Layer objects returned
to the front-end to indicate whether the layer was created to host
the reflection for an element. When this new property is true, the
"nodeId" property is set to point to the reflected element's node
id, since there is no node per-se directly associated with this layer.
We also change the "bounds" property to return absolute page coordinates
such that the front-end can use this information to highlight that
region in the page since metrics would otherwise be unavailable.

Reviewed by Dean Jackson.

Test: inspector-protocol/layers/layers-reflected-content.html

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

LayoutTests:

New test for reflection layers and an updated output for the
existing layersForNode() test since we changed the coordinates
for the "bounds" property to be absolute instead of local.

Reviewed by Dean Jackson.

* inspector-protocol/layers/layers-for-node-expected.txt:
* inspector-protocol/layers/layers-reflected-content-expected.txt: Added.
* inspector-protocol/layers/layers-reflected-content.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@144824 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/inspector-protocol/layers/layers-for-node-expected.txt
LayoutTests/inspector-protocol/layers/layers-reflected-content-expected.txt [new file with mode: 0644]
LayoutTests/inspector-protocol/layers/layers-reflected-content.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/inspector/Inspector.json
Source/WebCore/inspector/InspectorLayerTreeAgent.cpp