Improve border shorthand serialization.

Fix some bugs caught by css/cssom/shorthand-values. In particular:

 * Make the shorthand order match the spec.
 * Omit values when we can.

Fix a subtest that wasn't correct. Shorthands can be serialized as long
as !important matches in all components.

Differential Revision: https://phabricator.services.mozilla.com/D180466

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1837664
gecko-commit: f6082e10fe98283f17d78f73f21c1874abe38e87
gecko-reviewers: boris, devtools-reviewers
diff --git a/css/cssom/shorthand-values.html b/css/cssom/shorthand-values.html
index b64f7e9..f831cba 100644
--- a/css/cssom/shorthand-values.html
+++ b/css/cssom/shorthand-values.html
@@ -29,7 +29,7 @@
         'border-top: 1px; border-right: 1px; border-bottom: 1px; border-left: 1px;': 'border-width: 1px; border-style: none; border-color: currentcolor;',
         'border-top: 1px; border-right: 2px; border-bottom: 3px; border-left: 4px;': 'border-width: 1px 2px 3px 4px; border-style: none; border-color: currentcolor;',
         'border: 1px; border-top: 2px;': 'border-width: 2px 1px 1px; border-style: none; border-color: currentcolor; border-image: none;',
-        'border: 1px; border-top: 1px !important;': 'border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-right-style: none; border-bottom-style: none; border-left-style: none; border-right-color: currentcolor; border-bottom-color: currentcolor; border-left-color: currentcolor; border-image: none; border-top-width: 1px !important; border-top-style: none !important; border-top-color: currentcolor !important;',
+        'border: 1px; border-top: 1px !important;': 'border-right: 1px; border-bottom: 1px; border-left: 1px; border-image: none; border-top: 1px !important;',
         'border: 1px; border-top-color: red;': 'border-width: 1px; border-style: none; border-color: red currentcolor currentcolor; border-image: none;',
         'border: solid; border-style: dotted': 'border: dotted;',
         'border-width: 1px;': 'border-width: 1px;',