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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/sdk/DOMModel.js

Issue 2058323002: Add ARIA panel to accessibility sidebar pane (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: dgozman comments Created 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009, 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2009, 2010 Google Inc. All rights reserved.
3 * Copyright (C) 2009 Joseph Pecoraro 3 * Copyright (C) 2009 Joseph Pecoraro
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 this._nodeName = payload.nodeName; 51 this._nodeName = payload.nodeName;
52 this._localName = payload.localName; 52 this._localName = payload.localName;
53 this._nodeValue = payload.nodeValue; 53 this._nodeValue = payload.nodeValue;
54 this._pseudoType = payload.pseudoType; 54 this._pseudoType = payload.pseudoType;
55 this._shadowRootType = payload.shadowRootType; 55 this._shadowRootType = payload.shadowRootType;
56 this._frameId = payload.frameId || null; 56 this._frameId = payload.frameId || null;
57 this._xmlVersion = payload.xmlVersion; 57 this._xmlVersion = payload.xmlVersion;
58 58
59 this._shadowRoots = []; 59 this._shadowRoots = [];
60 60
61 this._attributes = []; 61 this._attributes = [];
dgozman 2016/07/19 18:13:12 Let's annotate this one here to ensure compiler ch
aboxhall 2016/07/21 21:39:26 Done.
62 this._attributesMap = {}; 62 this._attributesMap = {};
63 if (payload.attributes) 63 if (payload.attributes)
64 this._setAttributesPayload(payload.attributes); 64 this._setAttributesPayload(payload.attributes);
65 65
66 /** @type {!Map<string, ?>} */ 66 /** @type {!Map<string, ?>} */
67 this._markers = new Map(); 67 this._markers = new Map();
68 this._subtreeMarkerCount = 0; 68 this._subtreeMarkerCount = 0;
69 69
70 this._childNodeCount = payload.childNodeCount || 0; 70 this._childNodeCount = payload.childNodeCount || 0;
71 this._children = null; 71 this._children = null;
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 135
136 /** 136 /**
137 * @enum {string} 137 * @enum {string}
138 */ 138 */
139 WebInspector.DOMNode.ShadowRootTypes = { 139 WebInspector.DOMNode.ShadowRootTypes = {
140 UserAgent: "user-agent", 140 UserAgent: "user-agent",
141 Open: "open", 141 Open: "open",
142 Closed: "closed" 142 Closed: "closed"
143 } 143 }
144 144
145 /** @typedef {{name: string, value: string, _node: WebInspector.DOMNode}} */
146 WebInspector.DOMNode.Attribute;
147
145 WebInspector.DOMNode.prototype = { 148 WebInspector.DOMNode.prototype = {
146 /** 149 /**
147 * @return {!WebInspector.DOMModel} 150 * @return {!WebInspector.DOMModel}
148 */ 151 */
149 domModel: function() 152 domModel: function()
150 { 153 {
151 return this._domModel; 154 return this._domModel;
152 }, 155 },
153 156
154 /** 157 /**
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 * @param {string} name 423 * @param {string} name
421 * @param {string} value 424 * @param {string} value
422 * @param {function(?Protocol.Error)=} callback 425 * @param {function(?Protocol.Error)=} callback
423 */ 426 */
424 setAttributeValue: function(name, value, callback) 427 setAttributeValue: function(name, value, callback)
425 { 428 {
426 this._agent.setAttributeValue(this.id, name, value, this._domModel._mark Revision(this, callback)); 429 this._agent.setAttributeValue(this.id, name, value, this._domModel._mark Revision(this, callback));
427 }, 430 },
428 431
429 /** 432 /**
430 * @return {!Object} 433 * @return {!Array<!WebInspector.DOMNode.Attribute>}
dgozman 2016/07/19 18:13:12 Thanks!
aboxhall 2016/07/21 21:39:26 Sure! :D
431 */ 434 */
432 attributes: function() 435 attributes: function()
433 { 436 {
434 return this._attributes; 437 return this._attributes;
435 }, 438 },
436 439
437 /** 440 /**
438 * @param {string} name 441 * @param {string} name
439 * @param {function(?Protocol.Error)=} callback 442 * @param {function(?Protocol.Error)=} callback
440 */ 443 */
(...skipping 1836 matching lines...) Expand 10 before | Expand all | Expand 10 after
2277 } 2280 }
2278 2281
2279 /** 2282 /**
2280 * @param {!WebInspector.Target} target 2283 * @param {!WebInspector.Target} target
2281 * @return {?WebInspector.DOMModel} 2284 * @return {?WebInspector.DOMModel}
2282 */ 2285 */
2283 WebInspector.DOMModel.fromTarget = function(target) 2286 WebInspector.DOMModel.fromTarget = function(target)
2284 { 2287 {
2285 return /** @type {?WebInspector.DOMModel} */ (target.model(WebInspector.DOMM odel)); 2288 return /** @type {?WebInspector.DOMModel} */ (target.model(WebInspector.DOMM odel));
2286 } 2289 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698