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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/accessibility/ARIAMetadata.js

Issue 2466123002: DevTools: reformat front-end code to match chromium style. (Closed)
Patch Set: Created 4 years, 1 month 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 // Copyright (c) 2016 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @constructor 6 * @constructor
7 * @param {?Object} config 7 * @param {?Object} config
8 */ 8 */
9 WebInspector.ARIAMetadata = function(config) 9 WebInspector.ARIAMetadata = function(config)
10 { 10 {
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 this._roleNames = Object.keys(config["roles"]); 45 this._roleNames = Object.keys(config["roles"]);
46 }, 46 },
47 47
48 /** 48 /**
49 * @param {string} property 49 * @param {string} property
50 * @return {!Array<string>} 50 * @return {!Array<string>}
51 */ 51 */
52 valuesForProperty: function(property) 52 valuesForProperty: function(property)
53 { 53 {
54 if (this._attributes.has(property)) 54 if (this._attributes.has(property))
55 return this._attributes.get(property).enum(); 55 return this._attributes.get(property).getEnum();
56 56
57 if (property === "role") 57 if (property === "role")
58 return this._roleNames; 58 return this._roleNames;
59 59
60 return []; 60 return [];
61 } 61 }
62 }; 62 };
63 63
64 /** 64 /**
65 * @constructor 65 * @constructor
66 * @param {!Object} config 66 * @param {!Object} config
67 */ 67 */
68 WebInspector.ARIAMetadata.Attribute = function(config) 68 WebInspector.ARIAMetadata.Attribute = function(config)
69 { 69 {
70 /** @type {!Array<string>} */ 70 /** @type {!Array<string>} */
71 this._enum = []; 71 this._enum = [];
72 72
73 if ("enum" in config) 73 if ("enum" in config)
74 this._enum = config.enum; 74 this._enum = config.enum;
75 }; 75 };
76 76
77 WebInspector.ARIAMetadata.Attribute.prototype = { 77 WebInspector.ARIAMetadata.Attribute.prototype = {
78 /** 78 /**
79 * @return {!Array<string>} 79 * @return {!Array<string>}
80 */ 80 */
81 enum: function() 81 getEnum: function()
82 { 82 {
83 return this._enum; 83 return this._enum;
84 } 84 }
85 }; 85 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698