Summary: | Web Inspector: allow retrieval of composited layers in a given DOM subtree | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Antoine Quint <graouts> | ||||||
Component: | Web Inspector (Deprecated) | Assignee: | Antoine Quint <graouts> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | apavlov, joepeck, keishi, loislo, pfeldman, pmuellr, timothy, vsevik, web-inspector-bugs, webkit-bug-importer, webkit.review.bot, yurys | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Antoine Quint
2013-03-04 06:28:11 PST
Add a new LayerTreeAgent method allowing the front-end to gather all composited layers associated with nodes in the subtree of which the provided node is the root. This is a subtask of https://bugs.webkit.org/show_bug.cgi?id=110407. Created attachment 191223 [details]
Patch
Comment on attachment 191223 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=191223&action=review > Source/WebCore/inspector/InspectorLayerTreeAgent.cpp:136 > + gatherLayersUsingRenderLayerHierarchy(errorString, renderer->enclosingLayer(), layers); renderer->enclosingLayer() should just be toRenderLayerModelObject(renderer)->layer() > Source/WebCore/inspector/InspectorLayerTreeAgent.cpp:179 > + int id = domAgent->boundNodeId(node); > + if (!id) > + id = domAgent->pushNodeToFrontend(errorString, domAgent->boundNodeId(node->document()), node); Don't use 'id' in code; it will conflict with Objective-C's reserved word if this is ever turned into Obj-C++. Comment on attachment 191223 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=191223&action=review > Source/WebCore/inspector/Inspector.json:3686 > + { "name": "nodeId", "$ref": "DOM.NodeId", "description": "Root of the subtree for which we want to gather layers." } ], Formatting: The ending '],' should be on its own line, looks like the newline got lost. (In reply to comment #4) > (From update of attachment 191223 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=191223&action=review > > > Source/WebCore/inspector/InspectorLayerTreeAgent.cpp:136 > > + gatherLayersUsingRenderLayerHierarchy(errorString, renderer->enclosingLayer(), layers); > > renderer->enclosingLayer() should just be toRenderLayerModelObject(renderer)->layer() Will change in commit. > > Source/WebCore/inspector/InspectorLayerTreeAgent.cpp:179 > > + int id = domAgent->boundNodeId(node); > > + if (!id) > > + id = domAgent->pushNodeToFrontend(errorString, domAgent->boundNodeId(node->document()), node); > > Don't use 'id' in code; it will conflict with Objective-C's reserved word if this is ever turned into Obj-C++. Good point. I'll rename to "nodeId". Thanks for the review! (In reply to comment #5) > (From update of attachment 191223 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=191223&action=review > > > Source/WebCore/inspector/Inspector.json:3686 > > + { "name": "nodeId", "$ref": "DOM.NodeId", "description": "Root of the subtree for which we want to gather layers." } ], > > Formatting: The ending '],' should be on its own line, looks like the newline got lost. Not sure what happened in the diff, but the new line is there alright in the code, no worries. Created attachment 191449 [details]
Patch for landing
Comment on attachment 191449 [details] Patch for landing Clearing flags on attachment: 191449 Committed r144747: <http://trac.webkit.org/changeset/144747> All reviewed patches have been landed. Closing bug. |