diff options
author | joaodasilva@chromium.org <joaodasilva@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-21 21:20:20 +0000 |
---|---|---|
committer | joaodasilva@chromium.org <joaodasilva@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-21 21:20:20 +0000 |
commit | e52291df4e21fb9857f7225b86ca50fbcb8cc583 (patch) | |
tree | ed7a813bffce8c5049a056b5fda6cccebf673960 | |
parent | def6f60ce61c231c3b9bfd0875ffe4c3a98f0263 (diff) | |
download | chromium_src-e52291df4e21fb9857f7225b86ca50fbcb8cc583.zip chromium_src-e52291df4e21fb9857f7225b86ca50fbcb8cc583.tar.gz chromium_src-e52291df4e21fb9857f7225b86ca50fbcb8cc583.tar.bz2 |
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
-rw-r--r-- | chrome/browser/resources/policy.js | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/chrome/browser/resources/policy.js b/chrome/browser/resources/policy.js index a044bc9..6aa4eee 100644 --- a/chrome/browser/resources/policy.js +++ b/chrome/browser/resources/policy.js @@ -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); }, |