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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/components/DOMBreakpointsSidebarPane.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) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 * @param {!SDK.DOMNode} node 179 * @param {!SDK.DOMNode} node
180 * @param {!Protocol.DOMDebugger.DOMBreakpointType} type 180 * @param {!Protocol.DOMDebugger.DOMBreakpointType} type
181 * @param {boolean} enabled 181 * @param {boolean} enabled
182 */ 182 */
183 _createBreakpointElement(node, type, enabled) { 183 _createBreakpointElement(node, type, enabled) {
184 var element = createElement('li'); 184 var element = createElement('li');
185 element._node = node; 185 element._node = node;
186 element._type = type; 186 element._type = type;
187 element.addEventListener('contextmenu', this._contextMenu.bind(this, node, t ype), true); 187 element.addEventListener('contextmenu', this._contextMenu.bind(this, node, t ype), true);
188 188
189 var checkboxLabel = UI.createCheckboxLabel('', enabled); 189 var checkboxLabel = UI.CheckboxLabel.create('', enabled);
190 var checkboxElement = checkboxLabel.checkboxElement; 190 var checkboxElement = checkboxLabel.checkboxElement;
191 checkboxElement.addEventListener('click', this._checkboxClicked.bind(this, n ode, type), false); 191 checkboxElement.addEventListener('click', this._checkboxClicked.bind(this, n ode, type), false);
192 element._checkboxElement = checkboxElement; 192 element._checkboxElement = checkboxElement;
193 element.appendChild(checkboxLabel); 193 element.appendChild(checkboxLabel);
194 194
195 var labelElement = createElementWithClass('div', 'dom-breakpoint'); 195 var labelElement = createElementWithClass('div', 'dom-breakpoint');
196 element.appendChild(labelElement); 196 element.appendChild(labelElement);
197 197
198 var linkifiedNode = Components.DOMPresentationUtils.linkifyNodeReference(nod e); 198 var linkifiedNode = Components.DOMPresentationUtils.linkifyNodeReference(nod e);
199 linkifiedNode.classList.add('monospace'); 199 linkifiedNode.classList.add('monospace');
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 var pane = Components.domBreakpointsSidebarPane; 404 var pane = Components.domBreakpointsSidebarPane;
405 if (pane.element.parentNode !== this.element) 405 if (pane.element.parentNode !== this.element)
406 pane.show(this.element); 406 pane.show(this.element);
407 } 407 }
408 }; 408 };
409 409
410 /** 410 /**
411 * @type {!Components.DOMBreakpointsSidebarPane} 411 * @type {!Components.DOMBreakpointsSidebarPane}
412 */ 412 */
413 Components.domBreakpointsSidebarPane; 413 Components.domBreakpointsSidebarPane;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698