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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/ui/SettingsUI.js

Issue 2776263006: [DevTools] Migrate checkbox label to a proper web component (Closed)
Patch Set: Created 3 years, 8 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) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 19 matching lines...) Expand all
30 UI.SettingsUI = {}; 30 UI.SettingsUI = {};
31 31
32 /** 32 /**
33 * @param {string} name 33 * @param {string} name
34 * @param {!Common.Setting} setting 34 * @param {!Common.Setting} setting
35 * @param {boolean=} omitParagraphElement 35 * @param {boolean=} omitParagraphElement
36 * @param {string=} tooltip 36 * @param {string=} tooltip
37 * @return {!Element} 37 * @return {!Element}
38 */ 38 */
39 UI.SettingsUI.createSettingCheckbox = function(name, setting, omitParagraphEleme nt, tooltip) { 39 UI.SettingsUI.createSettingCheckbox = function(name, setting, omitParagraphEleme nt, tooltip) {
40 var label = UI.createCheckboxLabel(name); 40 var label = UI.CheckboxLabel.create(name);
41 if (tooltip) 41 if (tooltip)
42 label.title = tooltip; 42 label.title = tooltip;
43 43
44 var input = label.checkboxElement; 44 var input = label.checkboxElement;
45 input.name = name; 45 input.name = name;
46 UI.SettingsUI.bindCheckbox(input, setting); 46 UI.SettingsUI.bindCheckbox(input, setting);
47 47
48 if (omitParagraphElement) 48 if (omitParagraphElement)
49 return label; 49 return label;
50 50
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 * @interface 104 * @interface
105 */ 105 */
106 UI.SettingUI = function() {}; 106 UI.SettingUI = function() {};
107 107
108 UI.SettingUI.prototype = { 108 UI.SettingUI.prototype = {
109 /** 109 /**
110 * @return {?Element} 110 * @return {?Element}
111 */ 111 */
112 settingElement() {} 112 settingElement() {}
113 }; 113 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698