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

Unified Diff: tracing/tracing/ui/base/table.html

Issue 2956023002: Remove tr.b.dictionaryContainsValue. (Closed)
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tracing/tracing/base/iteration_helpers_test.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/ui/base/table.html
diff --git a/tracing/tracing/ui/base/table.html b/tracing/tracing/ui/base/table.html
index ac45516aea88bf50fdf8b94754f1d727f9db17cc..4c8650fd27ef93018ebfa75361aa8eabcf6b5d8f 100644
--- a/tracing/tracing/ui/base/table.html
+++ b/tracing/tracing/ui/base/table.html
@@ -209,8 +209,11 @@ tr.exportTo('tr.ui.b', function() {
const DESCENDING_ARROW = String.fromCharCode(0x25BE);
const SelectionMode = tr.ui.b.TableFormat.SelectionMode;
+ const SelectionModeValues = new Set(Object.values(SelectionMode));
const HighlightStyle = tr.ui.b.TableFormat.HighlightStyle;
+ const HighlightStyleValues = new Set(Object.values(HighlightStyle));
const ColumnAlignment = tr.ui.b.TableFormat.ColumnAlignment;
+ const ColumnAlignmentValues = new Set(Object.values(ColumnAlignment));
Polymer({
is: 'tr-ui-b-table',
@@ -1030,7 +1033,7 @@ tr.exportTo('tr.ui.b', function() {
},
set selectionMode(selectionMode) {
- if (!tr.b.dictionaryContainsValue(SelectionMode, selectionMode)) {
+ if (!SelectionModeValues.has(selectionMode)) {
throw new Error('Invalid selection mode ' + selectionMode);
}
this.rebuildIfNeeded_();
@@ -1043,7 +1046,7 @@ tr.exportTo('tr.ui.b', function() {
},
set rowHighlightStyle(rowHighlightStyle) {
- if (!tr.b.dictionaryContainsValue(HighlightStyle, rowHighlightStyle)) {
+ if (!HighlightStyleValues.has(rowHighlightStyle)) {
throw new Error('Invalid row highlight style ' + rowHighlightStyle);
}
this.rebuildIfNeeded_();
@@ -1072,7 +1075,7 @@ tr.exportTo('tr.ui.b', function() {
},
set cellHighlightStyle(cellHighlightStyle) {
- if (!tr.b.dictionaryContainsValue(HighlightStyle, cellHighlightStyle)) {
+ if (!HighlightStyleValues.has(cellHighlightStyle)) {
throw new Error('Invalid cell highlight style ' + cellHighlightStyle);
}
this.rebuildIfNeeded_();
« no previous file with comments | « tracing/tracing/base/iteration_helpers_test.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698