Bug 1334199 - script-generated patch to omit getComputedStyle's second argument when it's falsy, r=jaws.
authorFlorian Quèze <florian@queze.net>
Fri, 27 Jan 2017 10:51:02 +0100
changeset 378067 d02fd33024b876d9a5c7f4afa9bd103ed9d58e74
parent 378066 44495d8b46baf4d497ff927a7a804e77728ed09f
child 378068 c0be583a19b635e94b3e7801497d09d03daa68b7
push id7198
push userjlorenzo@mozilla.com
push dateTue, 18 Apr 2017 12:07:49 +0000
treeherdermozilla-beta@d57aa49c3948 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjaws
bugs1334199
milestone54.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1334199 - script-generated patch to omit getComputedStyle's second argument when it's falsy, r=jaws.
accessible/tests/mochitest/attributes.js
accessible/tests/mochitest/textattrs/test_general.html
browser/base/content/browser-gestureSupport.js
browser/base/content/newtab/transformations.js
browser/base/content/nsContextMenu.js
browser/base/content/tabbrowser.xml
browser/base/content/test/general/browser_addCertException.js
browser/base/content/test/general/browser_gestureSupport.js
browser/base/content/test/general/browser_insecureLoginForms.js
browser/base/content/test/general/browser_tabkeynavigation.js
browser/base/content/test/general/browser_windowactivation.js
browser/base/content/test/plugins/plugin_syncRemoved.html
browser/components/customizableui/CustomizeMode.jsm
browser/components/customizableui/content/panelUI.xml
browser/components/places/content/browserPlacesViews.js
browser/components/places/content/sidebarUtils.js
browser/components/preferences/in-content/tests/browser_subdialogs.js
browser/modules/FormSubmitObserver.jsm
devtools/client/webconsole/test/browser_webconsole_bug_632817.js
devtools/client/webconsole/test/browser_webconsole_live_filtering_of_message_types.js
devtools/client/webconsole/test/browser_webconsole_live_filtering_on_search_strings.js
devtools/client/webconsole/test/browser_webconsole_log_file_filter.js
devtools/shared/gcli/source/lib/gcli/mozui/inputter.js
devtools/shared/layout/utils.js
dom/base/crashtests/326865-1.html
dom/base/crashtests/816253.html
dom/base/test/file_bug416317.xhtml
dom/base/test/test_bug338679.html
dom/base/test/test_bug368972.html
dom/base/test/test_bug493881.js
dom/base/test/test_html_colors_quirks.html
dom/base/test/test_html_colors_standards.html
dom/events/test/test_legacy_event.html
dom/html/test/forms/test_maxlength_attribute.html
dom/html/test/forms/test_minlength_attribute.html
dom/html/test/forms/test_pattern_attribute.html
dom/html/test/forms/test_validation.html
dom/html/test/test_bug255820.html
dom/html/test/test_bug442801.html
dom/html/test/test_bug558788-1.html
dom/html/test/test_bug561640.html
dom/html/test/test_bug596511.html
dom/security/test/csp/test_hash_source.html
dom/security/test/csp/test_inlinestyle.html
dom/security/test/csp/test_nonce_source.html
dom/security/test/sri/iframe_style_crossdomain.html
dom/security/test/sri/iframe_style_sameorigin.html
dom/security/test/sri/test_csp_directive_style_imports.html
dom/security/test/sri/test_require-sri-for_csp_directive.html
dom/security/test/sri/test_require-sri-for_csp_directive_disabled.html
dom/smil/test/smilTestUtils.js
dom/smil/test/test_smilKeyTimes.xhtml
dom/svg/test/test_object-delayed-intrinsic-size.html
dom/svg/test/test_scientific.html
dom/tests/mochitest/general/test_focusrings.xul
dom/tests/mochitest/webcomponents/test_shadowroot_style_order.html
editor/libeditor/tests/test_bug372345.html
js/xpconnect/tests/chrome/test_paris_weakmap_keys.xul
layout/base/tests/test_bug435293-scale.html
layout/base/tests/test_bug435293-skew.html
layout/forms/test/test_bug287446.html
layout/forms/test/test_bug477531.html
layout/forms/test/test_bug477700.html
layout/generic/crashtests/641724.html
layout/generic/test/test_bug323656.html
layout/generic/test/test_bug522632.html
layout/reftests/bugs/371041-1.html
layout/reftests/bugs/371043-1.html
layout/reftests/bugs/391909-1-ref.html
layout/reftests/cssom/computed-style-cross-window-ref.html
layout/reftests/cssom/computed-style-cross-window.html
layout/reftests/font-face/download-3-notref.html
layout/reftests/font-face/download-3-ref.html
layout/reftests/font-face/download-3.html
layout/reftests/text-overflow/scroll-rounding-ref.html
layout/reftests/text-overflow/scroll-rounding.html
layout/reftests/text/lineheight-percentage-1.html
layout/reftests/text/text-align-unsafe.html
layout/style/crashtests/363950.html
layout/style/crashtests/368740.html
layout/style/crashtests/448161-2.html
layout/style/crashtests/524252-1.html
layout/style/crashtests/580685.html
layout/style/crashtests/822842.html
layout/style/crashtests/840898.html
layout/style/test/bug453896_iframe.html
layout/style/test/chrome/test_bug535806.xul
layout/style/test/chrome/test_display_mode.html
layout/style/test/chrome/test_display_mode_reflow.html
layout/style/test/chrome/test_moz_document_rules.html
layout/style/test/test_acid3_test46.html
layout/style/test/test_addSheet.html
layout/style/test/test_additional_sheets.html
layout/style/test/test_align_justify_computed_values.html
layout/style/test/test_bug1292447.html
layout/style/test/test_bug319381.html
layout/style/test/test_bug363146.html
layout/style/test/test_bug379440.html
layout/style/test/test_bug391034.html
layout/style/test/test_bug391221.html
layout/style/test/test_bug397427.html
layout/style/test/test_bug399349.html
layout/style/test/test_bug412901.html
layout/style/test/test_bug413958.html
layout/style/test/test_bug437915.html
layout/style/test/test_bug450191.html
layout/style/test/test_bug470769.html
layout/style/test/test_bug580685.html
layout/style/test/test_bug635286.html
layout/style/test/test_bug652486.html
layout/style/test/test_bug664955.html
layout/style/test/test_bug74880.html
layout/style/test/test_cascade.html
layout/style/test/test_computed_style_min_size_auto.html
layout/style/test/test_condition_text_assignment.html
layout/style/test/test_css_cross_domain.html
layout/style/test/test_flexbox_child_display_values.xhtml
layout/style/test/test_flexbox_flex_shorthand.html
layout/style/test/test_flexbox_layout.html
layout/style/test/test_initial_computation.html
layout/style/test/test_media_queries.html
layout/style/test/test_media_queries_dynamic.html
layout/style/test/test_media_queries_dynamic_xbl.html
layout/style/test/test_moz_device_pixel_ratio.html
layout/style/test/test_namespace_rule.html
layout/style/test/test_parse_eof.html
layout/style/test/test_position_float_display.html
layout/style/test/test_root_node_display.html
layout/style/test/test_rule_insertion.html
layout/style/test/test_selectors.html
layout/style/test/test_selectors_on_anonymous_content.html
layout/style/test/test_value_cloning.html
layout/style/test/test_value_computation.html
layout/style/test/test_value_storage.html
layout/style/test/test_video_object_fit.html
layout/style/test/test_viewport_units.html
layout/style/test/test_visited_lying.html
layout/style/test/test_webkit_device_pixel_ratio.html
layout/style/test/test_webkit_flex_display.html
layout/style/test/unprefixing_service_iframe.html
layout/style/xbl-marquee/xbl-marquee.xml
mobile/android/chrome/content/SelectHelper.js
mobile/android/chrome/content/browser.js
testing/marionette/driver.js
testing/marionette/listener.js
testing/mochitest/tests/SimpleTest/SimpleTest.js
toolkit/components/extensions/test/mochitest/test_ext_webrequest_basic.html
toolkit/components/microformats/test/static/javascript/prettify.js
toolkit/components/narrate/test/NarrateTestUtils.jsm
toolkit/components/tooltiptext/TooltipTextProvider.js
toolkit/components/url-classifier/tests/mochitest/classifiedAnnotatedFrame.html
toolkit/components/url-classifier/tests/mochitest/classifierFrame.html
toolkit/components/url-classifier/tests/mochitest/gethashFrame.html
toolkit/components/url-classifier/tests/mochitest/test_privatebrowsing_trackingprotection.html
toolkit/components/viewsource/test/browser/browser_viewsourceprefs.js
toolkit/content/browser-content.js
toolkit/content/customizeToolbar.js
toolkit/content/plugins.html
toolkit/content/tests/chrome/test_autocomplete2.xul
toolkit/content/tests/chrome/test_autocomplete3.xul
toolkit/content/tests/chrome/test_righttoleft.xul
toolkit/content/tests/chrome/window_tooltip.xul
toolkit/content/widgets/button.xml
toolkit/content/widgets/listbox.xml
toolkit/content/widgets/preferences.xml
toolkit/content/widgets/progressmeter.xml
toolkit/content/widgets/resizer.xml
toolkit/content/widgets/scrollbox.xml
toolkit/content/widgets/tabbox.xml
toolkit/content/widgets/tree.xml
toolkit/crashreporter/test/browser/browser_bug471404.js
toolkit/crashreporter/test/browser/browser_clearReports.js
toolkit/modules/BrowserUtils.jsm
toolkit/modules/Finder.jsm
toolkit/modules/FinderHighlighter.jsm
toolkit/modules/InlineSpellChecker.jsm
toolkit/modules/LightweightThemeConsumer.jsm
toolkit/modules/tests/browser/browser_WebRequest.js
toolkit/mozapps/extensions/content/extensions.js
toolkit/mozapps/extensions/content/extensions.xml
toolkit/mozapps/extensions/test/browser/browser_inlinesettings_custom.js
toolkit/mozapps/extensions/test/browser/browser_searching.js
toolkit/mozapps/extensions/test/browser/head.js
widget/tests/test_platform_colors.xul
--- a/accessible/tests/mochitest/attributes.js
+++ b/accessible/tests/mochitest/attributes.js
@@ -28,17 +28,17 @@ function testAbsentAttrs(aAccOrElmOrID, 
 }
 
 /**
  * Test CSS based object attributes.
  */
 function testCSSAttrs(aID)
 {
   var node = document.getElementById(aID);
-  var computedStyle = document.defaultView.getComputedStyle(node, "");
+  var computedStyle = document.defaultView.getComputedStyle(node);
 
   var attrs = {
     "display": computedStyle.display,
     "text-align": computedStyle.textAlign,
     "text-indent": computedStyle.textIndent,
     "margin-left": computedStyle.marginLeft,
     "margin-right": computedStyle.marginRight,
     "margin-top": computedStyle.marginTop,
@@ -263,17 +263,17 @@ function fontFamily(aComputedStyle)
  * @param aID          [in] identifier of accessible
  * @param aFontSize    [in] font size
  * @param aFontWeight  [in, optional] kBoldFontWeight or kNormalFontWeight,
  *                      default value is kNormalFontWeight
  */
 function buildDefaultTextAttrs(aID, aFontSize, aFontWeight, aFontFamily)
 {
   var elm = getNode(aID);
-  var computedStyle = document.defaultView.getComputedStyle(elm, "");
+  var computedStyle = document.defaultView.getComputedStyle(elm);
   var bgColor = computedStyle.backgroundColor == "transparent" ?
     "rgb(255, 255, 255)" : computedStyle.backgroundColor;
 
   var defAttrs = {
     "font-style": computedStyle.fontStyle,
     "font-size": aFontSize,
     "background-color": bgColor,
     "font-weight": aFontWeight ? aFontWeight : kNormalFontWeight,
--- a/accessible/tests/mochitest/textattrs/test_general.html
+++ b/accessible/tests/mochitest/textattrs/test_general.html
@@ -48,17 +48,17 @@
 
       attrs = {};
       testTextAttrs(ID, 0, attrs, defAttrs, 0, 7);
 
       attrs = { "font-weight": kBoldFontWeight };
       testTextAttrs(ID, 7, attrs, defAttrs, 7, 12);
 
       var tempElem = getNode(ID).firstChild.nextSibling.firstChild.nextSibling;
-      gComputedStyle = document.defaultView.getComputedStyle(tempElem, "");
+      gComputedStyle = document.defaultView.getComputedStyle(tempElem);
       attrs = {"font-style": gComputedStyle.fontStyle,
                "font-weight": kBoldFontWeight };
       testTextAttrs(ID, 13, attrs, defAttrs, 12, 19);
 
       attrs = { "font-weight": kBoldFontWeight };
       testTextAttrs(ID, 20, attrs, defAttrs, 19, 23);
 
       attrs = {};
@@ -66,66 +66,66 @@
 
       //////////////////////////////////////////////////////////////////////////
       // area3
       ID = "area3";
       defAttrs = buildDefaultTextAttrs(ID, "12pt");
       testDefaultTextAttrs(ID, defAttrs);
 
       tempElem = getNode(ID).firstChild.nextSibling;
-      gComputedStyle = document.defaultView.getComputedStyle(tempElem, "");
+      gComputedStyle = document.defaultView.getComputedStyle(tempElem);
       attrs = {"color": gComputedStyle.color};
       testTextAttrs(ID, 0, attrs, defAttrs, 0, 6);
 
       tempElem = tempElem.firstChild.nextSibling;
-      gComputedStyle = document.defaultView.getComputedStyle(tempElem, "");
+      gComputedStyle = document.defaultView.getComputedStyle(tempElem);
       attrs = {"color": gComputedStyle.color};
       testTextAttrs(ID, 6, attrs, defAttrs, 6, 26);
 
       tempElem = tempElem.parentNode;
-      gComputedStyle = document.defaultView.getComputedStyle(tempElem, "");
+      gComputedStyle = document.defaultView.getComputedStyle(tempElem);
       attrs = {"color": gComputedStyle.color};
       testTextAttrs(ID, 26, attrs, defAttrs, 26, 27);
 
       tempElem = tempElem.nextSibling;
-      gComputedStyle = document.defaultView.getComputedStyle(tempElem, "");
+      gComputedStyle = document.defaultView.getComputedStyle(tempElem);
       attrs = {"color": gComputedStyle.color,
                "background-color": gComputedStyle.backgroundColor};
       testTextAttrs(ID, 27, attrs, defAttrs, 27, 50);
 
       //////////////////////////////////////////////////////////////////////////
       // area4
       ID = "area4";
       defAttrs = buildDefaultTextAttrs(ID, "12pt");
       testDefaultTextAttrs(ID, defAttrs);
 
       tempElem = getNode(ID).firstChild.nextSibling;
-      gComputedStyle = document.defaultView.getComputedStyle(tempElem, "");
+      gComputedStyle = document.defaultView.getComputedStyle(tempElem);
       attrs = {"color": gComputedStyle.color};
       testTextAttrs(ID, 0, attrs, defAttrs, 0, 16);
 
       tempElem = tempElem.nextSibling.firstChild.nextSibling;
-      gComputedStyle = document.defaultView.getComputedStyle(tempElem, "");
+      gComputedStyle = document.defaultView.getComputedStyle(tempElem);
       attrs = {"color": gComputedStyle.color};
       testTextAttrs(ID, 16, attrs, defAttrs, 16, 33);
 
       tempElem = tempElem.parentNode;
-      gComputedStyle = document.defaultView.getComputedStyle(tempElem, "");
+      gComputedStyle = document.defaultView.getComputedStyle(tempElem);
       attrs = {"color": gComputedStyle.color};
       testTextAttrs(ID, 34, attrs, defAttrs, 33, 46);
 
       //////////////////////////////////////////////////////////////////////////
       // area5: "Green!*!RedNormal"
       ID = "area5";
       defAttrs = buildDefaultTextAttrs(ID, "12pt");
       testDefaultTextAttrs(ID, defAttrs);
 
       // Green
       tempElem = getNode(ID).firstChild.nextSibling;
-      gComputedStyle = document.defaultView.getComputedStyle(tempElem, "");
+      gComputedStyle = document.defaultView.getComputedStyle(tempElem);
       attrs = {"color": gComputedStyle.color};
       testTextAttrs(ID, 0, attrs, defAttrs, 0, 5);
 
       // br
       attrs = {};
       testTextAttrs(ID, 5, attrs, defAttrs, 5, 6);
 
       // img, embedded accessible, no attributes
@@ -133,17 +133,17 @@
       testTextAttrs(ID, 6, attrs, {}, 6, 7);
 
       // br
       attrs = {};
       testTextAttrs(ID, 7, attrs, defAttrs, 7, 8);
 
       // Red
       tempElem = tempElem.nextSibling.nextSibling.nextSibling.nextSibling;
-      gComputedStyle = document.defaultView.getComputedStyle(tempElem, "");
+      gComputedStyle = document.defaultView.getComputedStyle(tempElem);
       attrs = {"color": gComputedStyle.color};
       testTextAttrs(ID, 9, attrs, defAttrs, 8, 11);
 
       // Normal
       attrs = {};
       testTextAttrs(ID, 11, attrs, defAttrs, 11, 18);
 
       //////////////////////////////////////////////////////////////////////////
@@ -210,45 +210,45 @@
 
       attrs = {"language": "ru"};
       testTextAttrs(ID, 0, attrs, defAttrs, 0, 6);
 
       attrs = {};
       testTextAttrs(ID, 6, attrs, defAttrs, 6, 7);
 
       tempElem = getNode(ID).firstChild.nextSibling.nextSibling.nextSibling;
-      gComputedStyle = document.defaultView.getComputedStyle(tempElem, "");
+      gComputedStyle = document.defaultView.getComputedStyle(tempElem);
       attrs = { "background-color": gComputedStyle.backgroundColor};
       testTextAttrs(ID, 13, attrs, defAttrs, 7, 20);
 
       attrs = {};
       testTextAttrs(ID, 20, attrs, defAttrs, 20, 21);
 
       attrs = {"language": "de"};
       testTextAttrs(ID, 21, attrs, defAttrs, 21, 36);
 
       attrs = {};
       testTextAttrs(ID, 36, attrs, defAttrs, 36, 44);
 
       attrs = {};
       testTextAttrs(ID, 37, attrs, defAttrs, 36, 44);
 
       tempElem = tempElem.nextSibling.nextSibling.nextSibling.nextSibling.firstChild.nextSibling;
-      gComputedStyle = document.defaultView.getComputedStyle(tempElem, "");
+      gComputedStyle = document.defaultView.getComputedStyle(tempElem);
       attrs = {"color": gComputedStyle.color};
       testTextAttrs(ID, 44, attrs, defAttrs, 44, 51);
 
       tempElem = tempElem.firstChild.nextSibling;
-      gComputedStyle = document.defaultView.getComputedStyle(tempElem, "");
+      gComputedStyle = document.defaultView.getComputedStyle(tempElem);
       attrs = {"font-weight": kBoldFontWeight,
                "color": gComputedStyle.color};
       testTextAttrs(ID, 51, attrs, defAttrs, 51, 55);
 
       tempElem = tempElem.parentNode;
-      gComputedStyle = document.defaultView.getComputedStyle(tempElem, "");
+      gComputedStyle = document.defaultView.getComputedStyle(tempElem);
       attrs = {"color": gComputedStyle.color};
       testTextAttrs(ID, 55, attrs, defAttrs, 55, 62);
 
       //////////////////////////////////////////////////////////////////////////
       // area9, different single style spans in styled paragraph
       ID = "area9";
       defAttrs = buildDefaultTextAttrs(ID, "10pt");
       testDefaultTextAttrs(ID, defAttrs);
@@ -259,35 +259,35 @@
       attrs = { "font-size": "12pt" };
       testTextAttrs(ID, 7, attrs, defAttrs, 6, 12);
 
       attrs = {};
       testTextAttrs(ID, 13, attrs, defAttrs, 12, 21);
 
       // Walk to the span with the different background color
       tempElem = getNode(ID).firstChild.nextSibling.nextSibling.nextSibling;
-      gComputedStyle = document.defaultView.getComputedStyle(tempElem, "");
+      gComputedStyle = document.defaultView.getComputedStyle(tempElem);
       attrs = { "background-color": gComputedStyle.backgroundColor };
       testTextAttrs(ID, 22, attrs, defAttrs, 21, 36);
 
       attrs = {};
       testTextAttrs(ID, 37, attrs, defAttrs, 36, 44);
 
       // Walk from the background color span to the one with font-style
       tempElem = tempElem.nextSibling.nextSibling;
-      gComputedStyle = document.defaultView.getComputedStyle(tempElem, "");
+      gComputedStyle = document.defaultView.getComputedStyle(tempElem);
       attrs = { "font-style": gComputedStyle.fontStyle };
       testTextAttrs(ID, 45, attrs, defAttrs, 44, 61);
 
       attrs = {};
       testTextAttrs(ID, 62, attrs, defAttrs, 61, 69);
 
       // Walk from span with font-style to the one with font-family.
       tempElem = tempElem.nextSibling.nextSibling;
-      gComputedStyle = document.defaultView.getComputedStyle(tempElem, "");
+      gComputedStyle = document.defaultView.getComputedStyle(tempElem);
       attrs = { "font-family": kMonospaceFontFamily };
       testTextAttrs(ID, 70, attrs, defAttrs, 69, 83);
 
       attrs = {};
       testTextAttrs(ID, 84, attrs, defAttrs, 83, 91);
 
       attrs = {
         "text-underline-style": "solid",
@@ -337,35 +337,35 @@
       attrs = { "font-size": "14pt" };
       testTextAttrs(ID, 7, attrs, defAttrs, 7, 13);
 
       attrs = {};
       testTextAttrs(ID, 13, attrs, defAttrs, 13, 22);
 
       // Walk to the span with the different background color
       tempElem = getNode(ID).firstChild.nextSibling.nextSibling.nextSibling;
-      gComputedStyle = document.defaultView.getComputedStyle(tempElem, "");
+      gComputedStyle = document.defaultView.getComputedStyle(tempElem);
       attrs = { "background-color": gComputedStyle.backgroundColor };
       testTextAttrs(ID, 23, attrs, defAttrs, 22, 37);
 
       attrs = {};
       testTextAttrs(ID, 38, attrs, defAttrs, 37, 45);
 
       // Walk from the background color span to the one with font-style
       tempElem = tempElem.nextSibling.nextSibling;
-      gComputedStyle = document.defaultView.getComputedStyle(tempElem, "");
+      gComputedStyle = document.defaultView.getComputedStyle(tempElem);
       attrs = {"font-style": gComputedStyle.fontStyle};
       testTextAttrs(ID, 46, attrs, defAttrs, 45, 62);
 
       attrs = {};
       testTextAttrs(ID, 63, attrs, defAttrs, 62, 70);
 
       // Walk from span with font-style to the one with font-family.
       tempElem = tempElem.nextSibling.nextSibling;
-      gComputedStyle = document.defaultView.getComputedStyle(tempElem, "");
+      gComputedStyle = document.defaultView.getComputedStyle(tempElem);
       attrs = { "font-family": kMonospaceFontFamily };
       testTextAttrs(ID, 71, attrs, defAttrs, 70, 84);
 
       attrs = {};
       testTextAttrs(ID, 85, attrs, defAttrs, 84, 92);
 
       attrs = {
         "text-underline-style": "solid",
@@ -550,17 +550,17 @@
       // text enclosed in mark tag will have a different background color
       ID = "area19";
       defAttrs = buildDefaultTextAttrs(ID, "12pt");
 
       attrs = {};
       testTextAttrs(ID, 0, attrs, defAttrs, 0, 10);
       
       tempElem = getNode(ID).firstChild.nextSibling;
-      gComputedStyle = document.defaultView.getComputedStyle(tempElem, "");
+      gComputedStyle = document.defaultView.getComputedStyle(tempElem);
       attrs = { "background-color": gComputedStyle.backgroundColor };
       testTextAttrs(ID, 11, attrs, defAttrs, 10, 17);
 
       attrs = {};
       testTextAttrs(ID, 18, attrs, defAttrs, 17, 28);
 
        //////////////////////////////////////////////////////////////////////////
       // area20, "aOffset as -1 (Mozilla Bug 789621)" test
--- a/browser/base/content/browser-gestureSupport.js
+++ b/browser/base/content/browser-gestureSupport.js
@@ -532,17 +532,17 @@ var gGestureSupport = {
     // Bug 863514 - Make gesture support work in electrolysis
     if (gMultiProcessBrowser)
       return;
 
     if (!(content.document instanceof ImageDocument))
       return;
 
     let contentElement = content.document.body.firstElementChild;
-    let transformValue = content.window.getComputedStyle(contentElement, null)
+    let transformValue = content.window.getComputedStyle(contentElement)
                                        .transform;
 
     if (transformValue == "none") {
       this.rotation = 0;
       return;
     }
 
     // transformValue is a rotation matrix--split it and do mathemagic to
--- a/browser/base/content/newtab/transformations.js
+++ b/browser/base/content/newtab/transformations.js
@@ -10,17 +10,17 @@
  * convenience methods to work with a site's DOM node.
  */
 var gTransformation = {
   /**
    * Returns the width of the left and top border of a cell. We need to take it
    * into account when measuring and comparing site and cell positions.
    */
   get _cellBorderWidths() {
-    let cstyle = window.getComputedStyle(gGrid.cells[0].node, null);
+    let cstyle = window.getComputedStyle(gGrid.cells[0].node);
     let widths = {
       left: parseInt(cstyle.getPropertyValue("border-left-width")),
       top: parseInt(cstyle.getPropertyValue("border-top-width"))
     };
 
     // Cache this value, overwrite the getter.
     Object.defineProperty(this, "_cellBorderWidths",
                           {value: widths, enumerable: true});
@@ -218,17 +218,17 @@ var gTransformation = {
   },
 
   /**
    * Gets a given node's opacity value.
    * @param aNode The node to get the opacity value from.
    * @return The node's opacity value.
    */
   _getNodeOpacity: function Transformation_getNodeOpacity(aNode) {
-    let cstyle = window.getComputedStyle(aNode, null);
+    let cstyle = window.getComputedStyle(aNode);
     return cstyle.getPropertyValue("opacity");
   },
 
   /**
    * Sets a given node's opacity.
    * @param aNode The node to set the opacity value for.
    * @param aOpacity The opacity value to set.
    * @param aCallback The callback to call when finished.
--- a/browser/base/content/nsContextMenu.js
+++ b/browser/base/content/nsContextMenu.js
@@ -893,23 +893,23 @@ nsContextMenu.prototype = {
              node.href;
     }
   },
 
   // Returns the computed style attribute for the given element.
   getComputedStyle: function(aElem, aProp) {
     return aElem.ownerDocument
                 .defaultView
-                .getComputedStyle(aElem, "").getPropertyValue(aProp);
+                .getComputedStyle(aElem).getPropertyValue(aProp);
   },
 
   // Returns a "url"-type computed style attribute value, with the url() stripped.
   getComputedURL: function(aElem, aProp) {
     var url = aElem.ownerDocument
-                   .defaultView.getComputedStyle(aElem, "")
+                   .defaultView.getComputedStyle(aElem)
                    .getPropertyCSSValue(aProp);
     if (url instanceof CSSValueList) {
       if (url.length != 1)
         throw "found multiple URLs";
       url = url[0];
     }
     return url.primitiveType == CSSPrimitiveValue.CSS_URI ?
            url.getStringValue() : null;
--- a/browser/base/content/tabbrowser.xml
+++ b/browser/base/content/tabbrowser.xml
@@ -3503,17 +3503,17 @@
           ]]>
         </body>
       </method>
 
       <method name="moveTabOver">
         <parameter name="aEvent"/>
         <body>
           <![CDATA[
-            var direction = window.getComputedStyle(this.parentNode, null).direction;
+            var direction = window.getComputedStyle(this.parentNode).direction;
             if ((direction == "ltr" && aEvent.keyCode == KeyEvent.DOM_VK_RIGHT) ||
                 (direction == "rtl" && aEvent.keyCode == KeyEvent.DOM_VK_LEFT))
               this.moveTabForward();
             else
               this.moveTabBackward();
           ]]>
         </body>
       </method>
@@ -4610,17 +4610,17 @@
             if (!aEvent.metaKey)
               return;
 
             var offset = 1;
             switch (aEvent.charCode) {
               case "}".charCodeAt(0):
                 offset = -1;
               case "{".charCodeAt(0):
-                if (window.getComputedStyle(this, null).direction == "ltr")
+                if (window.getComputedStyle(this).direction == "ltr")
                   offset *= -1;
                 this.tabContainer.advanceSelectedTab(offset, true);
                 aEvent.preventDefault();
             }
           }
         ]]></body>
       </method>
 
@@ -5398,17 +5398,17 @@
       </method>
       <field name="_tabMarginLeft">null</field>
       <field name="_tabMarginRight">null</field>
       <method name="_calcTabMargins">
         <parameter name="aTab"/>
         <body><![CDATA[
           if (this._tabMarginLeft === null || this._tabMarginRight === null) {
             let tabMiddle = document.getAnonymousElementByAttribute(aTab, "class", "tab-background-middle");
-            let tabMiddleStyle = window.getComputedStyle(tabMiddle, null);
+            let tabMiddleStyle = window.getComputedStyle(tabMiddle);
             this._tabMarginLeft = parseFloat(tabMiddleStyle.marginLeft);
             this._tabMarginRight = parseFloat(tabMiddleStyle.marginRight);
           }
         ]]></body>
       </method>
       <method name="_adjustElementStartAndEnd">
         <parameter name="aTab"/>
         <parameter name="tabStart"/>
@@ -6140,17 +6140,17 @@
       </method>
 
       <method name="_getDropIndex">
         <parameter name="event"/>
         <parameter name="isLink"/>
         <body><![CDATA[
           var tabs = this.childNodes;
           var tab = this._getDragTargetTab(event, isLink);
-          if (window.getComputedStyle(this, null).direction == "ltr") {
+          if (window.getComputedStyle(this).direction == "ltr") {
             for (let i = tab ? tab._tPos : 0; i < tabs.length; i++)
               if (event.screenX < tabs[i].boxObject.screenX + tabs[i].boxObject.width / 2)
                 return i;
           } else {
             for (let i = tab ? tab._tPos : 0; i < tabs.length; i++)
               if (event.screenX > tabs[i].boxObject.screenX + tabs[i].boxObject.width / 2)
                 return i;
           }
@@ -6417,17 +6417,17 @@
           // be because they intend to open a new tab, but it could also be
           // because they just removed a tab and they now middleclicked on the
           // resulting space while that tab is closing. In that case, we don't
           // want to open a tab. So if we're removing one or more tabs, and
           // the tab click is before the end of the last visible tab, we do
           // nothing.
           if (this.tabbrowser._removingTabs.length) {
             let visibleTabs = this.tabbrowser.visibleTabs;
-            let ltr = (window.getComputedStyle(this, null).direction == "ltr");
+            let ltr = (window.getComputedStyle(this).direction == "ltr");
             let lastTab = visibleTabs[visibleTabs.length - 1];
             let endOfTab = lastTab.getBoundingClientRect()[ltr ? "right" : "left"];
             if ((ltr && event.clientX > endOfTab) ||
                 (!ltr && event.clientX < endOfTab)) {
               BrowserOpenTab();
             }
           } else {
             BrowserOpenTab();
@@ -6584,17 +6584,17 @@
         if (effects == "" || effects == "none") {
           ind.collapsed = true;
           return;
         }
         event.preventDefault();
         event.stopPropagation();
 
         var tabStrip = this.mTabstrip;
-        var ltr = (window.getComputedStyle(this, null).direction == "ltr");
+        var ltr = (window.getComputedStyle(this).direction == "ltr");
 
         // autoscroll the tab strip if we drag over the scroll
         // buttons, even if we aren't dragging a tab, but then
         // return to avoid drawing the drop indicator
         var pixelsToScroll = 0;
         if (this.getAttribute("overflow") == "true") {
           var targetAnonid = event.originalTarget.getAttribute("anonid");
           switch (targetAnonid) {
--- a/browser/base/content/test/general/browser_addCertException.js
+++ b/browser/base/content/test/general/browser_addCertException.js
@@ -22,23 +22,23 @@ add_task(function* () {
 // Check for the correct icons in the identity box and control center.
 function checkControlPanelIcons() {
   let { gIdentityHandler } = gBrowser.ownerGlobal;
   gIdentityHandler._identityBox.click();
   document.getElementById("identity-popup-security-expander").click();
 
   is_element_visible(document.getElementById("connection-icon"), "Should see connection icon");
   let connectionIconImage = gBrowser.ownerGlobal
-        .getComputedStyle(document.getElementById("connection-icon"), "")
+        .getComputedStyle(document.getElementById("connection-icon"))
         .getPropertyValue("list-style-image");
   let securityViewBG = gBrowser.ownerGlobal
-        .getComputedStyle(document.getElementById("identity-popup-securityView"), "")
+        .getComputedStyle(document.getElementById("identity-popup-securityView"))
         .getPropertyValue("background-image");
   let securityContentBG = gBrowser.ownerGlobal
-        .getComputedStyle(document.getElementById("identity-popup-security-content"), "")
+        .getComputedStyle(document.getElementById("identity-popup-security-content"))
         .getPropertyValue("background-image");
   is(connectionIconImage,
      "url(\"chrome://browser/skin/connection-mixed-passive-loaded.svg#icon\")",
      "Using expected icon image in the identity block");
   is(securityViewBG,
      "url(\"chrome://browser/skin/connection-mixed-passive-loaded.svg#icon\")",
      "Using expected icon image in the Control Center main view");
   is(securityContentBG,
--- a/browser/base/content/test/general/browser_gestureSupport.js
+++ b/browser/base/content/test/general/browser_gestureSupport.js
@@ -502,17 +502,17 @@ function test_swipeGestures() {
   test_removeCommand(cmdLeft);
   test_removeCommand(cmdRight);
 }
 
 
 function test_rotateHelperGetImageRotation(aImageElement) {
   // Get the true image rotation from the transform matrix, bounded
   // to 0 <= result < 360
-  let transformValue = content.window.getComputedStyle(aImageElement, null)
+  let transformValue = content.window.getComputedStyle(aImageElement)
                                      .transform;
   if (transformValue == "none")
     return 0;
 
   transformValue = transformValue.split("(")[1]
                                  .split(")")[0]
                                  .split(",");
   var rotation = Math.round(Math.atan2(transformValue[1], transformValue[0]) *
--- a/browser/base/content/test/general/browser_insecureLoginForms.js
+++ b/browser/base/content/test/general/browser_insecureLoginForms.js
@@ -38,23 +38,23 @@ add_task(function* test_simple() {
 
     let { gIdentityHandler } = gBrowser.ownerGlobal;
     gIdentityHandler._identityBox.click();
     document.getElementById("identity-popup-security-expander").click();
 
     if (expectWarning) {
       is_element_visible(document.getElementById("connection-icon"));
       let connectionIconImage = gBrowser.ownerGlobal
-            .getComputedStyle(document.getElementById("connection-icon"), "")
+            .getComputedStyle(document.getElementById("connection-icon"))
             .getPropertyValue("list-style-image");
       let securityViewBG = gBrowser.ownerGlobal
-            .getComputedStyle(document.getElementById("identity-popup-securityView"), "")
+            .getComputedStyle(document.getElementById("identity-popup-securityView"))
             .getPropertyValue("background-image");
       let securityContentBG = gBrowser.ownerGlobal
-            .getComputedStyle(document.getElementById("identity-popup-security-content"), "")
+            .getComputedStyle(document.getElementById("identity-popup-security-content"))
             .getPropertyValue("background-image");
       is(connectionIconImage,
          "url(\"chrome://browser/skin/connection-mixed-active-loaded.svg#icon\")",
          "Using expected icon image in the identity block");
       is(securityViewBG,
          "url(\"chrome://browser/skin/controlcenter/mcb-disabled.svg\")",
          "Using expected icon image in the Control Center main view");
       is(securityContentBG,
--- a/browser/base/content/test/general/browser_tabkeynavigation.js
+++ b/browser/base/content/test/general/browser_tabkeynavigation.js
@@ -56,17 +56,17 @@ add_task(function* test() {
   EventUtils.synthesizeKey("VK_PAGE_UP", { ctrlKey: true });
   is(gBrowser.selectedTab, tab1,
      "Tab1 should be activated by pressing Ctrl+PageUp on Tab2");
 
   if (gBrowser.mTabBox._handleMetaAltArrows) {
     gBrowser.selectedTab = tab1;
     browser1.focus();
 
-    let ltr = window.getComputedStyle(gBrowser.mTabBox, "").direction == "ltr";
+    let ltr = window.getComputedStyle(gBrowser.mTabBox).direction == "ltr";
     let advanceKey = ltr ? "VK_RIGHT" : "VK_LEFT";
     let reverseKey = ltr ? "VK_LEFT" : "VK_RIGHT";
 
     is(gBrowser.selectedTab, tab1,
        "Tab1 should be activated");
     EventUtils.synthesizeKey(advanceKey, { altKey: true, metaKey: true });
     is(gBrowser.selectedTab, tab2,
        "Tab2 should be activated by pressing Ctrl+" + advanceKey + " on Tab1");
@@ -104,17 +104,17 @@ add_task(function* test() {
 
   if (navigator.platform.indexOf("Mac") == 0) {
     gBrowser.selectedTab = tab1;
     browser1.focus();
 
     // XXX Currently, Command + "{" and "}" don't work if keydown event is
     //     consumed because following keypress event isn't fired.
 
-    let ltr = window.getComputedStyle(gBrowser.mTabBox, "").direction == "ltr";
+    let ltr = window.getComputedStyle(gBrowser.mTabBox).direction == "ltr";
     let advanceKey = ltr ? "}" : "{";
     let reverseKey = ltr ? "{" : "}";
 
     is(gBrowser.selectedTab, tab1,
        "Tab1 should be activated");
 
     EventUtils.synthesizeKey(advanceKey, { metaKey: true });
     is(gBrowser.selectedTab, tab2,
--- a/browser/base/content/test/general/browser_windowactivation.js
+++ b/browser/base/content/test/general/browser_windowactivation.js
@@ -164,16 +164,16 @@ function childFunction() {
       return;
     }
 
     let area = content.document.getElementById("area");
     if (!area) {
       return; /* hasn't loaded yet */
     }
 
-    let color = content.getComputedStyle(area, "").backgroundColor;
+    let color = content.getComputedStyle(area).backgroundColor;
     if (oldColor != color || !ifChanged) {
       expectingResponse = false;
       oldColor = color;
       sendAsyncMessage("Test:BackgroundColorChanged", { color });
     }
   }, 20);
 }
--- a/browser/base/content/test/plugins/plugin_syncRemoved.html
+++ b/browser/base/content/test/plugins/plugin_syncRemoved.html
@@ -1,15 +1,15 @@
-<!DOCTYPE html>
+<!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <body>
 <script type="text/javascript">
   // create an embed, insert it in the doc and immediately remove it
   var embed = document.createElement("embed");
   embed.setAttribute("id", "test");
   embed.setAttribute("type", "application/x-test");
   embed.setAttribute("style", "width: 0px; height: 0px;");
   document.body.appendChild(embed);
-  window.getComputedStyle(embed, null).top;
+  window.getComputedStyle(embed).top;
   document.body.remove(embed);
 </script>
--- a/browser/components/customizableui/CustomizeMode.jsm
+++ b/browser/components/customizableui/CustomizeMode.jsm
@@ -1696,17 +1696,17 @@ CustomizeMode.prototype = {
         dragValue = "after";
       } else {
         dragOverItem = targetParent.children[position];
         if (!targetIsToolbar) {
           dragValue = "before";
         } else {
           // Check if the aDraggedItem is hovered past the first half of dragOverItem
           let window = dragOverItem.ownerGlobal;
-          let direction = window.getComputedStyle(dragOverItem, null).direction;
+          let direction = window.getComputedStyle(dragOverItem).direction;
           let itemRect = dragOverItem.getBoundingClientRect();
           let dropTargetCenter = itemRect.left + (itemRect.width / 2);
           let existingDir = dragOverItem.getAttribute("dragover");
           if ((existingDir == "before") == (direction == "ltr")) {
             dropTargetCenter += (parseInt(dragOverItem.style.borderLeftWidth) || 0) / 2;
           } else {
             dropTargetCenter -= (parseInt(dragOverItem.style.borderRightWidth) || 0) / 2;
           }
--- a/browser/components/customizableui/content/panelUI.xml
+++ b/browser/components/customizableui/content/panelUI.xml
@@ -258,28 +258,28 @@
         <body><![CDATA[
           if (aAnchor) {
             // We need to find the edge of the anchor, relative to the main panel.
             // Then we need to add half the width of the anchor. This is the target
             // that we need to transition to.
             let anchorRect = aAnchor.getBoundingClientRect();
             let mainViewRect = this._mainViewContainer.getBoundingClientRect();
             let center = aAnchor.clientWidth / 2;
-            let direction = aAnchor.ownerDocument.defaultView.getComputedStyle(aAnchor, null).direction;
+            let direction = aAnchor.ownerDocument.defaultView.getComputedStyle(aAnchor).direction;
             let edge;
             if (direction == "ltr") {
               edge = anchorRect.left - mainViewRect.left;
             } else {
               edge = mainViewRect.right - anchorRect.right;
             }
 
             // If the anchor is an element on the far end of the mainView we
             // don't want to shift the mainView too far, we would reveal empty
             // space otherwise.
-            let cstyle = window.getComputedStyle(document.documentElement, null);
+            let cstyle = window.getComputedStyle(document.documentElement);
             let exitSubViewGutterWidth =
               cstyle.getPropertyValue("--panel-ui-exit-subview-gutter-width");
             let maxShift = mainViewRect.width - parseInt(exitSubViewGutterWidth);
             let target = Math.min(maxShift, edge + center);
 
             let neg = direction == "ltr" ? "-" : "";
             this._mainViewContainer.style.transform = `translateX(${neg}${target}px)`;
             aAnchor.setAttribute("panel-multiview-anchor", true);
--- a/browser/components/places/content/browserPlacesViews.js
+++ b/browser/components/places/content/browserPlacesViews.js
@@ -750,17 +750,17 @@ PlacesViewBase.prototype = {
     delete this._viewElt._placesView;
   },
 
   get isRTL() {
     if ("_isRTL" in this)
       return this._isRTL;
 
     return this._isRTL = document.defaultView
-                                 .getComputedStyle(this.viewElt, "")
+                                 .getComputedStyle(this.viewElt)
                                  .direction == "rtl";
   },
 
   get ownerWindow() {
     return window;
   },
 
   /**
--- a/browser/components/places/content/sidebarUtils.js
+++ b/browser/components/places/content/sidebarUtils.js
@@ -19,17 +19,17 @@ var SidebarUtils = {
     var mouseInGutter = false;
     if (aGutterSelect) {
       var rect = tbo.getCoordsForCellItem(cell.row, cell.col, "image");
       // getCoordsForCellItem returns the x coordinate in logical coordinates
       // (i.e., starting from the left and right sides in LTR and RTL modes,
       // respectively.)  Therefore, we make sure to exclude the blank area
       // before the tree item icon (that is, to the left or right of it in
       // LTR and RTL modes, respectively) from the click target area.
-      var isRTL = window.getComputedStyle(aTree, null).direction == "rtl";
+      var isRTL = window.getComputedStyle(aTree).direction == "rtl";
       if (isRTL)
         mouseInGutter = aEvent.clientX > rect.x;
       else
         mouseInGutter = aEvent.clientX < rect.x;
     }
 
     var metaKey = AppConstants.platform === "macosx" ? aEvent.metaKey
                                                      : aEvent.ctrlKey;
--- a/browser/components/preferences/in-content/tests/browser_subdialogs.js
+++ b/browser/components/preferences/in-content/tests/browser_subdialogs.js
@@ -37,17 +37,17 @@ function* open_subdialog_and_test_generi
       if (index >= 0) {
         expectedStyleSheetURLs.splice(index, 1);
       }
     }
 
     Assert.ok(!!subdialog._frame.contentWindow, "The dialog should be non-null");
     Assert.notEqual(subdialog._frame.contentWindow.location.toString(), "about:blank",
       "Subdialog URL should not be about:blank");
-    Assert.equal(win.getComputedStyle(subdialog._overlay, "").visibility, "visible",
+    Assert.equal(win.getComputedStyle(subdialog._overlay).visibility, "visible",
       "Overlay should be visible");
     Assert.equal(expectedStyleSheetURLs.length, 0,
       "No stylesheets that were expected are missing");
     return result;
   });
 }
 
 function* close_subdialog_and_test_generic_end_state(browser, closingFn, closingButton, acceptCount, options) {
@@ -60,17 +60,17 @@ function* close_subdialog_and_test_gener
       yield ContentTaskUtils.waitForEvent(frame.contentWindow, "dialogclosing");
     let contentClosingButton = closingEvent.detail.button;
     let actualAcceptCount = frame.contentWindow.arguments &&
                             frame.contentWindow.arguments[0].acceptCount;
 
     info("waiting for about:blank load");
     yield ContentTaskUtils.waitForEvent(frame, "load");
 
-    Assert.notEqual(win.getComputedStyle(subdialog._overlay, "").visibility, "visible",
+    Assert.notEqual(win.getComputedStyle(subdialog._overlay).visibility, "visible",
       "overlay is not visible");
     Assert.equal(frame.getAttribute("style"), "", "inline styles should be cleared");
     Assert.equal(frame.contentWindow.location.href.toString(), "about:blank",
       "sub-dialog should be unloaded");
     Assert.equal(contentClosingButton, expectations.closingButton,
       "closing event should indicate button was '" + expectations.closingButton + "'");
     Assert.equal(actualAcceptCount, expectations.acceptCount,
       "should be 1 if accepted, 0 if canceled, undefined if closed w/out button");
--- a/browser/modules/FormSubmitObserver.jsm
+++ b/browser/modules/FormSubmitObserver.jsm
@@ -201,17 +201,17 @@ FormSubmitObserver.prototype =
     // and where the content begin for the other elements.
     let offset = 0;
 
     if (aElement.tagName == "INPUT" &&
         (aElement.type == "radio" || aElement.type == "checkbox")) {
       panelData.position = "bottomcenter topleft";
     } else {
       let win = aElement.ownerGlobal;
-      let style = win.getComputedStyle(aElement, null);
+      let style = win.getComputedStyle(aElement);
       if (style.direction == "rtl") {
         offset = parseInt(style.paddingRight) + parseInt(style.borderRightWidth);
       } else {
         offset = parseInt(style.paddingLeft) + parseInt(style.borderLeftWidth);
       }
       let zoomFactor = this._getWindowUtils().fullZoom;
       panelData.offset = Math.round(offset * zoomFactor);
       panelData.position = "after_start";
--- a/devtools/client/webconsole/test/browser_webconsole_bug_632817.js
+++ b/devtools/client/webconsole/test/browser_webconsole_bug_632817.js
@@ -197,17 +197,17 @@ function testLiveFilteringOnSearchString
     "the string \"foo\"bar'baz\"boo'\"");
 }
 
 function countMessageNodes() {
   let messageNodes = hud.outputNode.querySelectorAll(".message");
   let displayedMessageNodes = 0;
   let view = hud.iframeWindow;
   for (let i = 0; i < messageNodes.length; i++) {
-    let computedStyle = view.getComputedStyle(messageNodes[i], null);
+    let computedStyle = view.getComputedStyle(messageNodes[i]);
     if (computedStyle.display !== "none") {
       displayedMessageNodes++;
     }
   }
 
   return displayedMessageNodes;
 }
 
--- a/devtools/client/webconsole/test/browser_webconsole_live_filtering_of_message_types.js
+++ b/devtools/client/webconsole/test/browser_webconsole_live_filtering_of_message_types.js
@@ -41,16 +41,16 @@ add_task(function* () {
     "corresponding filter is switched on");
 });
 
 function countMessageNodes(hud) {
   let messageNodes = hud.outputNode.querySelectorAll(".message");
   let displayedMessageNodes = 0;
   let view = hud.iframeWindow;
   for (let i = 0; i < messageNodes.length; i++) {
-    let computedStyle = view.getComputedStyle(messageNodes[i], null);
+    let computedStyle = view.getComputedStyle(messageNodes[i]);
     if (computedStyle.display !== "none") {
       displayedMessageNodes++;
     }
   }
 
   return displayedMessageNodes;
 }
--- a/devtools/client/webconsole/test/browser_webconsole_live_filtering_on_search_strings.js
+++ b/devtools/client/webconsole/test/browser_webconsole_live_filtering_on_search_strings.js
@@ -75,17 +75,17 @@ add_task(function* () {
 
 function countMessageNodes(hud) {
   let outputNode = hud.outputNode;
 
   let messageNodes = outputNode.querySelectorAll(".message");
   let displayedMessageNodes = 0;
   let view = hud.iframeWindow;
   for (let i = 0; i < messageNodes.length; i++) {
-    let computedStyle = view.getComputedStyle(messageNodes[i], null);
+    let computedStyle = view.getComputedStyle(messageNodes[i]);
     if (computedStyle.display !== "none") {
       displayedMessageNodes++;
     }
   }
 
   return displayedMessageNodes;
 }
 
--- a/devtools/client/webconsole/test/browser_webconsole_log_file_filter.js
+++ b/devtools/client/webconsole/test/browser_webconsole_log_file_filter.js
@@ -62,17 +62,17 @@ function testLiveFilteringOnSearchString
 function countMessageNodes() {
   let outputNode = hud.outputNode;
 
   let messageNodes = outputNode.querySelectorAll(".message");
   content.console.log(messageNodes.length);
   let displayedMessageNodes = 0;
   let view = hud.iframeWindow;
   for (let i = 0; i < messageNodes.length; i++) {
-    let computedStyle = view.getComputedStyle(messageNodes[i], null);
+    let computedStyle = view.getComputedStyle(messageNodes[i]);
     if (computedStyle.display !== "none") {
       displayedMessageNodes++;
     }
   }
 
   return displayedMessageNodes;
 }
 
--- a/devtools/shared/gcli/source/lib/gcli/mozui/inputter.js
+++ b/devtools/shared/gcli/source/lib/gcli/mozui/inputter.js
@@ -140,17 +140,17 @@ Inputter.prototype.onWindowResize = func
 /**
  * Make ourselves visually similar to the input element, and make the input
  * element transparent so our background shines through
  */
 Inputter.prototype.getDimensions = function() {
   var fixedLoc = {};
   var currentElement = this.element.parentNode;
   while (currentElement && currentElement.nodeName !== '#document') {
-    var style = this.document.defaultView.getComputedStyle(currentElement, '');
+    var style = this.document.defaultView.getComputedStyle(currentElement);
     if (style) {
       var position = style.getPropertyValue('position');
       if (position === 'absolute' || position === 'fixed') {
         var bounds = currentElement.getBoundingClientRect();
         fixedLoc.top = bounds.top;
         fixedLoc.left = bounds.left;
         break;
       }
--- a/devtools/shared/layout/utils.js
+++ b/devtools/shared/layout/utils.js
@@ -404,17 +404,17 @@ function safelyGetContentWindow(frame) {
  *        The frame.
  * @return {Array} [offsetTop, offsetLeft]
  *         offsetTop is the distance from the top of the frame and the top of
  *         the content document.
  *         offsetLeft is the distance from the left of the frame and the left
  *         of the content document.
  */
 function getFrameContentOffset(frame) {
-  let style = safelyGetContentWindow(frame).getComputedStyle(frame, null);
+  let style = safelyGetContentWindow(frame).getComputedStyle(frame);
 
   // In some cases, the computed style is null
   if (!style) {
     return [0, 0];
   }
 
   let paddingTop = parseInt(style.getPropertyValue("padding-top"), 10);
   let paddingLeft = parseInt(style.getPropertyValue("padding-left"), 10);
--- a/dom/base/crashtests/326865-1.html
+++ b/dom/base/crashtests/326865-1.html
@@ -1,12 +1,12 @@
 <html>
 <head>
 <script>
 try {
-  window.getComputedStyle(null, null);
+  window.getComputedStyle(null);
 } catch (e) {
 }
 </script>
 </head>
 <body>
 </body>
 </html>
--- a/dom/base/crashtests/816253.html
+++ b/dom/base/crashtests/816253.html
@@ -17,15 +17,15 @@
         <div id="console"></div>
         <div id="parentDiv">
             <div id="left-to-right" dir="auto" class="testElement">
                 <input type="text" value="מקור השם עברית">Test test test
             </div>
         </div>
         <script id="des">
             var el = document.getElementById("left-to-right");
-            document.defaultView.getComputedStyle(el, null).getPropertyValue('border-right-color');
+            document.defaultView.getComputedStyle(el).getPropertyValue('border-right-color');
 
             document.getElementById("parentDiv").style.display = "none";
         </script>
 
     </body>
 </html>
--- a/dom/base/test/file_bug416317.xhtml
+++ b/dom/base/test/file_bug416317.xhtml
@@ -471,17 +471,17 @@
           if (needToggle) {
             if ((div.getAttribute("class") || "").toString().indexOf("skipWhenToggling") > -1) {
               continue;
             }
             window.frameElement.style.display = "";
             // make sure it kicks in immediately
             document.body.offsetWidth;
           }
-          var view = document.defaultView.getComputedStyle(div, null);
+          var view = document.defaultView.getComputedStyle(div);
           var bg = view.getPropertyValue("background-color") || div.style.backgroundColor;
           if (needToggle) {
             window.frameElement.style.display = "none";
             // make sure it kicks in immediately
             document.body.offsetWidth;
           }
 
           var pass = bg && bg.indexOf("(255, 0, 0") == -1 && bg.indexOf("#ff0000") == -1 && bg.indexOf("red") == -1;
--- a/dom/base/test/test_bug338679.html
+++ b/dom/base/test/test_bug338679.html
@@ -64,15 +64,15 @@ function test_1() {
 }
 
 function test_2() {
   e_new = "width: 15%;";
   testDiv.style.width = "15%";
 }
 
 function test_3() {
-  window.getComputedStyle(testDiv, null).width; // force style resolution
+  window.getComputedStyle(testDiv).width; // force style resolution
   e_new = "width: inherit;";
   testDiv.style.width = "inherit";
 }
 </script>
 </body>
 </html>
--- a/dom/base/test/test_bug368972.html
+++ b/dom/base/test/test_bug368972.html
@@ -81,17 +81,17 @@ function check_size(id, width, height) {
   var element = document.getElementById(id);
   ok(element, "Plugin element " + id + " did not exist");
   if (width != "auto") {
     width = width + "px";
   }
   if (height != "auto") {
     height = height + "px";
   }
-  var style = window.getComputedStyle(element, null);
+  var style = window.getComputedStyle(element);
   is(style.width, width, "Plugin element " + id + " had an incorrect width");
   is(style.height, height, "Plugin element " + id + " had an incorrect height");
 }
 
 check_size("embed1", "auto", "auto");
 check_size("embed2", 0, 0);
 check_size("embed3", 100, 100);
 check_size("embed4", "auto", 100);
--- a/dom/base/test/test_bug493881.js
+++ b/dom/base/test/test_bug493881.js
@@ -37,17 +37,17 @@ addLoadEvent( function() {
   // Verify that the legacy color properties still have their original values.
   for (var i = 0; i < legacyProps.length; i++) {
     is(document[legacyProps[i]], initialValues[i], "document[" + legacyProps[i] + "] altered after body load");
   }
   
   // Verify that legacy color properties applied before BODY are really ignored when rendering.
   // Save current computed style colors for later use.
   for (i = 0; i < idPropList.length; i++) {
-    var style = window.getComputedStyle(document.getElementById(idPropList[i].id), null);
+    var style = window.getComputedStyle(document.getElementById(idPropList[i].id));
     var color = style.getPropertyValue(idPropList[i].prop);
     idPropList[i].initialComputedColor = color;
     isnot(color, rgbTestColors[i], "element rendered using before-body style");
   }
   // XXX: Can't get links to visually activate via script events, so can't verify
   // that the alinkColor property was not applied.
   
   // Verify that setting legacy color props to undefined after BODY loads will cause them
@@ -56,17 +56,17 @@ addLoadEvent( function() {
     document[legacyProps[i]] = undefined;
     is(document[legacyProps[i]], "undefined", 
       "Unexpected value of " + legacyProps[i] + " after setting to undefined");
   }
   
   // Verify that setting legacy color props to undefined led to result
   // of parsing undefined as a color.
   for (i = 0; i < idPropList.length; i++) {
-    var style = window.getComputedStyle(document.getElementById(idPropList[i].id), null);
+    var style = window.getComputedStyle(document.getElementById(idPropList[i].id));
     var color = style.getPropertyValue(idPropList[i].prop);
     is(color, "rgb(0, 239, 14)", 
       "element's style should get result of parsing undefined as a color");
   }
 
   // Mark the test as finished.
   setTimeout(SimpleTest.finish, 0);
 });
--- a/dom/base/test/test_html_colors_quirks.html
+++ b/dom/base/test/test_html_colors_quirks.html
@@ -683,18 +683,18 @@ var todos = {
 "  aliceblue   ": true,
 "H3<MOq'81C#\\nUjQc  xlsF@c2R<e);T~G]^N0_*M<j!jub~k,mgZ(.>GERhwS;kmmKC?1l} qQ&zcXK?g)S OmF^=E^TlTC)/": true,
 " $4X": true,
 "UGzLF+o3)Ezs=nMxqd^\"=q.Ik}Tk2I`X)R8]Zmy/WQp,|]TdbP)5  J+#Hm6SmWtQ+h?.MQ1W#oyp\\F,'JL>rLtjiHOA": true
 };
 
 var table0 = document.getElementById("table0");
 var table1 = document.getElementById("table1");
-var cs0 = document.defaultView.getComputedStyle(table0, "");
-var cs1 = document.defaultView.getComputedStyle(table1, "");
+var cs0 = document.defaultView.getComputedStyle(table0);
+var cs1 = document.defaultView.getComputedStyle(table1);
 var result;
 var reference;
 var log = "";
 var len = tests.length;
 is(tests.length, references.length, "array length mismatch");
 for (var i = 0; i < len; ++i) {
   table0.setAttribute("bgColor", tests[i]);
   table1.style.backgroundColor = references[i];
--- a/dom/base/test/test_html_colors_standards.html
+++ b/dom/base/test/test_html_colors_standards.html
@@ -684,18 +684,18 @@ var todos = {
 "  aliceblue   ": true,
 "H3<MOq'81C#\\nUjQc  xlsF@c2R<e);T~G]^N0_*M<j!jub~k,mgZ(.>GERhwS;kmmKC?1l} qQ&zcXK?g)S OmF^=E^TlTC)/": true,
 " $4X": true,
 "UGzLF+o3)Ezs=nMxqd^\"=q.Ik}Tk2I`X)R8]Zmy/WQp,|]TdbP)5  J+#Hm6SmWtQ+h?.MQ1W#oyp\\F,'JL>rLtjiHOA": true
 };
 
 var table0 = document.getElementById("table0");
 var table1 = document.getElementById("table1");
-var cs0 = document.defaultView.getComputedStyle(table0, "");
-var cs1 = document.defaultView.getComputedStyle(table1, "");
+var cs0 = document.defaultView.getComputedStyle(table0);
+var cs1 = document.defaultView.getComputedStyle(table1);
 var result;
 var reference;
 var log = "";
 var len = tests.length;
 is(tests.length, references.length, "array length mismatch");
 for (var i = 0; i < len; ++i) {
   table0.setAttribute("bgColor", tests[i]);
   table1.style.backgroundColor = references[i];
--- a/dom/events/test/test_legacy_event.html
+++ b/dom/events/test/test_legacy_event.html
@@ -58,17 +58,17 @@ var gLegacyEventInfo = [
 // This function triggers a very short (1ms long) transition, which will cause
 // events to fire for the transition ending.
 function triggerShortTransition(node) {
   node.style.transition = "1ms color linear" ;
   node.style.color = "purple";
   // Flush style, so that the above assignment value actually takes effect
   // in the computed style, so that a transition will get triggered when it
   // changes.
-  window.getComputedStyle(node, "").color;
+  window.getComputedStyle(node).color;
   node.style.color = "teal";
 }
 
 // This function triggers a very short (1ms long) animation, which will cause
 // events to fire for the animation beginning & ending.
 function triggerShortAnimation(node) {
   node.style.animation = "anim1 1ms linear";
 }
--- a/dom/html/test/forms/test_maxlength_attribute.html
+++ b/dom/html/test/forms/test_maxlength_attribute.html
@@ -31,95 +31,95 @@ https://bugzilla.mozilla.org/show_bug.cg
  * related to constraint validation.
  */
 
 function checkTooLongValidity(element)
 {
   element.value = "foo";
   ok(!element.validity.tooLong,
     "Element should not be too long when maxlength is not set");
-  is(window.getComputedStyle(element, null).getPropertyValue('background-color'),
+  is(window.getComputedStyle(element).getPropertyValue('background-color'),
      "rgb(0, 255, 0)", ":valid pseudo-class should apply");
   ok(element.validity.valid, "Element should be valid");
   ok(element.checkValidity(), "The element should be valid");
 
   element.maxLength = 1;
   ok(!element.validity.tooLong,
     "Element should not be too long unless the user edits it");
-  is(window.getComputedStyle(element, null).getPropertyValue('background-color'),
+  is(window.getComputedStyle(element).getPropertyValue('background-color'),
      "rgb(0, 255, 0)", ":valid pseudo-class should apply");
   ok(element.validity.valid, "Element should be valid");
   ok(element.checkValidity(), "The element should be valid");
 
   element.focus();
 
   synthesizeKey("VK_BACK_SPACE", {});
   is(element.value, "fo", "value should have changed");
   ok(element.validity.tooLong,
     "Element should be too long after a user edit that does not make it short enough");
-  is(window.getComputedStyle(element, null).getPropertyValue('background-color'),
+  is(window.getComputedStyle(element).getPropertyValue('background-color'),
      "rgb(255, 0, 0)", ":invalid pseudo-class should apply");
   ok(!element.validity.valid, "Element should be invalid");
   ok(!element.checkValidity(), "The element should not be valid");
   is(element.validationMessage,
           "Please shorten this text to 1 characters or less (you are currently using 2 characters).",
           "The validation message text is not correct");
 
   synthesizeKey("VK_BACK_SPACE", {});
   is(element.value, "f", "value should have changed");
   ok(!element.validity.tooLong,
     "Element should not be too long after a user edit makes it short enough");
-  is(window.getComputedStyle(element, null).getPropertyValue('background-color'),
+  is(window.getComputedStyle(element).getPropertyValue('background-color'),
      "rgb(0, 255, 0)", ":valid pseudo-class should apply");
   ok(element.validity.valid, "Element should be valid");
 
   element.maxLength = 2;
   ok(!element.validity.tooLong,
     "Element should remain valid if maxlength changes but maxlength > length");
-  is(window.getComputedStyle(element, null).getPropertyValue('background-color'),
+  is(window.getComputedStyle(element).getPropertyValue('background-color'),
      "rgb(0, 255, 0)", ":valid pseudo-class should apply");
   ok(element.validity.valid, "Element should be valid");
 
   element.maxLength = 1;
   ok(!element.validity.tooLong,
     "Element should remain valid if maxlength changes but maxlength = length");
-  is(window.getComputedStyle(element, null).getPropertyValue('background-color'),
+  is(window.getComputedStyle(element).getPropertyValue('background-color'),
      "rgb(0, 255, 0)", ":valid pseudo-class should apply");
   ok(element.validity.valid, "Element should be valid");
   ok(element.checkValidity(), "The element should be valid");
 
   element.maxLength = 0;
   ok(element.validity.tooLong,
     "Element should become invalid if maxlength changes and maxlength < length");
-  is(window.getComputedStyle(element, null).getPropertyValue('background-color'),
+  is(window.getComputedStyle(element).getPropertyValue('background-color'),
      "rgb(255, 0, 0)", ":invalid pseudo-class should apply");
   ok(!element.validity.valid, "Element should be invalid");
   ok(!element.checkValidity(), "The element should not be valid");
   is(element.validationMessage,
           "Please shorten this text to 0 characters or less (you are currently using 1 characters).",
           "The validation message text is not correct");
 
   element.maxLength = 1;
   ok(!element.validity.tooLong,
     "Element should become valid if maxlength changes and maxlength = length");
-  is(window.getComputedStyle(element, null).getPropertyValue('background-color'),
+  is(window.getComputedStyle(element).getPropertyValue('background-color'),
      "rgb(0, 255, 0)", ":valid pseudo-class should apply");
   ok(element.validity.valid, "Element should be valid");
   ok(element.checkValidity(), "The element should be valid");
 
   element.value = "test";
   ok(!element.validity.tooLong,
     "Element should stay valid after programmatic edit (even if value is too long)");
-  is(window.getComputedStyle(element, null).getPropertyValue('background-color'),
+  is(window.getComputedStyle(element).getPropertyValue('background-color'),
      "rgb(0, 255, 0)", ":valid pseudo-class should apply");
   ok(element.validity.valid, "Element should be valid");
   ok(element.checkValidity(), "The element should be valid");
 
   element.setCustomValidity("custom message");
-  is(window.getComputedStyle(element, null).getPropertyValue('background-color'),
+  is(window.getComputedStyle(element).getPropertyValue('background-color'),
      "rgb(255, 0, 0)", ":invalid pseudo-class should apply");
   is(element.validationMessage, "custom message",
     "Custom message should be shown instead of too long one");
 }
 
 checkTooLongValidity(document.getElementById('i'));
 checkTooLongValidity(document.getElementById('t'));
 
--- a/dom/html/test/forms/test_minlength_attribute.html
+++ b/dom/html/test/forms/test_minlength_attribute.html
@@ -31,95 +31,95 @@ https://bugzilla.mozilla.org/show_bug.cg
  * related to constraint validation.
  */
 
 function checkTooShortValidity(element)
 {
   element.value = "foo";
   ok(!element.validity.tooShort,
     "Element should not be too short when minlength is not set");
-  is(window.getComputedStyle(element, null).getPropertyValue('background-color'),
+  is(window.getComputedStyle(element).getPropertyValue('background-color'),
      "rgb(0, 255, 0)", ":valid pseudo-class should apply");
   ok(element.validity.valid, "Element should be valid");
   ok(element.checkValidity(), "The element should be valid");
 
   element.minLength = 5;
   ok(!element.validity.tooShort,
     "Element should not be too short unless the user edits it");
-  is(window.getComputedStyle(element, null).getPropertyValue('background-color'),
+  is(window.getComputedStyle(element).getPropertyValue('background-color'),
      "rgb(0, 255, 0)", ":valid pseudo-class should apply");
   ok(element.validity.valid, "Element should be valid");
   ok(element.checkValidity(), "The element should be valid");
 
   element.focus();
 
   synthesizeKey("o", {});
   is(element.value, "fooo", "value should have changed");
   ok(element.validity.tooShort,
     "Element should be too short after a user edit that does not make it short enough");
-  is(window.getComputedStyle(element, null).getPropertyValue('background-color'),
+  is(window.getComputedStyle(element).getPropertyValue('background-color'),
      "rgb(255, 0, 0)", ":invalid pseudo-class should apply");
   ok(!element.validity.valid, "Element should be invalid");
   ok(!element.checkValidity(), "The element should not be valid");
   is(element.validationMessage,
           "Please use at least 5 characters (you are currently using 4 characters).",
           "The validation message text is not correct");
 
   synthesizeKey("o", {});
   is(element.value, "foooo", "value should have changed");
   ok(!element.validity.tooShort,
     "Element should not be too short after a user edit makes it long enough");
-  is(window.getComputedStyle(element, null).getPropertyValue('background-color'),
+  is(window.getComputedStyle(element).getPropertyValue('background-color'),
      "rgb(0, 255, 0)", ":valid pseudo-class should apply");
   ok(element.validity.valid, "Element should be valid");
 
   element.minLength = 2;
   ok(!element.validity.tooShort,
     "Element should remain valid if minlength changes but minlength < length");
-  is(window.getComputedStyle(element, null).getPropertyValue('background-color'),
+  is(window.getComputedStyle(element).getPropertyValue('background-color'),
      "rgb(0, 255, 0)", ":valid pseudo-class should apply");
   ok(element.validity.valid, "Element should be valid");
 
   element.minLength = 1;
   ok(!element.validity.tooShort,
     "Element should remain valid if minlength changes but minlength = length");
-  is(window.getComputedStyle(element, null).getPropertyValue('background-color'),
+  is(window.getComputedStyle(element).getPropertyValue('background-color'),
      "rgb(0, 255, 0)", ":valid pseudo-class should apply");
   ok(element.validity.valid, "Element should be valid");
   ok(element.checkValidity(), "The element should be valid");
 
   element.minLength = 6;
   ok(element.validity.tooShort,
     "Element should become invalid if minlength changes and minlength > length");
-  is(window.getComputedStyle(element, null).getPropertyValue('background-color'),
+  is(window.getComputedStyle(element).getPropertyValue('background-color'),
      "rgb(255, 0, 0)", ":invalid pseudo-class should apply");
   ok(!element.validity.valid, "Element should be invalid");
   ok(!element.checkValidity(), "The element should not be valid");
   is(element.validationMessage,
           "Please use at least 6 characters (you are currently using 5 characters).",
           "The validation message text is not correct");
 
   element.minLength = 5;
   ok(!element.validity.tooShort,
     "Element should become valid if minlength changes and minlength = length");
-  is(window.getComputedStyle(element, null).getPropertyValue('background-color'),
+  is(window.getComputedStyle(element).getPropertyValue('background-color'),
      "rgb(0, 255, 0)", ":valid pseudo-class should apply");
   ok(element.validity.valid, "Element should be valid");
   ok(element.checkValidity(), "The element should be valid");
 
   element.value = "test";
   ok(!element.validity.tooShort,
     "Element should stay valid after programmatic edit (even if value is too short)");
-  is(window.getComputedStyle(element, null).getPropertyValue('background-color'),
+  is(window.getComputedStyle(element).getPropertyValue('background-color'),
      "rgb(0, 255, 0)", ":valid pseudo-class should apply");
   ok(element.validity.valid, "Element should be valid");
   ok(element.checkValidity(), "The element should be valid");
 
   element.setCustomValidity("custom message");
-  is(window.getComputedStyle(element, null).getPropertyValue('background-color'),
+  is(window.getComputedStyle(element).getPropertyValue('background-color'),
      "rgb(255, 0, 0)", ":invalid pseudo-class should apply");
   is(element.validationMessage, "custom message",
     "Custom message should be shown instead of too short one");
 }
 
 checkTooShortValidity(document.getElementById('i'));
 checkTooShortValidity(document.getElementById('t'));
 
--- a/dom/html/test/forms/test_pattern_attribute.html
+++ b/dom/html/test/forms/test_pattern_attribute.html
@@ -82,17 +82,17 @@ function checkValidPattern(element, comp
     ok(!element.validity.patternMismatch,
        "Element should not suffer from pattern mismatch");
     ok(element.validity.valid, "Element should be valid");
     ok(element.checkValidity(), "Element should be valid");
     ok(!gInvalid, "Invalid event shouldn't have been thrown");
     is(element.validationMessage, '',
        "Validation message should be the empty string");
     if (element.type != 'radio' && element.type != 'checkbox') {
-      is(window.getComputedStyle(element, null).getPropertyValue('background-color'),
+      is(window.getComputedStyle(element).getPropertyValue('background-color'),
          isBarred ? "rgb(0, 0, 0)" : "rgb(0, 255, 0)",
          "The pseudo-class is not correctly applied");
     }
   } else {
     ok(!element.validity.patternMismatch,
        "Element should not suffer from pattern mismatch");
   }
 }
@@ -111,17 +111,17 @@ function checkInvalidPattern(element, co
        "Please match the requested format.",
        "Validation message is not valid");
   } else {
     ok(element.validity.patternMismatch,
        "Element should suffer from pattern mismatch");
   }
 
   if (element.type != 'radio' && element.type != 'checkbox') {
-    is(window.getComputedStyle(element, null).getPropertyValue('background-color'),
+    is(window.getComputedStyle(element).getPropertyValue('background-color'),
        "rgb(255, 0, 0)", ":invalid pseudo-class should apply");
   }
 }
 
 function checkSyntaxError(element)
 {
     ok(!element.validity.patternMismatch,
        "On SyntaxError, element should not suffer");
--- a/dom/html/test/forms/test_validation.html
+++ b/dom/html/test/forms/test_validation.html
@@ -85,45 +85,45 @@ function checkConstraintValidationAPIDef
   ok(!element.validity.customError, "The element should not suffer from a constraint validation");
   ok(element.validity.valid, "The element should be valid by default");
 
   ok(element.checkValidity(), "The element should be valid by default");
 }
 
 function checkDefaultPseudoClass()
 {
-  is(window.getComputedStyle(document.getElementById('f'), null)
+  is(window.getComputedStyle(document.getElementById('f'))
        .getPropertyValue('background-color'), "rgb(0, 255, 0)",
      ":valid should apply");
 
-  is(window.getComputedStyle(document.getElementById('o'), null)
+  is(window.getComputedStyle(document.getElementById('o'))
        .getPropertyValue('background-color'), "rgb(0, 255, 0)",
      ":valid should apply");
 
-  is(window.getComputedStyle(document.getElementById('obj'), null)
+  is(window.getComputedStyle(document.getElementById('obj'))
        .getPropertyValue('background-color'), "rgb(0, 0, 0)",
      "Nor :valid and :invalid should apply");
 
-  todo_is(window.getComputedStyle(document.getElementById('k'), null)
+  todo_is(window.getComputedStyle(document.getElementById('k'))
        .getPropertyValue('background-color'), "rgb(0, 0, 0)",
      "Nor :valid and :invalid should apply");
 
-  is(window.getComputedStyle(document.getElementById('s'), null)
+  is(window.getComputedStyle(document.getElementById('s'))
        .getPropertyValue('background-color'), "rgb(0, 255, 0)",
      ":valid pseudo-class should apply");
 
-  is(window.getComputedStyle(document.getElementById('i'), null)
+  is(window.getComputedStyle(document.getElementById('i'))
        .getPropertyValue('background-color'), "rgb(0, 255, 0)",
      ":valid pseudo-class should apply");
 
-  is(window.getComputedStyle(document.getElementById('t'), null)
+  is(window.getComputedStyle(document.getElementById('t'))
        .getPropertyValue('background-color'), "rgb(0, 255, 0)",
      ":valid pseudo-class should apply");
 
-  is(window.getComputedStyle(document.getElementById('b'), null)
+  is(window.getComputedStyle(document.getElementById('b'))
        .getPropertyValue('background-color'), "rgb(0, 255, 0)",
      ":valid pseudo-class should apply");
 }
 
 function checkSpecificWillValidate()
 {
   // fieldset, output, object, keygen (TODO) and select elements
   ok(!document.getElementById('f').willValidate, "Fielset element should be barred from constraint validation");
@@ -131,92 +131,92 @@ function checkSpecificWillValidate()
   todo(!document.getElementById('k').willValidate, "Keygen element should be barred from constraint validation");
   ok(document.getElementById('o').willValidate, "Output element should not be barred from constraint validation");
   ok(document.getElementById('s').willValidate, "Select element should not be barred from constraint validation");
 
   // input element
   i = document.getElementById('i');
   i.type = "hidden";
   ok(!i.willValidate, "Hidden state input should be barred from constraint validation");
-  is(window.getComputedStyle(i, null).getPropertyValue('background-color'),
+  is(window.getComputedStyle(i).getPropertyValue('background-color'),
      "rgb(0, 0, 0)", "Nor :valid and :invalid should apply");
   i.type = "reset";
   ok(!i.willValidate, "Reset button state input should be barred from constraint validation");
-  is(window.getComputedStyle(i, null).getPropertyValue('background-color'),
+  is(window.getComputedStyle(i).getPropertyValue('background-color'),
      "rgb(0, 0, 0)", "Nor :valid and :invalid should apply");
   i.type = "button";
   ok(!i.willValidate, "Button state input should be barred from constraint validation");
-  is(window.getComputedStyle(i, null).getPropertyValue('background-color'),
+  is(window.getComputedStyle(i).getPropertyValue('background-color'),
      "rgb(0, 0, 0)", "Nor :valid and :invalid should apply");
   i.type = "image";
   ok(i.willValidate, "Image state input should not be barred from constraint validation");
-  is(window.getComputedStyle(i, null).getPropertyValue('background-color'),
+  is(window.getComputedStyle(i).getPropertyValue('background-color'),
      "rgb(0, 255, 0)", ":valid and :invalid should apply");
   i.type = "submit";
   ok(i.willValidate, "Submit state input should not be barred from constraint validation");
-  is(window.getComputedStyle(i, null).getPropertyValue('background-color'),
+  is(window.getComputedStyle(i).getPropertyValue('background-color'),
      "rgb(0, 255, 0)", ":valid and :invalid should apply");
   i.type = "number";
   ok(i.willValidate, "Number state input should not be barred from constraint validation");
-  is(window.getComputedStyle(i, null).getPropertyValue('background-color'),
+  is(window.getComputedStyle(i).getPropertyValue('background-color'),
      "rgb(0, 255, 0)", ":valid pseudo-class should apply");
   i.type = "";
   i.readOnly = 'true';
   ok(!i.willValidate, "Readonly input should be barred from constraint validation");
-  is(window.getComputedStyle(i, null).getPropertyValue('background-color'),
+  is(window.getComputedStyle(i).getPropertyValue('background-color'),
      "rgb(0, 0, 0)", "Nor :valid and :invalid should apply");
   i.removeAttribute('readOnly');
   ok(i.willValidate, "Default input element should not be barred from constraint validation");
-  is(window.getComputedStyle(i, null).getPropertyValue('background-color'),
+  is(window.getComputedStyle(i).getPropertyValue('background-color'),
      "rgb(0, 255, 0)", ":valid pseudo-class should apply");
 
   // button element
   b = document.getElementById('b');
   b.type = "reset";
   ok(!b.willValidate, "Reset state button should be barred from constraint validation");
-  is(window.getComputedStyle(b, null).getPropertyValue('background-color'),
+  is(window.getComputedStyle(b).getPropertyValue('background-color'),
      "rgb(0, 0, 0)", "Nor :valid and :invalid should apply");
   b.type = "button";
   ok(!b.willValidate, "Button state button should be barred from constraint validation");
-  is(window.getComputedStyle(b, null).getPropertyValue('background-color'),
+  is(window.getComputedStyle(b).getPropertyValue('background-color'),
      "rgb(0, 0, 0)", "Nor :valid and :invalid should apply");
   b.type = "submit";
   ok(b.willValidate, "Submit state button should not be barred from constraint validation");
-  is(window.getComputedStyle(b, null).getPropertyValue('background-color'),
+  is(window.getComputedStyle(b).getPropertyValue('background-color'),
      "rgb(0, 255, 0)", ":valid and :invalid should apply");
   b.type = "";
   ok(b.willValidate, "Default button element should not be barred from constraint validation");
-  is(window.getComputedStyle(b, null).getPropertyValue('background-color'),
+  is(window.getComputedStyle(b).getPropertyValue('background-color'),
      "rgb(0, 255, 0)", ":valid pseudo-class should apply");
 
   // textarea element
   t = document.getElementById('t');
   t.readOnly = true;
   ok(!t.willValidate, "Readonly textarea should be barred from constraint validation");
-  is(window.getComputedStyle(t, null).getPropertyValue('background-color'),
+  is(window.getComputedStyle(t).getPropertyValue('background-color'),
      "rgb(0, 0, 0)", "Nor :valid and :invalid should apply");
   t.removeAttribute('readOnly');
   ok(t.willValidate, "Default textarea element should not be barred from constraint validation");
-  is(window.getComputedStyle(t, null).getPropertyValue('background-color'),
+  is(window.getComputedStyle(t).getPropertyValue('background-color'),
      "rgb(0, 255, 0)", ":valid pseudo-class should apply");
 
   // TODO: PROGRESS
   // TODO: METER
 }
 
 function checkCommonWillValidate(element)
 {
   // Not checking the default value because it has been checked previously.
 
   // Not checking output elements because they can't be disabled.
   if (element.tagName != 'OUTPUT') {
     element.disabled = true;
     ok(!element.willValidate, "Disabled element should be barred from constraint validation");
 
-    is(window.getComputedStyle(element, null).getPropertyValue('background-color'),
+    is(window.getComputedStyle(element).getPropertyValue('background-color'),
        "rgb(0, 0, 0)", "Nor :valid and :invalid should apply");
 
     element.removeAttribute('disabled');
   }
 
   // TODO: If an element has a datalist element ancestor, it is barred from constraint validation.
 }
 
@@ -229,32 +229,32 @@ function checkCustomError(element, isBar
   } else {
     is(element.validationMessage, "",
        "An element barred from constraint validation can't have a validation message");
   }
   ok(element.validity.customError, "The element should suffer from a custom error");
   ok(!element.validity.valid, "The element should not be valid with a custom error");
 
   if (element.tagName == "FIELDSET") {
-    is(window.getComputedStyle(element, null).getPropertyValue('background-color'),
+    is(window.getComputedStyle(element).getPropertyValue('background-color'),
        isBarred ? "rgb(0, 255, 0)" : "rgb(255, 0, 0)",
        ":invalid pseudo-classs should apply" + element.tagName);
   }
   else {
-    is(window.getComputedStyle(element, null).getPropertyValue('background-color'),
+    is(window.getComputedStyle(element).getPropertyValue('background-color'),
        isBarred ? "rgb(0, 0, 0)" : "rgb(255, 0, 0)",
        ":invalid pseudo-classs should apply" + element.tagName);
   }
 
   element.setCustomValidity("");
   is(element.validationMessage, "", "The element should not have a validation message when reseted");
   ok(!element.validity.customError, "The element should not suffer anymore from a custom error");
   ok(element.validity.valid, "The element should now be valid");
 
-  is(window.getComputedStyle(element, null).getPropertyValue('background-color'),
+  is(window.getComputedStyle(element).getPropertyValue('background-color'),
      isBarred && element.tagName != "FIELDSET" ? "rgb(0, 0, 0)" : "rgb(0, 255, 0)",
      ":valid pseudo-classs should apply");
 }
 
 function checkCheckValidity(element)
 {
   element.setCustomValidity("message");
   ok(!element.checkValidity(), "checkValidity() should return false when the element is not valid");
--- a/dom/html/test/test_bug255820.html
+++ b/dom/html/test/test_bug255820.html
@@ -50,17 +50,17 @@ function f2Continue() {
   $("f2").
     setAttribute("onload",
                  "testFinished();");
   $("f2").contentWindow.location.reload();
 }
 
 function f3Continue() {
   var doc = $("f3").contentDocument;
-  is(doc.defaultView.getComputedStyle(doc.body, "").color, "rgb(0, 180, 0)",
+  is(doc.defaultView.getComputedStyle(doc.body).color, "rgb(0, 180, 0)",
      "Wrong color before reload");
   $("f3").
     setAttribute("onload",
                  'var doc = this.contentDocument; ' + 
                  'is(doc.defaultView.getComputedStyle(doc.body, "").color, ' +
                  '   "rgb(0, 180, 0)",' +
                  '   "Wrong color after reload");' +
                  "charsetTestFinished('f1', this.contentDocument, 'UTF-8')");
--- a/dom/html/test/test_bug442801.html
+++ b/dom/html/test/test_bug442801.html
@@ -36,28 +36,28 @@ https://bugzilla.mozilla.org/show_bug.cg
 
 
 </div>
 <pre id="test">
 <script type="application/javascript">
 
 /** Test for Bug 442801 **/
 
-is(window.getComputedStyle($("ce_true"), null).getPropertyValue("-moz-user-modify"), 
+is(window.getComputedStyle($("ce_true")).getPropertyValue("-moz-user-modify"), 
     "read-write", 
     "parent contenteditable is true, contenteditable is true; user-modify should be read-write");
-is(window.getComputedStyle($("ce_false"), null).getPropertyValue("-moz-user-modify"), 
+is(window.getComputedStyle($("ce_false")).getPropertyValue("-moz-user-modify"), 
     "read-only",
     "parent contenteditable is true, contenteditable is false; user-modify should be read-only");
-is(window.getComputedStyle($("ce_empty"), null).getPropertyValue("-moz-user-modify"), 
+is(window.getComputedStyle($("ce_empty")).getPropertyValue("-moz-user-modify"), 
     "read-write",
     "parent contenteditable is true, contenteditable is empty; user-modify should be read-write");
-is(window.getComputedStyle($("ce_inherit"), null).getPropertyValue("-moz-user-modify"), 
+is(window.getComputedStyle($("ce_inherit")).getPropertyValue("-moz-user-modify"), 
     "read-write",
     "parent contenteditable is true, contenteditable is inherit; user-modify should be read-write");
-is(window.getComputedStyle($("ce_none"), null).getPropertyValue("-moz-user-modify"), 
+is(window.getComputedStyle($("ce_none")).getPropertyValue("-moz-user-modify"), 
     "read-write",
     "parent contenteditable is true, contenteditable is none; user-modify should be read-write");
 
 </script>
 </pre>
 </body>
 </html>
--- a/dom/html/test/test_bug558788-1.html
+++ b/dom/html/test/test_bug558788-1.html
@@ -30,28 +30,28 @@ https://bugzilla.mozilla.org/show_bug.cg
  * Only <input> and <textarea> elements can have there validity changed by an
  * user input.
  */
 
 var gContent = document.getElementById('content');
 
 function checkValidApplies(elmt)
 {
-  is(window.getComputedStyle(elmt, null).getPropertyValue('background-color'),
+  is(window.getComputedStyle(elmt).getPropertyValue('background-color'),
      "rgb(0, 255, 0)", ":valid pseudo-class should apply");
 }
 
 function checkInvalidApplies(elmt, aTodo)
 {
   if (aTodo) {
-    todo_is(window.getComputedStyle(elmt, null).getPropertyValue('background-color'),
+    todo_is(window.getComputedStyle(elmt).getPropertyValue('background-color'),
             "rgb(255, 0, 0)", ":invalid pseudo-class should apply");
     return;
   }
-  is(window.getComputedStyle(elmt, null).getPropertyValue('background-color'),
+  is(window.getComputedStyle(elmt).getPropertyValue('background-color'),
      "rgb(255, 0, 0)", ":invalid pseudo-class should apply");
 }
 
 function checkMissing(elementName)
 {
   var element = document.createElement(elementName);
   element.required = true;
   gContent.appendChild(element);
--- a/dom/html/test/test_bug561640.html
+++ b/dom/html/test/test_bug561640.html
@@ -24,24 +24,24 @@ https://bugzilla.mozilla.org/show_bug.cg
 /** Test for Bug 561640 **/
 
 var elements = [ 'input', 'textarea' ];
 var content = document.getElementById('content');
 
 function checkValid(elmt)
 {
   ok(!elmt.validity.tooLong, "element should not be too long");
-  is(window.getComputedStyle(elmt, null).getPropertyValue('background-color'),
+  is(window.getComputedStyle(elmt).getPropertyValue('background-color'),
      "rgb(0, 255, 0)", ":valid pseudo-class should apply");
 }
 
 function checkInvalid(elmt)
 {
   todo(elmt.validity.tooLong, "element should be too long");
-  todo_is(window.getComputedStyle(elmt, null).getPropertyValue('background-color'),
+  todo_is(window.getComputedStyle(elmt).getPropertyValue('background-color'),
           "rgb(255, 0, 0)", ":invalid pseudo-class should apply");
 }
 
 for (var elmtName of elements) {
   var elmt = document.createElement(elmtName);
   content.appendChild(elmt);
 
   if (elmtName == 'textarea') {
--- a/dom/html/test/test_bug596511.html
+++ b/dom/html/test/test_bug596511.html
@@ -32,17 +32,17 @@ function checkNotSufferingFromBeingMissi
   ok(!element.validity.valueMissing,
     "Element should not suffer from value missing");
   ok(element.validity.valid, "Element should be valid");
   ok(element.checkValidity(), "Element should be valid");
 
   is(element.validationMessage, "",
     "Validation message should be the empty string");
 
-  is(window.getComputedStyle(element, null).getPropertyValue('background-color'),
+  is(window.getComputedStyle(element).getPropertyValue('background-color'),
      "rgb(0, 128, 0)", ":valid pseudo-class should apply");
 
   if (aTodo) {
     ok = SimpleTest.ok;
     is = SimpleTest.is;
   }
 }
 
@@ -55,17 +55,17 @@ function checkSufferingFromBeingMissing(
 
   ok(element.validity.valueMissing, "Element should suffer from value missing");
   ok(!element.validity.valid, "Element should not be valid");
   ok(!element.checkValidity(), "Element should not be valid");
 
   is(element.validationMessage, "Please select an item in the list.",
      "Validation message is wrong");
 
-  is(window.getComputedStyle(element, null).getPropertyValue('background-color'),
+  is(window.getComputedStyle(element).getPropertyValue('background-color'),
      "rgb(255, 0, 0)", ":invalid pseudo-class should apply");
 
   if (aTodo) {
     ok = SimpleTest.ok;
     is = SimpleTest.is;
   }
 }
 
--- a/dom/security/test/csp/test_hash_source.html
+++ b/dom/security/test/csp/test_hash_source.html
@@ -66,17 +66,17 @@ function checkInline () {
   }
 
   // Inline style tries to change an element's color to green. If blocked, the
   // element's color will be the default black.
   var green = "rgb(0, 128, 0)";
   var black = "rgb(0, 0, 0)";
 
   var getElementColorById = function (id) {
-    return window.getComputedStyle(cspframe.getElementById(id), null).color;
+    return window.getComputedStyle(cspframe.getElementById(id)).color;
   };
 
   var inlineStyleTests = {
     'inline-style-valid-hash': {
       shouldBe: green,
       message: 'Inline style with valid hash should be allowed'
     },
     'inline-style-invalid-hash': {
--- a/dom/security/test/csp/test_inlinestyle.html
+++ b/dom/security/test/csp/test_inlinestyle.html
@@ -24,70 +24,70 @@ var done = 0;
 // styles applied by <style> element, style attribute, and SMIL <animate> and <set> tags
 // (when it's not explicitly allowed.)
 function checkStyles(evt) {
   var cspframe = document.getElementById('cspframe1');
   var color;
 
   // black means the style wasn't applied.  green colors are used for styles
   //expected to be applied.  A color is red if a style is erroneously applied
-  color = window.getComputedStyle(cspframe.contentDocument.getElementById('linkstylediv'),null)['color'];
+  color = window.getComputedStyle(cspframe.contentDocument.getElementById('linkstylediv'))['color'];
   ok('rgb(0, 255, 0)' === color, 'External Stylesheet (' + color + ')');
-  color = window.getComputedStyle(cspframe.contentDocument.getElementById('inlinestylediv'),null)['color'];
+  color = window.getComputedStyle(cspframe.contentDocument.getElementById('inlinestylediv'))['color'];
   ok('rgb(0, 0, 0)' === color, 'Inline Style TAG (' + color + ')');
-  color = window.getComputedStyle(cspframe.contentDocument.getElementById('attrstylediv'),null)['color'];
+  color = window.getComputedStyle(cspframe.contentDocument.getElementById('attrstylediv'))['color'];
   ok('rgb(0, 0, 0)' === color, 'Style Attribute (' + color + ')');
-  color = window.getComputedStyle(cspframe.contentDocument.getElementById('csstextstylediv'),null)['color'];
+  color = window.getComputedStyle(cspframe.contentDocument.getElementById('csstextstylediv'))['color'];
   ok('rgb(0, 255, 0)' === color, 'cssText (' + color + ')');
   // SMIL tests
   color = window.getComputedStyle(cspframe.contentDocument.getElementById('xmlTest',null))['fill'];
   ok('rgb(0, 0, 0)' === color, 'XML Attribute styling (SMIL) (' + color + ')');
   color = window.getComputedStyle(cspframe.contentDocument.getElementById('cssOverrideTest',null))['fill'];
   ok('rgb(0, 0, 0)' === color, 'CSS Override styling (SMIL) (' + color + ')');
   color = window.getComputedStyle(cspframe.contentDocument.getElementById('cssOverrideTestById',null))['fill'];
   ok('rgb(0, 0, 0)' === color, 'CSS Override styling via ID lookup (SMIL) (' + color + ')');
   color = window.getComputedStyle(cspframe.contentDocument.getElementById('cssSetTestById',null))['fill'];
   ok('rgb(0, 0, 0)' === color, 'CSS Set Element styling via ID lookup (SMIL) (' + color + ')');
 
-  color = window.getComputedStyle(cspframe.contentDocument.getElementById('modifycsstextdiv'),null)['color'];
+  color = window.getComputedStyle(cspframe.contentDocument.getElementById('modifycsstextdiv'))['color'];
   ok('rgb(0, 255, 0)' === color, 'Modify loaded style sheet via cssText (' + color + ')');
 
   checkIfDone();
 }
 
 // When a CSP 1.0 compliant policy is specified we should allow inline
 // styles when it is explicitly allowed.
 function checkStylesAllowed(evt) {
   var cspframe = document.getElementById('cspframe2');
   var color;
 
   // black means the style wasn't applied.  green colors are used for styles
   // expected to be applied.  A color is red if a style is erroneously applied
-  color = window.getComputedStyle(cspframe.contentDocument.getElementById('linkstylediv'),null)['color'];
+  color = window.getComputedStyle(cspframe.contentDocument.getElementById('linkstylediv'))['color'];
   ok('rgb(0, 255, 0)' === color, 'External Stylesheet (' + color + ')');
-  color = window.getComputedStyle(cspframe.contentDocument.getElementById('inlinestylediv'),null)['color'];
+  color = window.getComputedStyle(cspframe.contentDocument.getElementById('inlinestylediv'))['color'];
   ok('rgb(0, 255, 0)' === color, 'Inline Style TAG (' + color + ')');
-  color = window.getComputedStyle(cspframe.contentDocument.getElementById('attrstylediv'),null)['color'];
+  color = window.getComputedStyle(cspframe.contentDocument.getElementById('attrstylediv'))['color'];
   ok('rgb(0, 255, 0)' === color, 'Style Attribute (' + color + ')');
 
   // Note that the below test will fail if "script-src: 'unsafe-inline'" breaks,
   // since it relies on executing script to set .cssText
-  color = window.getComputedStyle(cspframe.contentDocument.getElementById('csstextstylediv'),null)['color'];
+  color = window.getComputedStyle(cspframe.contentDocument.getElementById('csstextstylediv'))['color'];
   ok('rgb(0, 255, 0)' === color, 'style.cssText (' + color + ')');
   // SMIL tests
   color = window.getComputedStyle(cspframe.contentDocument.getElementById('xmlTest',null))['fill'];
   ok('rgb(0, 255, 0)' === color, 'XML Attribute styling (SMIL) (' + color + ')');
   color = window.getComputedStyle(cspframe.contentDocument.getElementById('cssOverrideTest',null))['fill'];
   ok('rgb(0, 255, 0)' === color, 'CSS Override styling (SMIL) (' + color + ')');
   color = window.getComputedStyle(cspframe.contentDocument.getElementById('cssOverrideTestById',null))['fill'];
   ok('rgb(0, 255, 0)' === color, 'CSS Override styling via ID lookup (SMIL) (' + color + ')');
   color = window.getComputedStyle(cspframe.contentDocument.getElementById('cssSetTestById',null))['fill'];
   ok('rgb(0, 255, 0)' === color, 'CSS Set Element styling via ID lookup (SMIL) (' + color + ')');
 
-  color = window.getComputedStyle(cspframe.contentDocument.getElementById('modifycsstextdiv'),null)['color'];
+  color = window.getComputedStyle(cspframe.contentDocument.getElementById('modifycsstextdiv'))['color'];
   ok('rgb(0, 255, 0)' === color, 'Modify loaded style sheet via cssText (' + color + ')');
 
   checkIfDone();
 }
 
 function checkIfDone() {
   done++;
   if (done == 2)
--- a/dom/security/test/csp/test_nonce_source.html
+++ b/dom/security/test/csp/test_nonce_source.html
@@ -71,17 +71,17 @@ function ranTests(num) {
     return;
   }
   cleanup();
 }
 
 function checkInlineScriptsAndStyles () {
   var cspframe = document.getElementById('cspframe');
   var getElementColorById = function (id) {
-    return window.getComputedStyle(cspframe.contentDocument.getElementById(id), null).color;
+    return window.getComputedStyle(cspframe.contentDocument.getElementById(id)).color;
   };
   // Inline style tries to change an element's color to green. If blocked, the
   // element's color will be the (unchanged) default black.
   var green = "rgb(0, 128, 0)";
   var red = "rgb(255,0,0)";
   var black = "rgb(0, 0, 0)";
 
   // inline script tests
--- a/dom/security/test/sri/iframe_style_crossdomain.html
+++ b/dom/security/test/sri/iframe_style_crossdomain.html
@@ -5,19 +5,19 @@
 <head>
   <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
   <script type="application/javascript">
     function check_styles() {
       var redText = document.getElementById('red-text');
       var greenText = document.getElementById('green-text');
       var blueText = document.getElementById('blue-text');
-      var redTextColor = window.getComputedStyle(redText, null).getPropertyValue('color');
-      var greenTextColor = window.getComputedStyle(greenText, null).getPropertyValue('color');
-      var blueTextColor = window.getComputedStyle(blueText, null).getPropertyValue('color');
+      var redTextColor = window.getComputedStyle(redText).getPropertyValue('color');
+      var greenTextColor = window.getComputedStyle(greenText).getPropertyValue('color');
+      var blueTextColor = window.getComputedStyle(blueText).getPropertyValue('color');
       ok(redTextColor == 'rgb(255, 0, 0)', "The first part should be red.");
       ok(greenTextColor == 'rgb(0, 255, 0)', "The second part should be green.");
       ok(blueTextColor == 'rgb(0, 0, 255)', "The third part should be blue.");
     }
 
     SimpleTest.waitForExplicitFinish();
     window.onload = function() {
       check_styles();
--- a/dom/security/test/sri/iframe_style_sameorigin.html
+++ b/dom/security/test/sri/iframe_style_sameorigin.html
@@ -6,20 +6,20 @@
   <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
   <script type="application/javascript">
     function check_styles() {
       var redText = document.getElementById('red-text');
       var blueText = document.getElementById('blue-text-element');
       var blackText1 = document.getElementById('black-text');
       var blackText2 = document.getElementById('black-text-2');
-      var redTextColor = window.getComputedStyle(redText, null).getPropertyValue('color');
-      var blueTextColor = window.getComputedStyle(blueText, null).getPropertyValue('color');
-      var blackTextColor1 = window.getComputedStyle(blackText1, null).getPropertyValue('color');
-      var blackTextColor2 = window.getComputedStyle(blackText2, null).getPropertyValue('color');
+      var redTextColor = window.getComputedStyle(redText).getPropertyValue('color');
+      var blueTextColor = window.getComputedStyle(blueText).getPropertyValue('color');
+      var blackTextColor1 = window.getComputedStyle(blackText1).getPropertyValue('color');
+      var blackTextColor2 = window.getComputedStyle(blackText2).getPropertyValue('color');
       ok(redTextColor == 'rgb(255, 0, 0)', "The first part should be red.");
       ok(blueTextColor == 'rgb(0, 0, 255)', "The second part should be blue.");
       ok(blackTextColor1 == 'rgb(0, 0, 0)', "The second last part should still be black.");
       ok(blackTextColor2 == 'rgb(0, 0, 0)', "The last part should still be black.");
     }
 
     SimpleTest.waitForExplicitFinish();
     window.onload = function() {
--- a/dom/security/test/sri/test_csp_directive_style_imports.html
+++ b/dom/security/test/sri/test_csp_directive_style_imports.html
@@ -19,17 +19,17 @@
   SimpleTest.waitForExplicitFinish();
   function handler(event) {
     console.log(event);
     switch (event.data) {
       case 'finish':
         // need finish message from iframe_require-sri-for_main onload event and
         // from iframe_require-sri-for_no_csp, which spawns a Worker
         var importText = frame.contentDocument.getElementById('text-for-import-test');
-        var importColor = frame.contentWindow.getComputedStyle(importText, null).getPropertyValue('color');
+        var importColor = frame.contentWindow.getComputedStyle(importText).getPropertyValue('color');
         ok(importColor == 'rgb(0, 0, 255)', "The import should not work without integrity. The text is now red, but should not.");
         removeEventListener('message', handler);
         SimpleTest.finish();
         break;
       default:
         ok(false, 'Something is wrong here');
         break;
     }
--- a/dom/security/test/sri/test_require-sri-for_csp_directive.html
+++ b/dom/security/test/sri/test_require-sri-for_csp_directive.html
@@ -48,17 +48,17 @@
         ok(true, 'Worker continued after failed importScript due to require-sri-for');
         break;
       case 'finish':
         finished++;
         if (finished > 1) {
           // need finish message from iframe_require-sri-for_main onload event and
           // from iframe_require-sri-for_no_csp, which spawns a Worker
           var blackText = frame.contentDocument.getElementById('black-text');
-          var blackTextColor = frame.contentWindow.getComputedStyle(blackText, null).getPropertyValue('color');
+          var blackTextColor = frame.contentWindow.getComputedStyle(blackText).getPropertyValue('color');
           ok(blackTextColor == 'rgb(0, 0, 0)', "The second part should not be black.");
           removeEventListener('message', handler);
           SimpleTest.finish();
         }
         break;
       default:
         ok(false, 'Something is wrong here');
         break;
--- a/dom/security/test/sri/test_require-sri-for_csp_directive_disabled.html
+++ b/dom/security/test/sri/test_require-sri-for_csp_directive_disabled.html
@@ -24,17 +24,17 @@
       case 'bad_nonsriLoaded':
         ok(true, "Eligible non-SRI resource should be blocked by the CSP!");
         break;
       case 'good_nonsriBlocked':
         ok(false, "Eligible non-SRI resources was correctly blocked by the CSP.");
         break;
       case 'finish':
         var blackText = frame.contentDocument.getElementById('black-text');
-        var blackTextColor = frame.contentWindow.getComputedStyle(blackText, null).getPropertyValue('color');
+        var blackTextColor = frame.contentWindow.getComputedStyle(blackText).getPropertyValue('color');
         ok(blackTextColor != 'rgb(0, 0, 0)', "The second part should still be black.");
         removeEventListener('message', handler);
         SimpleTest.finish();
         break;
       default:
         ok(false, 'Something is wrong here');
         break;
     }
--- a/dom/smil/test/smilTestUtils.js
+++ b/dom/smil/test/smilTestUtils.js
@@ -30,17 +30,17 @@ var SMILUtil =
   {
     var elemList = document.getElementsByTagName(aTargetTag);
     return (elemList.length == 0 ? null : elemList[0]);
   },
 
   // Simple wrapper for getComputedStyle
   getComputedStyleSimple: function(elem, prop)
   {
-    return window.getComputedStyle(elem, null).getPropertyValue(prop);
+    return window.getComputedStyle(elem).getPropertyValue(prop);
   },
 
   getAttributeValue: function(elem, attr)
   {
     if (attr.attrName == SMILUtil.getMotionFakeAttributeName()) {
       // Fake motion "attribute" -- "computed value" is the element's CTM
       return elem.getCTM();
     }
--- a/dom/smil/test/test_smilKeyTimes.xhtml
+++ b/dom/smil/test/test_smilKeyTimes.xhtml
@@ -373,17 +373,17 @@ function checkSample(anim, expectedValue
 function checkLineCapSample(anim, expectedValue, sampleTime, caseDescr)
 {
   var msg = "Test case " + caseDescr +
     " (keyTimes: '" + anim.getAttribute('keyTimes') + "'" +
     " calcMode: " + anim.getAttribute('calcMode') + "), " +
     "t=" + sampleTime +
     ": Unexpected sample value:";
   var actualValue =
-    window.getComputedStyle(anim.targetElement, null).
+    window.getComputedStyle(anim.targetElement).
     getPropertyValue('stroke-linecap');
   is(actualValue, expectedValue, msg);
 }
 
 window.addEventListener("load", main);
 ]]>
 </script>
 </pre>
--- a/dom/svg/test/test_object-delayed-intrinsic-size.html
+++ b/dom/svg/test/test_object-delayed-intrinsic-size.html
@@ -15,17 +15,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 // This test checks for a race condition. If it fails intermittently then it
 // may actually be a full failure.
 
 SimpleTest.waitForExplicitFinish();
 
 function runTest()
 {
   var object = document.querySelector("object");
-  var cs = document.defaultView.getComputedStyle(object, "");
+  var cs = document.defaultView.getComputedStyle(object);
   var width = cs.getPropertyValue("width");
   is(width, "70px", "Check that the &lt;object&gt; size updated");
   SimpleTest.finish();
 }
 
     </script>
   </head>
   <body onload="runTest();">
--- a/dom/svg/test/test_scientific.html
+++ b/dom/svg/test/test_scientific.html
@@ -23,61 +23,61 @@ https://bugzilla.mozilla.org/show_bug.cg
 	{
 	var doc = $("svg").contentWindow.document;
 	var rect = doc.getElementById("rect");
 	var text = doc.getElementById("text");
 
 	// ordinary
 
 	rect.setAttribute("stroke-width", "5");
-	is(doc.defaultView.getComputedStyle(rect, '').getPropertyValue("stroke-width"), "5", "Ordinary");
+	is(doc.defaultView.getComputedStyle(rect).getPropertyValue("stroke-width"), "5", "Ordinary");
 
 	// valid exponential notation
 
 	rect.setAttribute("stroke-width", "4E1");
-	is(doc.defaultView.getComputedStyle(rect, '').getPropertyValue("stroke-width"), "40", "Exponent");
+	is(doc.defaultView.getComputedStyle(rect).getPropertyValue("stroke-width"), "40", "Exponent");
 
 	rect.setAttribute("stroke-width", "6e1");
-	is(doc.defaultView.getComputedStyle(rect, '').getPropertyValue("stroke-width"), "60", "Lower-case Exponent");
+	is(doc.defaultView.getComputedStyle(rect).getPropertyValue("stroke-width"), "60", "Lower-case Exponent");
 
 	rect.setAttribute("stroke-width", "2E+1");
-	is(doc.defaultView.getComputedStyle(rect, '').getPropertyValue("stroke-width"), "20", "Positive Exponent");
+	is(doc.defaultView.getComputedStyle(rect).getPropertyValue("stroke-width"), "20", "Positive Exponent");
 
 	rect.setAttribute("stroke-width", "100E-1");
-	is(doc.defaultView.getComputedStyle(rect, '').getPropertyValue("stroke-width"), "10", "Negative Exponent");
+	is(doc.defaultView.getComputedStyle(rect).getPropertyValue("stroke-width"), "10", "Negative Exponent");
 
 	rect.setAttribute("stroke-width", "0.7E1");
-	is(doc.defaultView.getComputedStyle(rect, '').getPropertyValue("stroke-width"), "7", "Floating Point with Exponent");
+	is(doc.defaultView.getComputedStyle(rect).getPropertyValue("stroke-width"), "7", "Floating Point with Exponent");
 
 	rect.setAttribute("stroke-width", "50.0E-1");
-	is(doc.defaultView.getComputedStyle(rect, '').getPropertyValue("stroke-width"), "5", "Floating Point with Negative Exponent");
+	is(doc.defaultView.getComputedStyle(rect).getPropertyValue("stroke-width"), "5", "Floating Point with Negative Exponent");
 
 	rect.setAttribute("stroke-width", "0.8E+1");
-	is(doc.defaultView.getComputedStyle(rect, '').getPropertyValue("stroke-width"), "8", "Floating Point with Positive Exponent");
+	is(doc.defaultView.getComputedStyle(rect).getPropertyValue("stroke-width"), "8", "Floating Point with Positive Exponent");
 
 	rect.setAttribute("stroke-width", "4E1px");
-	is(doc.defaultView.getComputedStyle(rect, '').getPropertyValue("stroke-width"), "40px", "Units");
+	is(doc.defaultView.getComputedStyle(rect).getPropertyValue("stroke-width"), "40px", "Units");
 
 	// check units that begin with the letter e
 
-	var font_size = doc.defaultView.getComputedStyle(rect, '').getPropertyValue("font-size");
+	var font_size = doc.defaultView.getComputedStyle(rect).getPropertyValue("font-size");
 
 	rect.setAttribute("stroke-width", "1em");
-	is(doc.defaultView.getComputedStyle(rect, '').getPropertyValue("stroke-width"), font_size, "em Units");
+	is(doc.defaultView.getComputedStyle(rect).getPropertyValue("stroke-width"), font_size, "em Units");
 
 	// invalid exponential notation
 
 	rect.setAttribute("stroke-width", "1E1.1");
-	is(doc.defaultView.getComputedStyle(rect, '').getPropertyValue("stroke-width"), "1px", "Floating Point Exponent");
+	is(doc.defaultView.getComputedStyle(rect).getPropertyValue("stroke-width"), "1px", "Floating Point Exponent");
 
 	rect.setAttribute("stroke-width", "E1");
-	is(doc.defaultView.getComputedStyle(rect, '').getPropertyValue("stroke-width"), "1px", "No Mantissa");
+	is(doc.defaultView.getComputedStyle(rect).getPropertyValue("stroke-width"), "1px", "No Mantissa");
 
 	rect.setAttribute("stroke-width", "1 e");
-	is(doc.defaultView.getComputedStyle(rect, '').getPropertyValue("stroke-width"), "1px", "Spaces");
+	is(doc.defaultView.getComputedStyle(rect).getPropertyValue("stroke-width"), "1px", "Spaces");
 
 	SimpleTest.finish();
 	}
 
 	window.addEventListener("load", runTests);
 </script>
 </pre>
 </body>
--- a/dom/tests/mochitest/general/test_focusrings.xul
+++ b/dom/tests/mochitest/general/test_focusrings.xul
@@ -135,26 +135,26 @@ function testHTMLElements(list, isMac, e
 
     var shouldFocus = !isMac || (elem.className == "canfocus");
     var ringSize = (shouldFocus ? (expectedNoRingsOnWin ? 2 : 1) : 0) + "px";
     if (elem.localName == "a")
       ringSize = "0px";
 
     synthesizeMouse(elem, 8, 8, { }, childwin);
     is(childdoc.activeElement, shouldFocus ? elem : childdoc.body, "mouse click on " + list[e]);
-    is(childwin.getComputedStyle(elem, "").outlineWidth, ringSize, "mouse click on " + list[e] + " ring");
+    is(childwin.getComputedStyle(elem).outlineWidth, ringSize, "mouse click on " + list[e] + " ring");
 
     if (childdoc.activeElement)
       childdoc.activeElement.blur();
 
     ringSize = (elem.localName == "a" ? "0" : (expectedNoRingsOnWin ? 2 : 1)) + "px";
 
     elem.focus();
     is(childdoc.activeElement, elem, "focus() on " + list[e]);
-    is(childwin.getComputedStyle(elem, "").outlineWidth, ringSize,
+    is(childwin.getComputedStyle(elem).outlineWidth, ringSize,
        "focus() on " + list[e] + " ring");
 
     childdoc.activeElement.blur();
   }
 }
 
 SimpleTest.waitForFocus(runTest);
 
--- a/dom/tests/mochitest/webcomponents/test_shadowroot_style_order.html
+++ b/dom/tests/mochitest/webcomponents/test_shadowroot_style_order.html
@@ -27,16 +27,16 @@ veryTallShadowStyle.innerHTML = ".tall {
 
 var divToStyle = document.createElement("div");
 divToStyle.setAttribute("class", "tall");
 root.appendChild(divToStyle);
 
 // Make sure the styles are applied in tree order.
 root.appendChild(tallShadowStyle);
 is(root.styleSheets.length, 1, "ShadowRoot should have one style sheet.");
-is(window.getComputedStyle(divToStyle, null).getPropertyValue("height"), "100px", "Style in ShadowRoot should apply to elements in ShadowRoot.");
+is(window.getComputedStyle(divToStyle).getPropertyValue("height"), "100px", "Style in ShadowRoot should apply to elements in ShadowRoot.");
 root.appendChild(veryTallShadowStyle);
 is(root.styleSheets.length, 2, "ShadowRoot should have two style sheets.");
-is(window.getComputedStyle(divToStyle, null).getPropertyValue("height"), "200px", "Style in ShadowRoot should apply to elements in ShadowRoot in tree order.");
+is(window.getComputedStyle(divToStyle).getPropertyValue("height"), "200px", "Style in ShadowRoot should apply to elements in ShadowRoot in tree order.");
 
 </script>
 </body>
 </html>
--- a/editor/libeditor/tests/test_bug372345.html
+++ b/editor/libeditor/tests/test_bug372345.html
@@ -27,17 +27,17 @@ addLoadEvent(function() {
   var link = content.querySelector("a");
   function testCursor(post) {
     setTimeout(function() {
       var link = document.createElement("a");
       link.href = "http://mozilla.org/";
       link.textContent = "link";
       link.style.cursor = "pointer";
       content.appendChild(link);
-      is(iframe.contentWindow.getComputedStyle(link, null).cursor, "pointer", "Make sure that the cursor is set to pointer");
+      is(iframe.contentWindow.getComputedStyle(link).cursor, "pointer", "Make sure that the cursor is set to pointer");
       setTimeout(post, 0);
     }, 0);
   }
   testCursor(function() {
     doc.designMode = "on";
     testCursor(function() {
       doc.designMode = "off";
       testCursor(function() {
--- a/js/xpconnect/tests/chrome/test_paris_weakmap_keys.xul
+++ b/js/xpconnect/tests/chrome/test_paris_weakmap_keys.xul
@@ -43,17 +43,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 
   }
 
   make_live_map();
 
   // RGBColor is a non-nsISupports refCounted class using WebIDL bindings.
 
   // non-nsISupports cycle-collected classes should fail as weak map keys.
-  let context = window.getComputedStyle(document.documentElement, null).getPropertyCSSValue("color").getRGBColorValue();
+  let context = window.getComputedStyle(document.documentElement).getPropertyCSSValue("color").getRGBColorValue();
   let contextFail = false;
   try {
     live_map.set(context, 2);
   } catch (e) {
     contextFail = true;
   }
 
   ok(contextFail, "Cycle collected non-nsISupports classes aren't allowed as weak map keys.");
--- a/layout/base/tests/test_bug435293-scale.html
+++ b/layout/base/tests/test_bug435293-scale.html
@@ -64,40 +64,40 @@ https://bugzilla.mozilla.org/show_bug.cg
   </div>
 </div>
 
 <pre id="test">
 <script type="application/javascript">
 runtests();
 
 function runtests() {
-  var style = window.getComputedStyle(document.getElementById("test1"), "");
+  var style = window.getComputedStyle(document.getElementById("test1"));
   is(style.getPropertyValue("-moz-transform"), "matrix(0.5, 0, 0, 1, 0, 0)",
      "Scalex proper matrix is applied");
 
-  style = window.getComputedStyle(document.getElementById("test2"), "");
+  style = window.getComputedStyle(document.getElementById("test2"));
   is(style.getPropertyValue("-moz-transform"), "matrix(1, 0, 0, 0.5, 0, 0)",
      "Scaley proper matrix is applied");
 
-  style = window.getComputedStyle(document.getElementById("test3"), "");
+  style = window.getComputedStyle(document.getElementById("test3"));
   is(style.getPropertyValue("-moz-transform"), "matrix(0.5, 0, 0, 0.5, 0, 0)",
      "Scale proper matrix is applied");
 
-  style = window.getComputedStyle(document.getElementById("test4"), "");
+  style = window.getComputedStyle(document.getElementById("test4"));
   is(style.getPropertyValue("-moz-transform"), "none",
      "Three dimensional scale should be ignored");
 
-  style = window.getComputedStyle(document.getElementById("test5"), "");
+  style = window.getComputedStyle(document.getElementById("test5"));
   is(style.getPropertyValue("-moz-transform"), "none",
      "Percent values in scale should be ignored");
 
-  style = window.getComputedStyle(document.getElementById("test6"), "");
+  style = window.getComputedStyle(document.getElementById("test6"));
   is(style.getPropertyValue("-moz-transform"), "matrix(640000, 0, 0, 1e-19, 0, 0)",
      "Ensure wacky values are accepted");
 
-  style = window.getComputedStyle(document.getElementById("test7"), "");
+  style = window.getComputedStyle(document.getElementById("test7"));
   is(style.getPropertyValue("-moz-transform"), "none",
      "No unit values allowed in scale");
 }
 </script>
 </pre>
 </body>
 </html>
--- a/layout/base/tests/test_bug435293-skew.html
+++ b/layout/base/tests/test_bug435293-skew.html
@@ -87,82 +87,82 @@ https://bugzilla.mozilla.org/show_bug.cg
 <pre id="test">
 <script type="application/javascript">
 runtests();
 
 function runtests() {
   // For test 1 we need to handle the contingency that different systems may
   // round differently.  We will parse out the values and compare them
   // individually.  The matrix should be: matrix(1, 0, 0.57735, 1, 0, 0)
-  var style = window.getComputedStyle(document.getElementById("test1"), "");
+  var style = window.getComputedStyle(document.getElementById("test1"));
   var tformStyle = style.getPropertyValue("-moz-transform");
   var tformValues = tformStyle.substring(tformStyle.indexOf('(') + 1,
                                          tformStyle.indexOf(')')).split(',');
   is((+tformValues[0]), 1, "Test1: skewx: param 0 is 1");
   is((+tformValues[1]), 0, "Test1: skewx: param 1 is 0");
   ok(verifyRounded(tformValues[2], 0.57735), "Test1: skewx: Rounded param 2 is in bounds");
   is((+tformValues[3]), 1, "Test1: skewx: param 3 is 1");
   is((+tformValues[4]), 0, "Test1: skewx: param 4 is 0");
   is((+tformValues[5]), 0, "Test1: skewx: param 5 is 0");
 
   // Again, handle rounding for test 2, proper matrix should be:
   // matrix(1, 1.73205, 0, 1, 0, 0)
-  style = window.getComputedStyle(document.getElementById("test2"), "");
+  style = window.getComputedStyle(document.getElementById("test2"));
   tformStyle = style.getPropertyValue("-moz-transform");
   tformValues = tformStyle.substring(tformStyle.indexOf('(') + 1,
                                      tformStyle.indexOf(')')).split(',');
   is((+tformValues[0]), 1, "Test2: skewy: param 0 is 1");
   ok(verifyRounded(tformValues[1], 1.73205), "Test2: skewy: Rounded param 1 is in bounds");
   is((+tformValues[2]), 0, "Test2: skewy: param 2 is 0");
   is((+tformValues[3]), 1, "Test2: skewy: param 3 is 1");
   is((+tformValues[4]), 0, "Test2: skewy: param 4 is 0");
   is((+tformValues[5]), 0, "Test2: skewy: param 5 is 0");
 
-  style = window.getComputedStyle(document.getElementById("test3"), "");
+  style = window.getComputedStyle(document.getElementById("test3"));
   is(style.getPropertyValue("-moz-transform"), "matrix(1, 1, 1, 1, 0, 0)",
      "Test3: Skew proper matrix is applied");
 
-  style = window.getComputedStyle(document.getElementById("test4"), "");
+  style = window.getComputedStyle(document.getElementById("test4"));
   is(style.getPropertyValue("-moz-transform"), "matrix(1, 1, 0, 1, 0, 0)",
      "Test4: Skew angle wrap: proper matrix is applied");
 
-  style = window.getComputedStyle(document.getElementById("test5"), "");
+  style = window.getComputedStyle(document.getElementById("test5"));
   is(style.getPropertyValue("-moz-transform"), "matrix(1, -1, 1, 1, 0, 0)",
      "Test5: Skew mixing deg and grad");
 
-  style = window.getComputedStyle(document.getElementById("test6"), "");
+  style = window.getComputedStyle(document.getElementById("test6"));
   is(style.getPropertyValue("-moz-transform"), "none",
      "Test6: Skew with invalid units");
 
-  style = window.getComputedStyle(document.getElementById("test7"), "");
+  style = window.getComputedStyle(document.getElementById("test7"));
   is(style.getPropertyValue("-moz-transform"), "none",
      "Test7: Skew with more invalid units");
 
   // Test 8: skew with negative degrees, here again we must handle rounding.
   // The matrix should be: matrix(1, 3.73206, -1, 1, 0, 0)
-  style = window.getComputedStyle(document.getElementById("test8"), "");
+  style = window.getComputedStyle(document.getElementById("test8"));
   tformStyle = style.getPropertyValue("-moz-transform");
   tformValues = tformStyle.substring(tformStyle.indexOf('(') + 1,
                                      tformStyle.indexOf(')')).split(',');
   is((+tformValues[0]), 1, "Test8: Test skew with negative degrees-param 0 is 1");
   ok(verifyRounded(tformValues[1], 3.73206), "Test8: Rounded param 1 is in bounds");
   is((+tformValues[2]), -1, "Test8: param 2 is -1");
   is((+tformValues[3]), 1, "Test8: param 3 is 1");
   is((+tformValues[4]), 0, "Test8: param 4 is 0");
   is((+tformValues[5]), 0, "Test8: param 5 is 0");
 
-  style = window.getComputedStyle(document.getElementById("test9"), "");
+  style = window.getComputedStyle(document.getElementById("test9"));
   is(style.getPropertyValue("-moz-transform"), "none",
      "Test9: Skew in 3d should be ignored");
 
-  style = window.getComputedStyle(document.getElementById("test10"), "");
+  style = window.getComputedStyle(document.getElementById("test10"));
   is(style.getPropertyValue("-moz-transform"), "matrix(1, -10000, 1, 1, 0, 0)",
      "Test10: Skew with nearly infinite numbers");
 
-  style = window.getComputedStyle(document.getElementById("test11"), "");
+  style = window.getComputedStyle(document.getElementById("test11"));
   is(style.getPropertyValue("-moz-transform"), "matrix(1, -10000, 10000, 1, 0, 0)",
      "Test11: Skew with more infinite numbers");
 }
 
 // Verifies that aVal is +/- 0.00001 of aTrueVal
 // Returns true if so, false if not
 function verifyRounded(aVal, aTrueVal) {
   return (Math.abs(aVal - aTrueVal).toFixed(5) <= 0.00001);
--- a/layout/forms/test/test_bug287446.html
+++ b/layout/forms/test/test_bug287446.html
@@ -28,34 +28,34 @@ addLoadEvent(function() {
   try {
     $("i").contentDocument.documentElement;
     accessed = true;
   } catch(e) {}
   is(accessed, false, "Shouldn't be able to access cross-site");
 
   $("i").style.display = "none";
   document.body.offsetWidth;
-  is(document.defaultView.getComputedStyle($("i"), "").display, "none",
+  is(document.defaultView.getComputedStyle($("i")).display, "none",
      "toggling display failed");
   $("i").style.display = "";
   document.body.offsetWidth;
-  is(document.defaultView.getComputedStyle($("i"), "").display, "inline",
+  is(document.defaultView.getComputedStyle($("i")).display, "inline",
      "toggling display back failed");
 
   $("i").contentWindow.postMessage("start", "*");
 });
 
 function continueTest() {
   $("i").style.display = "none";
   document.body.offsetWidth;
-  is(document.defaultView.getComputedStyle($("i"), "").display, "none",
+  is(document.defaultView.getComputedStyle($("i")).display, "none",
      "toggling display second time failed");
   $("i").style.display = "";
   document.body.offsetWidth;
-  is(document.defaultView.getComputedStyle($("i"), "").display, "inline",
+  is(document.defaultView.getComputedStyle($("i")).display, "inline",
      "toggling display back second time failed");
 
 $("i").contentWindow.postMessage("continue", "*");
 }
 
 window.addEventListener("message",
   function(evt) {
     var arr = evt.data.split(/ /).map(decodeURIComponent);
--- a/layout/forms/test/test_bug477531.html
+++ b/layout/forms/test/test_bug477531.html
@@ -25,41 +25,41 @@ https://bugzilla.mozilla.org/show_bug.cg
 
 <input type="checkbox" id="s" />
 
 </div>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
 /** Test for Bug 477531 **/
-is(document.defaultView.getComputedStyle($("s"), null).getPropertyValue("margin-left"),
+is(document.defaultView.getComputedStyle($("s")).getPropertyValue("margin-left"),
    "10px",
    "Non-indeterminate checkbox should have a margin of 10px");
 
 $("s").indeterminate = true;
 
-is(document.defaultView.getComputedStyle($("s"), null).getPropertyValue("margin-left"),
+is(document.defaultView.getComputedStyle($("s")).getPropertyValue("margin-left"),
    "30px",
    "Indeterminate checkbox should have a margin of 30px");
 
 $("s").setAttribute("type", "radio");
 
-is(document.defaultView.getComputedStyle($("s"), null).getPropertyValue("margin-left"),
+is(document.defaultView.getComputedStyle($("s")).getPropertyValue("margin-left"),
    "30px",
    "Setting an indeterminate element to type radio should give it indeterminate styles");
 
 $("s").setAttribute("type", "checkbox");
 
-is(document.defaultView.getComputedStyle($("s"), null).getPropertyValue("margin-left"),
+is(document.defaultView.getComputedStyle($("s")).getPropertyValue("margin-left"),
    "30px",
    "Setting an indeterminate element to type checkbox should give it indeterminate styles");
 
 $("s").indeterminate = false;
 
-is(document.defaultView.getComputedStyle($("s"), null).getPropertyValue("margin-left"),
+is(document.defaultView.getComputedStyle($("s")).getPropertyValue("margin-left"),
    "10px",
    "Newly non-indeterminate checkbox should have a margin of 10px");
 
 </script>
 </pre>
 </body>
 </html>
 
--- a/layout/forms/test/test_bug477700.html
+++ b/layout/forms/test/test_bug477700.html
@@ -28,21 +28,21 @@ addLoadEvent(function() {
   try {
     $("i").contentDocument.documentElement;
     accessed = true;
   } catch(e) {}
   is(accessed, false, "Shouldn't be able to access cross-site");
 
   $("i").style.display = "none";
   document.body.offsetWidth;
-  is(document.defaultView.getComputedStyle($("i"), "").display, "none",
+  is(document.defaultView.getComputedStyle($("i")).display, "none",
      "toggling display failed");
   $("i").style.display = "";
   document.body.offsetWidth;
-  is(document.defaultView.getComputedStyle($("i"), "").display, "inline",
+  is(document.defaultView.getComputedStyle($("i")).display, "inline",
      "toggling display back failed");
 
   $("i").contentWindow.postMessage("start", "*");
 });
 
 window.addEventListener("message",
   function(evt) {
     var arr = evt.data.split(/ /).map(decodeURIComponent);
--- a/layout/generic/crashtests/641724.html
+++ b/layout/generic/crashtests/641724.html
@@ -102,17 +102,17 @@
             for (e in d)
                 if (a.call(d[e], e, d[e]) === false)
             for (var b = d[0]; i < length; b = d[++i]) { }
             return d
         },
         curCSS: function (f, l, k)
         {
             l = l.replace(/([A-Z])/g, "-$1").toLowerCase();
-            var c = document.defaultView.getComputedStyle(f, null);
+            var c = document.defaultView.getComputedStyle(f);
             c.getPropertyValue(l);
         },
         clean: function (l, h)
         {
             var k = [];
             D.each(l, function (i, d)
             {
                 var div = document.createElement("div");
--- a/layout/generic/test/test_bug323656.html
+++ b/layout/generic/test/test_bug323656.html
@@ -35,17 +35,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 </p>
 <div id="content" style="display: none">
   
 </div>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
 /** Test for Bug 323656 **/
-var s = document.defaultView.getComputedStyle($("testOption"), "");
+var s = document.defaultView.getComputedStyle($("testOption"));
 is(s.borderRightColor, "rgb(0, 128, 0)", "Inheritance broken");
 
 
 </script>
 </pre>
 </body>
 </html>
 
--- a/layout/generic/test/test_bug522632.html
+++ b/layout/generic/test/test_bug522632.html
@@ -19,14 +19,14 @@ https://bugzilla.mozilla.org/show_bug.cg
       </td>
     <tr>
   </table>  
 </div>
 <pre id="test">
 <script type="application/javascript">
 
 /** Test for Bug 522632 **/
-is(document.defaultView.getComputedStyle($("foo"), "").height, "100px",
+is(document.defaultView.getComputedStyle($("foo")).height, "100px",
    "Unexpected computed height");
 </script>
 </pre>
 </body>
 </html>
--- a/layout/reftests/bugs/371041-1.html
+++ b/layout/reftests/bugs/371041-1.html
@@ -37,13 +37,12 @@
 <div id="source10" class="source2" style="line-height: normal">TEST</div>
 <div id="source11" class="source2" style="line-height: 150%">TEST</div>
 <div id="source12" class="source2" style="line-height: 0.5">TEST</div>
 
 <script>
   var d = document;
   for (var i = 1; i <= 12; ++i) {
     d.getElementById("test" + i).style.height =
-      d.defaultView.getComputedStyle(d.getElementById("source" + i),
-                                     "").lineHeight;
+      d.defaultView.getComputedStyle(d.getElementById("source" + i)).lineHeight;
   }
 </script>
 </html>
--- a/layout/reftests/bugs/371043-1.html
+++ b/layout/reftests/bugs/371043-1.html
@@ -2,13 +2,12 @@
 <body>
   <div id="source" style="font-size: 10px; -moz-column-gap: 2ch">
     <span id="test"
           style="background: green; display: inline-block; height: 30px;
                  padding: 0 2px">
     </span>
     <script>
       document.getElementById("test").style.width =
-        document.defaultView.getComputedStyle(document.getElementById("source"),
-                                              "").MozColumnGap;
+        document.defaultView.getComputedStyle(document.getElementById("source")).MozColumnGap;
     </script>
   </div>
 </body>
--- a/layout/reftests/bugs/391909-1-ref.html
+++ b/layout/reftests/bugs/391909-1-ref.html
@@ -3,12 +3,12 @@
  <body>
    <div id="source" style="width: 3ch"></div>
    <div id="target" style="width: 0">
     This is a test
    </div>
    <script>
     document.getElementById("target").style.lineHeight =
       document.defaultView
-              .getComputedStyle(document.getElementById("source"), "").width;
+              .getComputedStyle(document.getElementById("source")).width;
    </script>
  </body>
 </html>
--- a/layout/reftests/cssom/computed-style-cross-window-ref.html
+++ b/layout/reftests/cssom/computed-style-cross-window-ref.html
@@ -19,32 +19,32 @@ function run() {
   var pout = document.getElementById("out");
   var poutnone = document.getElementById("outnone");
   var poutdet = document.createElement("p");
   var pin = i.contentDocument.getElementsByTagName("p")[0];
   var pinnone = i.contentDocument.getElementsByTagName("p")[1];
   var pindet = i.contentDocument.createElement("p");
 
   document.getElementById("res1").style.color =
-    window.getComputedStyle(pin, "").color;
+    window.getComputedStyle(pin).color;
 
   document.getElementById("res2").style.color =
-    i.contentWindow.getComputedStyle(pout, "").color;
+    i.contentWindow.getComputedStyle(pout).color;
 
   document.getElementById("res3").style.color =
-    window.getComputedStyle(pinnone, "").color;
+    window.getComputedStyle(pinnone).color;
 
   document.getElementById("res4").style.color =
-    i.contentWindow.getComputedStyle(poutnone, "").color;
+    i.contentWindow.getComputedStyle(poutnone).color;
 
   document.getElementById("res5").style.color =
-    window.getComputedStyle(pindet, "").color;
+    window.getComputedStyle(pindet).color;
 
   document.getElementById("res6").style.color =
-    i.contentWindow.getComputedStyle(poutdet, "").color;
+    i.contentWindow.getComputedStyle(poutdet).color;
 }
 
 </script>
 <body onload="run()">
 
 <p id="out">This is a paragraph outside the iframe.</p>
 <div style="display:none"><p id="outnone">This is a paragraph outside the iframe.</p></div>
 
--- a/layout/reftests/cssom/computed-style-cross-window.html
+++ b/layout/reftests/cssom/computed-style-cross-window.html
@@ -20,32 +20,32 @@ function run() {
   var pout = document.getElementById("out");
   var poutnone = document.getElementById("outnone");
   var poutdet = document.createElement("p");
   var pin = i.contentDocument.getElementsByTagName("p")[0];
   var pinnone = i.contentDocument.getElementsByTagName("p")[1];
   var pindet = i.contentDocument.createElement("p");
 
   document.getElementById("res1").style.color =
-    window.getComputedStyle(pin, "").color;
+    window.getComputedStyle(pin).color;
 
   document.getElementById("res2").style.color =
-    i.contentWindow.getComputedStyle(pout, "").color;
+    i.contentWindow.getComputedStyle(pout).color;
 
   document.getElementById("res3").style.color =
-    window.getComputedStyle(pinnone, "").color;
+    window.getComputedStyle(pinnone).color;
 
   document.getElementById("res4").style.color =
-    i.contentWindow.getComputedStyle(poutnone, "").color;
+    i.contentWindow.getComputedStyle(poutnone).color;
 
   document.getElementById("res5").style.color =
-    window.getComputedStyle(pindet, "").color;
+    window.getComputedStyle(pindet).color;
 
   document.getElementById("res6").style.color =
-    i.contentWindow.getComputedStyle(poutdet, "").color;
+    i.contentWindow.getComputedStyle(poutdet).color;
 
   document.documentElement.removeAttribute("class");
 }
 
 </script>
 <body onload="run()">
 
 <p id="out">This is a paragraph outside the iframe.</p>
--- a/layout/reftests/font-face/download-3-notref.html
+++ b/layout/reftests/font-face/download-3-notref.html
@@ -9,18 +9,18 @@
 	</style>
 </head>
 <body>
 
 <div id="t" style="visibility:hidden; width: -moz-fit-content">ABC</div>
 <script>
   document.body.offsetWidth;
   var n = document.getElementById("t");
-  var w = document.defaultView.getComputedStyle(n, "").width;
-  var h = document.defaultView.getComputedStyle(n, "").height;
+  var w = document.defaultView.getComputedStyle(n).width;
+  var h = document.defaultView.getComputedStyle(n).height;
   var d = document.createElement("div");
   d.style.width = w;
   d.style.height = h;
   d.style.backgroundColor = "green";
   n.parentNode.removeChild(n);
   document.body.appendChild(d);
 </script>
 </body>
--- a/layout/reftests/font-face/download-3-ref.html
+++ b/layout/reftests/font-face/download-3-ref.html
@@ -19,18 +19,18 @@
 
 <div id="t" style="visibility:hidden; width: -moz-fit-content">ABC</div>
 <script>
   // Force a reflow to make sure we start our font download now
   document.body.offsetWidth;
   window.addEventListener("load",
     function() {
       var n = document.getElementById("t");
-      var w = document.defaultView.getComputedStyle(n, "").width;
-      var h = document.defaultView.getComputedStyle(n, "").height;
+      var w = document.defaultView.getComputedStyle(n).width;
+      var h = document.defaultView.getComputedStyle(n).height;
       var d = document.createElement("div");
       d.style.width = w;
       d.style.height = h;
       d.style.backgroundColor = "green";
       n.parentNode.removeChild(n);
       document.body.appendChild(d);
     });
 </script>
--- a/layout/reftests/font-face/download-3.html
+++ b/layout/reftests/font-face/download-3.html
@@ -21,18 +21,18 @@
 <script>
   // Make sure to show our stuff as late as we can, so we only get reflows
   // from onload.  
   window.addEventListener("DOMContentLoaded",
     function() { document.documentElement.style.display = ""; })
   window.addEventListener("load",
     function() {
       var n = document.getElementById("t");
-      var w = document.defaultView.getComputedStyle(n, "").width;
-      var h = document.defaultView.getComputedStyle(n, "").height;
+      var w = document.defaultView.getComputedStyle(n).width;
+      var h = document.defaultView.getComputedStyle(n).height;
       var d = document.createElement("div");
       d.style.width = w;
       d.style.height = h;
       d.style.backgroundColor = "green";
       n.parentNode.removeChild(n);
       document.body.appendChild(d);
     });
 </script>
--- a/layout/reftests/text-overflow/scroll-rounding-ref.html
+++ b/layout/reftests/text-overflow/scroll-rounding-ref.html
@@ -1,9 +1,9 @@
-<!DOCTYPE HTML>
+<!DOCTYPE HTML>
 <!--
     Any copyright is dedicated to the Public Domain.
     http://creativecommons.org/licenses/publicdomain/
 
     Test: 1px scroll rounding at the end position
 -->
 <html class="reftest-wait"><head>
 <title>text-overflow: scroll rounding</title>
--- a/layout/reftests/text-overflow/scroll-rounding.html
+++ b/layout/reftests/text-overflow/scroll-rounding.html
@@ -1,9 +1,9 @@
-<!DOCTYPE HTML>
+<!DOCTYPE HTML>
 <!--
     Any copyright is dedicated to the Public Domain.
     http://creativecommons.org/licenses/publicdomain/
 
     Test: 1px scroll rounding at the end position
 -->
 <html class="reftest-wait"><head>
 <title>text-overflow: scroll rounding</title>
--- a/layout/reftests/text/lineheight-percentage-1.html
+++ b/layout/reftests/text/lineheight-percentage-1.html
@@ -1,6 +1,6 @@
 <!DOCTYPE html>
 <body style="font-size: 50px">
 <p style="line-height: 41%">
 <script>
-document.write(window.getComputedStyle(document.getElementsByTagName("p")[0], "").lineHeight);
+document.write(window.getComputedStyle(document.getElementsByTagName("p")[0]).lineHeight);
 </script>
--- a/layout/reftests/text/text-align-unsafe.html
+++ b/layout/reftests/text/text-align-unsafe.html
@@ -51,18 +51,18 @@
 </div>
 
 <div class=test5>
  <p>Lorem ipsum dolor sit amet.</p>
 </div>
 
 <script>
   var elem = document.querySelector('.test5 p');
-  var a = window.getComputedStyle(elem,null).getPropertyValue("text-align");
+  var a = window.getComputedStyle(elem).getPropertyValue("text-align");
   document.body.appendChild(document.createTextNode(a +"|"));
-  a = window.getComputedStyle(elem,null).getPropertyValue("text-align-last");
+  a = window.getComputedStyle(elem).getPropertyValue("text-align-last");
   document.body.appendChild(document.createTextNode(a));
 
   document.documentElement.removeAttribute('class');
 </script>
 
 </body>
 </html>
--- a/layout/style/crashtests/363950.html
+++ b/layout/style/crashtests/363950.html
@@ -5,16 +5,16 @@
 <body>
 This page should not crash Mozilla
 <script>
 var properties = ['margin-left','margin-right','margin-top','padding-bottom','padding-left','padding-right','padding-top'];
 
 function removestyles(i, j){
 if (j>=properties.length)
    j = 0;
-document.defaultView.getComputedStyle(document.getElementsByTagName('head')[0], null).getPropertyValue(properties[j]);
+document.defaultView.getComputedStyle(document.getElementsByTagName('head')[0]).getPropertyValue(properties[j]);
 j++;
 setTimeout(removestyles,50,j);
 }
 setTimeout(removestyles,500,0,0);
 </script>
 </body>
 </html>
--- a/layout/style/crashtests/368740.html
+++ b/layout/style/crashtests/368740.html
@@ -11,15 +11,15 @@ height: 400px;
 </head>
 <body>
 This page should not crash Mozilla<br>
 <iframe id="content" src="data:text/html;charset=utf-8,%3Chtml%3E%3Chead%3E%3C/head%3E%3Cbody%3E%0A%3Cbutton%3E%3C/button%3E%0A%3C/body%3E%3C/html%3E"></iframe>
 
 <script>
 function getComputedStyles(){
 var x=document.getElementById('content').contentDocument.getElementsByTagName('button')[0];
-var style = document.defaultView.getComputedStyle(x, null).getPropertyValue('border-left-width');
+var style = document.defaultView.getComputedStyle(x).getPropertyValue('border-left-width');
 }
 setTimeout(getComputedStyles,300);
 </script>
 
 </body>
 </html>
\ No newline at end of file
--- a/layout/style/crashtests/448161-2.html
+++ b/layout/style/crashtests/448161-2.html
@@ -1,9 +1,9 @@
 <html>
   <body>
     <script>
       var node = document.createElement("a");
       node.href = "http://www.mozilla.org";
-      document.defaultView.getComputedStyle(node, "").color
+      document.defaultView.getComputedStyle(node).color
     </script>
   </body>
 </html>
--- a/layout/style/crashtests/524252-1.html
+++ b/layout/style/crashtests/524252-1.html
@@ -1,10 +1,10 @@
 <html>
 <head><script>
 function boom()
 {
   var f = document.getElementById("f");
-  window.getComputedStyle(f, null).getPropertyValue("text-decoration");
+  window.getComputedStyle(f).getPropertyValue("text-decoration");
 }
 </script></head>
 <body onload="boom();"><font id="f" color="black">a</font></body>
 </html>
--- a/layout/style/crashtests/580685.html
+++ b/layout/style/crashtests/580685.html
@@ -1,10 +1,10 @@
 <html>
 <head></head>
 <body style="outline-offset: 0.1rem; ">
 <script>
 var body = document.body;
 document.removeChild(document.documentElement);
-var compstyle = window.getComputedStyle(body, null).getPropertyValue('outline-offset');
+var compstyle = window.getComputedStyle(body).getPropertyValue('outline-offset');
 </script>
 </body>
 </html>
\ No newline at end of file
--- a/layout/style/crashtests/822842.html
+++ b/layout/style/crashtests/822842.html
@@ -1,13 +1,13 @@
 <html>
   <head></head>
   <body></body>
   <script type="text/javascript">
-    window.x = window.getComputedStyle(document.documentElement, null).getPropertyCSSValue("transition-timing-function");
-    window.x = window.getComputedStyle(document.documentElement, null).getPropertyCSSValue("color");
+    window.x = window.getComputedStyle(document.documentElement).getPropertyCSSValue("transition-timing-function");
+    window.x = window.getComputedStyle(document.documentElement).getPropertyCSSValue("color");
     x.z = x.getRGBColorValue().blue;
     x.getRGBColor().blue.d = x;
     x= null;
     SpecialPowers.forceGC();
     SpecialPowers.forceCC();
   </script>
 </html>
--- a/layout/style/crashtests/840898.html
+++ b/layout/style/crashtests/840898.html
@@ -1,16 +1,16 @@
 <!DOCTYPE html>
 <html>
 <head>
 <script>
 
 function boom()
 {
-  var styleDeclaration = window.getComputedStyle(document.createElement('div'), null);
+  var styleDeclaration = window.getComputedStyle(document.createElement('div'));
   var cursorValue = styleDeclaration.getPropertyCSSValue('cursor');
   cursorValue.item(1000);
 }
 
 </script>
 </head>
 
 <body onload="boom();"></body>
--- a/layout/style/test/bug453896_iframe.html
+++ b/layout/style/test/bug453896_iframe.html
@@ -8,17 +8,17 @@
   <script type="application/javascript; version=1.7">
 
 function run(test_window)
 {
   var subdoc = document.getElementById("subdoc").contentDocument;
   var subwin = document.getElementById("subdoc").contentWindow;
   var style = subdoc.getElementById("style");
   var iframe_style = document.getElementById("subdoc").style;
-  var body_cs = subdoc.defaultView.getComputedStyle(subdoc.body, "");
+  var body_cs = subdoc.defaultView.getComputedStyle(subdoc.body);
 
   function query_applies(q) {
     style.setAttribute("media", q);
     return body_cs.getPropertyValue("text-decoration") == "underline";
   }
 
   function should_apply(q) {
     test_window.ok(query_applies(q), q + " should apply");
--- a/layout/style/test/chrome/test_bug535806.xul
+++ b/layout/style/test/chrome/test_bug535806.xul
@@ -27,17 +27,17 @@ https://bugzilla.mozilla.org/show_bug.cg
     }, false);
 
   function htmlLoaded() {
     $("f").setAttribute("src", "bug535806-xul.xul");
   }
 
   function xulLoaded() {
     var doc = $("f").contentDocument;
-    is(doc.defaultView.getComputedStyle(doc.getElementById("s"), null).color,
+    is(doc.defaultView.getComputedStyle(doc.getElementById("s")).color,
        "rgb(0, 128, 0)");
     SimpleTest.finish();
   }
 
 
   ]]>
   </script>
 </window>
--- a/layout/style/test/chrome/test_display_mode.html
+++ b/layout/style/test/chrome/test_display_mode.html
@@ -26,17 +26,17 @@ function waitOneEvent(element, name) {
 }
 
 add_task(function* () {
   yield waitOneEvent(window, "load");
 
   var iframe = document.getElementById("subdoc");
   var subdoc = iframe.contentDocument;
   var style = subdoc.getElementById("style");
-  var bodyComputedStyled = subdoc.defaultView.getComputedStyle(subdoc.body, "");
+  var bodyComputedStyled = subdoc.defaultView.getComputedStyle(subdoc.body);
   var win = Services.wm.getMostRecentWindow("navigator:browser");
 
   function queryApplies(q) {
     style.setAttribute("media", q);
     return bodyComputedStyled.getPropertyValue("text-decoration") == "underline";
   }
 
   function shouldApply(q) {
--- a/layout/style/test/chrome/test_display_mode_reflow.html
+++ b/layout/style/test/chrome/test_display_mode_reflow.html
@@ -26,17 +26,17 @@ function waitOneEvent(element, name) {
 }
 
 add_task(function* () {
   yield waitOneEvent(window, "load");
 
   var iframe = document.getElementById("subdoc");
   var subdoc = iframe.contentDocument;
   var style = subdoc.getElementById("style");
-  var bodyComputedStyled = subdoc.defaultView.getComputedStyle(subdoc.body, "");
+  var bodyComputedStyled = subdoc.defaultView.getComputedStyle(subdoc.body);
   var win = Services.wm.getMostRecentWindow("navigator:browser");
 
   var secondDiv = subdoc.getElementById("b");
   var offsetTop = secondDiv.offsetTop;
 
   // Test entering the OS's fullscreen mode.
   var fullScreenEntered = waitOneEvent(win, "sizemodechange");
   synthesizeKey("VK_F11", {});
--- a/layout/style/test/chrome/test_moz_document_rules.html
+++ b/layout/style/test/chrome/test_moz_document_rules.html
@@ -31,17 +31,17 @@ function remove_user_sheet(sheeturi)
     gStyleSheetService.unregisterSheet(uri, gStyleSheetService.USER_SHEET);
 }
 
 function run()
 {
     var iframe = document.getElementById("iframe");
     var subdoc = iframe.contentDocument;
     var subwin = iframe.contentWindow;
-    var cs = subwin.getComputedStyle(subdoc.getElementById("display"), "");
+    var cs = subwin.getComputedStyle(subdoc.getElementById("display"));
     var zIndexCounter = 0;
 
     function test_document_rule(urltests, shouldapply)
     {
         var zIndex = ++zIndexCounter;
         var encodedRule = encodeURI("@-moz-document " + urltests + " { ") +
                           "%23" + // encoded hash character for "#display"
                           encodeURI("display { z-index: " + zIndex + " } }");
--- a/layout/style/test/test_acid3_test46.html
+++ b/layout/style/test/test_acid3_test46.html
@@ -81,17 +81,17 @@ function runTest() {
 	var p = doc.createElement('p');
 	p.id = names[i];
 	doc.body.appendChild(p);
   }
   var count = 0;
   var check = function (c, e) {
 	count += 1;
 	var p = doc.getElementById(c);
-	is(doc.defaultView.getComputedStyle(p, '').textTransform, e ? 'uppercase' : 'none', "case " + c + " failed (index " + count + ")");
+	is(doc.defaultView.getComputedStyle(p).textTransform, e ? 'uppercase' : 'none', "case " + c + " failed (index " + count + ")");
   }
   check('a', true); // 1
   check('b', false);
   check('c', true);
   check('d', false);
   check('e', false);
   check('f', false); // true in old spec; commented out in real Acid3
   check('g', false);
--- a/layout/style/test/test_addSheet.html
+++ b/layout/style/test/test_addSheet.html
@@ -16,17 +16,17 @@
 
 let gIOService = SpecialPowers.Cc["@mozilla.org/network/io-service;1"]
   .getService(SpecialPowers.Ci.nsIIOService);
 
 let gSSService = SpecialPowers.Cc["@mozilla.org/content/style-sheet-service;1"]
   .getService(SpecialPowers.Ci.nsIStyleSheetService);
 
 function test(win, sheet) {
-    let cs = win.getComputedStyle(win.document.body, null);
+    let cs = win.getComputedStyle(win.document.body);
     is(cs.getPropertyValue('color'), "rgb(0, 0, 0)", "should have default color");
     var windowUtils = SpecialPowers.wrap(win)
       .QueryInterface(SpecialPowers.Ci.nsIInterfaceRequestor)
       .getInterface(SpecialPowers.Ci.nsIDOMWindowUtils);
     windowUtils.addSheet(sheet, SpecialPowers.Ci.nsIDOMWindowUtils.USER_SHEET);
     is(cs.getPropertyValue('color'), "rgb(255, 0, 0)", "should have changed color to red");
 }
 
--- a/layout/style/test/test_additional_sheets.html
+++ b/layout/style/test/test_additional_sheets.html
@@ -190,17 +190,17 @@ var author = {
 function loadAndCheck(win, firstType, secondType, swap, result1, result2)
 {
   var firstStyle = getStyle(firstType.color, false);
   var secondStyle = getStyle(secondType.color, swap);
 
   firstType.addRules(win, firstStyle);
   secondType.addRules(win, secondStyle);
 
-  var cs = win.getComputedStyle(win.document.body, null);
+  var cs = win.getComputedStyle(win.document.body);
   is(cs.getPropertyValue('color'), result1,
     firstType.type + "(normal)" + " vs " + secondType.type + (swap ? "(important)" : "(normal)" ) + " 1");
   is(cs.getPropertyValue('background-color'), result2,
     firstType.type + "(important)" + " vs " + secondType.type + (swap ? "(normal)" : "(important)" ) + " 2");
 
   firstType.removeRules(win, firstStyle);
   secondType.removeRules(win, secondStyle);
 
--- a/layout/style/test/test_align_justify_computed_values.html
+++ b/layout/style/test/test_align_justify_computed_values.html
@@ -27,32 +27,32 @@ https://bugzilla.mozilla.org/show_bug.cg
 <pre id="test">
 <script type="application/javascript">
 "use strict";
 
 /*
  * Utility function for getting computed style of "align-self":
  */
 function getComputedAlignSelf(elem) {
-  return window.getComputedStyle(elem, "").alignSelf;
+  return window.getComputedStyle(elem).alignSelf;
 }
 function getComputedAlignItems(elem) {
-  return window.getComputedStyle(elem, "").alignItems;
+  return window.getComputedStyle(elem).alignItems;
 }
 function getComputedAlignContent(elem) {
-  return window.getComputedStyle(elem, "").alignContent;
+  return window.getComputedStyle(elem).alignContent;
 }
 function getComputedJustifySelf(elem) {
-  return window.getComputedStyle(elem, "").justifySelf;
+  return window.getComputedStyle(elem).justifySelf;
 }
 function getComputedJustifyItems(elem) {
-  return window.getComputedStyle(elem, "").justifyItems;
+  return window.getComputedStyle(elem).justifyItems;
 }
 function getComputedJustifyContent(elem) {
-  return window.getComputedStyle(elem, "").justifyContent;
+  return window.getComputedStyle(elem).justifyContent;
 }
 
 /**
  * Test behavior of 'align-self:auto' (Bug 696253 and Bug 1304012)
  * ===============================================
  *
  * In a previous revision of the CSS Alignment spec, align-self:auto
  * was required to actually *compute* to the parent's align-items value --
--- a/layout/style/test/test_bug1292447.html
+++ b/layout/style/test/test_bug1292447.html
@@ -272,17 +272,17 @@ doATest("height", "minmaxheight5-", 320,
 doATest("height", "minmaxheight6-", 320, 0, true);
 doATest("height", "minmaxheight7-", 600, 0, true);
 doATest("height", "minmaxheight8-", 200, 0, true);
 doATest("height", "minmaxheight9-", 200, 0, true);
 doATest("height", "minmaxheight10-", 600, 0, true);
 doATest("height", "minmaxheight11-", 600, 0, true);
 
 function style(id) {
-  return document.defaultView.getComputedStyle($(id), "");
+  return document.defaultView.getComputedStyle($(id));
 }
 
 function round(num, decimals) {
   return Math.round(num * Math.pow(10, decimals)) / Math.pow(10, decimals);
 }
 
 function coordValueTest(camelProp, cssProp, decl, coordVal, prettyName) {
   is(decl[camelProp], coordVal + "px", prettyName);
--- a/layout/style/test/test_bug319381.html
+++ b/layout/style/test/test_bug319381.html
@@ -15,22 +15,22 @@ https://bugzilla.mozilla.org/show_bug.cg
   <div id="t"></div>  
 </div>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
 /** Test for Bug 319381 **/
 
 function c() {
-  return document.defaultView.getComputedStyle($('t'), "").
+  return document.defaultView.getComputedStyle($('t')).
     getPropertyValue("overflow");
 }
 
 function cval() {
-  return document.defaultView.getComputedStyle($('t'), "").
+  return document.defaultView.getComputedStyle($('t')).
     getPropertyCSSValue("overflow");
 }
 
 var vals = ["visible", "hidden", "auto", "scroll"];
 var mozVals = ["-moz-scrollbars-vertical", "-moz-scrollbars-horizontal"];
 var i, j;
 
 for (i = 0; i < vals.length; ++i) {
--- a/layout/style/test/test_bug363146.html
+++ b/layout/style/test/test_bug363146.html
@@ -31,31 +31,31 @@ https://bugzilla.mozilla.org/show_bug.cg
 <p id="display"></p>
 </div>
 <div id="content" style="display: none">
   
 </div>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
-var c = window.getComputedStyle(document.getElementById("t1"), "");
+var c = window.getComputedStyle(document.getElementById("t1"));
 is(c.width, "420px");
 is(c.height, "120px");
 is(c.left, "50px");
 is(c.top, "35px");
 is(c.borderLeftWidth, "10px");
 is(c.borderRightWidth, "10px");
 is(c.borderTopWidth, "10px");
 is(c.borderBottomWidth, "10px");
 is(c.marginLeft, "20px");
 is(c.marginRight, "20px");
 is(c.marginTop, "20px");
 is(c.marginBottom, "20px");
 
-var c2 = window.getComputedStyle(document.getElementById("t2"), "");
+var c2 = window.getComputedStyle(document.getElementById("t2"));
 is(c2.marginLeft, "20px");
 is(c2.marginRight, "20px");
 is(c2.marginTop, "20px");
 is(c2.marginBottom, "20px");
 
 </script>
 </pre>
 </body>
--- a/layout/style/test/test_bug379440.html
+++ b/layout/style/test/test_bug379440.html
@@ -48,17 +48,17 @@ https://bugzilla.mozilla.org/show_bug.cg
   
 </div>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
 /** Test for Bug 379440 **/
 
 function cur(id) {
-  return document.defaultView.getComputedStyle($(id), "").cursor;
+  return document.defaultView.getComputedStyle($(id)).cursor;
 }
 
 is(cur("t1"), 'url("file:///tmp/foo"), url("file:///c:/"), ' +
               'url("http://example.com/"), crosshair',
               "Serialize unloadable URLs using their specified value");
 is(cur("t2"), 'url("file:///tmp/foo"), url("file:///c:/"), crosshair',
               "Serialize unloadable URLs using their specified value");
 is(cur("t3"), 'url("http://example.com/"), crosshair', "URI + fallback");
--- a/layout/style/test/test_bug391034.html
+++ b/layout/style/test/test_bug391034.html
@@ -20,17 +20,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 <div id="content" style="display: none">
   <div id="four" style="position: relative; left: 10%; bottom: 20%"></div>  
 </div>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
 /** Test for Bug 391034 **/
 function getComp(id) {
- return document.defaultView.getComputedStyle($(id), "");
+ return document.defaultView.getComputedStyle($(id));
 }
 
 is(getComp("one").top, "-" + getComp("width-ref2").width,
    "Incorrect computed top offset if specified in ch")
 is(getComp("one").right, "-" + getComp("width-ref").width,
    "Incorrect computed right offset if specified in ch")
 is(getComp("one").bottom, getComp("width-ref2").width,
    "Incorrect computed bottom offset if specified in ch")
--- a/layout/style/test/test_bug391221.html
+++ b/layout/style/test/test_bug391221.html
@@ -20,17 +20,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 <div id="three" style="width: 1000ch; max-width: 2px"></div>
   
 </div>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
 /** Test for Bug 391221 **/
 function getComp(id) {
- return document.defaultView.getComputedStyle($(id), "");
+ return document.defaultView.getComputedStyle($(id));
 }
 
 is(getComp("one").width, getComp("width-ref").width,
    "max-width in ch units not working?");
 
 is(getComp("two").width, getComp("width-ref").width,
    "min-width in ch units not working?");
 
--- a/layout/style/test/test_bug397427.html
+++ b/layout/style/test/test_bug397427.html
@@ -32,29 +32,29 @@ https://bugzilla.mozilla.org/show_bug.cg
 /** Test for Bug 397427 **/
 SimpleTest.waitForExplicitFinish();
 
 addLoadEvent(function() {
   is($("a").sheet.href, null, "href should be null");
   is(typeof($("a").sheet.href), "object", "should be actual null");
 
   // Make sure the redirected sheets are loaded and have the right base URI
-  is(document.defaultView.getComputedStyle($("one"), "").color,
+  is(document.defaultView.getComputedStyle($("one")).color,
      "rgb(0, 128, 0)", "Redirect 1 did not work");
-  is(document.defaultView.getComputedStyle($("one"), "").backgroundImage,
+  is(document.defaultView.getComputedStyle($("one")).backgroundImage,
      "url(\"http://example.org/tests/layout/style/test/post-redirect-1.css#\")",
       "Redirect 1 did not get right base URI");
-  is(document.defaultView.getComputedStyle($("two"), "").color,
+  is(document.defaultView.getComputedStyle($("two")).color,
      "rgb(0, 128, 0)", "Redirect 2 did not work");
-  is(document.defaultView.getComputedStyle($("two"), "").backgroundImage,
+  is(document.defaultView.getComputedStyle($("two")).backgroundImage,
      "url(\"http://example.org/tests/layout/style/test/post-redirect-2.css#\")",
       "Redirect 2 did not get right base URI");
-  is(document.defaultView.getComputedStyle($("three"), "").color,
+  is(document.defaultView.getComputedStyle($("three")).color,
      "rgb(0, 128, 0)", "Redirect 3 did not work");
-  is(document.defaultView.getComputedStyle($("three"), "").backgroundImage,
+  is(document.defaultView.getComputedStyle($("three")).backgroundImage,
      "url(\"http://example.org/tests/layout/style/test/post-redirect-3.css#\")",
       "Redirect 3 did not get right base URI");
 
   var ruleList = $("a").sheet.cssRules;
 
   var redirHrefBase =
     window.location.href.replace(/test_bug397427.html$/,
       "redirect.sjs?http://example.org/tests/layout/style/test/post-");
--- a/layout/style/test/test_bug399349.html
+++ b/layout/style/test/test_bug399349.html
@@ -31,47 +31,47 @@ https://bugzilla.mozilla.org/show_bug.cg
                        position:relative;"></div>
 
 <div id="content" style="display: none">
   
 </div>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
-var a1 = window.getComputedStyle(document.getElementById("Aone"), "");
+var a1 = window.getComputedStyle(document.getElementById("Aone"));
 is(a1.width, "100px");
 is(a1.height, "400px");
 is(a1.top, "-100px");
 is(a1.left, "-200px");
 
-var a2 = window.getComputedStyle(document.getElementById("Atwo"), "");
+var a2 = window.getComputedStyle(document.getElementById("Atwo"));
 is(a2.width, "150.2px");
 is(a2.height, "450.25px");
 is(a2.top, "-150.2px");
 is(a2.left, "-450.25px");
 
-var a3 = window.getComputedStyle(document.getElementById("Athree"), "");
+var a3 = window.getComputedStyle(document.getElementById("Athree"));
 is(a3.width, "0.1px");
 is(a3.height, "0.3px");
 is(a3.top, "-0.1px");
 is(a3.left, "-0.3px");
 
-var a4 = window.getComputedStyle(document.getElementById("Afour"), "");
+var a4 = window.getComputedStyle(document.getElementById("Afour"));
 is(a4.width, "100.017px");
 is(a4.height, "400.017px");
 is(a4.top, "-0.116667px");
 is(a4.left, "-0.216667px");
 
-var a5 = window.getComputedStyle(document.getElementById("Afive"), "");
+var a5 = window.getComputedStyle(document.getElementById("Afive"));
 is(a5.width, "2345px");
 is(a5.height, "456px");
 is(a5.top, "-2123px");
 is(a5.left, "-6544px");
 
-var a6 = window.getComputedStyle(document.getElementById("Asix"), "");
+var a6 = window.getComputedStyle(document.getElementById("Asix"));
 is(a6.width, "12px");
 is(a6.height, "37.45px");
 is(a6.top, "-23px");
 is(a6.left, "-44.45px");
 
 </script>
 
 </script>
--- a/layout/style/test/test_bug412901.html
+++ b/layout/style/test/test_bug412901.html
@@ -18,25 +18,25 @@ https://bugzilla.mozilla.org/show_bug.cg
   
 </div>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
 /** Test for Bug 412901 **/
 
 var div = document.getElementById("testDiv");
-var computedStyle = document.defaultView.getComputedStyle(div, "");
+var computedStyle = document.defaultView.getComputedStyle(div);
 // we never round down to 0px, very small widths are rounded up to 1px
 is(computedStyle.borderLeftWidth, "1px");
 is(computedStyle.borderRightWidth, "0px");
 is(computedStyle.borderTopWidth, "2px");
 is(computedStyle.borderBottomWidth, "5px");
 
 var div2 = document.getElementById("testDiv2");
-var computedStyle2 = document.defaultView.getComputedStyle(div2, "");
+var computedStyle2 = document.defaultView.getComputedStyle(div2);
 is(computedStyle2.borderLeftWidth, "0px");
 is(computedStyle2.borderRightWidth, "0px");
 is(computedStyle2.borderTopWidth, "0px");
 is(computedStyle2.borderBottomWidth, "0px");
 </script>
 </pre>
 </body>
 </html>
--- a/layout/style/test/test_bug413958.html
+++ b/layout/style/test/test_bug413958.html
@@ -57,17 +57,17 @@ var results = [
       sourceLine: "200" } ],
 ];
 var curTest = -1;
 
 function doTest() {
   if (++curTest == tests.length) {
     var ss = document.getElementsByTagName("span");
     for (var i = 0; i < ss.length; i++) {
-      is(window.getComputedStyle(ss[i], "").color, "rgb(0, 0, 0)",
+      is(window.getComputedStyle(ss[i]).color, "rgb(0, 0, 0)",
          "recovery | " + ss[i].id);
     }
     SimpleTest.finish();
   } else {
     SimpleTest.expectConsoleMessages(tests[curTest], results[curTest], doTest);
   }
 }
 
--- a/layout/style/test/test_bug437915.html
+++ b/layout/style/test/test_bug437915.html
@@ -21,17 +21,17 @@ https://bugzilla.mozilla.org/show_bug.cg
   
 </div>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
 /** Test for Bug 437915 **/
 
 var div = document.getElementById("content");
-var cs = document.defaultView.getComputedStyle(div, "");
+var cs = document.defaultView.getComputedStyle(div);
 
 var chars = {
   0x09: true, // tab
   0x0a: true, // newline
   0x0b: false, // vertical tab (MAY CHANGE IN FUTURE!)
   0x0c: true, // form feed
   0x0d: true, // carriage return
   0x0e: false,
--- a/layout/style/test/test_bug450191.html
+++ b/layout/style/test/test_bug450191.html
@@ -21,21 +21,21 @@ SimpleTest.waitForExplicitFinish();
 function run() {
   var iframe = document.getElementById("display");
   var subdoc = iframe.contentDocument;
   var subwin = iframe.contentWindow;
 
   var doctext = "<div style='font-size: 2em'>div text <table><tr><td id='t'>table text</td></tr></table></div>";
 
   function subdoc_body_font() {
-    return subwin.getComputedStyle(subdoc.body, "").fontSize;
+    return subwin.getComputedStyle(subdoc.body).fontSize;
   }
 
   function subdoc_cell_font() {
-    return subwin.getComputedStyle(subdoc.getElementById("t"), "").fontSize;
+    return subwin.getComputedStyle(subdoc.getElementById("t")).fontSize;
   }
 
   subdoc.open();
   subdoc.write(doctext);
   subdoc.close();
 
   is(subdoc_cell_font(), subdoc_body_font(),
         "Quirks style sheet should be applied.");
--- a/layout/style/test/test_bug470769.html
+++ b/layout/style/test/test_bug470769.html
@@ -17,15 +17,15 @@ https://bugzilla.mozilla.org/show_bug.cg
 <pre id="test">
 <script type="application/javascript">
 
 /** Test for Bug 470769 **/
 
 var e = document.getElementById("display");
 e.setAttribute("style", "z-index: 2147483647"); // maximum signed 32-bit
 is(e.style.zIndex, "2147483647", "element.style should roundtrip correctly");
-is(window.getComputedStyle(e, "").zIndex, "2147483647",
+is(window.getComputedStyle(e).zIndex, "2147483647",
    "getComputedStyle should roundtrip correctly");
 
 </script>
 </pre>
 </body>
 </html>
--- a/layout/style/test/test_bug580685.html
+++ b/layout/style/test/test_bug580685.html
@@ -21,18 +21,18 @@ https://bugzilla.mozilla.org/show_bug.cg
 <script type="application/javascript">
 
 /** Test for Bug 580685 **/
 SimpleTest.waitForExplicitFinish()
 addLoadEvent(function() {
   var doc = $("f").contentDocument;
   var b = doc.body;
   doc.removeChild(doc.documentElement);
-  is(doc.defaultView.getComputedStyle(b, "").outlineOffset,
-     doc.defaultView.getComputedStyle(b, "").fontSize,
+  is(doc.defaultView.getComputedStyle(b).outlineOffset,
+     doc.defaultView.getComputedStyle(b).fontSize,
      "1rem did not compute correctly");
   SimpleTest.finish();
 });
 
 
 
 
 </script>
--- a/layout/style/test/test_bug635286.html
+++ b/layout/style/test/test_bug635286.html
@@ -29,17 +29,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 
 window.addEventListener("load", function() {
   var cases = Array.slice(document.getElementsByTagName("div"));
   cases.forEach(function(aCase, aIndex) {
     aCase.className = "after";
   });
   window.setTimeout(function() {
     cases.forEach(function(aCase, aIndex) {
-      is(window.getComputedStyle(aCase, null)
+      is(window.getComputedStyle(aCase)
            .getPropertyValue("background-color"),
          "transparent",
          aCase.textContent);
     });
     SimpleTest.finish();
   }, 1);
 });
 
--- a/layout/style/test/test_bug652486.html
+++ b/layout/style/test/test_bug652486.html
@@ -18,17 +18,17 @@ https://bugzilla.mozilla.org/show_bug.cg
   <div id="t"></div>  
 </div>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
 /** Test for Bug 652486 and Bug 1039488 **/
 
 function c() {
-  return document.defaultView.getComputedStyle($('t'), "").
+  return document.defaultView.getComputedStyle($('t')).
            getPropertyValue("text-decoration");
 }
 
 var tests = [
   // When only text-decoration was specified, text-decoration should look like
   // a longhand property.
   { decoration: "none",
     line: null, color: null, style: null,
@@ -148,17 +148,17 @@ function makeDeclaration(aTest)
 }
 
 function clearStyleObject()
 {
   $('t').style.textDecoration = null;
 }
 
 function testCSSValue(testname, test, dec) {
-  var val = document.defaultView.getComputedStyle($('t'), "").
+  var val = document.defaultView.getComputedStyle($('t')).
               getPropertyCSSValue("text-decoration");
   isnot(val, null, testname + " (CSS value): " + dec);
 
   if (typeof test.expectedCSSValue == "string") {
     is(val.getStringValue(), test.expectedCSSValue, testname + " (CSS value): " + dec);
     return;
   }
 
--- a/layout/style/test/test_bug664955.html
+++ b/layout/style/test/test_bug664955.html
@@ -18,19 +18,19 @@ https://bugzilla.mozilla.org/show_bug.cg
 </span>
 </p>
 <div id="content" style="display: none">
 
 </div>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 /** Test for Bug 664955 **/
-var parentSize = document.defaultView.getComputedStyle($('display'), "").fontSize;
-var largerSize = document.defaultView.getComputedStyle($('larger'), "").fontSize;
-var largerAgainSize = document.defaultView.getComputedStyle($('larger-again'), "").fontSize;
+var parentSize = document.defaultView.getComputedStyle($('display')).fontSize;
+var largerSize = document.defaultView.getComputedStyle($('larger')).fontSize;
+var largerAgainSize = document.defaultView.getComputedStyle($('larger-again')).fontSize;
 
 is(parentSize, largerSize, "font size is larger than max font size");
 is(parentSize, largerAgainSize, "font size is larger than max font size");
 
 </script>
 </pre>
 </body>
 </html>
--- a/layout/style/test/test_bug74880.html
+++ b/layout/style/test/test_bug74880.html
@@ -53,17 +53,17 @@ function values_for(set) {
     values = gColorValues;
   else
     values = gLengthValues;
   return values;
 }
 
 var e = document.getElementById("display");
 var s = e.style;
-var c = window.getComputedStyle(e, "");
+var c = window.getComputedStyle(e);
 
 for (var set of gProps) {
   var values = values_for(set);
   for (var val of values) {
     function check(dir, plogical, pvisual) {
       var v0 = c.getPropertyValue(pvisual);
       s.setProperty("direction", dir, "");
       s.setProperty(pvisual, val, "");
--- a/layout/style/test/test_cascade.html
+++ b/layout/style/test/test_cascade.html
@@ -21,17 +21,17 @@
 /** Test for Author style sheet aspects of CSS cascading **/
 
 var style_element = document.createElement("style");
 var style_contents = document.createTextNode("");
 style_element.appendChild(style_contents);
 document.getElementsByTagName("head")[0].appendChild(style_element);
 
 var div = document.getElementById("content");
-var cs = window.getComputedStyle(div, "");
+var cs = window.getComputedStyle(div);
 var zindex = 0;
 
 /**
  * Given the selectors |sel1| and |sel2|, in that order (the "order"
  * aspect of the cascade), with declarations that are !important if
  * |imp1|/|imp2| are true, assert that the one that wins in the
  * cascading order is given by |winning| (which must be either 1 or 2).
  */
--- a/layout/style/test/test_computed_style_min_size_auto.html
+++ b/layout/style/test/test_computed_style_min_size_auto.html
@@ -69,20 +69,20 @@ function setElemMinSizesToAuto(aElemId) 
 
 // Given an element ID, this function compares the corresponding element's
 // computed min-width and min-height against expected values.
 function checkElemMinSizes(aElemId,
                            aExpectedMinWidth,
                            aExpectedMinHeight)
 {
   var elem = document.getElementById(aElemId);
-  is(window.getComputedStyle(elem, "").minWidth,  aExpectedMinWidth,
+  is(window.getComputedStyle(elem).minWidth,  aExpectedMinWidth,
      "checking min-width of " + aElemId);
 
-  is(window.getComputedStyle(elem, "").minHeight, aExpectedMinHeight,
+  is(window.getComputedStyle(elem).minHeight, aExpectedMinHeight,
      "checking min-height of " + aElemId);
 }
 
 // This function goes through all the elements we're interested in
 // and checks their computed min-sizes against expected values,
 // farming out each per-element job to checkElemMinSizes.
 function checkAllTheMinSizes() {
   // This is the normal part -- generally, the default value of "min-width"
--- a/layout/style/test/test_condition_text_assignment.html
+++ b/layout/style/test/test_condition_text_assignment.html
@@ -25,17 +25,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 
 /** Test for Bug 815021 **/
 
 var sheet = document.getElementById("style").sheet;
 var rule = sheet.cssRules[1];
 var a = document.getElementById("a");
 
 function stylesApplied() {
-  return window.getComputedStyle(a, "").textTransform == "lowercase";
+  return window.getComputedStyle(a).textTransform == "lowercase";
 }
 
 is(rule.type, CSSRule.MEDIA_RULE, "initial @media rule type");
 is(rule.conditionText, "all", "initial @media rule conditionText");
 ok(stylesApplied(), "initial @media rule applied");
 
 // [value to set, value to check, whether styles should be applied]
 var media = [
--- a/layout/style/test/test_css_cross_domain.html
+++ b/layout/style/test/test_css_cross_domain.html
@@ -76,17 +76,17 @@
 
 <script type="application/javascript">
 
 /** Test for Bug 524223 **/
 function check_iframe(ifr) {
     var doc = ifr.contentDocument;
     var cases = doc.getElementsByTagName("p");
     for (var i = 0; i < cases.length; i++) {
-	var color = doc.defaultView.getComputedStyle(cases[i], "")
+	var color = doc.defaultView.getComputedStyle(cases[i])
 	    .getPropertyValue("background-color");
 
 	is(color, "rgb(0, 255, 0)", ifr.id + " " + cases[i].id);
     }
 }
 
 SimpleTest.waitForExplicitFinish();
 window.onload = function() {
--- a/layout/style/test/test_flexbox_child_display_values.xhtml
+++ b/layout/style/test/test_flexbox_child_display_values.xhtml
@@ -30,17 +30,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 
 /*
  * Utility function for getting computed style of "display".
  *
  * @arg aElem The element to query for its computed "display" value.
  * @return    The computed display value
  */
 function getComputedDisplay(aElem) {
-  return window.getComputedStyle(aElem, "").display;
+  return window.getComputedStyle(aElem).display;
 }
 
 /*
  * Function used for testing a given specified "display" value and checking
  * its computed value against expectations.
  *
  * @arg aSpecifiedDisplay
  *        The specified value of "display" that we should test.
--- a/layout/style/test/test_flexbox_flex_shorthand.html
+++ b/layout/style/test/test_flexbox_flex_shorthand.html
@@ -253,17 +253,17 @@ function runFlexShorthandTest(aFlexShort
   content.appendChild(elem);
 
   gFlexPropInfo.subproperties.forEach(function(aSubPropName) {
     var expectedVal = aSubPropName in aFlexShorthandTestcase ?
      aFlexShorthandTestcase[aSubPropName] :
      gFlexShorthandDefaults[aSubPropName];
 
     // Compare computed value against expected computed value (from testcase)
-    is(window.getComputedStyle(elem, null).getPropertyValue(aSubPropName),
+    is(window.getComputedStyle(elem).getPropertyValue(aSubPropName),
        expectedVal,
        "Computed value of subproperty \"" + aSubPropName + "\" when we set \"" +
        gFlexPropName + ": " + aFlexShorthandTestcase[gFlexPropName] + "\"");
   });
 
   // Clean up
   content.removeChild(elem);
 }
--- a/layout/style/test/test_flexbox_layout.html
+++ b/layout/style/test/test_flexbox_layout.html
@@ -29,17 +29,17 @@ https://bugzilla.mozilla.org/show_bug.cg
  * by creating a flex container, inserting some flexible children, and then
  * verifying that the computed width of those children is what we expect.
  *
  * See flexbox_layout_testcases.js for the actual testcases & testcase format.
  */
 
 function getComputedStyleWrapper(elem, prop)
 {
-  return window.getComputedStyle(elem, null).getPropertyValue(prop);
+  return window.getComputedStyle(elem).getPropertyValue(prop);
 }
 
 function setPossiblyAliasedProperty(aElem, aPropertyName, aPropertyValue,
                                     aPropertyMapping)
 {
   let actualPropertyName = (aPropertyName in aPropertyMapping ?
                             aPropertyMapping[aPropertyName] : aPropertyName);
 
--- a/layout/style/test/test_initial_computation.html
+++ b/layout/style/test/test_initial_computation.html
@@ -58,17 +58,17 @@ var gInitialValuesF;
 var gInitialPrereqsRuleN;
 var gInitialPrereqsRuleF;
 
 var gTestUnset = SpecialPowers.getBoolPref("layout.css.unset-value.enabled");
 
 function setup_initial_values(id, ivalprop, prereqprop) {
   var iframe = document.getElementById(id);
   window[ivalprop] = iframe.contentWindow.getComputedStyle(
-                       iframe.contentDocument.documentElement.firstChild, "");
+                       iframe.contentDocument.documentElement.firstChild);
   var sheet = iframe.contentDocument.styleSheets[0];
   // For 'width', 'height', etc., need a constant size container.
   sheet.insertRule(":root { height: 200px; width: 500px }", sheet.cssRules.length);
 
   window[prereqprop] = sheet.cssRules[sheet.insertRule(":root > * {}", sheet.cssRules.length)];
 }
 
 function test_property(property)
--- a/layout/style/test/test_media_queries.html
+++ b/layout/style/test/test_media_queries.html
@@ -31,17 +31,17 @@ function getScreenPixelsPerCSSPixel() {
 }
 
 function run() {
   iframe = document.getElementById("subdoc");
   var subdoc = iframe.contentDocument;
   var subwin = iframe.contentWindow;
   var style = subdoc.getElementById("style");
   var iframe_style = iframe.style;
-  var body_cs = subdoc.defaultView.getComputedStyle(subdoc.body, "");
+  var body_cs = subdoc.defaultView.getComputedStyle(subdoc.body);
 
   function query_applies(q) {
     style.setAttribute("media", q);
     return body_cs.getPropertyValue("text-decoration") == "underline";
   }
 
   function should_apply(q) {
     ok(query_applies(q), q + " should apply");
@@ -166,17 +166,17 @@ function run() {
       clonedsheet.insertRule("#nonexistent { color: purple}", 1);
       // remove the uncloned sheet
       links[0].parentNode.removeChild(links[0]);
 
       var ser3 = clonedsheet.cssRules[0].media.mediaText;
       is(ser3, ser1, "cloning query '" + q + "' should not change " +
                      "serialization");
       if (test_application) {
-        var applies = clonewin.getComputedStyle(clonedoc.body, "").
+        var applies = clonewin.getComputedStyle(clonedoc.body).
                         textDecoration == "underline";
         is(applies, should_apply,
            "Media query '" + q + "' should " + (should_apply ? "" : "NOT ") +
            "apply after cloning");
       }
     });
   }
 
--- a/layout/style/test/test_media_queries_dynamic.html
+++ b/layout/style/test/test_media_queries_dynamic.html
@@ -35,17 +35,17 @@ function run() {
   // query_applies to see if that query currently applies.
   var n = 0;
   function make_query(q) {
     var i = ++n;
     sheet.insertRule("@media " + q + " { #e" + i + " { text-decoration: underline; } }", sheet.cssRules.length);
     var e = subdoc.createElement("div");
     e.id = "e" + i;
     subdoc.body.appendChild(e);
-    var cs = subdoc.defaultView.getComputedStyle(e, "");
+    var cs = subdoc.defaultView.getComputedStyle(e);
     cs._originalQueryText = q;
     return cs;
   }
   function query_applies(cs) {
     return cs.getPropertyValue("text-decoration") == "underline";
   }
 
   function should_apply(cs) {
--- a/layout/style/test/test_media_queries_dynamic_xbl.html
+++ b/layout/style/test/test_media_queries_dynamic_xbl.html
@@ -19,20 +19,20 @@ https://bugzilla.mozilla.org/show_bug.cg
 function run() {
   var iframe = document.getElementById("display");
 
   var subdoc = iframe.contentDocument;
   var subwin = iframe.contentWindow;
   var p = subdoc.getElementById("para");
 
   iframe.setAttribute("style", "height: 300px; width: 100px");
-  is(subwin.getComputedStyle(p, "").color, "rgb(128, 0, 128)",
+  is(subwin.getComputedStyle(p).color, "rgb(128, 0, 128)",
      "should be purple when portait");
   iframe.setAttribute("style", "height: 100px; width: 300px");
-  is(subwin.getComputedStyle(p, "").color, "rgb(0, 0, 255)",
+  is(subwin.getComputedStyle(p).color, "rgb(0, 0, 255)",
      "should be blue when landscape");
   SimpleTest.finish();
 }
 SimpleTest.waitForExplicitFinish();
 
 </script>
 </pre>
 </body>
--- a/layout/style/test/test_moz_device_pixel_ratio.html
+++ b/layout/style/test/test_moz_device_pixel_ratio.html
@@ -30,17 +30,17 @@ SimpleTest.waitForExplicitFinish();
 function run() {
   function zoom(factor) {
     var previous = SpecialPowers.getFullZoom(window);
     SpecialPowers.setFullZoom(window, factor);
     return previous;
   }
 
   function isVisible(divName) {
-    return window.getComputedStyle(document.getElementById(divName), null).visibility == "visible";
+    return window.getComputedStyle(document.getElementById(divName)).visibility == "visible";
   }
 
   function getScreenPixelsPerCSSPixel() {
     return SpecialPowers.DOMWindowUtils.screenPixelsPerCSSPixel;
   }
 
   var screenPixelsPerCSSPixel = getScreenPixelsPerCSSPixel();
   var baseRatio = 1.0 * screenPixelsPerCSSPixel;
--- a/layout/style/test/test_namespace_rule.html
+++ b/layout/style/test/test_namespace_rule.html
@@ -58,43 +58,43 @@ function run() {
         var should_match = match_fn(ifdoc);
         var should_not_match = notmatch_fn(ifdoc);
         if (should_match.length + should_not_match.length == 0) {
             ok(false, "nothing to check");
         }
 
         for (var i = 0; i < should_match.length; ++i) {
             var e = should_match[i];
-            is(ifwin.getComputedStyle(e, "").zIndex, String(zi),
+            is(ifwin.getComputedStyle(e).zIndex, String(zi),
                "element in " + body_contents + " matched " + selector);
         }
         for (var i = 0; i < should_not_match.length; ++i) {
             var e = should_not_match[i];
-            is(ifwin.getComputedStyle(e, "").zIndex, "auto",
+            is(ifwin.getComputedStyle(e).zIndex, "auto",
                "element in " + body_contents + " did not match " + selector);
         }
 
         // Now, since we're here, may as well make sure serialization
         // works correctly.  It need not produce the exact same text,
         // but it should produce a selector that matches the same
         // elements.
         zi = ++gCounter;
         var ruleList = style_text.parentNode.sheet.cssRules;
         var ser1 = ruleList[ruleList.length-1].selectorText;
         style_text.data =
           namespaceRules + " " + ser1 + "{ z-index: " + zi + " }";
         for (var i = 0; i < should_match.length; ++i) {
             var e = should_match[i];
-            is(ifwin.getComputedStyle(e, "").zIndex, String(zi),
+            is(ifwin.getComputedStyle(e).zIndex, String(zi),
                "element in " + body_contents + " matched " + ser1 +
                " which is the reserialization of " + selector);
         }
         for (var i = 0; i < should_not_match.length; ++i) {
             var e = should_not_match[i];
-            is(ifwin.getComputedStyle(e, "").zIndex, "auto",
+            is(ifwin.getComputedStyle(e).zIndex, "auto",
                "element in " + body_contents + " did not match " + ser1 +
                " which is the reserialization of " + selector);
         }
 
         // But when we serialize the serialized result, we should get
         // the same text.
         var ser2 = ruleList[ruleList.length-1].selectorText;
         is(ser2, ser1, "parse+serialize of selector \"" + selector +
--- a/layout/style/test/test_parse_eof.html
+++ b/layout/style/test/test_parse_eof.html
@@ -45,25 +45,25 @@ var c_ref = document.getElementById("c-r
 var d_ref = document.getElementById("d-ref");
 
 test(function() {
   assert_equals(window.getComputedStyle(a, ":before").content,
                 window.getComputedStyle(a_ref, ":before").content);
 }, "test backslash before EOF inside a string");
 
 test(function() {
-  assert_equals(window.getComputedStyle(b, "").backgroundImage,
-                window.getComputedStyle(b_ref, "").backgroundImage);
+  assert_equals(window.getComputedStyle(b).backgroundImage,
+                window.getComputedStyle(b_ref).backgroundImage);
 }, "test backslash before EOF inside a url(\"\")");
 
 test(function() {
-  assert_equals(window.getComputedStyle(c, "").backgroundImage,
-                window.getComputedStyle(c_ref, "").backgroundImage);
+  assert_equals(window.getComputedStyle(c).backgroundImage,
+                window.getComputedStyle(c_ref).backgroundImage);
 }, "test backslash before EOF inside a url()");
 
 test(function() {
-  assert_equals(window.getComputedStyle(d, "").counterReset,
-                window.getComputedStyle(d_ref, "").counterReset);
+  assert_equals(window.getComputedStyle(d).counterReset,
+                window.getComputedStyle(d_ref).counterReset);
 }, "test backslash before EOF outside a string");
 </script>
 
 </body>
 </html>
--- a/layout/style/test/test_position_float_display.html
+++ b/layout/style/test/test_position_float_display.html
@@ -61,32 +61,32 @@ var mapping = {
   // Note: this is sometimes block
   "list-item": "list-item"
 };
 
 function test_display_value(val)
 {
   var floatLeftElem = document.getElementById("float-left");
   floatLeftElem.style.display = val;
-  var floatLeftConversion = window.getComputedStyle(floatLeftElem, null).display;
+  var floatLeftConversion = window.getComputedStyle(floatLeftElem).display;
   floatLeftElem.style.display = "";
 
   var floatRightElem = document.getElementById("float-right");
   floatRightElem.style.display = val;
-  var floatRightConversion = window.getComputedStyle(floatRightElem, null).display;
+  var floatRightConversion = window.getComputedStyle(floatRightElem).display;
   floatRightElem.style.display = "";
 
   var posAbsoluteElem = document.getElementById("position-absolute");
   posAbsoluteElem.style.display = val;
-  var posAbsoluteConversion = window.getComputedStyle(posAbsoluteElem, null).display;
+  var posAbsoluteConversion = window.getComputedStyle(posAbsoluteElem).display;
   posAbsoluteElem.style.display = "";
 
   var posFixedElem = document.getElementById("position-fixed");
   posFixedElem.style.display = val;
-  var posFixedConversion = window.getComputedStyle(posFixedElem, null).display;
+  var posFixedConversion = window.getComputedStyle(posFixedElem).display;
   posFixedElem.style.display = "";
 
   if (mapping[val]) {
     is(floatLeftConversion, mapping[val], 
         "Element display should be converted when floated left");
     is(floatRightConversion, mapping[val],
         "Element display should be converted when floated right");
     is(posAbsoluteConversion, mapping[val],
--- a/layout/style/test/test_root_node_display.html
+++ b/layout/style/test/test_root_node_display.html
@@ -21,23 +21,23 @@ https://bugzilla.mozilla.org/show_bug.cg
 
 /** Test for Bug 969460: Test that "display" on the root node is computed
     using the same conversion that we use for display on floated elements **/
 
 function test_display_value(val)
 {
   var floatElem = document.getElementById("float");
   floatElem.style.display = val;
-  var floatConversion = window.getComputedStyle(floatElem, null).display;
+  var floatConversion = window.getComputedStyle(floatElem).display;
   floatElem.style.display = "";
 
   var rootNode = document.documentElement;
   rootNode.style.display = val;
   rootNode.offsetHeight; // (Flush layout, to be sure layout can handle 'val')
-  var rootConversion = window.getComputedStyle(rootNode, null).display;
+  var rootConversion = window.getComputedStyle(rootNode).display;
   rootNode.style.display = "";
 
   // Special case: "display:list-item" does not get modified by 'float',
   // but the spec allows us to convert it to 'block' on the root node
   // (and we do convert it, so that we don't have to support documents whose
   // root node is a list-item).
   if (val == "list-item") {
     is(floatConversion, val, "'float' shouldn't affect 'display:list-item'");
--- a/layout/style/test/test_rule_insertion.html
+++ b/layout/style/test/test_rule_insertion.html
@@ -73,28 +73,28 @@ var outerRuleInfo = [
   ["@supports", "(color: green)", "(unknown: unknown)"]
 ];
 
 // [rule, function to test whether the rule was successfully inserted and applied]
 var innerRuleInfo = [
   ["#test { text-decoration: underline; }",
    function(aApplied, aParent, aException) {
      return !aException &&
-            window.getComputedStyle(test, "").textDecoration ==
+            window.getComputedStyle(test).textDecoration ==
                (aApplied ? "underline" : "none");
    }],
   ["@page { margin: 4cm; }",
    function(aApplied, aParent, aException) {
      // just test whether it threw
      return !aException;
    }],
   ["@keyframes test { from { font-size: 100px; } to { font-size: 100px; } }",
    function(aApplied, aParent, aException) {
      return !aException &&
-            window.getComputedStyle(test, "").fontSize ==
+            window.getComputedStyle(test).fontSize ==
                 (aApplied ? "100px" : "16px")
    }],
   ["@font-face { font-family: UnlikelyFontName; src: " +
      MONOSPACE_FONTS.map(function(s) { return "local('" + s + "')" }).join(", ") + "; }",
    function(aApplied, aParent, aException) {
      var width = testFont.getBoundingClientRect().width;
      if (aException) {
        return false;
--- a/layout/style/test/test_selectors.html
+++ b/layout/style/test/test_selectors.html
@@ -70,41 +70,41 @@ function run() {
         var should_match = match_fn(ifdoc);
         var should_not_match = notmatch_fn(ifdoc);
         if (should_match.length + should_not_match.length == 0) {
             ok(false, "nothing to check");
         }
 
         for (var i = 0; i < should_match.length; ++i) {
             var e = should_match[i];
-            is(ifwin.getComputedStyle(e, "").zIndex, String(zi),
+            is(ifwin.getComputedStyle(e).zIndex, String(zi),
                "element in " + body_contents + " matched " + selector);
         }
         for (var i = 0; i < should_not_match.length; ++i) {
             var e = should_not_match[i];
-            is(ifwin.getComputedStyle(e, "").zIndex, "auto",
+            is(ifwin.getComputedStyle(e).zIndex, "auto",
                "element in " + body_contents + " did not match " + selector);
         }
 
         // Now, since we're here, may as well make sure serialization
         // works correctly.  It need not produce the exact same text,
         // but it should produce a selector that matches the same
         // elements.
         zi = ++gCounter;
         var ser1 = style_text.parentNode.sheet.cssRules[idx].selectorText;
         style_text.data = namespaces + ser1 + "{ z-index: " + zi + " }";
         for (var i = 0; i < should_match.length; ++i) {
             var e = should_match[i];
-            is(ifwin.getComputedStyle(e, "").zIndex, String(zi),
+            is(ifwin.getComputedStyle(e).zIndex, String(zi),
                "element in " + body_contents + " matched " + ser1 +
                " which is the reserialization of " + selector);
         }
         for (var i = 0; i < should_not_match.length; ++i) {
             var e = should_not_match[i];
-            is(ifwin.getComputedStyle(e, "").zIndex, "auto",
+            is(ifwin.getComputedStyle(e).zIndex, "auto",
                "element in " + body_contents + " did not match " + ser1 +
                " which is the reserialization of " + selector);
         }
 
         // But when we serialize the serialized result, we should get
         // the same text.
         var ser2 = style_text.parentNode.sheet.cssRules[idx].selectorText;
         is(ser2, ser1, "parse+serialize of selector \"" + selector +
@@ -146,23 +146,23 @@ function run() {
             var should_not_match = notmatch_fn(clonedoc);
 
             if (should_match.length + should_not_match.length == 0) {
                 ok(false, "nothing to check");
             }
 
             for (var i = 0; i < should_match.length; ++i) {
                 var e = should_match[i];
-                is(clonewin.getComputedStyle(e, "").zIndex, String(zi),
+                is(clonewin.getComputedStyle(e).zIndex, String(zi),
                    "element in " + body_contents + " matched clone of " +
                    selector);
             }
             for (var i = 0; i < should_not_match.length; ++i) {
                 var e = should_not_match[i];
-                is(clonewin.getComputedStyle(e, "").zIndex, "auto",
+                is(clonewin.getComputedStyle(e).zIndex, "auto",
                    "element in " + body_contents + " did not match clone of " +
                    selector);
             }
 
             var ser3 = links[0].sheet.cssRules[idx].selectorText;
             is(ser3, ser1,
                "selector " + selector + " serializes correctly after cloning");
         });
@@ -179,27 +179,27 @@ function run() {
 
     function test_parseable(selector)
     {
         ifdoc.body.innerHTML = "<p></p>";
 
         var zi = ++gCounter;
         style_text.data = "p, " + selector + "{ z-index: " + zi + " }";
         var should_match = ifdoc.getElementsByTagName("p")[0];
-        var parsed = ifwin.getComputedStyle(should_match, "").zIndex == zi;
+        var parsed = ifwin.getComputedStyle(should_match).zIndex == zi;
         ok(parsed, "selector " + selector + " was parsed");
         if (!parsed) {
             return;
         }
 
         // Test that it serializes to something that is also parseable.
         var ser1 = style_elem.sheet.cssRules[0].selectorText;
         zi = ++gCounter;
         style_text.data = ser1 + "{ z-index: " + zi + " }";
-        is(ifwin.getComputedStyle(should_match, "").zIndex, String(zi),
+        is(ifwin.getComputedStyle(should_match).zIndex, String(zi),
            "serialization " + ser1 + " of selector p, " + selector +
            " was parsed");
         var ser2 = style_elem.sheet.cssRules[0].selectorText;
         is(ser2, ser1,
            "parse+serialize of selector " + selector + " is idempotent");
 
         ifdoc.body.innerHTML = "";
         style_text.data = "";
@@ -220,17 +220,17 @@ function run() {
             var clonewin = cloneiframe.contentWindow;
             var links = clonedoc.getElementsByTagName("link");
             // cause a clone
             links[1].sheet.insertRule("#nonexistent { color: purple}", 0);
             // remove the uncloned sheet
             links[0].parentNode.removeChild(links[0]);
 
             should_match = clonedoc.getElementsByTagName("p")[0];
-            is(clonewin.getComputedStyle(should_match, "").zIndex, String(zi),
+            is(clonewin.getComputedStyle(should_match).zIndex, String(zi),
                "selector " + selector + " was cloned correctly");
             var ser3 = links[0].sheet.cssRules[1].selectorText;
             is(ser3, ser1,
                "selector " + selector + " serializes correctly after cloning");
         });
     }
 
     function test_unparseable_via_api(selector)
@@ -263,33 +263,33 @@ function run() {
     {
         var zi1 = ++gCounter;
         var zi2 = ++gCounter;
         ifdoc.body.innerHTML = "<p></p><div></div>";
         style_text.data = "p, " + selector + "{ z-index: " + zi1 + " }" +
                           "div { z-index: " + zi2 + " }";
         var should_not_match = ifdoc.getElementsByTagName("p")[0];
         var should_match = ifdoc.getElementsByTagName("div")[0];
-        is(ifwin.getComputedStyle(should_not_match, "").zIndex, "auto",
+        is(ifwin.getComputedStyle(should_not_match).zIndex, "auto",
            "selector " + selector + " was a parser error");
-        is(ifwin.getComputedStyle(should_match, "").zIndex, String(zi2),
+        is(ifwin.getComputedStyle(should_match).zIndex, String(zi2),
            "selector " + selector + " error was recovered from");
         ifdoc.body.innerHTML = "";
         style_text.data = "";
         test_unparseable_via_api(selector);
     }
 
     function test_unbalanced_unparseable(selector)
     {
         var zi1 = ++gCounter;
         var zi2 = ++gCounter;
         ifdoc.body.innerHTML = "<p></p>";
         style_text.data = "p, " + selector + "{ z-index: " + zi1 + " }";
         var should_not_match = ifdoc.getElementsByTagName("p")[0];
-        is(ifwin.getComputedStyle(should_not_match, "").zIndex, "auto",
+        is(ifwin.getComputedStyle(should_not_match).zIndex, "auto",
            "selector " + selector + " was a parser error");
         is(style_text.parentNode.sheet.cssRules.length, 0,
            "sheet should have no rules since " + selector + " is parse error");
         ifdoc.body.innerHTML = "";
         style_text.data = "";
         test_unparseable_via_api(selector);
     }
 
--- a/layout/style/test/test_selectors_on_anonymous_content.html
+++ b/layout/style/test/test_selectors_on_anonymous_content.html
@@ -45,22 +45,22 @@ function run() {
         var anon_div = SpecialPowers.wrap(document).getAnonymousNodes(doc_div)[0];
         var should_match = [];
         var should_not_match = [];
         (matches_docdiv ? should_match : should_not_match).push(doc_div);
         (matches_anondiv ? should_match : should_not_match).push(anon_div);
 
         for (var i = 0; i < should_match.length; ++i) {
             var e = should_match[i];
-            is(SpecialPowers.wrap(window).getComputedStyle(e, "").zIndex, String(zi),
+            is(SpecialPowers.wrap(window).getComputedStyle(e).zIndex, String(zi),
                "element matched " + selector);
         }
         for (var i = 0; i < should_not_match.length; ++i) {
             var e = should_not_match[i];
-            is(SpecialPowers.wrap(window).getComputedStyle(e, "").zIndex, "auto",
+            is(SpecialPowers.wrap(window).getComputedStyle(e).zIndex, "auto",
                "element did not match " + selector);
         }
 
         style_text.data = "";
     }
 
     // Test that the root of an XBL1 anonymous content subtree doesn't
     // match :nth-child().
--- a/layout/style/test/test_value_cloning.html
+++ b/layout/style/test/test_value_cloning.html
@@ -113,17 +113,17 @@ function iframe_loaded(event)
   var test_cs = [];
   var ifdoc = iframe.contentDocument;
 
   for (var idx = 0; idx < test_queue.length; ++idx) {
     var current_item = test_queue[idx];
     var info = gCSSProperties[current_item.prop];
 
     var test = ifdoc.getElementById("test" + idx);
-    var cur_cs = iframe.contentWindow.getComputedStyle(test, "");
+    var cur_cs = iframe.contentWindow.getComputedStyle(test);
     test_cs.push(cur_cs);
     var cur_ser = ifdoc.styleSheets[0].cssRules[3*idx+2].style.getPropertyValue(current_item.prop);
     if (cur_ser == "") {
       isnot(cur_ser, "",
 	    "serialization should be nonempty for " +
 	    current_item.prop + ": " + current_item.value);
     }
     start_ser.push(cur_ser);
--- a/layout/style/test/test_value_computation.html
+++ b/layout/style/test/test_value_computation.html
@@ -114,17 +114,17 @@ var gRule2 = gStyleSheet.cssRules[gStyle
 var gInitialValuesN;
 var gInitialValuesF;
 var gInitialPrereqsRuleN;
 var gInitialPrereqsRuleF;
 
 function setup_initial_values(id, ivalprop, prereqprop) {
   var iframe = document.getElementById(id);
   window[ivalprop] = iframe.contentWindow.getComputedStyle(
-                       iframe.contentDocument.documentElement.firstChild, "");
+                       iframe.contentDocument.documentElement.firstChild);
   var sheet = iframe.contentDocument.styleSheets[0];
   // For 'width', 'height', etc., need a constant size container.
   sheet.insertRule(":root { height: 200px; width: 500px }", sheet.cssRules.length);
 
   window[prereqprop] = sheet.cssRules[sheet.insertRule(":root > * {}", sheet.cssRules.length)];
 }
 
 function test_value(property, val, is_initial)
--- a/layout/style/test/test_value_storage.html
+++ b/layout/style/test/test_value_storage.html
@@ -81,17 +81,17 @@ function xfail_compute(property, value)
   return false;
 }
 
 // constructed to map longhands ==> list of containing shorthands
 var gPropertyShorthands = {};
 
 var gElement = document.getElementById("testnode");
 var gDeclaration = gElement.style;
-var gComputedStyle = window.getComputedStyle(gElement, "");
+var gComputedStyle = window.getComputedStyle(gElement);
 
 var gPrereqDeclaration =
   document.getElementById("prereqsheet").sheet.cssRules[0].style;
 
 // On Android, avoid most 'TEST-PASS' logging by overriding
 // SimpleTest.is/isnot, to improve performance
 if (navigator.appVersion.indexOf("Android") >= 0) {
   is = function is(a, b, name)
--- a/layout/style/test/test_video_object_fit.html
+++ b/layout/style/test/test_video_object_fit.html
@@ -25,17 +25,17 @@ https://bugzilla.mozilla.org/show_bug.cg
  * a UA stylesheet. (This is different from the property's initial value, which
  * is "fill".)
  *
  * Spec reference:
  * https://html.spec.whatwg.org/multipage/rendering.html#video-object-fit
  */
 
 function checkStyle(elem, expectedVal, message) {
-  is(window.getComputedStyle(elem, "").objectFit, expectedVal, message);
+  is(window.getComputedStyle(elem).objectFit, expectedVal, message);
 }
 
 function main() {
   const videoElem = document.getElementById("myVideo");
 
   checkStyle(videoElem, "contain",
              "<video> should have 'object-fit:contain' by default");
 
--- a/layout/style/test/test_viewport_units.html
+++ b/layout/style/test/test_viewport_units.html
@@ -18,17 +18,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 
 function px_to_num(str)
 {
     return Number(String(str).match(/^([\d.]+)px$/)[1]);
 }
 
 function width(elt)
 {
-    return px_to_num(elt.ownerDocument.defaultView.getComputedStyle(elt, "").width);
+    return px_to_num(elt.ownerDocument.defaultView.getComputedStyle(elt).width);
 }
 
 SimpleTest.waitForExplicitFinish();
 
 function run() {
     var iframe = document.getElementById("iframe");
     var idoc = iframe.contentDocument;
     var vh = idoc.getElementById("vh");
--- a/layout/style/test/test_visited_lying.html
+++ b/layout/style/test/test_visited_lying.html
@@ -68,19 +68,19 @@ function run_tests()
   is(qsr.length, 2, "querySelectorAll(:link) should find 2 results");
   is(qsr[0], unvisitedlink, "querySelectorAll(:link)[0]");
   is(qsr[1], visitedlink, "querySelectorAll(:link)[1]");
   qsr = subdoc.querySelectorAll(":visited");
   is(qsr.length, 0, "querySelectorAll(:visited) should find 0 results");
 
   // Test getComputedStyle.
   var subwin = iframe.contentWindow;
-  is(subwin.getComputedStyle(unvisitedlink, "").color, "rgb(0, 0, 255)",
+  is(subwin.getComputedStyle(unvisitedlink).color, "rgb(0, 0, 255)",
      "getComputedStyle on unvisited link should report color is blue");
-  is(subwin.getComputedStyle(visitedlink, "").color, "rgb(0, 0, 255)",
+  is(subwin.getComputedStyle(visitedlink).color, "rgb(0, 0, 255)",
      "getComputedStyle on visited link should report color is blue");
 
   // Test matches.
   is(unvisitedlink.matches(":link"), true,
      "unvisited link matches :link");
   is(visitedlink.matches(":link"), true,
      "visited link matches :link");
   is(unvisitedlink.matches(":visited"), false,
--- a/layout/style/test/test_webkit_device_pixel_ratio.html
+++ b/layout/style/test/test_webkit_device_pixel_ratio.html
@@ -30,17 +30,17 @@ SimpleTest.waitForExplicitFinish();
 function run() {
   function zoom(factor) {
     var previous = SpecialPowers.getFullZoom(window);
     SpecialPowers.setFullZoom(window, factor);
     return previous;
   }
 
   function isVisible(divName) {
-    return window.getComputedStyle(document.getElementById(divName), null).visibility == "visible";
+    return window.getComputedStyle(document.getElementById(divName)).visibility == "visible";
   }
 
   function getScreenPixelsPerCSSPixel() {
     return SpecialPowers.DOMWindowUtils.screenPixelsPerCSSPixel;
   }
 
   var screenPixelsPerCSSPixel = getScreenPixelsPerCSSPixel();
   var baseRatio = 1.0 * screenPixelsPerCSSPixel;
--- a/layout/style/test/test_webkit_flex_display.html
+++ b/layout/style/test/test_webkit_flex_display.html
@@ -33,16 +33,16 @@ function runTest() {
 }
 
 function testValue(propName, specifiedVal, serializedVal) {
   var testElem = document.getElementById("testElem");
   testElem.style[propName] = specifiedVal;
 
   is(testElem.style[propName], serializedVal,
      `CSS '${propName}:${specifiedVal} should serialize as '${serializedVal}'`);
-  is(window.getComputedStyle(testElem, "")[propName], serializedVal,
+  is(window.getComputedStyle(testElem)[propName], serializedVal,
      `CSS 'display:${specifiedVal} should compute to '${serializedVal}'`);
 }
 
 </script>
 </pre>
 </body>
 </html>
--- a/layout/style/test/unprefixing_service_iframe.html
+++ b/layout/style/test/unprefixing_service_iframe.html
@@ -247,17 +247,17 @@ const gTestcases = [
      targetPropName: "background-image",
      expectedDOMStyleVal: "linear-gradient(black, white), radial-gradient(blue, purple), linear-gradient(180deg, red 0%, orange 100%)",
      expectedCompStyleVal: "linear-gradient(rgb(0, 0, 0), rgb(255, 255, 255)), radial-gradient(rgb(0, 0, 255), rgb(128, 0, 128)), linear-gradient(180deg, rgb(255, 0, 0) 0%, rgb(255, 165, 0) 100%)", },
 
 ];
 
 function getComputedStyleWrapper(elem, prop)
 {
-  return window.getComputedStyle(elem, null).getPropertyValue(prop);
+  return window.getComputedStyle(elem).getPropertyValue(prop);
 }
 
 // Shims for "is()" and "ok()", which defer to parent window using postMessage:
 function is(aActual, aExpected, aDesc)
 {
   // Add URL to description:
   aDesc += " (iframe url: '" + window.location + "')";
 
--- a/layout/style/xbl-marquee/xbl-marquee.xml
+++ b/layout/style/xbl-marquee/xbl-marquee.xml
@@ -388,30 +388,30 @@
           if (this.startNewDirection) {
             this.startNewDirection = false; //we only want this to run once every scroll direction change
 
             var corrvalue = 0;
 
             switch (this._direction)
             {
               case "up":
-                var height = document.defaultView.getComputedStyle(this, "").height;
+                var height = document.defaultView.getComputedStyle(this).height;
                 this.outerDiv.style.height = height;
                 if (this.originalHeight > this.outerDiv.offsetHeight) {
                     corrvalue = this.originalHeight - this.outerDiv.offsetHeight;
                 }
                 this.innerDiv.style.padding = height + " 0";
                 this.dirsign = 1;
                 this.startAt = (this._behavior == 'alternate') ? (this.originalHeight - corrvalue) : 0;
                 this.stopAt  = (this._behavior == 'alternate' || this._behavior == 'slide') ? 
                                 (parseInt(height) + corrvalue) : (this.originalHeight + parseInt(height));
               break;
 
               case "down":
-                var height = document.defaultView.getComputedStyle(this, "").height;
+                var height = document.defaultView.getComputedStyle(this).height;
                 this.outerDiv.style.height = height;
                 if (this.originalHeight > this.outerDiv.offsetHeight) {
                     corrvalue = this.originalHeight - this.outerDiv.offsetHeight;
                 }
                 this.innerDiv.style.padding = height + " 0";
                 this.dirsign = -1;
                 this.startAt  = (this._behavior == 'alternate') ?
                                 (parseInt(height) + corrvalue) : (this.originalHeight + parseInt(height));
@@ -523,25 +523,25 @@
       </method>
 
       <method name="init">
         <body>
         <![CDATA[
           this.stop();
 
           if ((this._direction != "up") && (this._direction != "down")) {
-            var width = window.getComputedStyle(this, "").width;
+            var width = window.getComputedStyle(this).width;
             this.innerDiv.parentNode.style.margin = '0 ' + width;
 
             //XXX Adding the margin sometimes causes the marquee to widen, 
             // see testcase from bug bug 364434: 
             // https://bugzilla.mozilla.org/attachment.cgi?id=249233
             // Just add a fixed width with current marquee's width for now
-            if (width != window.getComputedStyle(this, "").width) {
-              var width = window.getComputedStyle(this, "").width;
+            if (width != window.getComputedStyle(this).width) {
+              var width = window.getComputedStyle(this).width;
               this.outerDiv.style.width = width;
               this.innerDiv.parentNode.style.margin = '0 ' + width;
             }
           }
           else {
             // store the original height before we add padding
             this.innerDiv.style.padding = 0;
             this.originalHeight = this.innerDiv.offsetHeight;
--- a/mobile/android/chrome/content/SelectHelper.js
+++ b/mobile/android/chrome/content/SelectHelper.js
@@ -111,17 +111,17 @@ var SelectHelper = {
 
     // if there are no children in this select, we add a dummy row so that at least something appears
     if (numChildren == 0) {
       aFunction.call(this, {label: ""}, {isGroup: false}, parent);
     }
 
     for (let i = 0; i < numChildren; i++) {
       let child = children[i];
-      let style = window.getComputedStyle(child, null);
+      let style = window.getComputedStyle(child);
       if (style.display !== "none") {
         if (child instanceof HTMLOptionElement ||
             child instanceof Ci.nsIDOMXULSelectControlItemElement) {
           aFunction.call(this, child, {isGroup: false}, parent);
         } else if (child instanceof HTMLOptGroupElement) {
           aFunction.call(this, child, {isGroup: true});
           this.forVisibleOptions(child, aFunction, child);
         }
--- a/mobile/android/chrome/content/browser.js
+++ b/mobile/android/chrome/content/browser.js
@@ -4805,18 +4805,18 @@ const ElementTouchHelper = {
     cwu.getScrollXY(false, scrollX, scrollY);
 
     let r = aElement.getBoundingClientRect();
 
     // step out of iframes and frames, offsetting scroll values
     for (let frame = aElement.ownerDocument.defaultView; frame.frameElement && frame != content; frame = frame.parent) {
       // adjust client coordinates' origin to be top left of iframe viewport
       let rect = frame.frameElement.getBoundingClientRect();
-      let left = frame.getComputedStyle(frame.frameElement, "").borderLeftWidth;
-      let top = frame.getComputedStyle(frame.frameElement, "").borderTopWidth;
+      let left = frame.getComputedStyle(frame.frameElement).borderLeftWidth;
+      let top = frame.getComputedStyle(frame.frameElement).borderTopWidth;
       scrollX.value += rect.left + parseInt(left);
       scrollY.value += rect.top + parseInt(top);
     }
 
     return {x: r.left + scrollX.value,
             y: r.top + scrollY.value,
             w: r.width,
             h: r.height };
--- a/testing/marionette/driver.js
+++ b/testing/marionette/driver.js
@@ -1864,17 +1864,17 @@ GeckoDriver.prototype.isElementDisplayed
  */
 GeckoDriver.prototype.getElementValueOfCssProperty = function*(cmd, resp) {
   let {id, propertyName: prop} = cmd.parameters;
 
   switch (this.context) {
     case Context.CHROME:
       let win = this.getCurrentWindow();
       let el = this.curBrowser.seenEls.get(id, {frame: win});
-      let sty = win.document.defaultView.getComputedStyle(el, null);
+      let sty = win.document.defaultView.getComputedStyle(el);
       resp.body.value = sty.getPropertyValue(prop);
       break;
 
     case Context.CONTENT:
       resp.body.value = yield this.listener.getElementValueOfCssProperty(id, prop);
       break;
   }
 };
--- a/testing/marionette/listener.js
+++ b/testing/marionette/listener.js
@@ -1276,17 +1276,17 @@ function isElementDisplayed(id) {
  * @param {String} prop
  *     The CSS property to get.
  *
  * @return {String}
  *     Effective value of the requested CSS property.
  */
 function getElementValueOfCssProperty(id, prop) {
   let el = seenEls.get(id, curContainer);
-  let st = curContainer.frame.document.defaultView.getComputedStyle(el, null);
+  let st = curContainer.frame.document.defaultView.getComputedStyle(el);
   return st.getPropertyValue(prop);
 }
 
 /**
  * Get the position and dimensions of the element.
  *
  * @param {WebElement} id
  *     Reference to web element.
--- a/testing/mochitest/tests/SimpleTest/SimpleTest.js
+++ b/testing/mochitest/tests/SimpleTest/SimpleTest.js
@@ -199,17 +199,17 @@ if (typeof(computedStyle) == 'undefined'
     this.computedStyle = function(elem, cssProperty) {
         elem = getElement(elem);
         if (elem.currentStyle) {
             return elem.currentStyle[cssProperty];
         }
         if (typeof(document.defaultView) == 'undefined' || document === null) {
             return undefined;
         }
-        var style = document.defaultView.getComputedStyle(elem, null);
+        var style = document.defaultView.getComputedStyle(elem);
         if (typeof(style) == 'undefined' || style === null) {
             return undefined;
         }
 
         var selectorCase = cssProperty.replace(/([A-Z])/g, '-$1'
             ).toLowerCase();
 
         return style.getPropertyValue(selectorCase);
--- a/toolkit/components/extensions/test/mochitest/test_ext_webrequest_basic.html
+++ b/toolkit/components/extensions/test/mochitest/test_ext_webrequest_basic.html
@@ -61,17 +61,17 @@ add_task(function* test_webRequest_links
   extension.sendMessage("set-expected", {expect, origin: location.href});
   yield extension.awaitMessage("continue");
   addStylesheet("file_style_bad.css");
   yield extension.awaitMessage("cancelled");
   // we redirect to style_good which completes the test
   addStylesheet("file_style_redirect.css");
   yield extension.awaitMessage("done");
 
-  let style = window.getComputedStyle(document.getElementById("test"), null);
+  let style = window.getComputedStyle(document.getElementById("test"));
   is(style.getPropertyValue("color"), "rgb(255, 0, 0)", "Good CSS loaded");
 });
 
 add_task(function* test_webRequest_images() {
   let expect = {
     "file_image_bad.png": {
       type: "image",
       events: ["onBeforeRequest", "onErrorOccurred"],
--- a/toolkit/components/microformats/test/static/javascript/prettify.js
+++ b/toolkit/components/microformats/test/static/javascript/prettify.js
@@ -497,17 +497,17 @@ var REGEXP_PRECEDER_PATTERN = '(?:^^\\.?
     var length = 0;
     var spans = [];
     var k = 0;
 
     var whitespace;
     if (node.currentStyle) {
       whitespace = node.currentStyle.whiteSpace;
     } else if (window.getComputedStyle) {
-      whitespace = document.defaultView.getComputedStyle(node, null)
+      whitespace = document.defaultView.getComputedStyle(node)
           .getPropertyValue('white-space');
     }
     var isPreformatted = whitespace && 'pre' === whitespace.substring(0, 3);
 
     function walk(node) {
       switch (node.nodeType) {
         case 1:  // Element
           if (nocode.test(node.className)) { return; }
@@ -912,17 +912,17 @@ var REGEXP_PRECEDER_PATTERN = '(?:^^\\.?
     var lineBreak = /\r\n?|\n/;
 
     var document = node.ownerDocument;
 
     var whitespace;
     if (node.currentStyle) {
       whitespace = node.currentStyle.whiteSpace;
     } else if (window.getComputedStyle) {
-      whitespace = document.defaultView.getComputedStyle(node, null)
+      whitespace = document.defaultView.getComputedStyle(node)
           .getPropertyValue('white-space');
     }
     // If it's preformatted, then we need to split lines on line breaks
     // in addition to <BR>s.
     var isPreformatted = whitespace && 'pre' === whitespace.substring(0, 3);
 
     var li = document.createElement('LI');
     while (node.firstChild) {
--- a/toolkit/components/narrate/test/NarrateTestUtils.jsm
+++ b/toolkit/components/narrate/test/NarrateTestUtils.jsm
@@ -20,17 +20,17 @@ this.NarrateTestUtils = {
   VOICE_SELECT_LABEL: "#narrate-voices .select-toggle .current-voice",
   RATE: "#narrate-rate-input",
   START: "#narrate-dropdown:not(.speaking) #narrate-start-stop",
   STOP: "#narrate-dropdown.speaking #narrate-start-stop",
   BACK: "#narrate-skip-previous",
   FORWARD: "#narrate-skip-next",
 
   isVisible(element) {
-    let style = element.ownerDocument.defaultView.getComputedStyle(element, "");
+    let style = element.ownerDocument.defaultView.getComputedStyle(element);
     if (style.display == "none") {
       return false;
     } else if (style.visibility != "visible") {
       return false;
     } else if (style.display == "-moz-popup" && element.state != "open") {
       return false;
     }
 
--- a/toolkit/components/tooltiptext/TooltipTextProvider.js
+++ b/toolkit/components/tooltiptext/TooltipTextProvider.js
@@ -116,17 +116,17 @@ TooltipTextProvider.prototype = {
           for (let childNode of tipElement.childNodes) {
             if (childNode instanceof defView.SVGTitleElement) {
               SVGTitleText = childNode.textContent;
               break;
             }
           }
         }
 
-        direction = defView.getComputedStyle(tipElement, "")
+        direction = defView.getComputedStyle(tipElement)
                            .getPropertyValue("direction");
       }
 
       tipElement = tipElement.parentNode;
     }
 
     return [titleText, XLinkTitleText, SVGTitleText, XULtooltiptextText].some(function(t) {
       if (t && /\S/.test(t)) {
--- a/toolkit/components/url-classifier/tests/mochitest/classifiedAnnotatedFrame.html
+++ b/toolkit/components/url-classifier/tests/mochitest/classifiedAnnotatedFrame.html
@@ -45,17 +45,17 @@ function checkLoads() {
   window.parent.is(
     mediaItem1, "error", "Should not load tracking videos");
   window.parent.is(
     xhrItem, "failed", "Should not load tracking XHRs");
   window.parent.is(
     fetchItem, "error", "Should not fetch from tracking URLs");
 
   var elt = document.getElementById("styleCheck");
-  var style = document.defaultView.getComputedStyle(elt, "");
+  var style = document.defaultView.getComputedStyle(elt);
   window.parent.isnot(
     style.visibility, "hidden", "Should not load tracking css");
 
   window.parent.is(window.document.blockedTrackingNodeCount, badids.length,
     "Should identify all tracking elements");
 
   var blockedTrackingNodes = window.document.blockedTrackingNodes;
 
--- a/toolkit/components/url-classifier/tests/mochitest/classifierFrame.html
+++ b/toolkit/components/url-classifier/tests/mochitest/classifierFrame.html
@@ -7,25 +7,25 @@
 var scriptItem = "untouched";
 
 function checkLoads() {
   // Make sure the javascript did not load.
   window.parent.is(scriptItem, "untouched", "Should not load bad javascript");
 
   // Make sure the css did not load.
   var elt = document.getElementById("styleCheck");
-  var style = document.defaultView.getComputedStyle(elt, "");
+  var style = document.defaultView.getComputedStyle(elt);
   window.parent.isnot(style.visibility, "hidden", "Should not load bad css");
 
   elt = document.getElementById("styleBad");
-  style = document.defaultView.getComputedStyle(elt, "");
+  style = document.defaultView.getComputedStyle(elt);
   window.parent.isnot(style.visibility, "hidden", "Should not load bad css");
 
   elt = document.getElementById("styleImport");
-  style = document.defaultView.getComputedStyle(elt, "");
+  style = document.defaultView.getComputedStyle(elt);
   window.parent.isnot(style.visibility, "visible", "Should import clean css");
 
   // Call parent.loadTestFrame again to test classification metadata in HTTP
   // cache entries.
   if (window.parent.firstLoad) {
     window.parent.info("Reloading from cache...");
     window.parent.firstLoad = false;
     window.parent.loadTestFrame();
--- a/toolkit/components/url-classifier/tests/mochitest/gethashFrame.html
+++ b/toolkit/components/url-classifier/tests/mochitest/gethashFrame.html
@@ -15,30 +15,30 @@ function checkLoads() {
 
   if (window.parent.shouldLoad) {
     window.parent.is(scriptItem, "loaded malware javascript!", "Should load bad javascript");
   } else {
     window.parent.is(scriptItem, "untouched", "Should not load bad javascript");
   }
 
   var elt = document.getElementById("styleImport");
-  var style = document.defaultView.getComputedStyle(elt, "");
+  var style = document.defaultView.getComputedStyle(elt);
   window.parent.isnot(style.visibility, "visible", "Should load clean css");
 
   // Make sure the css did not load.
   elt = document.getElementById("styleCheck");
-  style = document.defaultView.getComputedStyle(elt, "");
+  style = document.defaultView.getComputedStyle(elt);
   if (window.parent.shouldLoad) {
     window.parent.isnot(style.visibility, "visible", "Should load bad css");
   } else {
     window.parent.isnot(style.visibility, "hidden", "Should not load bad css");
   }
 
   elt = document.getElementById("styleBad");
-  style = document.defaultView.getComputedStyle(elt, "");
+  style = document.defaultView.getComputedStyle(elt);
   if (window.parent.shouldLoad) {
     window.parent.isnot(style.visibility, "visible", "Should import bad css");
   } else {
     window.parent.isnot(style.visibility, "hidden", "Should not import bad css");
   }
 }
 
 </script>
--- a/toolkit/components/url-classifier/tests/mochitest/test_privatebrowsing_trackingprotection.html
+++ b/toolkit/components/url-classifier/tests/mochitest/test_privatebrowsing_trackingprotection.html
@@ -68,17 +68,17 @@ var badids = [
 
 function checkLoads(aWindow, aBlocked) {
   var win = aWindow.content;
   is(win.document.getElementById("badscript").dataset.touched, aBlocked ? "no" : "yes", "Should not load tracking javascript");
   is(win.document.getElementById("badimage").dataset.touched, aBlocked ? "no" : "yes", "Should not load tracking images");
   is(win.document.getElementById("goodscript").dataset.touched, "yes", "Should load whitelisted tracking javascript");
 
   var elt = win.document.getElementById("styleCheck");
-  var style = win.document.defaultView.getComputedStyle(elt, "");
+  var style = win.document.defaultView.getComputedStyle(elt);
   isnot(style.visibility, aBlocked ? "hidden" : "", "Should not load tracking css");
 
   is(win.document.blockedTrackingNodeCount, aBlocked ? badids.length : 0, "Should identify all tracking elements");
 
   var blockedTrackingNodes = win.document.blockedTrackingNodes;
 
   // Make sure that every node in blockedTrackingNodes exists in the tree
   // (that may not always be the case but do not expect any nodes to disappear
--- a/toolkit/components/viewsource/test/browser/browser_viewsourceprefs.js
+++ b/toolkit/components/viewsource/test/browser/browser_viewsourceprefs.js
@@ -112,25 +112,25 @@ function simulateClick(aMenuItem) {
     aMenuItem.setAttribute("checked", "true");
 
   aMenuItem.click();
 }
 
 var checkStyle = Task.async(function* (win, styleProperty, expected) {
   let browser = win.gBrowser;
   let value = yield ContentTask.spawn(browser, styleProperty, function* (styleProperty) {
-    let style = content.getComputedStyle(content.document.body, null);
+    let style = content.getComputedStyle(content.document.body);
     return style.getPropertyValue(styleProperty);
   });
   is(value, expected, "Correct value of " + styleProperty);
 });
 
 var checkHighlight = Task.async(function* (win, expected) {
   let browser = win.gBrowser;
   let highlighted = yield ContentTask.spawn(browser, {}, function* () {
     let spans = content.document.getElementsByTagName("span");
     return Array.some(spans, (span) => {
-      let style = content.getComputedStyle(span, null);
+      let style = content.getComputedStyle(span);
       return style.getPropertyValue("color") !== "rgb(0, 0, 0)";
     });
   });
   is(highlighted, expected, "Syntax highlighting " + (expected ? "on" : "off"));
 });
--- a/toolkit/content/browser-content.js
+++ b/toolkit/content/browser-content.js
@@ -80,20 +80,20 @@ var ClickEventHandler = {
       // Elements or non-html elements such as svg or Document nodes
       // also make sure to skip select elements that are not multiline
       if (!(this._scrollable instanceof content.HTMLElement) ||
           ((this._scrollable instanceof content.HTMLSelectElement) && !this._scrollable.multiple)) {
         continue;
       }
 
       var overflowx = this._scrollable.ownerDocument.defaultView
-                          .getComputedStyle(this._scrollable, "")
+                          .getComputedStyle(this._scrollable)
                           .getPropertyValue("overflow-x");
       var overflowy = this._scrollable.ownerDocument.defaultView
-                          .getComputedStyle(this._scrollable, "")
+                          .getComputedStyle(this._scrollable)
                           .getPropertyValue("overflow-y");
       // we already discarded non-multiline selects so allow vertical
       // scroll for multiline ones directly without checking for a
       // overflow property
       var scrollVert = this._scrollable.scrollTopMax &&
         (this._scrollable instanceof content.HTMLSelectElement ||
          scrollingAllowed.indexOf(overflowy) >= 0);
 
--- a/toolkit/content/customizeToolbar.js
+++ b/toolkit/content/customizeToolbar.js
@@ -410,17 +410,17 @@ function setWrapperType(aItem, aWrapper)
     aWrapper.setAttribute("type", "spacer");
   } else if (aItem.localName == "toolbaritem" && aItem.firstChild) {
     aWrapper.setAttribute("type", aItem.firstChild.localName);
   }
 }
 
 function setDragActive(aItem, aValue) {
   var node = aItem;
-  var direction = window.getComputedStyle(aItem, null).direction;
+  var direction = window.getComputedStyle(aItem).direction;
   var value = direction == "ltr" ? "left" : "right";
   if (aItem.localName == "toolbar") {
     node = aItem.lastChild;
     value = direction == "ltr" ? "right" : "left";
   }
 
   if (!node)
     return;
@@ -639,17 +639,17 @@ function onToolbarDragOver(aEvent) {
 
   var previousDragItem = gCurrentDragOverItem;
 
   if (dropTarget.localName == "toolbar") {
     gCurrentDragOverItem = dropTarget;
   } else {
     gCurrentDragOverItem = null;
 
-    var direction = window.getComputedStyle(dropTarget.parentNode, null).direction;
+    var direction = window.getComputedStyle(dropTarget.parentNode).direction;
     var dropTargetCenter = dropTarget.boxObject.x + (dropTarget.boxObject.width / 2);
     var dragAfter;
     if (direction == "ltr")
       dragAfter = aEvent.clientX > dropTargetCenter;
     else
       dragAfter = aEvent.clientX < dropTargetCenter;
 
     if (dragAfter) {
--- a/toolkit/content/plugins.html
+++ b/toolkit/content/plugins.html
@@ -25,17 +25,17 @@
 <script type="application/javascript">
   "use strict";
 
   function setDirection() {
     var frame = document.getElementById("directionDetector");
     var direction = frame.contentDocument
                          .defaultView
                          .window
-                         .getComputedStyle(frame.contentDocument.getElementById("target"), "")
+                         .getComputedStyle(frame.contentDocument.getElementById("target"))
                          .getPropertyValue("direction");
     document.body.removeChild(frame);
     document.dir = direction;
   }
 
   function setupDirection() {
     var frame = document.createElement("iframe");
     frame.setAttribute("id", "directionDetector");
--- a/toolkit/content/tests/chrome/test_autocomplete2.xul
+++ b/toolkit/content/tests/chrome/test_autocomplete2.xul
@@ -125,17 +125,17 @@ function check() {
   // search has stopped, then start a new search.
   autocomplete.blur();
   autocomplete.focus();
   synthesizeKey("r", {});
 }
 
 function checkResult() {
   var autocomplete = $("autocomplete");
-  var style = window.getComputedStyle(autocomplete, "");
+  var style = window.getComputedStyle(autocomplete);
 
   if (returnResult) {
     // Result was returned, so there should not be a nomatch attribute
     is(autocomplete.hasAttribute("nomatch"), false,
        "nomatch attribute shouldn't be present here");
 
     // Ensure that the style is set correctly whichever way highlightNonMatches
     // is set.
--- a/toolkit/content/tests/chrome/test_autocomplete3.xul
+++ b/toolkit/content/tests/chrome/test_autocomplete3.xul
@@ -127,17 +127,17 @@ function checkNext() {
   autocomplete.completeDefaultIndex = tests[currentTest].completeDefaultIndex;
   autocomplete.focus();
 
   synthesizeKey(tests[currentTest].key, {});
 }
 
 function checkResult() {
   var autocomplete = $("autocomplete");
-  var style = window.getComputedStyle(autocomplete, "");
+  var style = window.getComputedStyle(autocomplete);
 
   is(autocomplete.value, tests[currentTest].result,
      "Test " + currentTest + ": autocomplete.value should equal '" +
      tests[currentTest].result + "'");
 
   is(autocomplete.selectionStart, tests[currentTest].start,
      "Test " + currentTest + ": autocomplete selection should start at " +
      tests[currentTest].start);
--- a/toolkit/content/tests/chrome/test_righttoleft.xul
+++ b/toolkit/content/tests/chrome/test_righttoleft.xul
@@ -46,75 +46,75 @@
 
       function frameLoaded()
       {
         var subframe = document.getElementById("subframe");
         var subwin = subframe.contentWindow;
         var subdoc = subframe.contentDocument;
         var url = String(subwin.location);
         if (url.indexOf("chrome://ltrtest") == 0) {
-          is(subwin.getComputedStyle(subdoc.getElementById("hbox"), "").backgroundColor,
+          is(subwin.getComputedStyle(subdoc.getElementById("hbox")).backgroundColor,
              "rgb(255, 255, 0)", "left to right with :-moz-locale-dir(ltr)");
-          is(subwin.getComputedStyle(subdoc.getElementById("vbox"), "").backgroundColor,
+          is(subwin.getComputedStyle(subdoc.getElementById("vbox")).backgroundColor,
              "rgb(255, 255, 255)", "left to right with :-moz-locale-dir(rtl)");
 
-          is(subwin.getComputedStyle(subdoc.documentElement, "").direction, "ltr",
+          is(subwin.getComputedStyle(subdoc.documentElement).direction, "ltr",
              "left to right direction");
 
           subdoc.documentElement.setAttribute("localedir", "rtl");
 
-          is(subwin.getComputedStyle(subdoc.getElementById("hbox"), "").backgroundColor,
+          is(subwin.getComputedStyle(subdoc.getElementById("hbox")).backgroundColor,
              "rgb(255, 255, 255)", "left to right with :-moz-locale-dir(ltr) and localedir='rtl'");
-          is(subwin.getComputedStyle(subdoc.getElementById("vbox"), "").backgroundColor,
+          is(subwin.getComputedStyle(subdoc.getElementById("vbox")).backgroundColor,
              "rgb(0, 128, 0)", "left to right with :-moz-locale-dir(rtl) and localedir='rtl'");
-          is(subwin.getComputedStyle(subdoc.documentElement, "").direction, "rtl",
+          is(subwin.getComputedStyle(subdoc.documentElement).direction, "rtl",
              "left to right direction with localedir='rtl'");
 
           subdoc.documentElement.removeAttribute("localedir");
 
-          is(subwin.getComputedStyle(subdoc.getElementById("hbox"), "").backgroundColor,
+          is(subwin.getComputedStyle(subdoc.getElementById("hbox")).backgroundColor,
              "rgb(255, 255, 0)", "left to right with :-moz-locale-dir(ltr) and localedir removed");
-          is(subwin.getComputedStyle(subdoc.getElementById("vbox"), "").backgroundColor,
+          is(subwin.getComputedStyle(subdoc.getElementById("vbox")).backgroundColor,
              "rgb(255, 255, 255)", "left to right with :-moz-locale-dir(rtl) and localedir removed");
-          is(subwin.getComputedStyle(subdoc.documentElement, "").direction, "ltr",
+          is(subwin.getComputedStyle(subdoc.documentElement).direction, "ltr",
              "left to right direction with localedir removed");
 
           subframe.setAttribute("src", "chrome://rtltest/content/dirtest.xul");
         }
         else if (url.indexOf("chrome://rtltest") == 0) {
-          is(subwin.getComputedStyle(subdoc.getElementById("hbox"), "").backgroundColor,
+          is(subwin.getComputedStyle(subdoc.getElementById("hbox")).backgroundColor,
              "rgb(255, 255, 255)", "right to left with :-moz-locale-dir(ltr)");
-          is(subwin.getComputedStyle(subdoc.getElementById("vbox"), "").backgroundColor,
+          is(subwin.getComputedStyle(subdoc.getElementById("vbox")).backgroundColor,
              "rgb(0, 128, 0)", "right to left with :-moz-locale-dir(rtl)");
-          is(subwin.getComputedStyle(subdoc.documentElement, "").direction, "rtl",
+          is(subwin.getComputedStyle(subdoc.documentElement).direction, "rtl",
              "right to left direction");
 
           subdoc.documentElement.setAttribute("localedir", "ltr");
 
-          is(subwin.getComputedStyle(subdoc.getElementById("hbox"), "").backgroundColor,
+          is(subwin.getComputedStyle(subdoc.getElementById("hbox")).backgroundColor,
              "rgb(255, 255, 0)", "right to left with :-moz-locale-dir(ltr) and localedir='ltr'");
-          is(subwin.getComputedStyle(subdoc.getElementById("vbox"), "").backgroundColor,
+          is(subwin.getComputedStyle(subdoc.getElementById("vbox")).backgroundColor,
              "rgb(255, 255, 255)", "right to left with :-moz-locale-dir(rtl) and localedir='ltr'");
-          is(subwin.getComputedStyle(subdoc.documentElement, "").direction, "ltr",
+          is(subwin.getComputedStyle(subdoc.documentElement).direction, "ltr",
              "right to left direction with localedir='ltr'");
 
           subdoc.documentElement.removeAttribute("localedir");
 
           prefs.setCharPref(UI_DIRECTION_PREF, "");
-          is(subwin.getComputedStyle(subdoc.documentElement, "").direction, "ltr",
+          is(subwin.getComputedStyle(subdoc.documentElement).direction, "ltr",
              "left to right direction with no preference set");
           prefs.setCharPref(UI_DIRECTION_PREF + "-QA", "rtl");
-          is(subwin.getComputedStyle(subdoc.documentElement, "").direction, "rtl",
+          is(subwin.getComputedStyle(subdoc.documentElement).direction, "rtl",
              "right to left direction with more specific preference set");
           prefs.setCharPref(UI_DIRECTION_PREF, "ltr");
-          is(subwin.getComputedStyle(subdoc.documentElement, "").direction, "rtl",
+          is(subwin.getComputedStyle(subdoc.documentElement).direction, "rtl",
              "right to left direction with less specific and more specific preference set");
           prefs.setCharPref(UI_DIRECTION_PREF, "rtl");
           prefs.setCharPref(UI_DIRECTION_PREF + "-QA", "ltr");
-          is(subwin.getComputedStyle(subdoc.documentElement, "").direction, "ltr",
+          is(subwin.getComputedStyle(subdoc.documentElement).direction, "ltr",
              "left to right direction specific preference overrides");
           if (prefs.prefHasUserValue(UI_DIRECTION_PREF + "-QA"))
             prefs.clearUserPref(UI_DIRECTION_PREF + "-QA");
 
           if (prefs.prefHasUserValue(UI_DIRECTION_PREF))
             prefs.clearUserPref(UI_DIRECTION_PREF);
 
           SimpleTest.finish();
--- a/toolkit/content/tests/chrome/window_tooltip.xul
+++ b/toolkit/content/tests/chrome/window_tooltip.xul
@@ -39,17 +39,17 @@ function runTest()
 
 function checkCoords(event)
 {
   // all but one test open the tooltip at the button location offset by 6
   // in each direction. Test 5 opens it at 4 in each direction.
   var mod = (gTestIndex == 5) ? 4 : 6;
 
   var rect = gButton.getBoundingClientRect();
-  var popupstyle = window.getComputedStyle(gButton, "");
+  var popupstyle = window.getComputedStyle(gButton);
   is(event.clientX, Math.round(rect.left + mod),
      "step " + (gTestIndex + 1) + " clientX");
   is(event.clientY, Math.round(rect.top + mod),
      "step " + (gTestIndex + 1) + " clientY");
   ok(event.screenX > 0, "step " + (gTestIndex + 1) + " screenX");
   ok(event.screenY > 0, "step " + (gTestIndex + 1) + " screenY");
 }
 
@@ -113,17 +113,17 @@ var popupTests = [
     var evt = child.createEvent("Event");
     evt.initEvent("click", true, true);
     child.documentElement.dispatchEvent(evt);
     is(child.documentElement.getAttribute("data"), "xnull",
        "cannot get tooltipNode from other document");
 
     var buttonrect = document.getElementById("withtooltip").getBoundingClientRect();
     var rect = tooltip.getBoundingClientRect();
-    var popupstyle = window.getComputedStyle(document.getElementById("thetooltip"), "");
+    var popupstyle = window.getComputedStyle(document.getElementById("thetooltip"));
 
     is(Math.round(rect.left),
        Math.round(buttonrect.left + parseFloat(popupstyle.marginLeft) + 6),
        testname + " left position of tooltip");
     is(Math.round(rect.top),
        Math.round(buttonrect.top + parseFloat(popupstyle.marginTop) + 6),
        testname + " top position of tooltip");
 
@@ -162,18 +162,18 @@ var popupTests = [
     synthesizeMouse(gButton, 2, 2, { type: "mouseover" });
     synthesizeMouse(gButton, 6, 6, { type: "mousemove" });
     synthesizeMouse(gButton, 4, 4, { type: "mousemove" });
     disableNonTestMouse(false);
   },
   result: function(testname) {
     var buttonrect = document.getElementById("withtooltip").getBoundingClientRect();
     var rect = document.getElementById("thetooltip").getBoundingClientRect();
-    var popupstyle = window.getComputedStyle(document.getElementById("thetooltip"), "");
-    var buttonstyle = window.getComputedStyle(document.getElementById("withtooltip"), "");
+    var popupstyle = window.getComputedStyle(document.getElementById("thetooltip"));
+    var buttonstyle = window.getComputedStyle(document.getElementById("withtooltip"));
 
     is(Math.round(rect.left),
        Math.round(buttonrect.left + parseFloat(popupstyle.marginLeft) + 4),
        testname + " left position of tooltip");
     is(Math.round(rect.top),
        Math.round(buttonrect.top + parseFloat(popupstyle.marginTop) + 4),
        testname + " top position of tooltip");
 
@@ -207,18 +207,18 @@ var popupTests = [
     synthesizeMouse(gButton, 2, 2, { type: "mouseover" });
     synthesizeMouse(gButton, 4, 4, { type: "mousemove" });
     synthesizeMouse(gButton, 6, 6, { type: "mousemove" });
     disableNonTestMouse(false);
   },
   result: function(testname) {
     var buttonrect = document.getElementById("withtooltip").getBoundingClientRect();
     var rect = document.getElementById("thetooltip").getBoundingClientRect();
-    var popupstyle = window.getComputedStyle(document.getElementById("thetooltip"), "");
-    var buttonstyle = window.getComputedStyle(document.getElementById("withtooltip"), "");
+    var popupstyle = window.getComputedStyle(document.getElementById("thetooltip"));
+    var buttonstyle = window.getComputedStyle(document.getElementById("withtooltip"));
 
     is(Math.round(rect.left),
        Math.round(buttonrect.left + parseFloat(popupstyle.marginLeft) + 6),
        testname + " left position of tooltip");
     is(Math.round(rect.top),
        Math.round(buttonrect.top + parseFloat(popupstyle.marginTop) + 6),
        testname + " top position of tooltip");
 
@@ -252,17 +252,17 @@ var popupTests = [
       synthesizeMouse(gButton, 6, 6, { type: "mousemove" });
       synthesizeMouse(gButton, 4, 4, { type: "mousemove" });
       disableNonTestMouse(false);
     });
   },
   result: function(testname) {
     var buttonrect = document.getElementById("withtooltip").getBoundingClientRect();
     var rect = document.getElementById("thetooltip").getBoundingClientRect();
-    var popupstyle = window.getComputedStyle(document.getElementById("thetooltip"), "");
+    var popupstyle = window.getComputedStyle(document.getElementById("thetooltip"));
 
     is(Math.round(rect.y + rect.height),
        Math.round(buttonrect.top + 4 - parseFloat(popupstyle.marginTop)),
        testname + " position of tooltip above button");
   }
 },
 {
   testname: "open tooltip for keyclose",
--- a/toolkit/content/widgets/button.xml
+++ b/toolkit/content/widgets/button.xml
@@ -77,17 +77,17 @@
                 onget="return this.getAttribute('autoCheck') == 'true';"
                 onset="this.setAttribute('autoCheck', val); return val;"/>
 
       <method name ="filterButtons">
         <parameter name="node"/>
         <body>
         <![CDATA[
           // if the node isn't visible, don't descend into it.
-          var cs = node.ownerDocument.defaultView.getComputedStyle(node, null);
+          var cs = node.ownerDocument.defaultView.getComputedStyle(node);
           if (cs.visibility != "visible" || cs.display == "none") {
             return NodeFilter.FILTER_REJECT;
           }
           // but it may be a popup element, in which case we look at "state"...
           if (cs.display == "-moz-popup" && node.state != "open") {
             return NodeFilter.FILTER_REJECT;
           }
           // OK - the node seems visible, so it is a candidate.
@@ -154,32 +154,32 @@
       <handler event="keypress">
       <![CDATA[
         if (this.boxObject instanceof MenuBoxObject) {
           if (this.open)
             return;
         } else {
           if (event.keyCode == KeyEvent.DOM_VK_UP ||
               (event.keyCode == KeyEvent.DOM_VK_LEFT &&
-                document.defaultView.getComputedStyle(this.parentNode, "")
+                document.defaultView.getComputedStyle(this.parentNode)
                         .direction == "ltr") ||
               (event.keyCode == KeyEvent.DOM_VK_RIGHT &&
-                document.defaultView.getComputedStyle(this.parentNode, "")
+                document.defaultView.getComputedStyle(this.parentNode)
                         .direction == "rtl")) {
             event.preventDefault();
             window.document.commandDispatcher.rewindFocus();
             return;
           }
 
           if (event.keyCode == KeyEvent.DOM_VK_DOWN ||
               (event.keyCode == KeyEvent.DOM_VK_RIGHT &&
-                document.defaultView.getComputedStyle(this.parentNode, "")
+                document.defaultView.getComputedStyle(this.parentNode)
                         .direction == "ltr") ||
               (event.keyCode == KeyEvent.DOM_VK_LEFT &&
-                document.defaultView.getComputedStyle(this.parentNode, "")
+                document.defaultView.getComputedStyle(this.parentNode)
                         .direction == "rtl")) {
             event.preventDefault();
             window.document.commandDispatcher.advanceFocus();
             return;
           }
         }
 
         if (event.keyCode || event.charCode <= 32 || event.altKey ||
--- a/toolkit/content/widgets/listbox.xml
+++ b/toolkit/content/widgets/listbox.xml
@@ -511,17 +511,17 @@
         ]]>
         </body>
       </method>
 
       <method name="_canUserSelect">
         <parameter name="aItem"/>
         <body>
         <![CDATA[
-          var style = document.defaultView.getComputedStyle(aItem, "");
+          var style = document.defaultView.getComputedStyle(aItem);
           return style.display != "none" && style.visibility == "visible";
         ]]>
         </body>
       </method>
 
       <method name="_selectTimeoutHandler">
         <parameter name="aMe"/>
         <body>
--- a/toolkit/content/widgets/preferences.xml
+++ b/toolkit/content/widgets/preferences.xml
@@ -842,28 +842,28 @@
                 this.currentPane = aPaneElement;
                 this._initialized = true;
 
                 // Only animate if we've switched between prefpanes
                 if (this._shouldAnimate && oldPane.id != aPaneElement.id) {
                   aPaneElement.style.opacity = 0.0;
                   this.animate(oldPane, aPaneElement);
                 } else if (!this._shouldAnimate && prefpanes.length > 1) {
-                  var targetHeight = parseInt(window.getComputedStyle(this._paneDeckContainer, "").height);
-                  var verticalPadding = parseInt(window.getComputedStyle(aPaneElement, "").paddingTop);
-                  verticalPadding += parseInt(window.getComputedStyle(aPaneElement, "").paddingBottom);
+                  var targetHeight = parseInt(window.getComputedStyle(this._paneDeckContainer).height);
+                  var verticalPadding = parseInt(window.getComputedStyle(aPaneElement).paddingTop);
+                  verticalPadding += parseInt(window.getComputedStyle(aPaneElement).paddingBottom);
                   if (aPaneElement.contentHeight > targetHeight - verticalPadding) {
                     // To workaround the bottom border of a groupbox from being
                     // cutoff an hbox with a class of bottomBox may enclose it.
                     // This needs to include its padding to resize properly.
                     // See bug 394433
                     var bottomPadding = 0;
                     var bottomBox = aPaneElement.getElementsByAttribute("class", "bottomBox")[0];
                     if (bottomBox)
-                      bottomPadding = parseInt(window.getComputedStyle(bottomBox, "").paddingBottom);
+                      bottomPadding = parseInt(window.getComputedStyle(bottomBox).paddingBottom);
                     window.innerHeight += bottomPadding + verticalPadding + aPaneElement.contentHeight - targetHeight;
                   }
 
                   // XXX rstrong - extend the contents of the prefpane to
                   // prevent elements from being cutoff (see bug 349098).
                   if (aPaneElement.contentHeight + verticalPadding < targetHeight)
                     aPaneElement._content.style.height = targetHeight - verticalPadding + "px";
                 }
@@ -937,17 +937,17 @@
               window.innerHeight += increment;
               this._currentHeight += increment;
             } else {
               aTimer.cancel();
               this._setUpFadeTimer();
             }
           } else if (aTimer == this._fadeTimer) {
             var elt = document.getElementById(this.lastSelected);
-            var newOpacity = parseFloat(window.getComputedStyle(elt, "").opacity) + this._fadeIncrement;
+            var newOpacity = parseFloat(window.getComputedStyle(elt).opacity) + this._fadeIncrement;
             if (newOpacity < 1.0)
               elt.style.opacity = newOpacity;
             else {
               aTimer.cancel();
               elt.style.opacity = 1.0;
             }
           }
         ]]>
--- a/toolkit/content/widgets/progressmeter.xml
+++ b/toolkit/content/widgets/progressmeter.xml
@@ -68,17 +68,17 @@
       <field name="_alive">true</field>
       <method name="_init">
         <body><![CDATA[
           var stack =
             document.getAnonymousElementByAttribute(this, "anonid", "stack");
           var spacer =
             document.getAnonymousElementByAttribute(this, "anonid", "spacer");
           var isLTR =
-           document.defaultView.getComputedStyle(this, null).direction == "ltr";
+           document.defaultView.getComputedStyle(this).direction == "ltr";
           var startTime = performance.now();
           var self = this;
 
           function nextStep(t) {
             try {
               var width = stack.boxObject.width;
               if (!width) {
                 // Maybe we've been removed from the document.
--- a/toolkit/content/widgets/resizer.xml
+++ b/toolkit/content/widgets/resizer.xml
@@ -16,17 +16,17 @@
       <![CDATA[
         // don't do this for viewport resizers; causes a crash related to
         // bugs 563665 and 581536 otherwise
         if (this.parentNode == this.ownerDocument.documentElement)
           return;
 
         // if the direction is rtl, set the rtl attribute so that the
         // stylesheet can use this to make the cursor appear properly
-        var cs = window.getComputedStyle(this, "");
+        var cs = window.getComputedStyle(this);
         if (cs.writingMode === undefined || cs.writingMode == "horizontal-tb") {
           if (cs.direction == "rtl") {
             this.setAttribute("rtl", "true");
           }
         } else if (cs.writingMode.endsWith("-rl")) {
           // writing-modes 'vertical-rl' and 'sideways-rl' want rtl resizers,
           // as they will appear at the bottom left of the element
           this.setAttribute("rtl", "true");
--- a/toolkit/content/widgets/scrollbox.xml
+++ b/toolkit/content/widgets/scrollbox.xml
@@ -190,19 +190,19 @@
           innerRect.top = outerRect.top - this._scrollbox.scrollTop;
           innerRect.right = innerRect.left + this._scrollbox.scrollWidth;
           innerRect.bottom = innerRect.top + this._scrollbox.scrollHeight;
           return innerRect;
         ]]></getter>
       </property>
       <property name="scrollboxPaddingStart" readonly="true">
         <getter><![CDATA[
-          var ltr = (window.getComputedStyle(this, null).direction == "ltr");
+          var ltr = (window.getComputedStyle(this).direction == "ltr");
           var paddingStartName = ltr ? "padding-left" : "padding-right";
-          var scrollboxStyle = window.getComputedStyle(this._scrollbox, null);
+          var scrollboxStyle = window.getComputedStyle(this._scrollbox);
           return parseFloat(scrollboxStyle.getPropertyValue(paddingStartName));
         ]]></getter>
       </property>
       <property name="scrollPosition">
         <getter><![CDATA[
           return this.orient == "vertical" ?
                  this._scrollbox.scrollTop :
                  this._scrollbox.scrollLeft;
@@ -220,17 +220,17 @@
         <getter><![CDATA[
           return this.orient == "vertical" ?
                  ["top", "bottom"] : ["left", "right"];
         ]]></getter>
       </property>
 
       <field name="_isRTLScrollbox"><![CDATA[
         this.orient != "vertical" &&
-        document.defaultView.getComputedStyle(this._scrollbox, "").direction == "rtl";
+        document.defaultView.getComputedStyle(this._scrollbox).direction == "rtl";
       ]]></field>
 
       <field name="_scrollTarget">null</field>
 
       <method name="_canScrollToElement">
         <parameter name="element"/>
         <body><![CDATA[
           return window.getComputedStyle(element).display != "none";
@@ -248,17 +248,17 @@
           var rect = this.scrollClientRect;
           var containerStart = vertical ? rect.top : rect.left;
           var containerEnd = vertical ? rect.bottom : rect.right;
           rect = element.getBoundingClientRect();
           var elementStart = vertical ? rect.top : rect.left;
           var elementEnd = vertical ? rect.bottom : rect.right;
 
           var scrollPaddingRect = this.scrollPaddingRect;
-          let style = window.getComputedStyle(this._scrollbox, null);
+          let style = window.getComputedStyle(this._scrollbox);
           var scrollContentRect = {
             left: scrollPaddingRect.left + parseFloat(style.paddingLeft),
             top: scrollPaddingRect.top + parseFloat(style.paddingTop),
             right: scrollPaddingRect.right - parseFloat(style.paddingRight),
             bottom: scrollPaddingRect.bottom - parseFloat(style.paddingBottom)
           };
 
           // Provide an entry point for derived bindings to adjust these values.
--- a/toolkit/content/widgets/tabbox.xml
+++ b/toolkit/content/widgets/tabbox.xml
@@ -166,26 +166,26 @@
                 if (this.tabs && this.handleCtrlPageUpDown) {
                   this.tabs.advanceSelectedTab(1, true);
                   event.preventDefault();
                 }
               break;
             case event.DOM_VK_LEFT:
               if (event.metaKey && event.altKey && !event.shiftKey && !event.ctrlKey)
                 if (this.tabs && this._handleMetaAltArrows) {
-                  var offset = window.getComputedStyle(this, "")
+                  var offset = window.getComputedStyle(this)
                                      .direction == "ltr" ? -1 : 1;
                   this.tabs.advanceSelectedTab(offset, true);
                   event.preventDefault();
                 }
               break;
             case event.DOM_VK_RIGHT:
               if (event.metaKey && event.altKey && !event.shiftKey && !event.ctrlKey)
                 if (this.tabs && this._handleMetaAltArrows) {
-                  offset = window.getComputedStyle(this, "")
+                  offset = window.getComputedStyle(this)
                                      .direction == "ltr" ? 1 : -1;
                   this.tabs.advanceSelectedTab(offset, true);
                   event.preventDefault();
                 }
               break;
           }
         ]]>
         </body>
@@ -841,24 +841,24 @@
         // Otherwise this tab is already selected and we will fall
         // through to mousedown behavior which sets focus on the current tab,
         // Only a click on an already selected tab should focus the tab itself.
       ]]>
       </handler>
 
       <handler event="keydown" keycode="VK_LEFT" group="system" preventdefault="true">
       <![CDATA[
-        var direction = window.getComputedStyle(this.parentNode, null).direction;
+        var direction = window.getComputedStyle(this.parentNode).direction;
         this.parentNode.advanceSelectedTab(direction == "ltr" ? -1 : 1, this.arrowKeysShouldWrap);
       ]]>
       </handler>
 
       <handler event="keydown" keycode="VK_RIGHT" group="system" preventdefault="true">
       <![CDATA[
-        var direction = window.getComputedStyle(this.parentNode, null).direction;
+        var direction = window.getComputedStyle(this.parentNode).direction;
         this.parentNode.advanceSelectedTab(direction == "ltr" ? 1 : -1, this.arrowKeysShouldWrap);
       ]]>
       </handler>
 
       <handler event="keydown" keycode="VK_UP" group="system" preventdefault="true">
       <![CDATA[
         this.parentNode.advanceSelectedTab(-1, this.arrowKeysShouldWrap);
       ]]>
--- a/toolkit/content/widgets/tree.xml
+++ b/toolkit/content/widgets/tree.xml
@@ -191,17 +191,17 @@
         ]]></body>
       </method>
 
       <method name="_getColumnAtX">
         <parameter name="aX"/>
         <parameter name="aThresh"/>
         <parameter name="aPos"/>
         <body><![CDATA[
-          var isRTL = document.defaultView.getComputedStyle(this, "")
+          var isRTL = document.defaultView.getComputedStyle(this)
                               .direction == "rtl";
 
           if (aPos)
             aPos.value = isRTL ? "after" : "before";
 
           var columns = [];
           var col = this.columns.getFirstColumn();
           while (col) {
@@ -350,17 +350,17 @@
 
             // Get the coordinates of the text inside the cell.
             var textRect = box.getCoordsForCellItem(row, column, "text");
 
             // Get the coordinates of the cell itself.
             var cellRect = box.getCoordsForCellItem(row, column, "cell");
 
             // Calculate the top offset of the textbox.
-            var style = window.getComputedStyle(input, "");
+            var style = window.getComputedStyle(input);
             var topadj = parseInt(style.borderTopWidth) + parseInt(style.paddingTop);
             input.top = textRect.y - topadj;
 
             // The leftside of the textbox is aligned to the left side of the text
             // in LTR mode, and left side of the cell in RTL mode.
             var left, widthdiff;
             if (style.direction == "rtl") {
               left = cellRect.x;
--- a/toolkit/crashreporter/test/browser/browser_bug471404.js
+++ b/toolkit/crashreporter/test/browser/browser_bug471404.js
@@ -1,15 +1,15 @@
 function check_clear_visible(browser, aVisible) {
   return ContentTask.spawn(browser, aVisible, function(aVisible) {
     let doc = content.document;
     let visible = false;
     let button = doc.getElementById("clear-reports");
     if (button) {
-      let style = doc.defaultView.getComputedStyle(button, "");
+      let style = doc.defaultView.getComputedStyle(button);
       if (style.display != "none" &&
           style.visibility == "visible")
         visible = true;
     }
     Assert.equal(visible, aVisible,
       "clear reports button is " + (aVisible ? "visible" : "hidden"));
   });
 }
--- a/toolkit/crashreporter/test/browser/browser_clearReports.js
+++ b/toolkit/crashreporter/test/browser/browser_clearReports.js
@@ -7,17 +7,17 @@ function clickClearReports(browser) {
 
   let button = doc.getElementById("clear-reports");
 
   if (!button) {
     Assert.ok(false, "Button not found");
     return Promise.resolve();
   }
 
-  let style = doc.defaultView.getComputedStyle(button, "");
+  let style = doc.defaultView.getComputedStyle(button);
 
   Assert.notEqual(style.display, "none", "Clear reports button visible");
 
   let deferred = {};
   deferred.promise = new Promise(resolve => deferred.resolve = resolve);
   var observer = new content.MutationObserver(function(mutations) {
     for (let mutation of mutations) {
       if (mutation.type == "attributes" &&
--- a/toolkit/modules/BrowserUtils.jsm
+++ b/toolkit/modules/BrowserUtils.jsm
@@ -163,17 +163,17 @@ this.BrowserUtils = {
 
     let x = rect.left, y = rect.top;
 
     // We need to compensate for any iframes that might shift things
     // over. We also need to compensate for zooming.
     let parentFrame = win.frameElement;
     while (parentFrame) {
       win = parentFrame.ownerDocument.defaultView;
-      let cstyle = win.getComputedStyle(parentFrame, "");
+      let cstyle = win.getComputedStyle(parentFrame);
 
       let framerect = parentFrame.getBoundingClientRect();
       x += framerect.left + parseFloat(cstyle.borderLeftWidth) + parseFloat(cstyle.paddingLeft);
       y += framerect.top + parseFloat(cstyle.borderTopWidth) + parseFloat(cstyle.paddingTop);
 
       parentFrame = win.frameElement;
     }
 
--- a/toolkit/modules/Finder.jsm
+++ b/toolkit/modules/Finder.jsm
@@ -515,18 +515,18 @@ Finder.prototype = {
     let utils = topWin.QueryInterface(Ci.nsIInterfaceRequestor)
                       .getInterface(Ci.nsIDOMWindowUtils);
 
     let scrollX = {}, scrollY = {};
     utils.getScrollXY(false, scrollX, scrollY);
 
     for (let frame = win; frame != topWin; frame = frame.parent) {
       let rect = frame.frameElement.getBoundingClientRect();
-      let left = frame.getComputedStyle(frame.frameElement, "").borderLeftWidth;
-      let top = frame.getComputedStyle(frame.frameElement, "").borderTopWidth;
+      let left = frame.getComputedStyle(frame.frameElement).borderLeftWidth;
+      let top = frame.getComputedStyle(frame.frameElement).borderTopWidth;
       scrollX.value += rect.left + parseInt(left, 10);
       scrollY.value += rect.top + parseInt(top, 10);
     }
     let rect = Rect.fromRect(selection.getRangeAt(0).getBoundingClientRect());
     return rect.translate(scrollX.value, scrollY.value);
   },
 
   _outlineLink(aDrawOutline) {
--- a/toolkit/modules/FinderHighlighter.jsm
+++ b/toolkit/modules/FinderHighlighter.jsm
@@ -637,17 +637,17 @@ FinderHighlighter.prototype = {
    *
    * @param  {nsIDOMRange} range Range to fetch style info from.
    * @return {Object} Dictionary consisting of the styles that were found.
    */
   _getRangeFontStyle(range) {
     let node = range.startContainer;
     while (node.nodeType != 1)
       node = node.parentNode;
-    let style = node.ownerDocument.defaultView.getComputedStyle(node, "");
+    let style = node.ownerDocument.defaultView.getComputedStyle(node);
     let props = {};
     for (let prop of kFontPropsCamelCase) {
       if (prop in style && style[prop])
         props[prop] = style[prop];
     }
     return props;
   },
 
@@ -766,17 +766,17 @@ FinderHighlighter.prototype = {
     // Check if we're in a frameset (including iframes).
     if (window != window.top) {
       if (!dict.frames.has(window))
         dict.frames.set(window, null);
       return true;
     }
 
     do {
-      let style = window.getComputedStyle(node, null);
+      let style = window.getComputedStyle(node);
       if (kFixed.has(style.position) || kFixed.has(style.overflow) ||
           kFixed.has(style.overflowX) || kFixed.has(style.overflowY)) {
         return true;
       }
       node = node.parentNode;
     } while (node && node != document.documentElement)
 
     return false;
--- a/toolkit/modules/InlineSpellChecker.jsm
+++ b/toolkit/modules/InlineSpellChecker.jsm
@@ -432,17 +432,17 @@ var SpellCheckHelper = {
     return (method == "GET" || method == "") ||
            (form.enctype != "text/plain") && (form.enctype != "multipart/form-data");
   },
 
   // Returns the computed style attribute for the given element.
   getComputedStyle(aElem, aProp) {
     return aElem.ownerDocument
                 .defaultView
-                .getComputedStyle(aElem, "").getPropertyValue(aProp);
+                .getComputedStyle(aElem).getPropertyValue(aProp);
   },
 
   isEditable(element, window) {
     var flags = 0;
     if (element instanceof window.HTMLInputElement) {
       flags |= this.INPUT;
 
       if (element.mozIsTextField(false) || element.type == "number") {
--- a/toolkit/modules/LightweightThemeConsumer.jsm
+++ b/toolkit/modules/LightweightThemeConsumer.jsm
@@ -104,17 +104,17 @@ LightweightThemeConsumer.prototype = {
     // We need to clear these either way: either because the theme is being removed,
     // or because we are applying a new theme and the data might be bogus CSS,
     // so if we don't reset first, it'll keep the old value.
     root.style.removeProperty("color");
     root.style.removeProperty("background-color");
     if (active) {
       root.style.color = aData.textcolor || "black";
       root.style.backgroundColor = aData.accentcolor || "white";
-      let [r, g, b] = _parseRGB(this._doc.defaultView.getComputedStyle(root, "").color);
+      let [r, g, b] = _parseRGB(this._doc.defaultView.getComputedStyle(root).color);
       let luminance = 0.2125 * r + 0.7154 * g + 0.0721 * b;
       root.setAttribute("lwthemetextcolor", luminance <= 110 ? "dark" : "bright");
       root.setAttribute("lwtheme", "true");
     } else {
       root.removeAttribute("lwthemetextcolor");
       root.removeAttribute("lwtheme");
     }
 
--- a/toolkit/modules/tests/browser/browser_WebRequest.js
+++ b/toolkit/modules/tests/browser/browser_WebRequest.js
@@ -180,17 +180,17 @@ function* test_once() {
       expected_browser = null;
 
       yield ContentTask.spawn(browser, null, function() {
         let win = content.wrappedJSObject;
         is(win.success, 2, "Good script ran");
         is(win.failure, undefined, "Failure script didn't run");
 
         let style =
-          content.getComputedStyle(content.document.getElementById("test"), null);
+          content.getComputedStyle(content.document.getElementById("test"));
         is(style.getPropertyValue("color"), "rgb(255, 0, 0)", "Good CSS loaded");
       });
     });
 
   compareLists(requested, expected_requested, "requested");
   compareLists(sendHeaders, expected_sendHeaders, "sendHeaders");
   compareLists(beforeRedirect, expected_beforeRedirect, "beforeRedirect");
   compareLists(headersReceived, expected_headersReceived, "headersReceived");
--- a/toolkit/mozapps/extensions/content/extensions.js
+++ b/toolkit/mozapps/extensions/content/extensions.js
@@ -2078,17 +2078,17 @@ var gHeader = {
     var node = outerDoc.getElementById("back-button");
     // If the outer frame has no back-button then make the buttons visible
     if (!node)
       return true;
 
     // If the back-button or any of its parents are hidden then make the buttons
     // visible
     while (node != outerDoc) {
-      var style = outerWin.getComputedStyle(node, "");
+      var style = outerWin.getComputedStyle(node);
       if (style.display == "none")
         return true;
       if (style.visibility != "visible")
         return true;
       node = node.parentNode;
     }
 
     return false;
@@ -3115,17 +3115,17 @@ var gDetailView = {
     }
 
     document.getElementById("detail-prefs-btn").hidden = !aIsRemote &&
       !gViewController.commands.cmd_showItemPreferences.isEnabled(aAddon);
 
     var gridRows = document.querySelectorAll("#detail-grid rows row");
     let first = true;
     for (let gridRow of gridRows) {
-      if (first && window.getComputedStyle(gridRow, null).getPropertyValue("display") != "none") {
+      if (first && window.getComputedStyle(gridRow).getPropertyValue("display") != "none") {
         gridRow.setAttribute("first-row", true);
         first = false;
       } else {
         gridRow.removeAttribute("first-row");
       }
     }
 
     if (this._addon.type == "experiment") {
@@ -3471,17 +3471,17 @@ var gDetailView = {
             setting = document.importNode(setting, true);
             var style = setting.getAttribute("style");
             if (style) {
               setting.removeAttribute("style");
               setting.setAttribute("style", style);
             }
 
             rows.appendChild(setting);
-            var visible = window.getComputedStyle(setting, null).getPropertyValue("display") != "none";
+            var visible = window.getComputedStyle(setting).getPropertyValue("display") != "none";
             if (!firstSetting && visible) {
               setting.setAttribute("first-row", true);
               firstSetting = setting;
             }
           }
 
           finish(firstSetting);
 
@@ -3504,17 +3504,17 @@ var gDetailView = {
   },
 
   scrollToPreferencesRows() {
     // We find this row, rather than remembering it from above,
     // in case it has been changed by the observers.
     let firstRow = gDetailView.node.querySelector('setting[first-row="true"]');
     if (firstRow) {
       let top = firstRow.boxObject.y;
-      top -= parseInt(window.getComputedStyle(firstRow, null).getPropertyValue("margin-top"));
+      top -= parseInt(window.getComputedStyle(firstRow).getPropertyValue("margin-top"));
 
       let detailViewBoxObject = gDetailView.node.boxObject;
       top -= detailViewBoxObject.y;
 
       detailViewBoxObject.scrollTo(0, top);
     }
   },
 
--- a/toolkit/mozapps/extensions/content/extensions.xml
+++ b/toolkit/mozapps/extensions/content/extensions.xml
@@ -391,17 +391,17 @@
            allowing that item to be selected when hiding.  -->
       <method name="_canUserSelect">
         <parameter name="aItem"/>
         <body>
         <![CDATA[
           if (aItem.hasAttribute("disabled") &&
               aItem.getAttribute("disabled") == "true")
             return false;
-          var style = document.defaultView.getComputedStyle(aItem, "");
+          var style = document.defaultView.getComputedStyle(aItem);
           return style.display != "none" && style.visibility == "visible";
         ]]>
         </body>
       </method>
     </implementation>
   </binding>
 
 
--- a/toolkit/mozapps/extensions/test/browser/browser_inlinesettings_custom.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_inlinesettings_custom.js
@@ -67,17 +67,17 @@ add_test(function() {
        "Current view should scroll to preferences");
 
     var grid = gManagerWindow.document.getElementById("detail-grid");
     var settings = grid.querySelectorAll("rows > setting");
     is(settings.length, 1, "Grid should have settings children");
 
     ok(settings[0].hasAttribute("first-row"), "First visible row should have first-row attribute");
 
-    var style = window.getComputedStyle(settings[0], null);
+    var style = window.getComputedStyle(settings[0]);
     is(style.getPropertyValue("background-color"), "rgb(0, 0, 255)", "Background color should be set");
     is(style.getPropertyValue("display"), "-moz-grid-line", "Display should be set");
     is(style.getPropertyValue("-moz-binding"), 'url("chrome://inlinesettings/content/binding.xml#custom")', "Binding should be set");
 
     var label = gManagerWindow.document.getAnonymousElementByAttribute(settings[0], "anonid", "label");
     is(label.textContent, "Custom", "Localized string should be shown");
 
     var input = gManagerWindow.document.getAnonymousElementByAttribute(settings[0], "anonid", "input");
--- a/toolkit/mozapps/extensions/test/browser/browser_searching.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_searching.js
@@ -158,17 +158,17 @@ function search(aQuery, aFinishImmediate
 function get_actual_results() {
   var list = gManagerWindow.document.getElementById("search-list");
   var rows = list.getElementsByTagName("richlistitem");
 
   var results = [];
   for (var item of rows) {
 
     // Only consider items that are currently showing
-    var style = gManagerWindow.document.defaultView.getComputedStyle(item, "");
+    var style = gManagerWindow.document.defaultView.getComputedStyle(item);
     if (style.display == "none" || style.visibility != "visible")
       continue;
 
     if (item.mInstall || item.isPending("install")) {
       var sourceURI = item.mInstall.sourceURI.spec;
       if (sourceURI == REMOTE_INSTALL_URL) {
         results.push({name: REMOTE_TO_INSTALL, item});
         continue;
--- a/toolkit/mozapps/extensions/test/browser/head.js
+++ b/toolkit/mozapps/extensions/test/browser/head.js
@@ -505,17 +505,17 @@ function formatDate(aDate) {
   const locale = Cc["@mozilla.org/chrome/chrome-registry;1"]
                  .getService(Ci.nsIXULChromeRegistry)
                  .getSelectedLocale("global", true);
   const dtOptions = { year: "numeric", month: "long", day: "numeric" };
   return aDate.toLocaleDateString(locale, dtOptions);
 }
 
 function is_hidden(aElement) {
-  var style = aElement.ownerDocument.defaultView.getComputedStyle(aElement, "");
+  var style = aElement.ownerDocument.defaultView.getComputedStyle(aElement);
   if (style.display == "none")
     return true;
   if (style.visibility != "visible")
     return true;
 
   // Hiding a parent element will hide all its children
   if (aElement.parentNode != aElement.ownerDocument)
     return is_hidden(aElement.parentNode);
--- a/widget/tests/test_platform_colors.xul
+++ b/widget/tests/test_platform_colors.xul
@@ -91,17 +91,17 @@ var colors = {
   "-moz-combobox": ["rgb(255, 255, 255)"]
 };
 
 var colorbox = document.getElementById('colorbox');
 
 for (var c in colors) {
   dump("testing color " + c + "\n");
   colorbox.style.backgroundColor = c;
-  var rgb = document.defaultView.getComputedStyle(colorbox, null).getPropertyValue('background-color');
+  var rgb = document.defaultView.getComputedStyle(colorbox).getPropertyValue('background-color');
   ok(colors[c].indexOf(rgb) != -1 || colors[c].length == 8, 'platform color ' + c + ' is wrong: ' + rgb);
 }
 
 
 ]]>
 </script>
 
 </window>