Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(246)

Side by Side Diff: components/ui_devtools/protocol.json

Issue 2959263002: Show corresponding window/widget/view in UIElement tree when clicking on a UI element. (Closed)
Patch Set: set handled for cancelable event mouse click Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/ui_devtools/BUILD.gn ('k') | components/ui_devtools/views/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 { 1 {
2 "domains": [ 2 "domains": [
3 { 3 {
4 "commands": [ 4 "commands": [
5 { 5 {
6 "description": "Enables DOM agent for the given page.", 6 "description": "Enables DOM agent for the given page.",
7 "name": "enable" 7 "name": "enable"
8 }, 8 },
9 { 9 {
10 "description": "Disables DOM agent for the given page.", 10 "description": "Disables DOM agent for the given page.",
11 "name": "disable" 11 "name": "disable"
12 }, 12 },
13 { 13 {
14 "description": "Returns the root DOM node to the caller.", 14 "description": "Returns the root DOM node to the caller.",
15 "name": "getDocument", 15 "name": "getDocument",
16 "returns": [ 16 "returns": [
17 { 17 {
18 "$ref": "Node", 18 "$ref": "Node",
19 "description": "Resulting node.", 19 "description": "Resulting node.",
20 "name": "root" 20 "name": "root"
21 } 21 }
22 ] 22 ]
23 }, 23 },
24 { 24 {
25 "name": "highlightNode", 25 "name": "highlightNode",
26 "parameters": [ 26 "description": "Highlights DOM node.",
27 { 27 "redirect": "Overlay"
28 "name": "highlightConfig",
29 "$ref": "HighlightConfig",
30 "description": "A descriptor for the highlight appea rance."
31 },
32 {
33 "description": "Identifier of the node to highlight. ",
34 "optional": true,
35 "name": "nodeId",
36 "$ref": "NodeId"
37 }
38 ],
39 "description": "Highlights DOM node with given id or with th e given JavaScript object wrapper. Either nodeId or objectId must be specified."
40 }, 28 },
41 { 29 {
42 "name": "hideHighlight", 30 "name": "hideHighlight",
43 "description": "Hides DOM node highlight." 31 "description": "Hides DOM node highlight."
32 },
33 {
34 "name": "pushNodesByBackendIdsToFrontend",
35 "parameters": [
36 {
37 "name": "backendNodeIds",
38 "type": "array",
39 "items": {
40 "$ref": "BackendNodeId"
41 },
42 "description": "The array of backend node ids."
43 }
44 ],
45 "returns": [
46 {
47 "name": "nodeIds",
48 "type": "array",
49 "items": {
50 "$ref": "NodeId"
51 },
52 "description": "The array of ids of pushed nodes tha t correspond to the backend ids specified in backendNodeIds."
53 }
54 ],
55 "description": "Requests that a batch of nodes is sent to th e caller given their backend node ids.",
56 "experimental": true
57 },
58 {
59 "name": "setInspectedNode",
60 "parameters": [
61 {
62 "name": "nodeId",
63 "$ref": "NodeId",
64 "description": "DOM node id to be accessible by mean s of $x command line API."
65 }
66 ],
67 "description": "Enables console to refer to the node with gi ven id via $x (see Command Line API for more details $x functions)."
44 } 68 }
45
46 ], 69 ],
47 "events": [ 70 "events": [
48 { 71 {
72 "name": "nodeHighlightRequested",
73 "parameters": [
74 {
75 "name": "nodeId",
76 "$ref": "NodeId",
77 "description": "Identifier of the node to highlight in DOM tree."
78 }
79 ],
80 "description": "In DOM tree, highlights DOM node with given id."
81 },
82 {
49 "name": "childNodeInserted", 83 "name": "childNodeInserted",
50 "parameters": [ 84 "parameters": [
51 { 85 {
52 "description": "Id of the node that has changed.", 86 "description": "Id of the node that has changed.",
53 "name": "parentNodeId", 87 "name": "parentNodeId",
54 "$ref": "NodeId" 88 "$ref": "NodeId"
55 }, 89 },
56 { 90 {
57
58 "description": "Id of the previous sibling (0 if thi s is at the beginning of the list).", 91 "description": "Id of the previous sibling (0 if thi s is at the beginning of the list).",
59 "name": "previousNodeId", 92 "name": "previousNodeId",
60 "$ref": "NodeId" 93 "$ref": "NodeId"
61 }, 94 },
62 { 95 {
63 "description": "Inserted node data.", 96 "description": "Inserted node data.",
64 "name": "node", 97 "name": "node",
65 "$ref": "Node" 98 "$ref": "Node"
66 } 99 }
67 ], 100 ],
(...skipping 17 matching lines...) Expand all
85 } 118 }
86 ], 119 ],
87 "domain": "DOM", 120 "domain": "DOM",
88 "types": [ 121 "types": [
89 { 122 {
90 "description": "Unique DOM node identifier.", 123 "description": "Unique DOM node identifier.",
91 "id": "NodeId", 124 "id": "NodeId",
92 "type": "integer" 125 "type": "integer"
93 }, 126 },
94 { 127 {
128 "id": "BackendNodeId",
129 "type": "integer",
130 "description": "Unique DOM node identifier used to reference a node that may not have been pushed to the front-end."
131 },
132 {
95 "description": "DOM interaction is implemented in terms of m irror objects that represent the actual DOM nodes. DOMNode is a base node mirror type.", 133 "description": "DOM interaction is implemented in terms of m irror objects that represent the actual DOM nodes. DOMNode is a base node mirror type.",
96 "id": "Node", 134 "id": "Node",
97 "properties": [ 135 "properties": [
98 { 136 {
99 "$ref": "NodeId", 137 "$ref": "NodeId",
100 "description": "Node identifier that is passed into the rest of the DOM messages as the <code>nodeId</code>. Backend will only push node with given <code>id</code> once. It is aware of all requested nodes and wil l only fire DOM events for nodes known to the client.", 138 "description": "Node identifier that is passed into the rest of the DOM messages as the <code>nodeId</code>. Backend will only push node with given <code>id</code> once. It is aware of all requested nodes and wil l only fire DOM events for nodes known to the client.",
101 "name": "nodeId" 139 "name": "nodeId"
102 }, 140 },
103 { 141 {
142 "name": "backendNodeId",
143 "$ref": "BackendNodeId",
144 "description": "The BackendNodeId for this node."
145 },
146 {
104 "description": "<code>Node</code>'s nodeType.", 147 "description": "<code>Node</code>'s nodeType.",
105 "name": "nodeType", 148 "name": "nodeType",
106 "type": "integer" 149 "type": "integer"
107 }, 150 },
108 { 151 {
109 "description": "<code>Node</code>'s nodeName.", 152 "description": "<code>Node</code>'s nodeName.",
110 "name": "nodeName", 153 "name": "nodeName",
111 "type": "string" 154 "type": "string"
112 }, 155 },
113 { 156 {
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 "optional": true, 189 "optional": true,
147 "type": "string" 190 "type": "string"
148 } 191 }
149 ], 192 ],
150 "type": "object" 193 "type": "object"
151 }, 194 },
152 { 195 {
153 "id": "RGBA", 196 "id": "RGBA",
154 "type": "object", 197 "type": "object",
155 "properties": [ 198 "properties": [
156 { 199 {
157 "name": "r", 200 "name": "r",
158 "type": "integer", 201 "type": "integer",
159 "description": "The red component, in the [0-255] ra nge." 202 "description": "The red component, in the [0-255] ra nge."
160 }, 203 },
161 { 204 {
162 "name": "g", 205 "name": "g",
163 "type": "integer", 206 "type": "integer",
164 "description": "The green component, in the [0-255] range." 207 "description": "The green component, in the [0-255] range."
165 }, 208 },
166 { 209 {
167 "name": "b", 210 "name": "b",
168 "type": "integer", 211 "type": "integer",
169 "description": "The blue component, in the [0-255] r ange." 212 "description": "The blue component, in the [0-255] r ange."
170 }, 213 },
171 { 214 {
172 "name": "a", 215 "name": "a",
173 "type": "number", 216 "type": "number",
174 "optional": true, 217 "optional": true,
175 "description": "The alpha component, in the [0-1] ra nge (default: 1)." 218 "description": "The alpha component, in the [0-1] ra nge (default: 1)."
176 } 219 }
177 ], 220 ],
178 "description": "A structure holding an RGBA color." 221 "description": "A structure holding an RGBA color."
179 }, 222 },
180 { 223 {
224 "id": "Mode",
225 "type": "string",
226 "description": "Enable or Disable the highlighting inspector ."
227 },
228 {
181 "id": "HighlightConfig", 229 "id": "HighlightConfig",
182 "type": "object", 230 "type":"object",
183 "properties": [ 231 "properties":[
184 { 232 {
185 "name": "contentColor", 233 "name": "showInfo",
186 "$ref": "RGBA", 234 "type": "boolean",
187 "optional": true, 235 "optional": true,
188 "description": "The content box highlight fill color (default: transparent)." 236 "description": "Whether the node info tooltip should be shown (default: false)."
189 }, 237 },
190 { 238 {
191 "name": "borderColor", 239 "name": "showRulers",
192 "$ref": "RGBA", 240 "type": "boolean",
193 "optional": true, 241 "optional": true,
194 "description": "The border highlight fill color (def ault: transparent)." 242 "description": "Whether the rulers should be shown ( default: false)."
243 },
244 {
245 "name": "showExtensionLines",
246 "type": "boolean",
247 "optional": true,
248 "description": "Whether the extension lines from nod e to the rulers should be shown (default: false)."
249 },
250 {
251 "name": "displayAsMaterial",
252 "type": "boolean",
253 "optional": true
254 },
255 {
256 "name": "contentColor",
257 "$ref": "DOM.RGBA",
258 "optional": true,
259 "description": "The content box highlight fill color (default: transparent)."
260 },
261 {
262 "name": "paddingColor",
263 "$ref": "DOM.RGBA",
264 "optional": true,
265 "description": "The padding highlight fill color (de fault: transparent)."
266 },
267 {
268 "name": "borderColor",
269 "$ref": "DOM.RGBA",
270 "optional": true,
271 "description": "The border highlight fill color (def ault: transparent)."
272 },
273 {
274 "name": "marginColor",
275 "$ref": "DOM.RGBA",
276 "optional": true,
277 "description": "The margin highlight fill color (def ault: transparent)."
278 },
279 {
280 "name": "eventTargetColor",
281 "$ref": "DOM.RGBA",
282 "optional": true,
283 "description": "The event target element highlight f ill color (default: transparent)."
284 },
285 {
286 "name": "shapeColor",
287 "$ref": "DOM.RGBA",
288 "optional": true,
289 "description": "The shape outside fill color (defaul t: transparent)."
290 },
291 {
292 "name": "shapeMarginColor",
293 "$ref": "DOM.RGBA",
294 "optional": true,
295 "description": "The shape margin fill color (default : transparent)."
296 },
297 {
298 "name": "selectorList",
299 "type": "string",
300 "optional": true,
301 "description": "Selectors to highlight relevant node s."
195 } 302 }
196 ], 303 ],
197 "description": "Configuration data for the highlighting of p age elements." 304 "description": "Configuration data for the highlighting of p age elements."
198 } 305 }
199 ] 306 ]
200 }, 307 },
201 { 308 {
202 "commands": [ 309 "commands": [
203 { 310 {
204 "description": "Enables CSS agent for the given page.", 311 "description": "Enables CSS agent for the given page.",
205 "name": "enable" 312 "name": "enable"
206 }, 313 },
207 { 314 {
208 "description": "Disables CSS agent for the given page.", 315 "description": "Disables CSS agent for the given page.",
209 "name": "disable" 316 "name": "disable"
210 }, 317 },
211 { 318 {
212 "description": "Returns requested styles for a DOM node iden tified by <code>nodeId</code>.", 319 "description": "Returns requested styles for a DOM node iden tified by <code>nodeId</code>.",
213 "name": "getMatchedStylesForNode", 320 "name": "getMatchedStylesForNode",
214 "parameters": [ 321 "parameters": [
215 { 322 {
216 "$ref": "DOM.NodeId", 323 "$ref": "DOM.NodeId",
217 "name": "nodeId" 324 "name": "nodeId"
218 } 325 }
219 ], 326 ],
220 "returns": [ 327 "returns": [
221 { 328 {
222 "$ref": "CSSStyle", 329 "$ref": "CSSStyle",
223 "description": "Inline style for the specified DOM n ode.", 330 "description": "Inline style for the specified DOM n ode.",
224 "name": "inlineStyle", 331 "name": "inlineStyle",
225 "optional": true 332 "optional": true
226 } 333 }
227
228 ] 334 ]
229 }, 335 },
230 { 336 {
231 "description": "Applies specified style edits one after anot her in the given order.", 337 "description": "Applies specified style edits one after anot her in the given order.",
232 "name": "setStyleTexts", 338 "name": "setStyleTexts",
233 "parameters": [ 339 "parameters": [
234 { 340 {
235 "items": { 341 "items": {
236 "$ref": "StyleDeclarationEdit" 342 "$ref": "StyleDeclarationEdit"
237 }, 343 },
(...skipping 21 matching lines...) Expand all
259 "name": "styleSheetId", 365 "name": "styleSheetId",
260 "$ref": "StyleSheetId" 366 "$ref": "StyleSheetId"
261 } 367 }
262 ], 368 ],
263 "description": "Fired whenever any bounds are updated for an y object." 369 "description": "Fired whenever any bounds are updated for an y object."
264 } 370 }
265 ], 371 ],
266 "domain": "CSS", 372 "domain": "CSS",
267 "types": [ 373 "types": [
268 { 374 {
269 "id": "StyleSheetId", 375 "id": "StyleSheetId",
270 "type": "string" 376 "type": "string"
271 }, 377 },
272 { 378 {
273 "description": "Text range within a resource. All numbers ar e zero-based.", 379 "description": "Text range within a resource. All numbers ar e zero-based.",
274 "type": "object", 380 "type": "object",
275 "id": "SourceRange", 381 "id": "SourceRange",
276 "properties": [ 382 "properties": [
277 { 383 {
278 "type": "integer", 384 "type": "integer",
279 "name": "startLine", 385 "name": "startLine",
280 "description": "Start line of range." 386 "description": "Start line of range."
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 { 425 {
320 "description": "The property name.", 426 "description": "The property name.",
321 "name": "name", 427 "name": "name",
322 "type": "string" 428 "type": "string"
323 }, 429 },
324 { 430 {
325 "description": "The property value.", 431 "description": "The property value.",
326 "name": "value", 432 "name": "value",
327 "type": "string" 433 "type": "string"
328 }, 434 },
329 { 435 {
330 "name": "range", 436 "name": "range",
331 "$ref": "SourceRange", 437 "$ref": "SourceRange",
332 "optional": true, 438 "optional": true,
333 "description": "The entire property range in the enc losing style declaration (if available)." 439 "description": "The entire property range in the enc losing style declaration (if available)."
334 } 440 }
335 ], 441 ],
336 "type": "object" 442 "type": "object"
337 }, 443 },
338 { 444 {
339 "description": "CSS style representation.", 445 "description": "CSS style representation.",
340 "id": "CSSStyle", 446 "id": "CSSStyle",
341 "properties": [ 447 "properties": [
342 { 448 {
343 "description": "The css style sheet identifier (abse nt for user agent stylesheet and user-specified stylesheet rules) this rule came from. For UI devtools, this is simply equivalent to the NodeId.", 449 "description": "The css style sheet identifier (abse nt for user agent stylesheet and user-specified stylesheet rules) this rule came from. For UI devtools, this is simply equivalent to the NodeId.",
(...skipping 20 matching lines...) Expand all
364 { 470 {
365 "description": "Style declaration range in the enclo sing stylesheet (if available).", 471 "description": "Style declaration range in the enclo sing stylesheet (if available).",
366 "optional": true, 472 "optional": true,
367 "name": "range", 473 "name": "range",
368 "$ref": "SourceRange" 474 "$ref": "SourceRange"
369 } 475 }
370 ], 476 ],
371 "type": "object" 477 "type": "object"
372 } 478 }
373 ] 479 ]
480 },
481 {
482 "commands":[
483 {
484 "description":"Enables CSS agent for the given page.",
485 "name":"enable"
486 },
487 {
488 "description":"Disables CSS agent for the given page.",
489 "name":"disable"
490 },
491 {
492 "name":"highlightNode",
493 "description":"Highlights DOM node with given id or with the given JavaScript object wrapper. Either nodeId or objectId must be specified.",
494 "parameters":[
495 {
496 "name":"highlightConfig",
497 "$ref":"HighlightConfig",
498 "description":"A descriptor for the highlight appear ance."
499 },
500 {
501 "name":"nodeId",
502 "$ref":"DOM.NodeId",
503 "optional":true,
504 "description":"Identifier of the node to highlight."
505 }
506 ]
507 },
508 {
509 "name":"hideHighlight",
510 "description":"Hides DOM node highlight."
511 },
512 {
513 "name":"setInspectMode",
514 "parameters":[
515 {
516 "description":"Set an inspection mode.",
517 "name":"mode",
518 "$ref":"InspectMode"
519 },
520 {
521 "description":"A descriptor for the highlight appear ance of hovered-over nodes. May be omitted if <code>enabled == false</code>.",
522 "optional":true,
523 "name":"highlightConfig",
524 "$ref":"HighlightConfig"
525 }
526 ],
527 "description":"Enters the 'inspect' mode. In this mode, elem ents that user is hovering over are highlighted. Backend then generates 'inspect NodeRequested' event upon element selection."
528 }
529 ],
530 "description":"This domain provides various functionality related to drawing atop the inspected page.",
531 "domain":"Overlay",
532 "dependencies":[
533 "DOM"
534 ],
535 "experimental":true,
536 "events":[
537 {
538 "name":"setInspectMode",
539 "parameters":[
540 {
541 "description":"Set an inspection mode.",
542 "name":"mode",
543 "$ref":"InspectMode"
544 },
545 {
546 "description":"A descriptor for the highlight appear ance of hovered-over nodes. May be omitted if <code>enabled == false</code>.",
547 "optional":true,
548 "name":"highlightConfig",
549 "$ref":"HighlightConfig"
550 }
551 ],
552 "description":"Enters the 'inspect' mode. In this mode, elem ents that user is hovering over are highlighted. Backend then generates 'inspect NodeRequested' event upon element selection."
553 },
554 {
555 "name":"nodeHighlightRequested",
556 "description":"Fired when the node should be highlighted. Th is happens after call to <code>setInspectMode</code>.",
557 "parameters":[
558 {
559 "name":"nodeId",
560 "$ref":"DOM.NodeId"
561 }
562 ]
563 },
564 {
565 "name":"inspectNodeRequested",
566 "description":"Fired when the node should be inspected. This happens after call to <code>setInspectMode</code> or when user manually inspect s an element.",
567 "parameters":[
568 {
569 "name":"backendNodeId",
570 "$ref":"DOM.BackendNodeId",
571 "description":"Id of the node to inspect."
572 }
573 ]
574 }
575 ],
576 "types":[
577 {
578 "id":"HighlightConfig",
579 "type":"object",
580 "properties":[
581 {
582 "name":"showInfo",
583 "type":"boolean",
584 "optional":true,
585 "description":"Whether the node info tooltip should be shown (default: false)."
586 },
587 {
588 "name":"showRulers",
589 "type":"boolean",
590 "optional":true,
591 "description":"Whether the rulers should be shown (d efault: false)."
592 },
593 {
594 "name":"showExtensionLines",
595 "type":"boolean",
596 "optional":true,
597 "description":"Whether the extension lines from node to the rulers should be shown (default: false)."
598 },
599 {
600 "name":"displayAsMaterial",
601 "type":"boolean",
602 "optional":true
603 },
604 {
605 "name":"contentColor",
606 "$ref":"DOM.RGBA",
607 "optional":true,
608 "description":"The content box highlight fill color (default: transparent)."
609 },
610 {
611 "name":"paddingColor",
612 "$ref":"DOM.RGBA",
613 "optional":true,
614 "description":"The padding highlight fill color (def ault: transparent)."
615 },
616 {
617 "name":"borderColor",
618 "$ref":"DOM.RGBA",
619 "optional":true,
620 "description":"The border highlight fill color (defa ult: transparent)."
621 },
622 {
623 "name":"marginColor",
624 "$ref":"DOM.RGBA",
625 "optional":true,
626 "description":"The margin highlight fill color (defa ult: transparent)."
627 },
628 {
629 "name":"eventTargetColor",
630 "$ref":"DOM.RGBA",
631 "optional":true,
632 "description":"The event target element highlight fi ll color (default: transparent)."
633 },
634 {
635 "name":"shapeColor",
636 "$ref":"DOM.RGBA",
637 "optional":true,
638 "description":"The shape outside fill color (default : transparent)."
639 },
640 {
641 "name":"shapeMarginColor",
642 "$ref":"DOM.RGBA",
643 "optional":true,
644 "description":"The shape margin fill color (default: transparent)."
645 },
646 {
647 "name":"selectorList",
648 "type":"string",
649 "optional":true,
650 "description":"Selectors to highlight relevant nodes ."
651 }
652 ],
653 "description":"Configuration data for the highlighting of pa ge elements."
654 },
655 {
656 "id":"InspectMode",
657 "type":"string",
658 "enum":[
659 "searchForNode",
660 "searchForUAShadowDOM",
661 "none"
662 ]
663 }
664 ]
374 } 665 }
375 ], 666 ],
376 "version": { 667 "version": {
377 "major": "1", 668 "major": "1",
378 "minor": "0" 669 "minor": "0"
379 } 670 }
380 } 671 }
OLDNEW
« no previous file with comments | « components/ui_devtools/BUILD.gn ('k') | components/ui_devtools/views/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698