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

Unified Diff: Source/devtools/front_end/ui/UIUtils.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: pfeldman review comments (take 3) Created 5 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 side-by-side diff with in-line comments
Download patch
Index: Source/devtools/front_end/ui/UIUtils.js
diff --git a/Source/devtools/front_end/ui/UIUtils.js b/Source/devtools/front_end/ui/UIUtils.js
index 7efda350f98c2a2a1068603ef05954dac0212f5c..759b118f0a0449b9830ca201a05978bda9a90e64 100644
--- a/Source/devtools/front_end/ui/UIUtils.js
+++ b/Source/devtools/front_end/ui/UIUtils.js
@@ -563,14 +563,28 @@ Number.withThousandsSeparator = function(num)
/**
* @param {string} format
* @param {?ArrayLike} substitutions
- * @param {!Object.<string, function(string, ...):*>} formatters
- * @param {string} initialValue
- * @param {function(string, string): ?} append
- * @return {!{formattedResult: string, unusedSubstitutions: ?ArrayLike}};
+ * @param {?string} initialValue
+ * @return {!Element}
*/
-WebInspector.formatLocalized = function(format, substitutions, formatters, initialValue, append)
+WebInspector.formatLocalized = function(format, substitutions, initialValue)
{
- return String.format(WebInspector.UIString(format), substitutions, formatters, initialValue, append);
+ var element = createElement("span");
+ var formatters = {
+ s: function(substitution)
+ {
+ return substitution;
+ }
+ };
+ function append(a, b)
+ {
+ if (typeof b === "string")
+ b = createTextNode(b);
+ else if (b.shadowRoot)
+ b = createTextNode(b.shadowRoot.lastChild.textContent);
+ element.appendChild(b);
+ }
+ String.format(WebInspector.UIString(format), substitutions, formatters, initialValue, append);
+ return element;
}
/**

Powered by Google App Engine
This is Rietveld 408576698