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

Side by Side Diff: Source/devtools/front_end/components/DOMBreakpointsSidebarPane.js

Issue 1076453004: Show reasons why nodes are ignored in accessibility sidebar (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add a catch-all return to ignoredReasonName Created 5 years, 7 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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 substitutions.push(targetNodeLink); 156 substitutions.push(targetNodeLink);
157 } else 157 } else
158 message = "Paused on a \"%s\" breakpoint set on %s, because a new child was added to that node."; 158 message = "Paused on a \"%s\" breakpoint set on %s, because a new child was added to that node.";
159 } else { 159 } else {
160 message = "Paused on a \"%s\" breakpoint set on %s, because its descendant %s was removed."; 160 message = "Paused on a \"%s\" breakpoint set on %s, because its descendant %s was removed.";
161 substitutions.push(targetNodeLink); 161 substitutions.push(targetNodeLink);
162 } 162 }
163 } else 163 } else
164 message = "Paused on a \"%s\" breakpoint set on %s."; 164 message = "Paused on a \"%s\" breakpoint set on %s.";
165 165
166 var element = createElement("span"); 166 var element = WebInspector.formatLocalized(message, substitutions, "");
167 var formatters = {
168 s: function(substitution)
169 {
170 return substitution;
171 }
172 };
173 function append(a, b)
174 {
175 if (typeof b === "string")
176 b = createTextNode(b);
177 else if (b.shadowRoot)
178 b = createTextNode(b.shadowRoot.lastChild.textContent);
179 element.appendChild(b);
180 }
181 WebInspector.formatLocalized(message, substitutions, formatters, "", app end);
182 167
183 callback(element); 168 callback(element);
184 }, 169 },
185 170
186 _nodeRemoved: function(event) 171 _nodeRemoved: function(event)
187 { 172 {
188 var node = event.data.node; 173 var node = event.data.node;
189 this._removeBreakpointsForNode(event.data.node); 174 this._removeBreakpointsForNode(event.data.node);
190 var children = node.children(); 175 var children = node.children();
191 if (!children) 176 if (!children)
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 this.element.appendChild(this.bodyElement); 464 this.element.appendChild(this.bodyElement);
480 }, 465 },
481 466
482 __proto__: WebInspector.SidebarPane.prototype 467 __proto__: WebInspector.SidebarPane.prototype
483 } 468 }
484 469
485 /** 470 /**
486 * @type {!WebInspector.DOMBreakpointsSidebarPane} 471 * @type {!WebInspector.DOMBreakpointsSidebarPane}
487 */ 472 */
488 WebInspector.domBreakpointsSidebarPane; 473 WebInspector.domBreakpointsSidebarPane;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698