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

Side by Side Diff: Source/devtools/front_end/accessibility/AccessibilitySidebarView.js

Issue 1172643002: DevTools: migrate sidebar pane's titleElement to use Toolbar. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: only using latin1 in css Created 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 * @extends {WebInspector.ThrottledWidget} 7 * @extends {WebInspector.ThrottledWidget}
8 */ 8 */
9 WebInspector.AccessibilitySidebarView = function() 9 WebInspector.AccessibilitySidebarView = function()
10 { 10 {
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 /** 172 /**
173 * @param {string} textContent 173 * @param {string} textContent
174 * @param {string=} className 174 * @param {string=} className
175 * @return {!Element} 175 * @return {!Element}
176 */ 176 */
177 createInfo: function(textContent, className) 177 createInfo: function(textContent, className)
178 { 178 {
179 var classNameOrDefault = className || "info"; 179 var classNameOrDefault = className || "info";
180 var info = createElementWithClass("div", classNameOrDefault); 180 var info = createElementWithClass("div", classNameOrDefault);
181 info.textContent = textContent; 181 info.textContent = textContent;
182 this.bodyElement.appendChild(info); 182 this.element.appendChild(info);
183 return info; 183 return info;
184 }, 184 },
185 185
186 /** 186 /**
187 * @param {string=} className 187 * @param {string=} className
188 * @return {!TreeOutline} 188 * @return {!TreeOutline}
189 */ 189 */
190 createTreeOutline: function(className) 190 createTreeOutline: function(className)
191 { 191 {
192 var treeOutline = new TreeOutlineInShadow(className); 192 var treeOutline = new TreeOutlineInShadow(className);
193 treeOutline.registerRequiredCSS("accessibility/accessibilityNode.css"); 193 treeOutline.registerRequiredCSS("accessibility/accessibilityNode.css");
194 treeOutline.registerRequiredCSS("components/objectValue.css"); 194 treeOutline.registerRequiredCSS("components/objectValue.css");
195 treeOutline.element.classList.add("hidden"); 195 treeOutline.element.classList.add("hidden");
196 this.bodyElement.appendChild(treeOutline.element); 196 this.element.appendChild(treeOutline.element);
197 return treeOutline; 197 return treeOutline;
198 }, 198 },
199 199
200 __proto__: WebInspector.SidebarPane.prototype 200 __proto__: WebInspector.SidebarPane.prototype
201 } 201 }
202 202
203 /** 203 /**
204 * @constructor 204 * @constructor
205 * @extends {WebInspector.AccessibilitySubPane} 205 * @extends {WebInspector.AccessibilitySubPane}
206 */ 206 */
207 WebInspector.AXComputedTextSubPane = function() 207 WebInspector.AXComputedTextSubPane = function()
208 { 208 {
209 WebInspector.AccessibilitySubPane.call(this, WebInspector.UIString("Computed Text")); 209 WebInspector.AccessibilitySubPane.call(this, WebInspector.UIString("Computed Text"));
210 210
211 this._computedTextElement = this.bodyElement.createChild("div", "ax-computed -text hidden"); 211 this._computedTextElement = this.element.createChild("div", "ax-computed-tex t hidden");
212 212
213 this._noTextInfo = this.createInfo(WebInspector.UIString("No computed text") ); 213 this._noTextInfo = this.createInfo(WebInspector.UIString("No computed text") );
214 this._noNodeInfo = this.createInfo(WebInspector.UIString("No accessibility n ode")); 214 this._noNodeInfo = this.createInfo(WebInspector.UIString("No accessibility n ode"));
215 this._treeOutline = this.createTreeOutline(); 215 this._treeOutline = this.createTreeOutline();
216 }; 216 };
217 217
218 218
219 WebInspector.AXComputedTextSubPane.prototype = { 219 WebInspector.AXComputedTextSubPane.prototype = {
220 /** 220 /**
221 * @param {?AccessibilityAgent.AXNode} axNode 221 * @param {?AccessibilityAgent.AXNode} axNode
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
681 reasonElement = WebInspector.formatLocalized("Static text node is used a s name for ", [], ""); 681 reasonElement = WebInspector.formatLocalized("Static text node is used a s name for ", [], "");
682 break; 682 break;
683 case "uninteresting": 683 case "uninteresting":
684 reasonElement = WebInspector.formatLocalized("Element not interesting fo r accessibility.", [], "") 684 reasonElement = WebInspector.formatLocalized("Element not interesting fo r accessibility.", [], "")
685 break; 685 break;
686 } 686 }
687 if (reasonElement) 687 if (reasonElement)
688 reasonElement.classList.add("ax-reason"); 688 reasonElement.classList.add("ax-reason");
689 return reasonElement; 689 return reasonElement;
690 } 690 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698