Don't rely on the second argument to DOMTokenList.toggle in about:policy.

This argument is not standardized and is not implemented by Webkit on iOS,
making the page unusable when included on iOS builds.

BUG=252537

Review URL: https://chromiumcodereview.appspot.com/17341004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207924 0039d316-1c4b-4281-b951-d872f2087c98
parent def6f60c
......@@ -162,9 +162,10 @@ cr.define('policy', function() {
// Determine whether the contents of the value column overflows. The
// visibility of the contents, replacement link and additional row
// containing the complete value that depend on this are handled by CSS.
this.classList.toggle(
'has-overflowed-value',
valueContainer.offsetWidth < valueContainer.valueWidth);
if (valueContainer.offsetWidth < valueContainer.valueWidth)
this.classList.add('has-overflowed-value');
else
this.classList.remove('has-overflowed-value');
},
/**
......@@ -279,8 +280,10 @@ cr.define('policy', function() {
policy.unset && !showUnset ||
policy.name.toLowerCase().indexOf(this.filterPattern_) == -1;
}
this.parentElement.classList.toggle(
'empty', !this.querySelector('tbody:not([hidden])'));
if (this.querySelector('tbody:not([hidden])'))
this.parentElement.classList.remove('empty');
else
this.parentElement.classList.add('empty');
setTimeout(this.checkOverflow_.bind(this), 0);
},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment