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

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

Issue 2875193002: DevTools: update text inputs to new style (Closed)
Patch Set: ac Created 3 years, 6 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 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. 3 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
4 * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com). 4 * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com).
5 * Copyright (C) 2009 Joseph Pecoraro 5 * Copyright (C) 2009 Joseph Pecoraro
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 10 *
(...skipping 1163 matching lines...) Expand 10 before | Expand all | Expand 10 after
1174 */ 1174 */
1175 UI.createTextButton = function(text, clickHandler, className) { 1175 UI.createTextButton = function(text, clickHandler, className) {
1176 var element = createElementWithClass('button', className || '', 'text-button') ; 1176 var element = createElementWithClass('button', className || '', 'text-button') ;
1177 element.textContent = text; 1177 element.textContent = text;
1178 if (clickHandler) 1178 if (clickHandler)
1179 element.addEventListener('click', clickHandler, false); 1179 element.addEventListener('click', clickHandler, false);
1180 return element; 1180 return element;
1181 }; 1181 };
1182 1182
1183 /** 1183 /**
1184 * @param {string=} className
1185 * @param {string=} type
1186 * @return {!Element}
1187 */
1188 UI.createInput = function(className, type) {
1189 var element = createElementWithClass('input', className || '');
1190 element.classList.add('harmony-input');
1191 if (type)
1192 element.type = type;
1193 return element;
1194 };
1195
1196 /**
1184 * @param {string} name 1197 * @param {string} name
1185 * @param {string} title 1198 * @param {string} title
1186 * @param {boolean=} checked 1199 * @param {boolean=} checked
1187 * @return {!Element} 1200 * @return {!Element}
1188 */ 1201 */
1189 UI.createRadioLabel = function(name, title, checked) { 1202 UI.createRadioLabel = function(name, title, checked) {
1190 var element = createElement('label', 'dt-radio'); 1203 var element = createElement('label', 'dt-radio');
1191 element.radioElement.name = name; 1204 element.radioElement.name = name;
1192 element.radioElement.checked = !!checked; 1205 element.radioElement.checked = !!checked;
1193 element.createTextChild(title); 1206 element.createTextChild(title);
(...skipping 842 matching lines...) Expand 10 before | Expand all | Expand 10 after
2036 */ 2049 */
2037 UI.createInlineButton = function(toolbarButton) { 2050 UI.createInlineButton = function(toolbarButton) {
2038 var element = createElement('span'); 2051 var element = createElement('span');
2039 var shadowRoot = UI.createShadowRootWithCoreStyles(element, 'ui/inlineButton.c ss'); 2052 var shadowRoot = UI.createShadowRootWithCoreStyles(element, 'ui/inlineButton.c ss');
2040 element.classList.add('inline-button'); 2053 element.classList.add('inline-button');
2041 var toolbar = new UI.Toolbar(''); 2054 var toolbar = new UI.Toolbar('');
2042 toolbar.appendToolbarItem(toolbarButton); 2055 toolbar.appendToolbarItem(toolbarButton);
2043 shadowRoot.appendChild(toolbar.element); 2056 shadowRoot.appendChild(toolbar.element);
2044 return element; 2057 return element;
2045 }; 2058 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698