Merge m-c to m-i
authorPhil Ringnalda <philringnalda@gmail.com>
Sat, 17 Sep 2016 13:59:39 -0700
changeset 357864 7f798aafd21aed88c13d648390f77a4457f00872
parent 357863 977e0fbc8fc18a187c8b0327ee54308ede97e559 (current diff)
parent 357847 eaf5eb6f8fa0d8e7a09f3774c0da53c0dd6dadd7 (diff)
child 357865 520980c5d845fa81c96019c8321108688549f7d7
push id1324
push usermtabara@mozilla.com
push dateMon, 16 Jan 2017 13:07:44 +0000
treeherdermozilla-release@a01c49833940 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone51.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
Merge m-c to m-i
dom/html/test/test_track_disabled.html
dom/media/test/test_webvtt_disabled.html
--- a/CLOBBER
+++ b/CLOBBER
@@ -17,9 +17,9 @@
 #
 # Modifying this file will now automatically clobber the buildbot machines \o/
 #
 
 # Are you updating CLOBBER because you think it's needed for your WebIDL
 # changes to stick? As of bug 928195, this shouldn't be necessary! Please
 # don't change CLOBBER for WebIDL changes any more.
 
-Bug 1302429 to fix also bustage.
+Bug 1297097 - Remove preference "layout.css.vertical-text.enabled" modifies nsCSSPropList.h. Might need a clobber due to bug 1276197.
--- a/browser/base/content/test/urlbar/browser_autocomplete_enter_race.js
+++ b/browser/base/content/test/urlbar/browser_autocomplete_enter_race.js
@@ -64,27 +64,59 @@ add_task(function* test_disabled_ac() {
   Preferences.set("browser.urlbar.suggest.openpages", false);
 
   Services.search.addEngineWithDetails("MozSearch", "", "", "", "GET",
                                        "http://example.com/?q={searchTerms}");
   let engine = Services.search.getEngineByName("MozSearch");
   let originalEngine = Services.search.currentEngine;
   Services.search.currentEngine = engine;
 
-  registerCleanupFunction(function* () {
+  function* cleanup() {
     Preferences.set("browser.urlbar.suggest.history", suggestHistory);
     Preferences.set("browser.urlbar.suggest.bookmark", suggestBookmarks);
     Preferences.set("browser.urlbar.suggest.openpage", suggestOpenPages);
 
     Services.search.currentEngine = originalEngine;
     let engine = Services.search.getEngineByName("MozSearch");
-    Services.search.removeEngine(engine);
-  });
+    if (engine) {
+      Services.search.removeEngine(engine);
+    }
+  }
+  registerCleanupFunction(cleanup);
 
   gURLBar.focus();
   gURLBar.value = "e";
   EventUtils.synthesizeKey("x", {});
   EventUtils.synthesizeKey("VK_RETURN", {});
 
   info("wait for the page to load");
   yield BrowserTestUtils.browserLoaded(gBrowser.selectedTab.linkedBrowser,
                                        false, "http://example.com/?q=ex");
+  yield cleanup();
 });
+
+add_task(function* test_delay() {
+  const TIMEOUT = 10000;
+  // Set a large delay.
+  let delay = Preferences.get("browser.urlbar.delay");
+  Preferences.set("browser.urlbar.delay", TIMEOUT);
+
+  registerCleanupFunction(function* () {
+    Preferences.set("browser.urlbar.delay", delay);
+  });
+
+  // This is needed to clear the current value, otherwise autocomplete may think
+  // the user removed text from the end.
+  let start = Date.now();
+  yield promiseAutocompleteResultPopup("");
+  Assert.ok((Date.now() - start) < TIMEOUT);
+
+  start = Date.now();
+  gURLBar.closePopup();
+  gURLBar.focus();
+  gURLBar.value = "e";
+  EventUtils.synthesizeKey("x", {});
+  EventUtils.synthesizeKey("VK_RETURN", {});
+  info("wait for the page to load");
+  yield BrowserTestUtils.browserLoaded(gBrowser.selectedTab.linkedBrowser,
+                                       false, "http://example.com/");
+  Assert.ok((Date.now() - start) < TIMEOUT);
+});
--- a/browser/base/content/urlbarBindings.xml
+++ b/browser/base/content/urlbarBindings.xml
@@ -1499,17 +1499,17 @@ file, You can obtain one at http://mozil
         <body><![CDATA[
           if (this.mPopupOpen) {
             return;
           }
 
           this.mInput = aInput;
           this.selectedIndex = this._isFirstResultHeuristic ? 0 : -1;
           this.view = aInput.controller.QueryInterface(Components.interfaces.nsITreeView);
-          this.invalidate();
+          this._invalidate();
 
           var rect = window.document.documentElement.getBoundingClientRect();
           var width = rect.right - rect.left;
           this.setAttribute("width", width);
 
           // Adjust the direction of the autocomplete popup list based on the textbox direction, bug 649840
           var popupDirection = aElement.ownerDocument.defaultView.getComputedStyle(aElement).direction;
           this.style.direction = popupDirection;
@@ -1769,25 +1769,26 @@ file, You can obtain one at http://mozil
               this.selectedIndex = 0;
               this.richlistbox.suppressMenuItemEvent = false;
             }
 
             this.input.gotResultForCurrentQuery = true;
 
             // Check if we should perform a delayed handleEnter.
             if (this.input.handleEnterInstance) {
-              try {
+              let instance = this.input.handleEnterInstance;
+              this.input.handleEnterInstance = null;
+              // Don't handle this immediately or we could cause a recursive
+              // loop where the controller sets popupOpen and re-enters here.
+              setTimeout(() => {
                 // Safety check: handle only if the search string didn't change.
-                let instance = this.input.handleEnterInstance;
                 if (this.input.mController.searchString == instance.searchString) {
                   this.input.mController.handleEnter(false, instance.event);
                 }
-              } finally {
-                this.input.handleEnterInstance = null;
-              }
+              }, 0);
             }
           ]]>
         </body>
       </method>
 
       <method name="_onSearchBegin">
         <body><![CDATA[
           // Set the selected index to 0 (heuristic) until a result comes back
--- a/devtools/client/framework/attach-thread.js
+++ b/devtools/client/framework/attach-thread.js
@@ -35,20 +35,28 @@ function handleThreadState(toolbox, even
   }
 }
 
 function attachThread(toolbox) {
   let deferred = defer();
 
   let target = toolbox.target;
   let { form: { chromeDebugger, actor } } = target;
-  let threadOptions = {
-    useSourceMaps: Services.prefs.getBoolPref("devtools.debugger.source-maps-enabled"),
-    autoBlackBox: Services.prefs.getBoolPref("devtools.debugger.auto-black-box")
-  };
+
+  // Sourcemaps are always turned off when using the new debugger
+  // frontend. This is because it does sourcemapping on the
+  // client-side, so the server should not do it. It also does not support
+  // blackboxing yet.
+  let useSourceMaps = false;
+  let autoBlackBox = false;
+  if(!Services.prefs.getBoolPref("devtools.debugger.new-debugger-frontend")) {
+    useSourceMaps = Services.prefs.getBoolPref("devtools.debugger.source-maps-enabled");
+    autoBlackBox = Services.prefs.getBoolPref("devtools.debugger.auto-black-box");
+  }
+  let threadOptions = { useSourceMaps, autoBlackBox };
 
   let handleResponse = (res, threadClient) => {
     if (res.error) {
       deferred.reject(new Error("Couldn't attach to thread: " + res.error));
       return;
     }
     threadClient.addListener("paused", handleThreadState.bind(null, toolbox));
     threadClient.addListener("resumed", handleThreadState.bind(null, toolbox));
--- a/devtools/client/themes/layout.css
+++ b/devtools/client/themes/layout.css
@@ -32,71 +32,82 @@
   background: url(images/geometry-editor.svg) no-repeat center center / 16px 16px;
 }
 
 /* Main: contains the box-model regions */
 
 #layout-main {
   position: relative;
   box-sizing: border-box;
-  color: #1A1C22;
+  /* The regions are semi-transparent, so the white background is partly
+     visible */
+  background-color: white;
+  color: var(--theme-selection-color);
   /* Make sure there is some space between the window's edges and the regions */
   margin: 0 14px 4px 14px;
   width: calc(100% - 2 * 14px);
 }
 
+.layout-margin,
+.layout-size {
+  color: var(--theme-highlight-blue);
+}
+
 /* Regions are 3 nested elements with wide borders and outlines */
 
+#layout-content {
+  height: 18px;
+}
+
 #layout-margins,
 #layout-borders,
 #layout-padding {
+  border-color: hsla(210,100%,85%,0.2);
+  border-width: 18px;
   border-style: solid;
-  border-width: 2px;
-  border-radius: 2px;
-  padding: 16px;
+  outline: dotted 1px hsl(210,100%,85%);
+}
+
+#layout-margins {
+  /* This opacity applies to all of the regions, since they are nested */
+  opacity: .8;
 }
 
 /* Regions colors */
 
 #layout-margins {
-  background-color: #9ebce1;
-  border-color: #2f5b8e;
+  border-color: #edff64;
 }
 
 #layout-borders {
-  background-color: #b3c8e2;
-  border-color: #3b72b3;
+  border-color: #444444;
 }
 
 #layout-padding {
-  background-color: #7fe3cc;
-  border-color: #00c79a;
+  border-color: #6a5acd;
 }
 
 #layout-content {
-  background-color: #f0f7ff;
-  border: 2px solid #eaf4ff;
-  height: 18px;
+  background-color: #87ceeb;
 }
 
 .theme-firebug #layout-main,
 .theme-firebug #layout-borders,
 .theme-firebug #layout-content {
   border-style: solid;
 }
 
 .theme-firebug #layout-main,
 .theme-firebug #layout-header {
   font-family: var(--proportional-font-family);
 }
 
 .theme-firebug #layout-main {
   color: var(--theme-body-color);
   font-size: var(--theme-toolbar-font-size);
-  background-color: var(--theme-body-color);
 }
 
 .theme-firebug #layout-header {
   font-size: var(--theme-toolbar-font-size);
 }
 
 /* Editable region sizes are contained in absolutely positioned <p> */
 
@@ -112,111 +123,112 @@
   vertical-align: middle;
   pointer-events: auto;
 }
 
 /* Coordinates for the region sizes */
 
 .layout-top,
 .layout-bottom {
-  width: 100%;
+  width: calc(100% - 2px);
   text-align: center;
 }
 
 .layout-padding.layout-top {
-  top: 38px;
+  top: 37px;
 }
 
 .layout-padding.layout-bottom {
-  bottom: 39px;
+  bottom: 38px;
 }
 
 .layout-border.layout-top {
-  top: 20px;
+  top: 19px;
 }
 
 .layout-border.layout-bottom {
-  bottom: 21px;
+  bottom: 20px;
 }
 
 .layout-margin.layout-top {
-  top: 2px;
+  top: 1px;
 }
 
 .layout-margin.layout-bottom {
-  bottom: 3px;
+  bottom: 2px;
 }
 
 .layout-size,
 .layout-margin.layout-left,
 .layout-margin.layout-right,
 .layout-border.layout-left,
 .layout-border.layout-right,
 .layout-padding.layout-left,
 .layout-padding.layout-right {
-  top: 23px;
+  top: 22px;
   line-height: 80px;
 }
 
 .layout-size {
-  width: 100%;
+  width: calc(100% - 2px);
 }
 
 .layout-margin.layout-right,
 .layout-margin.layout-left,
 .layout-border.layout-left,
 .layout-border.layout-right,
 .layout-padding.layout-right,
 .layout-padding.layout-left {
-  width: 20px;
+  width: 21px;
 }
 
 .layout-padding.layout-left {
-  left: 36px;
+  left: 35px;
 }
 
 .layout-padding.layout-right {
-  right: 36px;
+  right: 35px;
 }
 
 .layout-border.layout-left {
-  left: 18px;
+  left: 16px;
 }
 
 .layout-border.layout-right {
-  right: 18px;
+  right: 17px;
 }
 
 .layout-margin.layout-right {
   right: 0;
 }
 
 .layout-margin.layout-left {
   left: 0;
 }
 
 .layout-rotate.layout-left:not(.layout-editing) {
   transform: rotate(-90deg);
-  left: -2px;
 }
 
 .layout-rotate.layout-right:not(.layout-editing) {
   transform: rotate(90deg);
-  right: -2px;
 }
 
 /* Legend: displayed inside regions */
 
 .layout-legend {
-  color: #1A1C22;
   position: absolute;
-  margin: 3px 6px;
+  margin: 2px 6px;
   z-index: 1;
 }
 
+.layout-legend[data-box="margin"] {
+  color: var(--theme-highlight-blue);
+}
+
 /* Editable fields */
 
 .layout-editable {
   border: 1px dashed transparent;
   -moz-user-select: text;
 }
 
 .layout-editable:hover {
--- a/devtools/server/actors/highlighters.css
+++ b/devtools/server/actors/highlighters.css
@@ -24,17 +24,17 @@
   text-indent: initial;
   letter-spacing: initial;
   word-spacing: initial;
   color: initial;
 }
 
 :-moz-native-anonymous .highlighter-container {
   --highlighter-guide-color: #08c;
-  --highlighter-content-color: #f0f7ff;
+  --highlighter-content-color: #87ceeb;
   --highlighter-bubble-text-color: hsl(216, 33%, 97%);
   --highlighter-bubble-background-color: hsl(214, 13%, 24%);
   --highlighter-bubble-border-color: rgba(255, 255, 255, 0.2);
 }
 
 :-moz-native-anonymous .highlighter-container {
   position: fixed;
   width: 100%;
@@ -67,25 +67,25 @@
   display: none;
 }
 
 :-moz-native-anonymous .box-model-content {
   fill: var(--highlighter-content-color);
 }
 
 :-moz-native-anonymous .box-model-padding {
-  fill: #7fe3cc;
+  fill: #6a5acd;
 }
 
 :-moz-native-anonymous .box-model-border {
-  fill: #b3c8e2;
+  fill: #444444;
 }
 
 :-moz-native-anonymous .box-model-margin {
-  fill: #9ebce1;
+  fill: #edff64;
 }
 
 :-moz-native-anonymous .box-model-content,
 :-moz-native-anonymous .box-model-padding,
 :-moz-native-anonymous .box-model-border,
 :-moz-native-anonymous .box-model-margin {
   stroke: none;
 }
--- a/devtools/server/actors/highlighters/css-grid.js
+++ b/devtools/server/actors/highlighters/css-grid.js
@@ -31,16 +31,27 @@ const GRID_LINES_PROPERTIES = {
     strokeStyle: "#8A2BE2"
   },
   "implicit": {
     lineDash: [2, 2],
     strokeStyle: "#9370DB"
   }
 };
 
+// px
+const GRID_GAP_PATTERN_WIDTH = 14;
+const GRID_GAP_PATTERN_HEIGHT = 14;
+const GRID_GAP_PATTERN_LINE_DASH = [5, 3];
+const GRID_GAP_PATTERN_STROKE_STYLE = "#9370DB";
+
+/**
+ * Cached used by `CssGridHighlighter.getGridGapPattern`.
+ */
+const gCachedGridPattern = new Map();
+
 /**
  * The CssGridHighlighter is the class that overlays a visual grid on top of
  * display:grid elements.
  *
  * Usage example:
  * let h = new CssGridHighlighter(env);
  * h.show(node, options);
  * h.hide();
@@ -189,30 +200,69 @@ CssGridHighlighter.prototype = extend(Au
     });
 
     return container;
   },
 
   destroy() {
     AutoRefreshHighlighter.prototype.destroy.call(this);
     this.markup.destroy();
+    gCachedGridPattern.clear();
   },
 
   getElement(id) {
     return this.markup.getElement(this.ID_CLASS_PREFIX + id);
   },
 
   get ctx() {
     return this.canvas.getCanvasContext("2d");
   },
 
   get canvas() {
     return this.getElement("canvas");
   },
 
+  /**
+   * Gets the grid gap pattern used to render the gap regions.
+   *
+   * @param  {String} dimensionType
+   *         The grid dimension type which is either the constant COLUMNS or ROWS.
+   * @return {CanvasPattern} grid gap pattern.
+   */
+  getGridGapPattern(dimensionType) {
+    if (gCachedGridPattern.has(dimensionType)) {
+      return gCachedGridPattern.get(dimensionType);
+    }
+
+    // Create the diagonal lines pattern for the rendering the grid gaps.
+    let canvas = createNode(this.win, { nodeType: "canvas" });
+    canvas.width = GRID_GAP_PATTERN_WIDTH;
+    canvas.height = GRID_GAP_PATTERN_HEIGHT;
+
+    let ctx = canvas.getContext("2d");
+    ctx.setLineDash(GRID_GAP_PATTERN_LINE_DASH);
+    ctx.beginPath();
+    ctx.translate(.5, .5);
+
+    if (dimensionType === COLUMNS) {
+      ctx.moveTo(0, 0);
+      ctx.lineTo(GRID_GAP_PATTERN_WIDTH, GRID_GAP_PATTERN_HEIGHT);
+    } else {
+      ctx.moveTo(GRID_GAP_PATTERN_WIDTH, 0);
+      ctx.lineTo(0, GRID_GAP_PATTERN_HEIGHT);
+    }
+
+    ctx.strokeStyle = GRID_GAP_PATTERN_STROKE_STYLE;
+    ctx.stroke();
+
+    let pattern = ctx.createPattern(canvas, "repeat");
+    gCachedGridPattern.set(dimensionType, pattern);
+    return pattern;
+  },
+
   _show() {
     if (Services.prefs.getBoolPref(CSS_GRID_ENABLED_PREF) && !this.isGrid()) {
       this.hide();
       return false;
     }
 
     return this._update();
   },
@@ -462,18 +512,19 @@ CssGridHighlighter.prototype = extend(Au
         this.renderLine(linePos, lineStartPos, lineEndPos, dimensionType, "edge");
       } else {
         this.renderLine(linePos, lineStartPos, lineEndPos, dimensionType,
                         gridDimension.tracks[i - 1].type);
       }
 
       // Render a second line to illustrate the gutter for non-zero breadth.
       if (line.breadth > 0) {
-        linePos = linePos + line.breadth;
-        this.renderLine(linePos, lineStartPos, lineEndPos, dimensionType,
+        this.renderGridGap(linePos, lineStartPos, lineEndPos, line.breadth,
+                           dimensionType);
+        this.renderLine(linePos + line.breadth, lineStartPos, lineEndPos, dimensionType,
                         gridDimension.tracks[i].type);
       }
     }
   },
 
   /**
    * Render the grid line on the css grid highlighter canvas.
    *
@@ -517,22 +568,54 @@ CssGridHighlighter.prototype = extend(Au
    *         The line position along the x-axis for a column grid line and
    *         y-axis for a row grid line.
    * @param  {Number} startPos
    *         The start position of the cross side of the grid line.
    * @param  {String} dimensionType
    *         The grid dimension type which is either the constant COLUMNS or ROWS.
    */
   renderGridLineNumber(lineNumber, linePos, startPos, dimensionType) {
+    this.ctx.save();
+
     if (dimensionType === COLUMNS) {
       this.ctx.fillText(lineNumber, linePos, startPos);
     } else {
       let textWidth = this.ctx.measureText(lineNumber).width;
       this.ctx.fillText(lineNumber, startPos - textWidth, linePos);
     }
+
+    this.ctx.restore();
+  },
+
+  /**
+   * Render the grid gap area on the css grid highlighter canvas.
+   *
+   * @param  {Number} linePos
+   *         The line position along the x-axis for a column grid line and
+   *         y-axis for a row grid line.
+   * @param  {Number} startPos
+   *         The start position of the cross side of the grid line.
+   * @param  {Number} endPos
+   *         The end position of the cross side of the grid line.
+   * @param  {Number} breadth
+   *         The grid line breadth value.
+   * @param  {String} dimensionType
+   *         The grid dimension type which is either the constant COLUMNS or ROWS.
+   */
+  renderGridGap(linePos, startPos, endPos, breadth, dimensionType) {
+    this.ctx.save();
+    this.ctx.fillStyle = this.getGridGapPattern(dimensionType);
+
+    if (dimensionType === COLUMNS) {
+      this.ctx.fillRect(linePos, startPos, breadth, endPos - startPos);
+    } else {
+      this.ctx.fillRect(startPos, linePos, endPos - startPos, breadth);
+    }
+
+    this.ctx.restore();
   },
 
   /**
    * Render the grid area highlight for the given area name or for all the grid areas.
    *
    * @param  {String} areaName
    *         Name of the grid area to be highlighted. If no area name is provided, all
    *         the grid areas should be highlighted.
--- a/dom/html/HTMLTrackElement.cpp
+++ b/dom/html/HTMLTrackElement.cpp
@@ -45,20 +45,16 @@ static mozilla::LazyLogModule gTrackElem
 #define LOG(type, msg) MOZ_LOG(gTrackElementLog, type, msg)
 
 // Replace the usual NS_IMPL_NS_NEW_HTML_ELEMENT(Track) so
 // we can return an UnknownElement instead when pref'd off.
 nsGenericHTMLElement*
 NS_NewHTMLTrackElement(already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo,
                        mozilla::dom::FromParser aFromParser)
 {
-  if (!mozilla::dom::HTMLTrackElement::IsWebVTTEnabled()) {
-    return new mozilla::dom::HTMLUnknownElement(aNodeInfo);
-  }
-
   return new mozilla::dom::HTMLTrackElement(aNodeInfo);
 }
 
 namespace mozilla {
 namespace dom {
 
 // Map html attribute string values to TextTrackKind enums.
 static constexpr nsAttrValue::EnumTable kKindTable[] = {
@@ -172,23 +168,16 @@ HTMLTrackElement::OnChannelRedirect(nsIC
 }
 
 JSObject*
 HTMLTrackElement::WrapNode(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
 {
   return HTMLTrackElementBinding::Wrap(aCx, this, aGivenProto);
 }
 
-bool
-HTMLTrackElement::IsWebVTTEnabled()
-{
-  // Our callee does not use its arguments.
-  return HTMLTrackElementBinding::ConstructorEnabled(nullptr, nullptr);
-}
-
 TextTrack*
 HTMLTrackElement::GetTrack()
 {
   if (!mTrack) {
     CreateTextTrack();
   }
 
   return mTrack;
--- a/dom/html/HTMLTrackElement.h
+++ b/dom/html/HTMLTrackElement.h
@@ -101,19 +101,16 @@ public:
   // Override BindToTree() so that we can trigger a load when we become
   // the child of a media element.
   virtual nsresult BindToTree(nsIDocument* aDocument,
                               nsIContent* aParent,
                               nsIContent* aBindingParent,
                               bool aCompileEventHandlers) override;
   virtual void UnbindFromTree(bool aDeep, bool aNullParent) override;
 
-  // Check enabling preference.
-  static bool IsWebVTTEnabled();
-
   void DispatchTrackRunnable(const nsString& aEventName);
   void DispatchTrustedEvent(const nsAString& aName);
 
   void DropChannel();
 
   void NotifyShutdown();
 
 protected:
--- a/dom/html/test/mochitest.ini
+++ b/dom/html/test/mochitest.ini
@@ -536,17 +536,16 @@ skip-if = buildapp == 'mulet' || buildap
 [test_param_attributes_reflection.html]
 [test_q_attributes_reflection.html]
 [test_restore_from_parser_fragment.html]
 [test_rowscollection.html]
 [test_srcdoc-2.html]
 [test_srcdoc.html]
 [test_style_attributes_reflection.html]
 [test_track.html]
-[test_track_disabled.html]
 [test_ul_attributes_reflection.html]
 [test_undoManager.html]
 [test_input_files_not_nsIFile.html]
 [test_ignoreuserfocus.html]
 [test_fragment_form_pointer.html]
 [test_bug1682.html]
 [test_bug1823.html]
 [test_bug57600.html]
@@ -628,9 +627,9 @@ skip-if = (os != 'win' && os != 'linux')
 skip-if = (os != 'win' && os != 'linux')
 [test_bug1261674-2.html]
 skip-if = (os != 'win' && os != 'linux')
 [test_bug1260704.html]
 [test_allowMedia.html]
 [test_bug1292522_same_domain_with_different_port_number.html]
 [test_bug1295719_event_sequence_for_arrow_keys.html]
 skip-if = os == "android" || appname == "b2g" # up/down arrow keys not supported on android/b2g
-[test_bug1295719_event_sequence_for_number_keys.html]
\ No newline at end of file
+[test_bug1295719_event_sequence_for_number_keys.html]
deleted file mode 100644
--- a/dom/html/test/test_track_disabled.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=833386
--->
-<head>
-  <meta charset='utf-8'>
-  <title>Test for Bug 833386 - HTMLTrackElement</title>
-  <script type="text/javascript" src="/MochiKit/MochiKit.js"></script>
-  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
-  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
-</head>
-<body>
-<p id="display"></p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-<script class="testbody" type="text/javascript">
-SimpleTest.waitForExplicitFinish();
-SpecialPowers.pushPrefEnv({"set": [["media.webvtt.enabled", false]]},
-  function() {
-    var track = document.createElement("track");
-    is(track.constructor, HTMLUnknownElement, "Track should actually be an HTMLUnknownElement.");
-    SimpleTest.finish();
-  }
-);
-</script>
-</pre>
-</body>
-</html>
--- a/dom/media/TextTrackRegion.h
+++ b/dom/media/TextTrackRegion.h
@@ -23,22 +23,16 @@ class TextTrack;
 class TextTrackRegion final : public nsISupports,
                               public nsWrapperCache
 {
 public:
 
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(TextTrackRegion)
 
-  static bool RegionsEnabled(JSContext* cx, JSObject* obj)
-  {
-    return Preferences::GetBool("media.webvtt.enabled") &&
-           Preferences::GetBool("media.webvtt.regions.enabled");
-  }
-
   JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
 
   nsISupports* GetParentObject() const
   {
     return mParent;
   }
 
   explicit TextTrackRegion(nsISupports* aGlobal);
--- a/dom/media/WebVTTListener.cpp
+++ b/dom/media/WebVTTListener.cpp
@@ -48,21 +48,16 @@ WebVTTListener::GetInterface(const nsIID
                              void** aResult)
 {
   return QueryInterface(aIID, aResult);
 }
 
 nsresult
 WebVTTListener::LoadResource()
 {
-  if (!HTMLTrackElement::IsWebVTTEnabled()) {
-    NS_WARNING("WebVTT support disabled."
-               " See media.webvtt.enabled in about:config. ");
-    return NS_ERROR_FAILURE;
-  }
   nsresult rv;
   mParserWrapper = do_CreateInstance(NS_WEBVTTPARSERWRAPPER_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsPIDOMWindowInner* window = mElement->OwnerDoc()->GetInnerWindow();
   rv = mParserWrapper->LoadParser(window);
   NS_ENSURE_SUCCESS(rv, rv);
 
--- a/dom/media/test/mochitest.ini
+++ b/dom/media/test/mochitest.ini
@@ -881,18 +881,16 @@ skip-if = toolkit == 'gonk' # bug 112884
 [test_video_to_canvas.html]
 [test_video_in_audio_element.html]
 [test_videoDocumentTitle.html]
 [test_VideoPlaybackQuality.html]
 [test_VideoPlaybackQuality_disabled.html]
 [test_volume.html]
 [test_vttparser.html]
 tags = webvtt
-[test_webvtt_disabled.html]
-tags = webvtt
 [test_webvtt_empty_displaystate.html]
 tags = webvtt
 [test_webvtt_positionalign.html]
 tags = webvtt
 
 # The tests below contain backend-specific tests. Write backend independent
 # tests rather than adding to this list.
 [test_can_play_type_webm.html]
--- a/dom/media/test/test_texttrackevents_video.html
+++ b/dom/media/test/test_texttrackevents_video.html
@@ -9,85 +9,82 @@
 </head>
 <body>
 <p id="display"></p>
 <div id="content">
 </div>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 SimpleTest.waitForExplicitFinish();
-SpecialPowers.pushPrefEnv({"set": [["media.webvtt.enabled", true]]},
-  function() {
-    var video = document.createElement("video");
-    video.src = "vp9cake.webm";
-    video.preload = "auto";
-    video.controls = true;
-    var trackElement = document.createElement("track");
-    trackElement.src = "sequential.vtt";
-    trackElement.kind = "subtitles";
-    trackElement.default = true;
-    document.getElementById("content").appendChild(video);
-    video.appendChild(trackElement);
+
+var video = document.createElement("video");
+video.src = "vp9cake.webm";
+video.preload = "auto";
+video.controls = true;
+var trackElement = document.createElement("track");
+trackElement.src = "sequential.vtt";
+trackElement.kind = "subtitles";
+trackElement.default = true;
+document.getElementById("content").appendChild(video);
+video.appendChild(trackElement);
 
-    var trackElementCueChangeCount = 0;
-    var trackCueChangeCount = 0;
-    var cueEnterCount = 0;
-    var cueExitCount = 0;
+var trackElementCueChangeCount = 0;
+var trackCueChangeCount = 0;
+var cueEnterCount = 0;
+var cueExitCount = 0;
 
-    video.addEventListener("loadedmetadata", function run_tests() {
-      // Re-queue run_tests() at the end of the event loop until the track
-      // element has loaded its data.
-      if (trackElement.readyState == 1) {
-        return setTimeout(run_tests, 0);
-      }
-      is(trackElement.readyState, 2, "Track::ReadyState should be set to LOADED.");
-      ok('oncuechange' in trackElement.track, "Track::OnCueChange should exist.");
+video.addEventListener("loadedmetadata", function run_tests() {
+  // Re-queue run_tests() at the end of the event loop until the track
+  // element has loaded its data.
+  if (trackElement.readyState == 1) {
+    return setTimeout(run_tests, 0);
+  }
+  is(trackElement.readyState, 2, "Track::ReadyState should be set to LOADED.");
+  ok('oncuechange' in trackElement.track, "Track::OnCueChange should exist.");
 
-      var textTrack = trackElement.track;
-      is(textTrack.cues.length, 3, "textTrack.cues.length should 3.");
-      textTrack.cues[0].onenter = function() {
-        ++cueEnterCount;
-      };
-      textTrack.cues[0].onexit = function() {
-        ++cueExitCount;
-      };
-      textTrack.cues[1].onenter = function() {
-        ++cueEnterCount;
-      };
-      textTrack.cues[1].onexit = function() {
-        ++cueExitCount;
-      };
-      textTrack.cues[2].onenter = function() {
-        ++cueEnterCount;
-      };
-      textTrack.cues[2].onexit = function() {
-        ++cueExitCount;
-      };
+  var textTrack = trackElement.track;
+  is(textTrack.cues.length, 3, "textTrack.cues.length should 3.");
+  textTrack.cues[0].onenter = function() {
+    ++cueEnterCount;
+  };
+  textTrack.cues[0].onexit = function() {
+    ++cueExitCount;
+  };
+  textTrack.cues[1].onenter = function() {
+    ++cueEnterCount;
+  };
+  textTrack.cues[1].onexit = function() {
+    ++cueExitCount;
+  };
+  textTrack.cues[2].onenter = function() {
+    ++cueEnterCount;
+  };
+  textTrack.cues[2].onexit = function() {
+    ++cueExitCount;
+  };
 
-      trackElement.track.oncuechange = function() {
-        ++trackElementCueChangeCount;
-      };
+  trackElement.track.oncuechange = function() {
+    ++trackElementCueChangeCount;
+  };
 
-      trackElement.addEventListener("cuechange", function() {
-        ++trackCueChangeCount;
-      });
+  trackElement.addEventListener("cuechange", function() {
+    ++trackCueChangeCount;
+  });
 
-      video.play();
-    });
+  video.play();
+});
 
-    video.addEventListener('ended', function() {
-      // Should be fired 1 to 6 times, as there are 3 cues,
-      // with a change event for when it is activated/deactivated
-      // (6 events at most).
-      isnot(trackElementCueChangeCount, 0, "TrackElement should fire cue change at least one time.");
-      ok(trackElementCueChangeCount <= 6, 'trackElementCueChangeCount should <= 6');
-      isnot(trackCueChangeCount, 0, "TrackElement.track should fire cue change at least one time.");
-      ok(trackCueChangeCount <= 6, 'trackCueChangeCount should <= 6');
-      is(cueEnterCount, 3, "cueEnterCount should fire three times.");
-      is(cueExitCount, 3, "cueExitCount should fire three times.");
-      SimpleTest.finish()
-    })
-  }
-);
+video.addEventListener('ended', function() {
+  // Should be fired 1 to 6 times, as there are 3 cues,
+  // with a change event for when it is activated/deactivated
+  // (6 events at most).
+  isnot(trackElementCueChangeCount, 0, "TrackElement should fire cue change at least one time.");
+  ok(trackElementCueChangeCount <= 6, 'trackElementCueChangeCount should <= 6');
+  isnot(trackCueChangeCount, 0, "TrackElement.track should fire cue change at least one time.");
+  ok(trackCueChangeCount <= 6, 'trackCueChangeCount should <= 6');
+  is(cueEnterCount, 3, "cueEnterCount should fire three times.");
+  is(cueExitCount, 3, "cueExitCount should fire three times.");
+  SimpleTest.finish()
+});
 </script>
 </pre>
 </body>
 </html>
--- a/dom/media/test/test_trackelementsrc.html
+++ b/dom/media/test/test_trackelementsrc.html
@@ -10,46 +10,44 @@
 <body>
 <p id="display"></p>
 <div id="content" style="display: none">
 </div>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 SimpleTest.waitForExplicitFinish();
 
-SpecialPowers.pushPrefEnv({"set": [["media.webvtt.enabled", true],
-  ["media.webvtt.regions.enabled", true]]}, function() {
+SpecialPowers.pushPrefEnv({"set": [["media.webvtt.regions.enabled", true]]},
+  function() {
+    var video = document.createElement("video");
+    video.src = "seek.webm";
+    video.preload = "metadata";
+    var trackElement = document.createElement("track");
+    trackElement.src = "basic.vtt";
+    trackElement.default = true;
 
-var video = document.createElement("video");
-video.src = "seek.webm";
-video.preload = "metadata";
-var trackElement = document.createElement("track");
-trackElement.src = "basic.vtt";
-trackElement.default = true;
-
-document.getElementById("content").appendChild(video);
-video.appendChild(trackElement);
+    document.getElementById("content").appendChild(video);
+    video.appendChild(trackElement);
 
-video.addEventListener("loadedmetadata", function metadata() {
-  if (trackElement.readyState <= 1) {
-    return setTimeout(metadata, 0);
-  }
-  is(video.textTracks.length, 1, "Length should be 1.");
-  is(video.textTracks[0].cues.length, 6, "Cue length should be 6.");
+    video.addEventListener("loadedmetadata", function metadata() {
+      if (trackElement.readyState <= 1) {
+        return setTimeout(metadata, 0);
+      }
+      is(video.textTracks.length, 1, "Length should be 1.");
+      is(video.textTracks[0].cues.length, 6, "Cue length should be 6.");
 
-  trackElement.src = "sequential.vtt";
-  trackElement.track.mode = "showing";
-  video.play();
-});
+      trackElement.src = "sequential.vtt";
+      trackElement.track.mode = "showing";
+      video.play();
+    });
 
-video.addEventListener("ended", function end() {
-  is(trackElement.readyState, 2, "readyState should be 2.")
-  is(video.textTracks.length, 1, "Length should be 1.");
-  is(video.textTracks[0].cues.length, 3, "Cue length should be 3.");
-  SimpleTest.finish();
-});
-
+    video.addEventListener("ended", function end() {
+      is(trackElement.readyState, 2, "readyState should be 2.")
+      is(video.textTracks.length, 1, "Length should be 1.");
+      is(video.textTracks[0].cues.length, 3, "Cue length should be 3.");
+      SimpleTest.finish();
+    });
 });
 </script>
 </pre>
 </body>
 </html>
 
deleted file mode 100644
--- a/dom/media/test/test_webvtt_disabled.html
+++ /dev/null
@@ -1,35 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=833386
--->
-<head>
-  <meta charset='utf-8'>
-  <title>Test for Bug 833386 - TextTrackList Pref Off</title>
-  <script type="text/javascript" src="/MochiKit/MochiKit.js"></script>
-  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
-  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
-</head>
-<body>
-<p id="display"></p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-<script class="testbody" type="text/javascript">
-SimpleTest.waitForExplicitFinish();
-SpecialPowers.pushPrefEnv({"set": [["media.webvtt.enabled", false]]},
-  function() {
-    var video = document.createElement("video");
-    is(video.textTracks, undefined, "HTMLMediaElement::TextTracks() function should be unavailable.");
-    is(video.addTextTrack, undefined, "HTMLMediaElement::AddTextTrack() function should be unavailable.");
-    is(typeof TextTrackList, "undefined", "TextTrackList should not be available.");
-    is(typeof TextTrack, "undefined", "TextTrack should not be available.");
-    is(typeof VTTCue, "undefined", "VTTCue should not be available.");
-    is(typeof TextTrackCueList, "undefined", "TextTrackCueList should not be available.");
-    SimpleTest.finish();
-  }
-);
-</script>
-</pre>
-</body>
-</html>
--- a/dom/webidl/HTMLMediaElement.webidl
+++ b/dom/webidl/HTMLMediaElement.webidl
@@ -87,19 +87,17 @@ interface HTMLMediaElement : HTMLElement
            attribute boolean defaultMuted;
 
   // TODO: Bug 847379
   // tracks
   [Pref="media.track.enabled"]
   readonly attribute AudioTrackList audioTracks;
   [Pref="media.track.enabled"]
   readonly attribute VideoTrackList videoTracks;
-  [Pref="media.webvtt.enabled"]
   readonly attribute TextTrackList? textTracks;
-  [Pref="media.webvtt.enabled"]
   TextTrack addTextTrack(TextTrackKind kind,
                          optional DOMString label = "",
                          optional DOMString language = "");
 };
 
 // Mozilla extensions:
 partial interface HTMLMediaElement {
   [ChromeOnly]
--- a/dom/webidl/HTMLTrackElement.webidl
+++ b/dom/webidl/HTMLTrackElement.webidl
@@ -2,17 +2,16 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  *
  * The origin of this IDL file is
  * http://www.whatwg.org/specs/web-apps/current-work/#the-track-element
  */
 
-[Pref="media.webvtt.enabled"]
 interface HTMLTrackElement : HTMLElement {
   [SetterThrows, Pure]
   attribute DOMString kind;
   [SetterThrows, Pure]
   attribute DOMString src;
   [SetterThrows, Pure]
   attribute DOMString srclang;
   [SetterThrows, Pure]
--- a/dom/webidl/TextTrack.webidl
+++ b/dom/webidl/TextTrack.webidl
@@ -16,17 +16,16 @@ enum TextTrackKind {
 };
 
 enum TextTrackMode {
   "disabled",
   "hidden",
   "showing"
 };
 
-[Pref="media.webvtt.enabled"]
 interface TextTrack : EventTarget {
   readonly attribute TextTrackKind kind;
   readonly attribute DOMString label;
   readonly attribute DOMString language;
 
   readonly attribute DOMString id;
   readonly attribute DOMString inBandMetadataTrackDispatchType;
 
--- a/dom/webidl/TextTrackCue.webidl
+++ b/dom/webidl/TextTrackCue.webidl
@@ -2,20 +2,19 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  *
  * The origin of this IDL file is
  * https://html.spec.whatwg.org/#texttrackcue
  */
 
-[Pref="media.webvtt.enabled"]
 interface TextTrackCue : EventTarget {
   readonly attribute TextTrack? track;
 
   attribute DOMString id;
   attribute double startTime;
   attribute double endTime;
   attribute boolean pauseOnExit;
 
   attribute EventHandler onenter;
   attribute EventHandler onexit;
-};
\ No newline at end of file
+};
--- a/dom/webidl/TextTrackCueList.webidl
+++ b/dom/webidl/TextTrackCueList.webidl
@@ -2,14 +2,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  *
  * The origin of this IDL file is
  * http://www.whatwg.org/specs/web-apps/current-work/#texttrackcuelist
  */
 
-[Pref="media.webvtt.enabled"]
 interface TextTrackCueList {
   readonly attribute unsigned long length;
   getter VTTCue (unsigned long index);
   VTTCue? getCueById(DOMString id);
 };
--- a/dom/webidl/TextTrackList.webidl
+++ b/dom/webidl/TextTrackList.webidl
@@ -2,17 +2,16 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  *
  * The origin of this IDL file is
  * http://www.whatwg.org/specs/web-apps/current-work/#texttracklist
  */
 
-[Pref="media.webvtt.enabled"]
 interface TextTrackList : EventTarget {
   readonly attribute unsigned long length;
   getter TextTrack (unsigned long index);
   TextTrack? getTrackById(DOMString id);
 
            attribute EventHandler onchange;
            attribute EventHandler onaddtrack;
            attribute EventHandler onremovetrack;
--- a/dom/webidl/VTTCue.webidl
+++ b/dom/webidl/VTTCue.webidl
@@ -31,18 +31,17 @@ enum AlignSetting {
 };
 
 enum DirectionSetting {
   "",
   "rl",
   "lr"
 };
 
-[Constructor(double startTime, double endTime, DOMString text),
- Pref="media.webvtt.enabled"]
+[Constructor(double startTime, double endTime, DOMString text)]
 interface VTTCue : TextTrackCue {
   [Pref="media.webvtt.regions.enabled"]
   attribute VTTRegion? region;
   attribute DirectionSetting vertical;
   attribute boolean snapToLines;
   attribute (double or AutoKeyword) line;
   [SetterThrows]
   attribute LineAlignSetting lineAlign;
--- a/dom/webidl/VTTRegion.webidl
+++ b/dom/webidl/VTTRegion.webidl
@@ -2,17 +2,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  *
  * The origin of this IDL file is
  *  http://dev.w3.org/html5/webvtt/#extension-of-the-texttrack-interface-for-region-support
  */
 
-[Constructor, Func="TextTrackRegion::RegionsEnabled"]
+[Constructor, Pref="media.webvtt.regions.enabled"]
 interface VTTRegion {
            [SetterThrows]
            attribute double width;
 
            attribute long lines;
 
            [SetterThrows]
            attribute double regionAnchorX;
--- a/layout/generic/crashtests/1145768.html
+++ b/layout/generic/crashtests/1145768.html
@@ -1,17 +1,13 @@
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="UTF-8">
-<!--
 
-user_pref("layout.css.vertical-text.enabled", true);
-
--->
 <script>
 
 function boom()
 {
   document.documentElement.offsetHeight;
   var emptyTail = q.firstChild.splitText(2);
   document.documentElement.offsetHeight;
   emptyTail.splitText(0);
--- a/layout/reftests/css-grid/reftest.list
+++ b/layout/reftests/css-grid/reftest.list
@@ -34,20 +34,20 @@ fails == grid-whitespace-handling-1b.xht
 == grid-abspos-items-015.html grid-abspos-items-015-ref.html
 == grid-order-abspos-items-001.html grid-order-abspos-items-001-ref.html
 == grid-order-placement-auto-001.html grid-order-placement-auto-001-ref.html
 fuzzy-if(skiaContent,1,200) == grid-order-placement-definite-001.html grid-order-placement-definite-001-ref.html
 skip-if(Android) == grid-placement-definite-implicit-001.html grid-placement-definite-implicit-001-ref.html
 == grid-placement-definite-implicit-002.html grid-placement-definite-implicit-002-ref.html
 skip-if(Android) fuzzy-if(winWidget,1,32) == grid-placement-auto-implicit-001.html grid-placement-auto-implicit-001-ref.html
 == grid-placement-abspos-implicit-001.html grid-placement-abspos-implicit-001-ref.html
-pref(layout.css.vertical-text.enabled,true) == rtl-grid-placement-definite-001.html rtl-grid-placement-definite-001-ref.html
-pref(layout.css.vertical-text.enabled,true) == rtl-grid-placement-auto-row-sparse-001.html rtl-grid-placement-auto-row-sparse-001-ref.html
-pref(layout.css.vertical-text.enabled,true) == vlr-grid-placement-auto-row-sparse-001.html vlr-grid-placement-auto-row-sparse-001-ref.html
-pref(layout.css.vertical-text.enabled,true) == vrl-grid-placement-auto-row-sparse-001.html vrl-grid-placement-auto-row-sparse-001-ref.html
+== rtl-grid-placement-definite-001.html rtl-grid-placement-definite-001-ref.html
+== rtl-grid-placement-auto-row-sparse-001.html rtl-grid-placement-auto-row-sparse-001-ref.html
+== vlr-grid-placement-auto-row-sparse-001.html vlr-grid-placement-auto-row-sparse-001-ref.html
+== vrl-grid-placement-auto-row-sparse-001.html vrl-grid-placement-auto-row-sparse-001-ref.html
 == grid-relpos-items-001.html grid-relpos-items-001-ref.html
 == grid-item-sizing-percent-001.html grid-item-sizing-percent-001-ref.html
 == grid-item-sizing-px-001.html grid-item-sizing-percent-001-ref.html
 == grid-item-dir-001.html grid-item-dir-001-ref.html
 fuzzy-if(winWidget,70,130) fuzzy-if(cocoaWidget,85,180) == grid-col-max-sizing-max-content-001.html grid-col-max-sizing-max-content-001-ref.html
 fuzzy-if(winWidget,70,130) fuzzy-if(cocoaWidget,85,180) == grid-col-max-sizing-max-content-002.html grid-col-max-sizing-max-content-002-ref.html
 == grid-min-max-content-sizing-001.html grid-min-max-content-sizing-001-ref.html
 == grid-min-max-content-sizing-002.html grid-min-max-content-sizing-002-ref.html
--- a/layout/reftests/css-ruby/reftest.list
+++ b/layout/reftests/css-ruby/reftest.list
@@ -41,17 +41,17 @@ load nested-ruby-1.html
 == no-transform.html no-transform-ref.html
 == relative-positioning-1.html relative-positioning-1-ref.html
 == relative-positioning-2.html relative-positioning-2-ref.html
 == ruby-align-1.html ruby-align-1-ref.html
 == ruby-align-1a.html ruby-align-1-ref.html
 == ruby-align-2.html ruby-align-2-ref.html
 == ruby-align-2a.html ruby-align-2-ref.html
 == ruby-position-horizontal.html ruby-position-horizontal-ref.html
-pref(layout.css.vertical-text.enabled,true) == ruby-position-vertical-lr.html ruby-position-vertical-lr-ref.html
-pref(layout.css.vertical-text.enabled,true) == ruby-position-vertical-rl.html ruby-position-vertical-rl-ref.html
+== ruby-position-vertical-lr.html ruby-position-vertical-lr-ref.html
+== ruby-position-vertical-rl.html ruby-position-vertical-rl-ref.html
 != ruby-reflow-1-opaqueruby.html ruby-reflow-1-noruby.html
 fuzzy-if(/^Windows\x20NT\x2010\.0/.test(http.oscpu),13,1) == ruby-reflow-1-transparentruby.html ruby-reflow-1-noruby.html
 == ruby-span-1.html ruby-span-1-ref.html
 == ruby-whitespace-1.html ruby-whitespace-1-ref.html
 == ruby-whitespace-2.html ruby-whitespace-2-ref.html
 == bug1181890.html bug1181890-ref.html
 != bug1181890.html bug1181890-notref.html
--- a/layout/reftests/floats/reftest.list
+++ b/layout/reftests/floats/reftest.list
@@ -46,22 +46,16 @@ fuzzy-if(skiaContent,1,12000) == float-i
 == bfc-displace-2a.html bfc-displace-2a-ref.html
 == bfc-displace-2b.html bfc-displace-2b-ref.html
 == bfc-displace-3a.html bfc-displace-3a-ref.html
 == bfc-displace-3b.html bfc-displace-3b-ref.html
 == bfc-displace-4.html bfc-displace-4-ref.html
 == bfc-shrink-1.html bfc-shrink-1-ref.html
 
 # Testcases that involve vertical writing mode.
-#
-# XXX The default-preferences setting here can be removed after the
-#     pref has been made true by default for all channels (bug 1138384).
-
-default-preferences pref(layout.css.vertical-text.enabled,true)
-
 == float-in-rtl-vlr-1a.html float-in-rtl-vlr-1-ref.html
 == float-in-rtl-vlr-1b.html float-in-rtl-vlr-1-ref.html
 == float-in-rtl-vlr-1c.html float-in-rtl-vlr-1-ref.html
 == float-in-rtl-vlr-1d.html float-in-rtl-vlr-1-ref.html
 == float-in-rtl-vlr-2a.html float-in-rtl-vlr-2-ref.html
 == float-in-rtl-vlr-2b.html float-in-rtl-vlr-2-ref.html
 == float-in-rtl-vlr-2c.html float-in-rtl-vlr-2-ref.html
 == float-in-rtl-vlr-2d.html float-in-rtl-vlr-2-ref.html
--- a/layout/reftests/forms/input/number/reftest.list
+++ b/layout/reftests/forms/input/number/reftest.list
@@ -5,18 +5,18 @@ default-preferences pref(dom.forms.numbe
 skip-if(Android||B2G||Mulet) != not-other-type-unthemed-1.html not-other-type-unthemed-1a-notref.html # Initial mulet triage: parity with B2G/B2G Desktop
 skip-if(Android||B2G||Mulet) != not-other-type-unthemed-1.html not-other-type-unthemed-1b-notref.html # Initial mulet triage: parity with B2G/B2G Desktop
 # only valid on Android/B2G where type=number looks the same as type=text
 skip-if(!Android&&!B2G&&!Mulet) == number-same-as-text-unthemed.html number-same-as-text-unthemed-ref.html # Initial mulet triage: parity with B2G/B2G Desktop
 
 # should look the same as type=text, except for the spin box
 == number-similar-to-text-unthemed.html number-similar-to-text-unthemed-ref.html
 == number-similar-to-text-unthemed-rtl.html number-similar-to-text-unthemed-rtl-ref.html
-pref(layout.css.vertical-text.enabled,true) == number-similar-to-text-unthemed-vertical-lr.html number-similar-to-text-unthemed-vertical-lr-ref.html
-pref(layout.css.vertical-text.enabled,true) == number-similar-to-text-unthemed-vertical-rl.html number-similar-to-text-unthemed-vertical-rl-ref.html
+== number-similar-to-text-unthemed-vertical-lr.html number-similar-to-text-unthemed-vertical-lr-ref.html
+== number-similar-to-text-unthemed-vertical-rl.html number-similar-to-text-unthemed-vertical-rl-ref.html
 
 # dynamic type changes:
 fuzzy-if(/^Windows\x20NT\x205\.1/.test(http.oscpu),64,4) fuzzy-if(cocoaWidget,63,4) fuzzy-if(skiaContent,2,5) == to-number-from-other-type-unthemed-1.html to-number-from-other-type-unthemed-1-ref.html
 fuzzy-if(skiaContent,2,5) == from-number-to-other-type-unthemed-1.html from-number-to-other-type-unthemed-1-ref.html
 
 # dynamic value changes:
 fuzzy-if(skiaContent,2,13) == show-value.html show-value-ref.html
 
--- a/layout/reftests/forms/input/range/reftest.list
+++ b/layout/reftests/forms/input/range/reftest.list
@@ -28,19 +28,16 @@ fuzzy-if(B2G,2,1) == max-prop.html 100pc
 == direction-unthemed-1.html direction-unthemed-1-ref.html
 
 # ::-moz-range-progress pseudo-element:
 fails-if(B2G||Mulet||Android) == moz-range-progress-1.html moz-range-progress-1-ref.html # Initial mulet triage: parity with B2G/B2G Desktop
 == moz-range-progress-2.html moz-range-progress-2-ref.html
 == moz-range-progress-3.html moz-range-progress-3-ref.html
 
 # Tests for block and inline orientation in combination with writing-mode
-# XXX Remove default-preferences setting here after bug 1138384 makes
-#     it the default for all channels
-default-preferences pref(layout.css.vertical-text.enabled,true)
 != range-orient-horizontal.html range-orient-vertical.html
 != range-orient-horizontal.html range-orient-horizontal-rtl.html
 == range-orient-block.html range-orient-vertical.html
 == range-orient-inline.html range-orient-horizontal.html
 == range-vlr.html range-orient-vertical.html
 == range-vlr-orient-block.html range-orient-horizontal.html
 == range-vlr-orient-inline.html range-orient-vertical.html
 == range-vlr-orient-horizontal.html range-orient-horizontal.html
--- a/layout/reftests/forms/meter/reftest.list
+++ b/layout/reftests/forms/meter/reftest.list
@@ -22,19 +22,16 @@ skip-if(B2G||Mulet) == bar-pseudo-elemen
 include default-style/reftest.list
 
 # Tests for bugs:
 == block-invalidate.html block-invalidate-ref.html
 == in-cells.html in-cells-ref.html
 == max-height.html max-height-ref.html
 
 # Tests for block and inline orientation in combination with writing-mode
-# XXX Remove default-preferences setting here after bug 1138384 makes
-#     it the default for all channels
-default-preferences pref(layout.css.vertical-text.enabled,true)
 != meter-orient-vertical.html meter-orient-horizontal.html
 != meter-orient-horizontal.html meter-orient-horizontal-rtl.html
 == meter-orient-block.html meter-orient-vertical.html
 == meter-orient-inline.html meter-orient-horizontal.html
 == meter-vlr.html meter-orient-vertical.html
 == meter-vlr-orient-block.html meter-orient-horizontal.html
 == meter-vlr-orient-inline.html meter-orient-vertical.html
 == meter-vlr-orient-horizontal.html meter-orient-horizontal.html
--- a/layout/reftests/forms/progress/reftest.list
+++ b/layout/reftests/forms/progress/reftest.list
@@ -21,19 +21,16 @@ skip-if(B2G||Mulet) == bar-pseudo-elemen
 # == transformations.html transformations-ref.html
 
 # Tests for bugs:
 == block-invalidate.html block-invalidate-ref.html
 == in-cells.html in-cells-ref.html
 == max-height.html max-height-ref.html
 
 # Tests for block and inline orientation in combination with writing-mode
-# XXX Remove default-preferences setting here after bug 1138384 makes
-#     it the default for all channels
-default-preferences pref(layout.css.vertical-text.enabled,true)
 != progress-orient-horizontal.html progress-orient-vertical.html
 fails-if(!cocoaWidget||OSX==1010) != progress-orient-vertical.html progress-orient-vertical-rtl.html # only OS X currently has direction-dependent rendering here
 == progress-orient-block.html progress-orient-vertical.html
 == progress-orient-inline.html progress-orient-horizontal.html
 == progress-vlr.html progress-orient-vertical.html
 == progress-vlr-orient-block.html progress-orient-horizontal.html
 == progress-vlr-orient-inline.html progress-orient-vertical.html
 == progress-vlr-orient-horizontal.html progress-orient-horizontal.html
--- a/layout/reftests/svg/text/reftest.list
+++ b/layout/reftests/svg/text/reftest.list
@@ -126,17 +126,17 @@ fuzzy-if(/^Windows\x20NT\x2010\.0/.test(
 == textLength-4.svg textLength-4-ref.svg
 == textLength-5.svg textLength-5-ref.svg
 == textLength-6.svg textLength-6-ref.svg
 
 # text-shadow
 == text-shadow.svg text-shadow-ref.svg
 
 # vertical text
-pref(layout.css.vertical-text.enabled,true) == vertical-01.svg vertical-01-ref.svg
+== vertical-01.svg vertical-01-ref.svg
 
 # tests for ignoring various properties
 == ignore-border.svg ignore-prop-ref.svg
 == ignore-display.svg ignore-display-ref.svg
 == ignore-float.svg ignore-prop-ref.svg
 == ignore-float-first-letter.svg ignore-prop-ref.svg
 == ignore-position.svg ignore-position-ref.svg
 == ignore-margin.svg ignore-prop-ref.svg
--- a/layout/reftests/text-overflow/reftest.list
+++ b/layout/reftests/text-overflow/reftest.list
@@ -21,16 +21,16 @@ HTTP(..) == theme-overflow.html theme-ov
 skip-if(B2G||Mulet) HTTP(..) == table-cell.html table-cell-ref.html # Initial mulet triage: parity with B2G/B2G Desktop
 skip-if(Mulet) fuzzy-if(gtkWidget,10,32) HTTP(..) == two-value-syntax.html two-value-syntax-ref.html # MULET: Bug 1144079: Re-enable Mulet mochitests and reftests taskcluster-specific disables
 skip-if(B2G||Mulet) HTTP(..) == single-value.html single-value-ref.html  # Initial mulet triage: parity with B2G/B2G Desktop
 skip-if(B2G||Mulet) fuzzy-if(gtkWidget,10,2) HTTP(..) == atomic-under-marker.html atomic-under-marker-ref.html # Initial mulet triage: parity with B2G/B2G Desktop
 fuzzy(1,2616) skip-if(Android||B2G||Mulet) fuzzy-if(asyncPan&&!layersGPUAccelerated,102,12352) HTTP(..) == xulscroll.html xulscroll-ref.html # Initial mulet triage: parity with B2G/B2G Desktop
 HTTP(..) == combobox-zoom.html combobox-zoom-ref.html
 
 # The vertical-text pref setting can be removed after bug 1138384 lands
-pref(layout.css.vertical-text.enabled,true) == vertical-decorations-1.html vertical-decorations-1-ref.html
-pref(layout.css.vertical-text.enabled,true) == vertical-decorations-2.html vertical-decorations-2-ref.html
-pref(layout.css.vertical-text.enabled,true) != vertical-decorations-1.html vertical-decorations-1-2-notref.html
-pref(layout.css.vertical-text.enabled,true) != vertical-decorations-2.html vertical-decorations-1-2-notref.html
-pref(layout.css.vertical-text.enabled,true) == vertical-decorations-3.html vertical-decorations-3-ref.html
-pref(layout.css.vertical-text.enabled,true) == vertical-decorations-4.html vertical-decorations-4-ref.html
-pref(layout.css.vertical-text.enabled,true) != vertical-decorations-3.html vertical-decorations-3-4-notref.html
-pref(layout.css.vertical-text.enabled,true) != vertical-decorations-4.html vertical-decorations-3-4-notref.html
+== vertical-decorations-1.html vertical-decorations-1-ref.html
+== vertical-decorations-2.html vertical-decorations-2-ref.html
+!= vertical-decorations-1.html vertical-decorations-1-2-notref.html
+!= vertical-decorations-2.html vertical-decorations-1-2-notref.html
+== vertical-decorations-3.html vertical-decorations-3-ref.html
+== vertical-decorations-4.html vertical-decorations-4-ref.html
+!= vertical-decorations-3.html vertical-decorations-3-4-notref.html
+!= vertical-decorations-4.html vertical-decorations-3-4-notref.html
--- a/layout/reftests/w3c-css/submitted/flexbox/reftest.list
+++ b/layout/reftests/w3c-css/submitted/flexbox/reftest.list
@@ -188,22 +188,22 @@ fails == flexbox-min-height-auto-002b.ht
 == flexbox-whitespace-handling-002.xhtml  flexbox-whitespace-handling-002-ref.xhtml
 
 # Tests for flex containers with pseudo-elements
 == flexbox-with-pseudo-elements-001.html flexbox-with-pseudo-elements-001-ref.html
 == flexbox-with-pseudo-elements-002.html flexbox-with-pseudo-elements-002-ref.html
 == flexbox-with-pseudo-elements-003.html flexbox-with-pseudo-elements-003-ref.html
 
 # Tests for combined influence of 'writing-mode' & 'direction' on flex axes
-test-pref(layout.css.vertical-text.enabled,true) == flexbox-writing-mode-001.html flexbox-writing-mode-001-ref.html
-test-pref(layout.css.vertical-text.enabled,true) == flexbox-writing-mode-002.html flexbox-writing-mode-002-ref.html
-test-pref(layout.css.vertical-text.enabled,true) == flexbox-writing-mode-003.html flexbox-writing-mode-003-ref.html
-test-pref(layout.css.vertical-text.enabled,true) == flexbox-writing-mode-004.html flexbox-writing-mode-004-ref.html
-test-pref(layout.css.vertical-text.enabled,true) == flexbox-writing-mode-005.html flexbox-writing-mode-005-ref.html
-test-pref(layout.css.vertical-text.enabled,true) == flexbox-writing-mode-006.html flexbox-writing-mode-006-ref.html
-test-pref(layout.css.vertical-text.enabled,true) == flexbox-writing-mode-007.html flexbox-writing-mode-007-ref.html
-test-pref(layout.css.vertical-text.enabled,true) == flexbox-writing-mode-008.html flexbox-writing-mode-008-ref.html
-test-pref(layout.css.vertical-text.enabled,true) == flexbox-writing-mode-009.html flexbox-writing-mode-009-ref.html
+== flexbox-writing-mode-001.html flexbox-writing-mode-001-ref.html
+== flexbox-writing-mode-002.html flexbox-writing-mode-002-ref.html
+== flexbox-writing-mode-003.html flexbox-writing-mode-003-ref.html
+== flexbox-writing-mode-004.html flexbox-writing-mode-004-ref.html
+== flexbox-writing-mode-005.html flexbox-writing-mode-005-ref.html
+== flexbox-writing-mode-006.html flexbox-writing-mode-006-ref.html
+== flexbox-writing-mode-007.html flexbox-writing-mode-007-ref.html
+== flexbox-writing-mode-008.html flexbox-writing-mode-008-ref.html
+== flexbox-writing-mode-009.html flexbox-writing-mode-009-ref.html
 
 # Single-line size clamping
 == flexbox-single-line-clamp-1.html flexbox-single-line-clamp-1-ref.html
 == flexbox-single-line-clamp-2.html flexbox-single-line-clamp-2-ref.html
 == flexbox-single-line-clamp-3.html flexbox-single-line-clamp-3-ref.html
--- a/layout/reftests/w3c-css/submitted/text-decor-3/reftest.list
+++ b/layout/reftests/w3c-css/submitted/text-decor-3/reftest.list
@@ -1,10 +1,8 @@
-default-preferences pref(layout.css.vertical-text.enabled,true)
-
 == ruby-text-decoration-01.html ruby-text-decoration-01-ref.html
 == text-decoration-propagation-01.html text-decoration-propagation-01-ref.html
 
 # text-emphasis-style
 == text-emphasis-style-property-001.html text-emphasis-style-property-001-ref.html
 fuzzy-if(gtkWidget,3,4) fuzzy-if(skiaContent,87,65)  == text-emphasis-style-property-002.html text-emphasis-style-property-002-ref.html
 skip-if(/^Windows\x20NT\x205\.1/.test(http.oscpu)) == text-emphasis-style-property-003.html text-emphasis-style-property-003-ref.html
 skip-if(/^Windows\x20NT\x205\.1/.test(http.oscpu)) == text-emphasis-style-property-004.html text-emphasis-style-property-004-ref.html
--- a/layout/reftests/writing-mode/abspos/reftest.list
+++ b/layout/reftests/writing-mode/abspos/reftest.list
@@ -1,12 +1,10 @@
 # This directory contains tests for position:absolute and vertical writing modes.
-# They require the vertical-text pref to be true, otherwise lots of them will fail.
 # (See bug 1079151 for the origin of these testcases by Gérard Talbot.)
-default-preferences pref(layout.css.vertical-text.enabled,true)
 
 # All of these are fuzzy-if on skia content on OS X due to subpixel text positioning.
 # Frequent Windows 7 load failed: timed out waiting for test to complete (waiting for onload scripts to complete), bug 1167155 and friends
 # Even though the whole reftest.list here is skipped, it doesn't actually work because reftests match the last
 # **-if, which means even though we tried to skip this list,the fuzzy-if still matched forcing us to run the test.
 fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vlr-003.xht s71-abs-pos-non-replaced-vlr-003-ref.xht
 fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vlr-005.xht s71-abs-pos-non-replaced-vlr-005-ref.xht
 fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vlr-007.xht s71-abs-pos-non-replaced-vlr-007-ref.xht
--- a/layout/reftests/writing-mode/reftest.list
+++ b/layout/reftests/writing-mode/reftest.list
@@ -1,11 +1,9 @@
 # This directory contains tests for vertical text and logical layout coordinates.
-# They require the vertical-text pref to be true, otherwise lots of them will fail.
-default-preferences pref(layout.css.vertical-text.enabled,true)
 
 HTTP(..) == 1079154-1-vertical-rl-columns.html 1079154-1-vertical-rl-columns-ref.html
 == 1082844.html 1082844-ref.html
 HTTP(..) == 1083748.html 1083748-ref.html
 HTTP(..) == 1083848-1-inline-border.html 1083848-1-inline-border-ref.html
 HTTP(..) == 1083848-2-inline-background.html 1083848-2-inline-background-ref.html
 fuzzy-if(gtkWidget,255,2) fuzzy-if(winWidget||Android||B2G,4,8704) HTTP(..) == 1083848-3-inline-background-repeat.html 1083848-3-inline-background-repeat-ref.html
 == 1083892-1.html 1083892-1-ref.html
--- a/layout/style/nsCSSPropList.h
+++ b/layout/style/nsCSSPropList.h
@@ -643,144 +643,135 @@ CSS_PROP_DISPLAY(
 CSS_PROP_LOGICAL(
     block-size,
     block_size,
     BlockSize,
     CSS_PROPERTY_PARSE_VALUE |
         CSS_PROPERTY_VALUE_NONNEGATIVE |
         CSS_PROPERTY_STORES_CALC |
         CSS_PROPERTY_GETCS_NEEDS_LAYOUT_FLUSH |
-        CSS_PROPERTY_ENABLED_IN_UA_SHEETS |
         CSS_PROPERTY_LOGICAL |
         CSS_PROPERTY_LOGICAL_AXIS |
         CSS_PROPERTY_LOGICAL_BLOCK_AXIS,
-    "layout.css.vertical-text.enabled",
+    "",
     VARIANT_AHLP | VARIANT_CALC,
     nullptr,
     Size,
     Position,
     CSS_PROP_NO_OFFSET,
     eStyleAnimType_None)
 CSS_PROP_SHORTHAND(
     border,
     border,
     Border,
     CSS_PROPERTY_PARSE_FUNCTION,
     "")
 CSS_PROP_SHORTHAND(
     border-block-end,
     border_block_end,
     BorderBlockEnd,
-    CSS_PROPERTY_PARSE_FUNCTION |
-        CSS_PROPERTY_ENABLED_IN_UA_SHEETS,
-    "layout.css.vertical-text.enabled")
+    CSS_PROPERTY_PARSE_FUNCTION,
+    "")
 CSS_PROP_LOGICAL(
     border-block-end-color,
     border_block_end_color,
     BorderBlockEndColor,
     CSS_PROPERTY_PARSE_VALUE |
         CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
-        CSS_PROPERTY_ENABLED_IN_UA_SHEETS |
         CSS_PROPERTY_LOGICAL |
         CSS_PROPERTY_LOGICAL_BLOCK_AXIS |
         CSS_PROPERTY_LOGICAL_END_EDGE,
-    "layout.css.vertical-text.enabled",
+    "",
     VARIANT_HCK,
     kBorderColorKTable,
     BorderColor,
     Border,
     CSS_PROP_NO_OFFSET,
     eStyleAnimType_None)
 CSS_PROP_LOGICAL(
     border-block-end-style,
     border_block_end_style,
     BorderBlockEndStyle,
     CSS_PROPERTY_PARSE_VALUE |
         CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
-        CSS_PROPERTY_ENABLED_IN_UA_SHEETS |
         CSS_PROPERTY_LOGICAL |
         CSS_PROPERTY_LOGICAL_BLOCK_AXIS |
         CSS_PROPERTY_LOGICAL_END_EDGE,
-    "layout.css.vertical-text.enabled",
+    "",
     VARIANT_HK,
     kBorderStyleKTable,
     BorderStyle,
     Border,
     CSS_PROP_NO_OFFSET,
     eStyleAnimType_None)
 CSS_PROP_LOGICAL(
     border-block-end-width,
     border_block_end_width,
     BorderBlockEndWidth,
     CSS_PROPERTY_PARSE_VALUE |
         CSS_PROPERTY_VALUE_NONNEGATIVE |
         CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
         CSS_PROPERTY_GETCS_NEEDS_LAYOUT_FLUSH |
-        CSS_PROPERTY_ENABLED_IN_UA_SHEETS |
         CSS_PROPERTY_LOGICAL |
         CSS_PROPERTY_LOGICAL_BLOCK_AXIS |
         CSS_PROPERTY_LOGICAL_END_EDGE,
-    "layout.css.vertical-text.enabled",
+    "",
     VARIANT_HKL | VARIANT_CALC,
     kBorderWidthKTable,
     BorderWidth,
     Border,
     CSS_PROP_NO_OFFSET,
     eStyleAnimType_None)
 CSS_PROP_SHORTHAND(
     border-block-start,
     border_block_start,
     BorderBlockStart,
-    CSS_PROPERTY_PARSE_FUNCTION |
-        CSS_PROPERTY_ENABLED_IN_UA_SHEETS,
-    "layout.css.vertical-text.enabled")
+    CSS_PROPERTY_PARSE_FUNCTION,
+    "")
 CSS_PROP_LOGICAL(
     border-block-start-color,
     border_block_start_color,
     BorderBlockStartColor,
     CSS_PROPERTY_PARSE_VALUE |
         CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
-        CSS_PROPERTY_ENABLED_IN_UA_SHEETS |
         CSS_PROPERTY_LOGICAL |
         CSS_PROPERTY_LOGICAL_BLOCK_AXIS,
-    "layout.css.vertical-text.enabled",
+    "",
     VARIANT_HCK,
     kBorderColorKTable,
     BorderColor,
     Border,
     CSS_PROP_NO_OFFSET,
     eStyleAnimType_None)
 CSS_PROP_LOGICAL(
     border-block-start-style,
     border_block_start_style,
     BorderBlockStartStyle,
     CSS_PROPERTY_PARSE_VALUE |
         CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
-        CSS_PROPERTY_ENABLED_IN_UA_SHEETS |
         CSS_PROPERTY_LOGICAL |
         CSS_PROPERTY_LOGICAL_BLOCK_AXIS,
-    "layout.css.vertical-text.enabled",
+    "",
     VARIANT_HK,
     kBorderStyleKTable,
     BorderStyle,
     Border,
     CSS_PROP_NO_OFFSET,
     eStyleAnimType_None)
 CSS_PROP_LOGICAL(
     border-block-start-width,
     border_block_start_width,
     BorderBlockStartWidth,
     CSS_PROPERTY_PARSE_VALUE |
         CSS_PROPERTY_VALUE_NONNEGATIVE |
         CSS_PROPERTY_GETCS_NEEDS_LAYOUT_FLUSH |
         CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
-        CSS_PROPERTY_ENABLED_IN_UA_SHEETS |
         CSS_PROPERTY_LOGICAL |
         CSS_PROPERTY_LOGICAL_BLOCK_AXIS,
-    "layout.css.vertical-text.enabled",
+    "",
     VARIANT_HKL | VARIANT_CALC,
     kBorderWidthKTable,
     BorderWidth,
     Border,
     CSS_PROP_NO_OFFSET,
     eStyleAnimType_None)
 CSS_PROP_SHORTHAND(
     border-bottom,
@@ -2324,20 +2315,19 @@ CSS_PROP_UIRESET(
 CSS_PROP_LOGICAL(
     inline-size,
     inline_size,
     InlineSize,
     CSS_PROPERTY_PARSE_VALUE |
         CSS_PROPERTY_VALUE_NONNEGATIVE |
         CSS_PROPERTY_STORES_CALC |
         CSS_PROPERTY_GETCS_NEEDS_LAYOUT_FLUSH |
-        CSS_PROPERTY_ENABLED_IN_UA_SHEETS |
         CSS_PROPERTY_LOGICAL |
         CSS_PROPERTY_LOGICAL_AXIS,
-    "layout.css.vertical-text.enabled",
+    "",
     VARIANT_AHKLP | VARIANT_CALC,
     kWidthKTable,
     Size,
     Position,
     CSS_PROP_NO_OFFSET,
     eStyleAnimType_None)
 CSS_PROP_DISPLAY(
     isolation,
@@ -2496,40 +2486,38 @@ CSS_PROP_LOGICAL(
     margin-block-end,
     margin_block_end,
     MarginBlockEnd,
     CSS_PROPERTY_PARSE_VALUE |
         CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
         CSS_PROPERTY_STORES_CALC |
         CSS_PROPERTY_APPLIES_TO_PAGE_RULE |
         CSS_PROPERTY_GETCS_NEEDS_LAYOUT_FLUSH |
-        CSS_PROPERTY_ENABLED_IN_UA_SHEETS |
         CSS_PROPERTY_LOGICAL |
         CSS_PROPERTY_LOGICAL_BLOCK_AXIS |
         CSS_PROPERTY_LOGICAL_END_EDGE,
-    "layout.css.vertical-text.enabled",
+    "",
     VARIANT_AHLP | VARIANT_CALC,
     nullptr,
     Margin,
     Margin,
     CSS_PROP_NO_OFFSET,
     eStyleAnimType_None)
 CSS_PROP_LOGICAL(
     margin-block-start,
     margin_block_start,
     MarginBlockStart,
     CSS_PROPERTY_PARSE_VALUE |
         CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
         CSS_PROPERTY_STORES_CALC |
         CSS_PROPERTY_APPLIES_TO_PAGE_RULE |
         CSS_PROPERTY_GETCS_NEEDS_LAYOUT_FLUSH |
-        CSS_PROPERTY_ENABLED_IN_UA_SHEETS |
         CSS_PROPERTY_LOGICAL |
         CSS_PROPERTY_LOGICAL_BLOCK_AXIS,
-    "layout.css.vertical-text.enabled",
+    "",
     VARIANT_AHLP | VARIANT_CALC,
     nullptr,
     Margin,
     Margin,
     CSS_PROP_NO_OFFSET,
     eStyleAnimType_None)
 CSS_PROP_MARGIN(
     margin-bottom,
@@ -2842,21 +2830,20 @@ CSS_PROP_FONT(
 CSS_PROP_LOGICAL(
     max-block-size,
     max_block_size,
     MaxBlockSize,
     CSS_PROPERTY_PARSE_VALUE |
         CSS_PROPERTY_VALUE_NONNEGATIVE |
         CSS_PROPERTY_STORES_CALC |
         CSS_PROPERTY_GETCS_NEEDS_LAYOUT_FLUSH |
-        CSS_PROPERTY_ENABLED_IN_UA_SHEETS |
         CSS_PROPERTY_LOGICAL |
         CSS_PROPERTY_LOGICAL_AXIS |
         CSS_PROPERTY_LOGICAL_BLOCK_AXIS,
-    "layout.css.vertical-text.enabled",
+    "",
     VARIANT_HLPO | VARIANT_CALC,
     nullptr,
     MaxSize,
     Position,
     CSS_PROP_NO_OFFSET,
     eStyleAnimType_None)
 CSS_PROP_POSITION(
     max-height,
@@ -2875,20 +2862,19 @@ CSS_PROP_POSITION(
 CSS_PROP_LOGICAL(
     max-inline-size,
     max_inline_size,
     MaxInlineSize,
     CSS_PROPERTY_PARSE_VALUE |
         CSS_PROPERTY_VALUE_NONNEGATIVE |
         CSS_PROPERTY_STORES_CALC |
         CSS_PROPERTY_GETCS_NEEDS_LAYOUT_FLUSH |
-        CSS_PROPERTY_ENABLED_IN_UA_SHEETS |
         CSS_PROPERTY_LOGICAL |
         CSS_PROPERTY_LOGICAL_AXIS,
-    "layout.css.vertical-text.enabled",
+    "",
     VARIANT_HKLPO | VARIANT_CALC,
     kWidthKTable,
     MaxSize,
     Position,
     CSS_PROP_NO_OFFSET,
     eStyleAnimType_None)
 CSS_PROP_POSITION(
     max-width,
@@ -2907,21 +2893,20 @@ CSS_PROP_POSITION(
 CSS_PROP_LOGICAL(
     min-block-size,
     min_block_size,
     MinBlockSize,
     CSS_PROPERTY_PARSE_VALUE |
         CSS_PROPERTY_VALUE_NONNEGATIVE |
         CSS_PROPERTY_STORES_CALC |
         CSS_PROPERTY_GETCS_NEEDS_LAYOUT_FLUSH |
-        CSS_PROPERTY_ENABLED_IN_UA_SHEETS |
         CSS_PROPERTY_LOGICAL |
         CSS_PROPERTY_LOGICAL_AXIS |
         CSS_PROPERTY_LOGICAL_BLOCK_AXIS,
-    "layout.css.vertical-text.enabled",
+    "",
     VARIANT_AHLP | VARIANT_CALC,
     nullptr,
     MinSize,
     Position,
     CSS_PROP_NO_OFFSET,
     eStyleAnimType_None)
 #ifndef CSS_PROP_LIST_EXCLUDE_INTERNAL
 CSS_PROP_FONT(
@@ -2954,20 +2939,19 @@ CSS_PROP_POSITION(
 CSS_PROP_LOGICAL(
     min-inline-size,
     min_inline_size,
     MinInlineSize,
     CSS_PROPERTY_PARSE_VALUE |
         CSS_PROPERTY_VALUE_NONNEGATIVE |
         CSS_PROPERTY_STORES_CALC |
         CSS_PROPERTY_GETCS_NEEDS_LAYOUT_FLUSH |
-        CSS_PROPERTY_ENABLED_IN_UA_SHEETS |
         CSS_PROPERTY_LOGICAL |
         CSS_PROPERTY_LOGICAL_AXIS,
-    "layout.css.vertical-text.enabled",
+    "",
     VARIANT_AHKLP | VARIANT_CALC,
     kWidthKTable,
     MinSize,
     Position,
     CSS_PROP_NO_OFFSET,
     eStyleAnimType_None)
 CSS_PROP_POSITION(
     min-width,
@@ -3019,71 +3003,67 @@ CSS_PROP_POSITION(
     eStyleAnimType_Custom)
 CSS_PROP_LOGICAL(
     offset-block-end,
     offset_block_end,
     OffsetBlockEnd,
     CSS_PROPERTY_PARSE_VALUE |
         CSS_PROPERTY_STORES_CALC |
         CSS_PROPERTY_GETCS_NEEDS_LAYOUT_FLUSH |
-        CSS_PROPERTY_ENABLED_IN_UA_SHEETS |
         CSS_PROPERTY_LOGICAL |
         CSS_PROPERTY_LOGICAL_BLOCK_AXIS |
         CSS_PROPERTY_LOGICAL_END_EDGE,
-    "layout.css.vertical-text.enabled",
+    "",
     VARIANT_AHLP | VARIANT_CALC,
     nullptr,
     Offset,
     Position,
     CSS_PROP_NO_OFFSET,
     eStyleAnimType_None)
 CSS_PROP_LOGICAL(
     offset-block-start,
     offset_block_start,
     OffsetBlockStart,
     CSS_PROPERTY_PARSE_VALUE |
         CSS_PROPERTY_STORES_CALC |
         CSS_PROPERTY_GETCS_NEEDS_LAYOUT_FLUSH |
-        CSS_PROPERTY_ENABLED_IN_UA_SHEETS |
         CSS_PROPERTY_LOGICAL |
         CSS_PROPERTY_LOGICAL_BLOCK_AXIS,
-    "layout.css.vertical-text.enabled",
+    "",
     VARIANT_AHLP | VARIANT_CALC,
     nullptr,
     Offset,
     Position,
     CSS_PROP_NO_OFFSET,
     eStyleAnimType_None)
 CSS_PROP_LOGICAL(
     offset-inline-end,
     offset_inline_end,
     OffsetInlineEnd,
     CSS_PROPERTY_PARSE_VALUE |
         CSS_PROPERTY_STORES_CALC |
         CSS_PROPERTY_GETCS_NEEDS_LAYOUT_FLUSH |
-        CSS_PROPERTY_ENABLED_IN_UA_SHEETS |
         CSS_PROPERTY_LOGICAL |
         CSS_PROPERTY_LOGICAL_END_EDGE,
-    "layout.css.vertical-text.enabled",
+    "",
     VARIANT_AHLP | VARIANT_CALC,
     nullptr,
     Offset,
     Position,
     CSS_PROP_NO_OFFSET,
     eStyleAnimType_None)
 CSS_PROP_LOGICAL(
     offset-inline-start,
     offset_inline_start,
     OffsetInlineStart,
     CSS_PROPERTY_PARSE_VALUE |
         CSS_PROPERTY_STORES_CALC |
         CSS_PROPERTY_GETCS_NEEDS_LAYOUT_FLUSH |
-        CSS_PROPERTY_ENABLED_IN_UA_SHEETS |
         CSS_PROPERTY_LOGICAL,
-    "layout.css.vertical-text.enabled",
+    "",
     VARIANT_AHLP | VARIANT_CALC,
     nullptr,
     Offset,
     Position,
     CSS_PROP_NO_OFFSET,
     eStyleAnimType_None)
 CSS_PROP_EFFECTS(
     opacity,
@@ -3291,21 +3271,20 @@ CSS_PROP_LOGICAL(
     PaddingBlockEnd,
     CSS_PROPERTY_PARSE_VALUE |
         CSS_PROPERTY_VALUE_NONNEGATIVE |
         CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
         // This is required by the UA stylesheet and can't be overridden.
         CSS_PROPERTY_APPLIES_TO_PLACEHOLDER |
         CSS_PROPERTY_STORES_CALC |
         CSS_PROPERTY_GETCS_NEEDS_LAYOUT_FLUSH |
-        CSS_PROPERTY_ENABLED_IN_UA_SHEETS |
         CSS_PROPERTY_LOGICAL |
         CSS_PROPERTY_LOGICAL_BLOCK_AXIS |
         CSS_PROPERTY_LOGICAL_END_EDGE,
-    "layout.css.vertical-text.enabled",
+    "",
     VARIANT_HLP | VARIANT_CALC,
     nullptr,
     Padding,
     Padding,
     CSS_PROP_NO_OFFSET,
     eStyleAnimType_None)
 CSS_PROP_LOGICAL(
     padding-block-start,
@@ -3313,20 +3292,19 @@ CSS_PROP_LOGICAL(
     PaddingBlockStart,
     CSS_PROPERTY_PARSE_VALUE |
         CSS_PROPERTY_VALUE_NONNEGATIVE |
         CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
         // This is required by the UA stylesheet and can't be overridden.
         CSS_PROPERTY_APPLIES_TO_PLACEHOLDER |
         CSS_PROPERTY_STORES_CALC |
         CSS_PROPERTY_GETCS_NEEDS_LAYOUT_FLUSH |
-        CSS_PROPERTY_ENABLED_IN_UA_SHEETS |
         CSS_PROPERTY_LOGICAL |
         CSS_PROPERTY_LOGICAL_BLOCK_AXIS,
-    "layout.css.vertical-text.enabled",
+    "",
     VARIANT_HLP | VARIANT_CALC,
     nullptr,
     Padding,
     Padding,
     CSS_PROP_NO_OFFSET,
     eStyleAnimType_None)
 CSS_PROP_PADDING(
     padding-bottom,
@@ -4052,19 +4030,18 @@ CSS_PROP_TEXT(
     VARIANT_HLP | VARIANT_CALC,
     nullptr,
     offsetof(nsStyleText, mTextIndent),
     eStyleAnimType_Coord)
 CSS_PROP_VISIBILITY(
     text-orientation,
     text_orientation,
     TextOrientation,
-    CSS_PROPERTY_PARSE_VALUE |
-        CSS_PROPERTY_ENABLED_IN_UA_SHEETS,
-    "layout.css.vertical-text.enabled",
+    CSS_PROPERTY_PARSE_VALUE,
+    "",
     VARIANT_HK,
     kTextOrientationKTable,
     CSS_PROP_NO_OFFSET,
     eStyleAnimType_Discrete)
 CSS_PROP_TEXTRESET(
     text-overflow,
     text_overflow,
     TextOverflow,
@@ -4499,19 +4476,18 @@ CSS_PROP_TEXT(
     VARIANT_HK,
     kOverflowWrapKTable,
     CSS_PROP_NO_OFFSET,
     eStyleAnimType_None)
 CSS_PROP_VISIBILITY(
     writing-mode,
     writing_mode,
     WritingMode,
-    CSS_PROPERTY_PARSE_VALUE |
-        CSS_PROPERTY_ENABLED_IN_UA_SHEETS,
-    "layout.css.vertical-text.enabled",
+    CSS_PROPERTY_PARSE_VALUE,
+    "",
     VARIANT_HK,
     kWritingModeKTable,
     CSS_PROP_NO_OFFSET,
     eStyleAnimType_Discrete)
 CSS_PROP_POSITION(
     z-index,
     z_index,
     ZIndex,
--- a/layout/style/test/property_database.js
+++ b/layout/style/test/property_database.js
@@ -2870,16 +2870,17 @@ var gCSSProperties = {
     initial_values: [ "none" ],
     other_values: [ "left", "right" ],
     invalid_values: []
   },
   "font": {
     domProp: "font",
     inherited: true,
     type: CSS_TYPE_TRUE_SHORTHAND,
+    prerequisites: { "writing-mode": "initial" },
     subproperties: [ "font-style", "font-variant", "font-weight", "font-size", "line-height", "font-family", "font-stretch",
                      "font-size-adjust", "font-feature-settings", "font-language-override",
                      "font-kerning", "font-synthesis", "font-variant-alternates", "font-variant-caps", "font-variant-east-asian",
                      "font-variant-ligatures", "font-variant-numeric", "font-variant-position" ],
     initial_values: [ (gInitialFontFamilyIsSansSerif ? "medium sans-serif" : "medium serif") ],
     other_values: [ "large serif", "9px fantasy", "condensed bold italic small-caps 24px/1.4 Times New Roman, serif", "small inherit roman", "small roman inherit",
       // system fonts
       "caption", "icon", "menu", "message-box", "small-caption", "status-bar",
@@ -3152,17 +3153,17 @@ var gCSSProperties = {
     /*
      * Inheritance tests require consistent font size, since
      * getComputedStyle (which uses the CSS2 computed value, or
      * CSS2.1 used value) doesn't match what the CSS2.1 computed
      * value is.  And they even require consistent font metrics for
      * computation of 'normal'.   -moz-block-height requires height
      * on a block.
      */
-    prerequisites: { "font-size": "19px", "font-size-adjust": "none", "font-family": "serif", "font-weight": "normal", "font-style": "normal", "height": "18px", "display": "block"},
+    prerequisites: { "font-size": "19px", "font-size-adjust": "none", "font-family": "serif", "font-weight": "normal", "font-style": "normal", "height": "18px", "display": "block", "writing-mode": "initial" },
     initial_values: [ "normal" ],
     other_values: [ "1.0", "1", "1em", "47px", "-moz-block-height", "calc(2px)", "calc(50%)", "calc(3*25px)", "calc(25px*3)", "calc(3*25px + 50%)", "calc(1 + 2*3/4)" ],
     invalid_values: [ "calc(1 + 2px)", "calc(100% + 0.1)" ]
   },
   "list-style": {
     domProp: "listStyle",
     inherited: true,
     type: CSS_TYPE_TRUE_SHORTHAND,
@@ -4883,17 +4884,502 @@ var gCSSProperties = {
   },
   "-moz-text-align-last": {
     domProp: "MozTextAlignLast",
     inherited: true,
     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
     alias_for: "text-align-last",
     subproperties: [ "text-align-last" ],
   },
-}
+  // vertical text properties
+  "writing-mode": {
+    domProp: "writingMode",
+    inherited: true,
+    type: CSS_TYPE_LONGHAND,
+    initial_values: [ "horizontal-tb", "lr", "lr-tb", "rl", "rl-tb" ],
+    other_values: [ "vertical-lr", "vertical-rl", "sideways-rl", "sideways-lr", "tb", "tb-rl" ],
+    invalid_values: [ "10px", "30%", "justify", "auto", "1em" ]
+  },
+  "text-orientation": {
+    domProp: "textOrientation",
+    inherited: true,
+    type: CSS_TYPE_LONGHAND,
+    initial_values: [ "mixed" ],
+    other_values: [ "upright", "sideways", "sideways-right" ], /* sideways-right alias for backward compatibility */
+    invalid_values: [ "none", "3em", "sideways-left" ] /* sideways-left removed from CSS Writing Modes */
+  },
+  "border-block-end": {
+    domProp: "borderBlockEnd",
+    inherited: false,
+    type: CSS_TYPE_TRUE_SHORTHAND,
+    subproperties: [ "border-block-end-color", "border-block-end-style", "border-block-end-width" ],
+    initial_values: [ "none", "medium", "currentColor", "thin", "none medium currentcolor" ],
+    other_values: [ "solid", "green", "medium solid", "green solid", "10px solid", "thick solid", "5px green none" ],
+    invalid_values: [ "5%", "5", "5 solid green" ]
+  },
+  "block-size": {
+    domProp: "blockSize",
+    inherited: false,
+    type: CSS_TYPE_LONGHAND,
+    logical: true,
+    axis: true,
+    get_computed: logical_axis_prop_get_computed,
+    /* XXX testing auto has prerequisites */
+    initial_values: [ "auto" ],
+    prerequisites: { "display": "block" },
+    other_values: [ "15px", "3em", "15%",
+      "calc(2px)",
+      "calc(50%)",
+      "calc(3*25px)",
+      "calc(25px*3)",
+      "calc(3*25px + 50%)",
+    ],
+    invalid_values: [ "none", "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available" ],
+  },
+  "border-block-end-color": {
+    domProp: "borderBlockEndColor",
+    inherited: false,
+    type: CSS_TYPE_LONGHAND,
+    logical: true,
+    get_computed: logical_box_prop_get_computed,
+    initial_values: [ "currentColor" ],
+    other_values: [ "green", "rgba(255,128,0,0.5)", "transparent" ],
+    invalid_values: [ "#0", "#00", "#00000", "#0000000", "#000000000", "000000" ]
+  },
+  "border-block-end-style": {
+    domProp: "borderBlockEndStyle",
+    inherited: false,
+    type: CSS_TYPE_LONGHAND,
+    logical: true,
+    get_computed: logical_box_prop_get_computed,
+    /* XXX hidden is sometimes the same as initial */
+    initial_values: [ "none" ],
+    other_values: [ "solid", "dashed", "dotted", "double", "outset", "inset", "groove", "ridge" ],
+    invalid_values: []
+  },
+  "border-block-end-width": {
+    domProp: "borderBlockEndWidth",
+    inherited: false,
+    type: CSS_TYPE_LONGHAND,
+    logical: true,
+    get_computed: logical_box_prop_get_computed,
+    prerequisites: { "border-block-end-style": "solid" },
+    initial_values: [ "medium", "3px", "calc(4px - 1px)" ],
+    other_values: [ "thin", "thick", "1px", "2em",
+      "calc(2px)",
+      "calc(-2px)",
+      "calc(0em)",
+      "calc(0px)",
+      "calc(5em)",
+      "calc(3*25px)",
+      "calc(25px*3)",
+      "calc(3*25px + 5em)",
+    ],
+    invalid_values: [ "5%", "5" ]
+  },
+  "border-block-start": {
+    domProp: "borderBlockStart",
+    inherited: false,
+    type: CSS_TYPE_TRUE_SHORTHAND,
+    subproperties: [ "border-block-start-color", "border-block-start-style", "border-block-start-width" ],
+    initial_values: [ "none", "medium", "currentColor", "thin", "none medium currentcolor" ],
+    other_values: [ "solid", "green", "medium solid", "green solid", "10px solid", "thick solid", "5px green none" ],
+    invalid_values: [ "5%", "5", "5 solid green" ]
+  },
+  "border-block-start-color": {
+    domProp: "borderBlockStartColor",
+    inherited: false,
+    type: CSS_TYPE_LONGHAND,
+    logical: true,
+    get_computed: logical_box_prop_get_computed,
+    initial_values: [ "currentColor" ],
+    other_values: [ "green", "rgba(255,128,0,0.5)", "transparent" ],
+    invalid_values: [ "#0", "#00", "#00000", "#0000000", "#000000000", "000000" ]
+  },
+  "border-block-start-style": {
+    domProp: "borderBlockStartStyle",
+    inherited: false,
+    type: CSS_TYPE_LONGHAND,
+    logical: true,
+    get_computed: logical_box_prop_get_computed,
+    /* XXX hidden is sometimes the same as initial */
+    initial_values: [ "none" ],
+    other_values: [ "solid", "dashed", "dotted", "double", "outset", "inset", "groove", "ridge" ],
+    invalid_values: []
+  },
+  "border-block-start-width": {
+    domProp: "borderBlockStartWidth",
+    inherited: false,
+    type: CSS_TYPE_LONGHAND,
+    logical: true,
+    get_computed: logical_box_prop_get_computed,
+    prerequisites: { "border-block-start-style": "solid" },
+    initial_values: [ "medium", "3px", "calc(4px - 1px)" ],
+    other_values: [ "thin", "thick", "1px", "2em",
+      "calc(2px)",
+      "calc(-2px)",
+      "calc(0em)",
+      "calc(0px)",
+      "calc(5em)",
+      "calc(3*25px)",
+      "calc(25px*3)",
+      "calc(3*25px + 5em)",
+    ],
+    invalid_values: [ "5%", "5" ]
+  },
+  "-moz-border-end": {
+    domProp: "MozBorderEnd",
+    inherited: false,
+    type: CSS_TYPE_TRUE_SHORTHAND,
+    alias_for: "border-inline-end",
+    subproperties: [ "-moz-border-end-color", "-moz-border-end-style", "-moz-border-end-width" ],
+  },
+  "-moz-border-end-color": {
+    domProp: "MozBorderEndColor",
+    inherited: false,
+    type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
+    alias_for: "border-inline-end-color",
+    subproperties: [ "border-inline-end-color" ],
+    get_computed: logical_box_prop_get_computed,
+  },
+  "-moz-border-end-style": {
+    domProp: "MozBorderEndStyle",
+    inherited: false,
+    type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
+    alias_for: "border-inline-end-style",
+    subproperties: [ "border-inline-end-style" ],
+    get_computed: logical_box_prop_get_computed,
+  },
+  "-moz-border-end-width": {
+    domProp: "MozBorderEndWidth",
+    inherited: false,
+    type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
+    alias_for: "border-inline-end-width",
+    subproperties: [ "border-inline-end-width" ],
+    get_computed: logical_box_prop_get_computed,
+  },
+  "-moz-border-start": {
+    domProp: "MozBorderStart",
+    inherited: false,
+    type: CSS_TYPE_TRUE_SHORTHAND,
+    alias_for: "border-inline-start",
+    subproperties: [ "-moz-border-start-color", "-moz-border-start-style", "-moz-border-start-width" ],
+  },
+  "-moz-border-start-color": {
+    domProp: "MozBorderStartColor",
+    inherited: false,
+    type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
+    alias_for: "border-inline-start-color",
+    subproperties: [ "border-inline-start-color" ],
+    get_computed: logical_box_prop_get_computed,
+  },
+  "-moz-border-start-style": {
+    domProp: "MozBorderStartStyle",
+    inherited: false,
+    type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
+    alias_for: "border-inline-start-style",
+    subproperties: [ "border-inline-start-style" ],
+    get_computed: logical_box_prop_get_computed,
+  },
+  "-moz-border-start-width": {
+    domProp: "MozBorderStartWidth",
+    inherited: false,
+    type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
+    alias_for: "border-inline-start-width",
+    subproperties: [ "border-inline-start-width" ],
+    get_computed: logical_box_prop_get_computed,
+  },
+  "inline-size": {
+    domProp: "inlineSize",
+    inherited: false,
+    type: CSS_TYPE_LONGHAND,
+    logical: true,
+    axis: true,
+    get_computed: logical_axis_prop_get_computed,
+    /* XXX testing auto has prerequisites */
+    initial_values: [ "auto" ],
+    prerequisites: { "display": "block" },
+    other_values: [ "15px", "3em", "15%",
+      // these three keywords compute to the initial value only when the
+      // writing mode is vertical, and we're testing with a horizontal
+      // writing mode
+      "-moz-max-content", "-moz-min-content", "-moz-fit-content",
+      // whether -moz-available computes to the initial value depends on
+      // the container size, and for the container size we're testing
+      // with, it does
+      // "-moz-available",
+      "calc(2px)",
+      "calc(50%)",
+      "calc(3*25px)",
+      "calc(25px*3)",
+      "calc(3*25px + 50%)",
+    ],
+    invalid_values: [ "none" ],
+  },
+  "margin-block-end": {
+    domProp: "marginBlockEnd",
+    inherited: false,
+    type: CSS_TYPE_LONGHAND,
+    logical: true,
+    get_computed: logical_box_prop_get_computed,
+    /* XXX testing auto has prerequisites */
+    initial_values: [ "0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)" ],
+    other_values: [ "1px", "2em", "5%",
+      "calc(2px)",
+      "calc(-2px)",
+      "calc(50%)",
+      "calc(3*25px)",
+      "calc(25px*3)",
+      "calc(3*25px + 50%)",
+    ],
+    invalid_values: [ "..25px", ".+5px", ".px", "-.px", "++5px", "-+4px", "+-3px", "--7px", "+-.6px", "-+.5px", "++.7px", "--.4px" ],
+  },
+  "margin-block-start": {
+    domProp: "marginBlockStart",
+    inherited: false,
+    type: CSS_TYPE_LONGHAND,
+    logical: true,
+    get_computed: logical_box_prop_get_computed,
+    /* XXX testing auto has prerequisites */
+    initial_values: [ "0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)" ],
+    other_values: [ "1px", "2em", "5%",
+      "calc(2px)",
+      "calc(-2px)",
+      "calc(50%)",
+      "calc(3*25px)",
+      "calc(25px*3)",
+      "calc(3*25px + 50%)",
+    ],
+    invalid_values: [ "..25px", ".+5px", ".px", "-.px", "++5px", "-+4px", "+-3px", "--7px", "+-.6px", "-+.5px", "++.7px", "--.4px" ],
+  },
+  "-moz-margin-end": {
+    domProp: "MozMarginEnd",
+    inherited: false,
+    type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
+    alias_for: "margin-inline-end",
+    subproperties: [ "margin-inline-end" ],
+    get_computed: logical_box_prop_get_computed,
+  },
+  "-moz-margin-start": {
+    domProp: "MozMarginStart",
+    inherited: false,
+    type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
+    alias_for: "margin-inline-start",
+    subproperties: [ "margin-inline-start" ],
+    get_computed: logical_box_prop_get_computed,
+  },
+  "max-block-size": {
+    domProp: "maxBlockSize",
+    inherited: false,
+    type: CSS_TYPE_LONGHAND,
+    logical: true,
+    axis: true,
+    get_computed: logical_axis_prop_get_computed,
+    prerequisites: { "display": "block" },
+    initial_values: [ "none" ],
+    other_values: [ "30px", "50%",
+      "calc(2px)",
+      "calc(50%)",
+      "calc(3*25px)",
+      "calc(25px*3)",
+      "calc(3*25px + 50%)",
+    ],
+    invalid_values: [ "auto", "5", "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available" ]
+  },
+  "max-inline-size": {
+    domProp: "maxInlineSize",
+    inherited: false,
+    type: CSS_TYPE_LONGHAND,
+    logical: true,
+    axis: true,
+    get_computed: logical_axis_prop_get_computed,
+    prerequisites: { "display": "block" },
+    initial_values: [ "none" ],
+    other_values: [ "30px", "50%",
+      // these four keywords compute to the initial value only when the
+      // writing mode is vertical, and we're testing with a horizontal
+      // writing mode
+      "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available",
+      "calc(2px)",
+      "calc(50%)",
+      "calc(3*25px)",
+      "calc(25px*3)",
+      "calc(3*25px + 50%)",
+    ],
+    invalid_values: [ "auto", "5" ]
+  },
+  "min-block-size": {
+    domProp: "minBlockSize",
+    inherited: false,
+    type: CSS_TYPE_LONGHAND,
+    logical: true,
+    axis: true,
+    get_computed: logical_axis_prop_get_computed,
+    prerequisites: { "display": "block" },
+    initial_values: [ "auto", "0", "calc(0em)", "calc(-2px)", "calc(-1%)" ],
+    other_values: [ "30px", "50%",
+      "calc(2px)",
+      "calc(50%)",
+      "calc(3*25px)",
+      "calc(25px*3)",
+      "calc(3*25px + 50%)",
+    ],
+    invalid_values: [ "none", "5", "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available" ]
+  },
+  "min-inline-size": {
+    domProp: "minInlineSize",
+    inherited: false,
+    type: CSS_TYPE_LONGHAND,
+    logical: true,
+    axis: true,
+    get_computed: logical_axis_prop_get_computed,
+    prerequisites: { "display": "block" },
+    initial_values: [ "auto", "0", "calc(0em)", "calc(-2px)", "calc(-1%)" ],
+    other_values: [ "30px", "50%",
+      // these four keywords compute to the initial value only when the
+      // writing mode is vertical, and we're testing with a horizontal
+      // writing mode
+      "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available",
+      "calc(2px)",
+      "calc(50%)",
+      "calc(3*25px)",
+      "calc(25px*3)",
+      "calc(3*25px + 50%)",
+    ],
+    invalid_values: [ "none", "5" ]
+  },
+  "offset-block-end": {
+    domProp: "offsetBlockEnd",
+    inherited: false,
+    type: CSS_TYPE_LONGHAND,
+    logical: true,
+    get_computed: logical_box_prop_get_computed,
+    /* FIXME: run tests with multiple prerequisites */
+    prerequisites: { "position": "relative" },
+    /* XXX 0 may or may not be equal to auto */
+    initial_values: [ "auto" ],
+    other_values: [ "32px", "-3em", "12%",
+      "calc(2px)",
+      "calc(-2px)",
+      "calc(50%)",
+      "calc(3*25px)",
+      "calc(25px*3)",
+      "calc(3*25px + 50%)",
+    ],
+    invalid_values: []
+  },
+  "offset-block-start": {
+    domProp: "offsetBlockStart",
+    inherited: false,
+    type: CSS_TYPE_LONGHAND,
+    logical: true,
+    get_computed: logical_box_prop_get_computed,
+    /* FIXME: run tests with multiple prerequisites */
+    prerequisites: { "position": "relative" },
+    /* XXX 0 may or may not be equal to auto */
+    initial_values: [ "auto" ],
+    other_values: [ "32px", "-3em", "12%",
+      "calc(2px)",
+      "calc(-2px)",
+      "calc(50%)",
+      "calc(3*25px)",
+      "calc(25px*3)",
+      "calc(3*25px + 50%)",
+    ],
+    invalid_values: []
+  },
+  "offset-inline-end": {
+    domProp: "offsetInlineEnd",
+    inherited: false,
+    type: CSS_TYPE_LONGHAND,
+    logical: true,
+    get_computed: logical_box_prop_get_computed,
+    /* FIXME: run tests with multiple prerequisites */
+    prerequisites: { "position": "relative" },
+    /* XXX 0 may or may not be equal to auto */
+    initial_values: [ "auto" ],
+    other_values: [ "32px", "-3em", "12%",
+      "calc(2px)",
+      "calc(-2px)",
+      "calc(50%)",
+      "calc(3*25px)",
+      "calc(25px*3)",
+      "calc(3*25px + 50%)",
+    ],
+    invalid_values: []
+  },
+  "offset-inline-start": {
+    domProp: "offsetInlineStart",
+    inherited: false,
+    type: CSS_TYPE_LONGHAND,
+    logical: true,
+    get_computed: logical_box_prop_get_computed,
+    /* FIXME: run tests with multiple prerequisites */
+    prerequisites: { "position": "relative" },
+    /* XXX 0 may or may not be equal to auto */
+    initial_values: [ "auto" ],
+    other_values: [ "32px", "-3em", "12%",
+      "calc(2px)",
+      "calc(-2px)",
+      "calc(50%)",
+      "calc(3*25px)",
+      "calc(25px*3)",
+      "calc(3*25px + 50%)",
+    ],
+    invalid_values: []
+  },
+  "padding-block-end": {
+    domProp: "paddingBlockEnd",
+    inherited: false,
+    type: CSS_TYPE_LONGHAND,
+    logical: true,
+    get_computed: logical_box_prop_get_computed,
+    initial_values: [ "0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)", "calc(-3px)", "calc(-1%)" ],
+    other_values: [ "1px", "2em", "5%",
+      "calc(2px)",
+      "calc(50%)",
+      "calc(3*25px)",
+      "calc(25px*3)",
+      "calc(3*25px + 50%)",
+    ],
+    invalid_values: [ ],
+  },
+  "padding-block-start": {
+    domProp: "paddingBlockStart",
+    inherited: false,
+    type: CSS_TYPE_LONGHAND,
+    logical: true,
+    get_computed: logical_box_prop_get_computed,
+    initial_values: [ "0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)", "calc(-3px)", "calc(-1%)" ],
+    other_values: [ "1px", "2em", "5%",
+      "calc(2px)",
+      "calc(50%)",
+      "calc(3*25px)",
+      "calc(25px*3)",
+      "calc(3*25px + 50%)",
+    ],
+    invalid_values: [ ],
+  },
+  "-moz-padding-end": {
+    domProp: "MozPaddingEnd",
+    inherited: false,
+    type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
+    alias_for: "padding-inline-end",
+    subproperties: [ "padding-inline-end" ],
+    get_computed: logical_box_prop_get_computed,
+  },
+  "-moz-padding-start": {
+    domProp: "MozPaddingStart",
+    inherited: false,
+    type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
+    alias_for: "padding-inline-start",
+    subproperties: [ "padding-inline-start" ],
+    get_computed: logical_box_prop_get_computed,
+  },
+} // end of gCSSProperties
 
 function logical_axis_prop_get_computed(cs, property)
 {
   // Use defaults for these two properties in case the vertical text
   // pref (which they live behind) is turned off.
   var writingMode = cs.getPropertyValue("writing-mode") || "horizontal-tb";
   var orientation = writingMode.substring(0, writingMode.indexOf("-"));
 
@@ -5040,521 +5526,16 @@ if (IsCSSPropertyPrefEnabled("layout.css
                  "pan-x pan-y pan-x", "pan-x pan-x pan-y", "pan-y pan-x pan-x", "pan-y pan-x pan-y", "pan-y pan-y pan-x", "pan-x pan-y pan-y",
                  "manipulation none", "none manipulation", "manipulation auto", "auto manipulation", "manipulation zoom", "zoom manipulation",
                  "manipulation manipulation", "manipulation pan-x", "pan-x manipulation", "manipulation pan-y", "pan-y manipulation",
                  "manipulation pan-x pan-y", "pan-x manipulation pan-y", "pan-x pan-y manipulation",
                  "manipulation pan-y pan-x", "pan-y manipulation pan-x", "pan-y pan-x manipulation"]
     };
 }
 
-if (IsCSSPropertyPrefEnabled("layout.css.vertical-text.enabled")) {
-  var verticalTextProperties = {
-    "writing-mode": {
-      domProp: "writingMode",
-      inherited: true,
-      type: CSS_TYPE_LONGHAND,
-      initial_values: [ "horizontal-tb", "lr", "lr-tb", "rl", "rl-tb" ],
-      other_values: [ "vertical-lr", "vertical-rl", "sideways-rl", "sideways-lr", "tb", "tb-rl" ],
-      invalid_values: [ "10px", "30%", "justify", "auto", "1em" ]
-    },
-    "text-orientation": {
-      domProp: "textOrientation",
-      inherited: true,
-      type: CSS_TYPE_LONGHAND,
-      initial_values: [ "mixed" ],
-      other_values: [ "upright", "sideways", "sideways-right" ], /* sideways-right alias for backward compatibility */
-      invalid_values: [ "none", "3em", "sideways-left" ] /* sideways-left removed from CSS Writing Modes */
-    },
-    "border-block-end": {
-      domProp: "borderBlockEnd",
-      inherited: false,
-      type: CSS_TYPE_TRUE_SHORTHAND,
-      subproperties: [ "border-block-end-color", "border-block-end-style", "border-block-end-width" ],
-      initial_values: [ "none", "medium", "currentColor", "thin", "none medium currentcolor" ],
-      other_values: [ "solid", "green", "medium solid", "green solid", "10px solid", "thick solid", "5px green none" ],
-      invalid_values: [ "5%", "5", "5 solid green" ]
-    },
-    "block-size": {
-      domProp: "blockSize",
-      inherited: false,
-      type: CSS_TYPE_LONGHAND,
-      logical: true,
-      axis: true,
-      get_computed: logical_axis_prop_get_computed,
-      /* XXX testing auto has prerequisites */
-      initial_values: [ "auto" ],
-      prerequisites: { "display": "block" },
-      other_values: [ "15px", "3em", "15%",
-        "calc(2px)",
-        "calc(50%)",
-        "calc(3*25px)",
-        "calc(25px*3)",
-        "calc(3*25px + 50%)",
-      ],
-      invalid_values: [ "none", "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available" ],
-    },
-    "border-block-end-color": {
-      domProp: "borderBlockEndColor",
-      inherited: false,
-      type: CSS_TYPE_LONGHAND,
-      logical: true,
-      get_computed: logical_box_prop_get_computed,
-      initial_values: [ "currentColor" ],
-      other_values: [ "green", "rgba(255,128,0,0.5)", "transparent" ],
-      invalid_values: [ "#0", "#00", "#00000", "#0000000", "#000000000", "000000" ]
-    },
-    "border-block-end-style": {
-      domProp: "borderBlockEndStyle",
-      inherited: false,
-      type: CSS_TYPE_LONGHAND,
-      logical: true,
-      get_computed: logical_box_prop_get_computed,
-      /* XXX hidden is sometimes the same as initial */
-      initial_values: [ "none" ],
-      other_values: [ "solid", "dashed", "dotted", "double", "outset", "inset", "groove", "ridge" ],
-      invalid_values: []
-    },
-    "border-block-end-width": {
-      domProp: "borderBlockEndWidth",
-      inherited: false,
-      type: CSS_TYPE_LONGHAND,
-      logical: true,
-      get_computed: logical_box_prop_get_computed,
-      prerequisites: { "border-block-end-style": "solid" },
-      initial_values: [ "medium", "3px", "calc(4px - 1px)" ],
-      other_values: [ "thin", "thick", "1px", "2em",
-        "calc(2px)",
-        "calc(-2px)",
-        "calc(0em)",
-        "calc(0px)",
-        "calc(5em)",
-        "calc(3*25px)",
-        "calc(25px*3)",
-        "calc(3*25px + 5em)",
-      ],
-      invalid_values: [ "5%", "5" ]
-    },
-    "border-block-start": {
-      domProp: "borderBlockStart",
-      inherited: false,
-      type: CSS_TYPE_TRUE_SHORTHAND,
-      subproperties: [ "border-block-start-color", "border-block-start-style", "border-block-start-width" ],
-      initial_values: [ "none", "medium", "currentColor", "thin", "none medium currentcolor" ],
-      other_values: [ "solid", "green", "medium solid", "green solid", "10px solid", "thick solid", "5px green none" ],
-      invalid_values: [ "5%", "5", "5 solid green" ]
-    },
-    "border-block-start-color": {
-      domProp: "borderBlockStartColor",
-      inherited: false,
-      type: CSS_TYPE_LONGHAND,
-      logical: true,
-      get_computed: logical_box_prop_get_computed,
-      initial_values: [ "currentColor" ],
-      other_values: [ "green", "rgba(255,128,0,0.5)", "transparent" ],
-      invalid_values: [ "#0", "#00", "#00000", "#0000000", "#000000000", "000000" ]
-    },
-    "border-block-start-style": {
-      domProp: "borderBlockStartStyle",
-      inherited: false,
-      type: CSS_TYPE_LONGHAND,
-      logical: true,
-      get_computed: logical_box_prop_get_computed,
-      /* XXX hidden is sometimes the same as initial */
-      initial_values: [ "none" ],
-      other_values: [ "solid", "dashed", "dotted", "double", "outset", "inset", "groove", "ridge" ],
-      invalid_values: []
-    },
-    "border-block-start-width": {
-      domProp: "borderBlockStartWidth",
-      inherited: false,
-      type: CSS_TYPE_LONGHAND,
-      logical: true,
-      get_computed: logical_box_prop_get_computed,
-      prerequisites: { "border-block-start-style": "solid" },
-      initial_values: [ "medium", "3px", "calc(4px - 1px)" ],
-      other_values: [ "thin", "thick", "1px", "2em",
-        "calc(2px)",
-        "calc(-2px)",
-        "calc(0em)",
-        "calc(0px)",
-        "calc(5em)",
-        "calc(3*25px)",
-        "calc(25px*3)",
-        "calc(3*25px + 5em)",
-      ],
-      invalid_values: [ "5%", "5" ]
-    },
-    "-moz-border-end": {
-      domProp: "MozBorderEnd",
-      inherited: false,
-      type: CSS_TYPE_TRUE_SHORTHAND,
-      alias_for: "border-inline-end",
-      subproperties: [ "-moz-border-end-color", "-moz-border-end-style", "-moz-border-end-width" ],
-    },
-    "-moz-border-end-color": {
-      domProp: "MozBorderEndColor",
-      inherited: false,
-      type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
-      alias_for: "border-inline-end-color",
-      subproperties: [ "border-inline-end-color" ],
-      get_computed: logical_box_prop_get_computed,
-    },
-    "-moz-border-end-style": {
-      domProp: "MozBorderEndStyle",
-      inherited: false,
-      type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
-      alias_for: "border-inline-end-style",
-      subproperties: [ "border-inline-end-style" ],
-      get_computed: logical_box_prop_get_computed,
-    },
-    "-moz-border-end-width": {
-      domProp: "MozBorderEndWidth",
-      inherited: false,
-      type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
-      alias_for: "border-inline-end-width",
-      subproperties: [ "border-inline-end-width" ],
-      get_computed: logical_box_prop_get_computed,
-    },
-    "-moz-border-start": {
-      domProp: "MozBorderStart",
-      inherited: false,
-      type: CSS_TYPE_TRUE_SHORTHAND,
-      alias_for: "border-inline-start",
-      subproperties: [ "-moz-border-start-color", "-moz-border-start-style", "-moz-border-start-width" ],
-    },
-    "-moz-border-start-color": {
-      domProp: "MozBorderStartColor",
-      inherited: false,
-      type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
-      alias_for: "border-inline-start-color",
-      subproperties: [ "border-inline-start-color" ],
-      get_computed: logical_box_prop_get_computed,
-    },
-    "-moz-border-start-style": {
-      domProp: "MozBorderStartStyle",
-      inherited: false,
-      type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
-      alias_for: "border-inline-start-style",
-      subproperties: [ "border-inline-start-style" ],
-      get_computed: logical_box_prop_get_computed,
-    },
-    "-moz-border-start-width": {
-      domProp: "MozBorderStartWidth",
-      inherited: false,
-      type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
-      alias_for: "border-inline-start-width",
-      subproperties: [ "border-inline-start-width" ],
-      get_computed: logical_box_prop_get_computed,
-    },
-    "inline-size": {
-      domProp: "inlineSize",
-      inherited: false,
-      type: CSS_TYPE_LONGHAND,
-      logical: true,
-      axis: true,
-      get_computed: logical_axis_prop_get_computed,
-      /* XXX testing auto has prerequisites */
-      initial_values: [ "auto" ],
-      prerequisites: { "display": "block" },
-      other_values: [ "15px", "3em", "15%",
-        // these three keywords compute to the initial value only when the
-        // writing mode is vertical, and we're testing with a horizontal
-        // writing mode
-        "-moz-max-content", "-moz-min-content", "-moz-fit-content",
-        // whether -moz-available computes to the initial value depends on
-        // the container size, and for the container size we're testing
-        // with, it does
-        // "-moz-available",
-        "calc(2px)",
-        "calc(50%)",
-        "calc(3*25px)",
-        "calc(25px*3)",
-        "calc(3*25px + 50%)",
-      ],
-      invalid_values: [ "none" ],
-    },
-    "margin-block-end": {
-      domProp: "marginBlockEnd",
-      inherited: false,
-      type: CSS_TYPE_LONGHAND,
-      logical: true,
-      get_computed: logical_box_prop_get_computed,
-      /* XXX testing auto has prerequisites */
-      initial_values: [ "0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)" ],
-      other_values: [ "1px", "2em", "5%",
-        "calc(2px)",
-        "calc(-2px)",
-        "calc(50%)",
-        "calc(3*25px)",
-        "calc(25px*3)",
-        "calc(3*25px + 50%)",
-      ],
-      invalid_values: [ "..25px", ".+5px", ".px", "-.px", "++5px", "-+4px", "+-3px", "--7px", "+-.6px", "-+.5px", "++.7px", "--.4px" ],
-    },
-    "margin-block-start": {
-      domProp: "marginBlockStart",
-      inherited: false,
-      type: CSS_TYPE_LONGHAND,
-      logical: true,
-      get_computed: logical_box_prop_get_computed,
-      /* XXX testing auto has prerequisites */
-      initial_values: [ "0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)" ],
-      other_values: [ "1px", "2em", "5%",
-        "calc(2px)",
-        "calc(-2px)",
-        "calc(50%)",
-        "calc(3*25px)",
-        "calc(25px*3)",
-        "calc(3*25px + 50%)",
-      ],
-      invalid_values: [ "..25px", ".+5px", ".px", "-.px", "++5px", "-+4px", "+-3px", "--7px", "+-.6px", "-+.5px", "++.7px", "--.4px" ],
-    },
-    "-moz-margin-end": {
-      domProp: "MozMarginEnd",
-      inherited: false,
-      type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
-      alias_for: "margin-inline-end",
-      subproperties: [ "margin-inline-end" ],
-      get_computed: logical_box_prop_get_computed,
-    },
-    "-moz-margin-start": {
-      domProp: "MozMarginStart",
-      inherited: false,
-      type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
-      alias_for: "margin-inline-start",
-      subproperties: [ "margin-inline-start" ],
-      get_computed: logical_box_prop_get_computed,
-    },
-    "max-block-size": {
-      domProp: "maxBlockSize",
-      inherited: false,
-      type: CSS_TYPE_LONGHAND,
-      logical: true,
-      axis: true,
-      get_computed: logical_axis_prop_get_computed,
-      prerequisites: { "display": "block" },
-      initial_values: [ "none" ],
-      other_values: [ "30px", "50%",
-        "calc(2px)",
-        "calc(50%)",
-        "calc(3*25px)",
-        "calc(25px*3)",
-        "calc(3*25px + 50%)",
-      ],
-      invalid_values: [ "auto", "5", "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available" ]
-    },
-    "max-inline-size": {
-      domProp: "maxInlineSize",
-      inherited: false,
-      type: CSS_TYPE_LONGHAND,
-      logical: true,
-      axis: true,
-      get_computed: logical_axis_prop_get_computed,
-      prerequisites: { "display": "block" },
-      initial_values: [ "none" ],
-      other_values: [ "30px", "50%",
-        // these four keywords compute to the initial value only when the
-        // writing mode is vertical, and we're testing with a horizontal
-        // writing mode
-        "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available",
-        "calc(2px)",
-        "calc(50%)",
-        "calc(3*25px)",
-        "calc(25px*3)",
-        "calc(3*25px + 50%)",
-      ],
-      invalid_values: [ "auto", "5" ]
-    },
-    "min-block-size": {
-      domProp: "minBlockSize",
-      inherited: false,
-      type: CSS_TYPE_LONGHAND,
-      logical: true,
-      axis: true,
-      get_computed: logical_axis_prop_get_computed,
-      prerequisites: { "display": "block" },
-      initial_values: [ "auto", "0", "calc(0em)", "calc(-2px)", "calc(-1%)" ],
-      other_values: [ "30px", "50%",
-        "calc(2px)",
-        "calc(50%)",
-        "calc(3*25px)",
-        "calc(25px*3)",
-        "calc(3*25px + 50%)",
-      ],
-      invalid_values: [ "none", "5", "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available" ]
-    },
-    "min-inline-size": {
-      domProp: "minInlineSize",
-      inherited: false,
-      type: CSS_TYPE_LONGHAND,
-      logical: true,
-      axis: true,
-      get_computed: logical_axis_prop_get_computed,
-      prerequisites: { "display": "block" },
-      initial_values: [ "auto", "0", "calc(0em)", "calc(-2px)", "calc(-1%)" ],
-      other_values: [ "30px", "50%",
-        // these four keywords compute to the initial value only when the
-        // writing mode is vertical, and we're testing with a horizontal
-        // writing mode
-        "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available",
-        "calc(2px)",
-        "calc(50%)",
-        "calc(3*25px)",
-        "calc(25px*3)",
-        "calc(3*25px + 50%)",
-      ],
-      invalid_values: [ "none", "5" ]
-    },
-    "offset-block-end": {
-      domProp: "offsetBlockEnd",
-      inherited: false,
-      type: CSS_TYPE_LONGHAND,
-      logical: true,
-      get_computed: logical_box_prop_get_computed,
-      /* FIXME: run tests with multiple prerequisites */
-      prerequisites: { "position": "relative" },
-      /* XXX 0 may or may not be equal to auto */
-      initial_values: [ "auto" ],
-      other_values: [ "32px", "-3em", "12%",
-        "calc(2px)",
-        "calc(-2px)",
-        "calc(50%)",
-        "calc(3*25px)",
-        "calc(25px*3)",
-        "calc(3*25px + 50%)",
-      ],
-      invalid_values: []
-    },
-    "offset-block-start": {
-      domProp: "offsetBlockStart",
-      inherited: false,
-      type: CSS_TYPE_LONGHAND,
-      logical: true,
-      get_computed: logical_box_prop_get_computed,
-      /* FIXME: run tests with multiple prerequisites */
-      prerequisites: { "position": "relative" },
-      /* XXX 0 may or may not be equal to auto */
-      initial_values: [ "auto" ],
-      other_values: [ "32px", "-3em", "12%",
-        "calc(2px)",
-        "calc(-2px)",
-        "calc(50%)",
-        "calc(3*25px)",
-        "calc(25px*3)",
-        "calc(3*25px + 50%)",
-      ],
-      invalid_values: []
-    },
-    "offset-inline-end": {
-      domProp: "offsetInlineEnd",
-      inherited: false,
-      type: CSS_TYPE_LONGHAND,
-      logical: true,
-      get_computed: logical_box_prop_get_computed,
-      /* FIXME: run tests with multiple prerequisites */
-      prerequisites: { "position": "relative" },
-      /* XXX 0 may or may not be equal to auto */
-      initial_values: [ "auto" ],
-      other_values: [ "32px", "-3em", "12%",
-        "calc(2px)",
-        "calc(-2px)",
-        "calc(50%)",
-        "calc(3*25px)",
-        "calc(25px*3)",
-        "calc(3*25px + 50%)",
-      ],
-      invalid_values: []
-    },
-    "offset-inline-start": {
-      domProp: "offsetInlineStart",
-      inherited: false,
-      type: CSS_TYPE_LONGHAND,
-      logical: true,
-      get_computed: logical_box_prop_get_computed,
-      /* FIXME: run tests with multiple prerequisites */
-      prerequisites: { "position": "relative" },
-      /* XXX 0 may or may not be equal to auto */
-      initial_values: [ "auto" ],
-      other_values: [ "32px", "-3em", "12%",
-        "calc(2px)",
-        "calc(-2px)",
-        "calc(50%)",
-        "calc(3*25px)",
-        "calc(25px*3)",
-        "calc(3*25px + 50%)",
-      ],
-      invalid_values: []
-    },
-    "padding-block-end": {
-      domProp: "paddingBlockEnd",
-      inherited: false,
-      type: CSS_TYPE_LONGHAND,
-      logical: true,
-      get_computed: logical_box_prop_get_computed,
-      initial_values: [ "0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)", "calc(-3px)", "calc(-1%)" ],
-      other_values: [ "1px", "2em", "5%",
-        "calc(2px)",
-        "calc(50%)",
-        "calc(3*25px)",
-        "calc(25px*3)",
-        "calc(3*25px + 50%)",
-      ],
-      invalid_values: [ ],
-    },
-    "padding-block-start": {
-      domProp: "paddingBlockStart",
-      inherited: false,
-      type: CSS_TYPE_LONGHAND,
-      logical: true,
-      get_computed: logical_box_prop_get_computed,
-      initial_values: [ "0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)", "calc(-3px)", "calc(-1%)" ],
-      other_values: [ "1px", "2em", "5%",
-        "calc(2px)",
-        "calc(50%)",
-        "calc(3*25px)",
-        "calc(25px*3)",
-        "calc(3*25px + 50%)",
-      ],
-      invalid_values: [ ],
-    },
-    "-moz-padding-end": {
-      domProp: "MozPaddingEnd",
-      inherited: false,
-      type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
-      alias_for: "padding-inline-end",
-      subproperties: [ "padding-inline-end" ],
-      get_computed: logical_box_prop_get_computed,
-    },
-    "-moz-padding-start": {
-      domProp: "MozPaddingStart",
-      inherited: false,
-      type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
-      alias_for: "padding-inline-start",
-      subproperties: [ "padding-inline-start" ],
-      get_computed: logical_box_prop_get_computed,
-    },
-  };
-  for (var prop in verticalTextProperties) {
-    gCSSProperties[prop] = verticalTextProperties[prop];
-  }
-  /*
-   * Vertical vs horizontal writing-mode can affect line-height
-   * because font metrics may not be symmetrical,
-   * so we require writing-mode:initial to ensure consistency
-   * in font shorthand and line-height tests.
-   */
-  ["font", "line-height"].forEach(function(prop) {
-    var p = gCSSProperties[prop];
-    if (p.prerequisites === undefined) {
-      p.prerequisites = {};
-    }
-    p.prerequisites["writing-mode"] = "initial";
-  });
-}
-
 if (IsCSSPropertyPrefEnabled("layout.css.text-combine-upright.enabled")) {
   gCSSProperties["text-combine-upright"] = {
     domProp: "textCombineUpright",
     inherited: true,
     type: CSS_TYPE_LONGHAND,
     initial_values: [ "none" ],
     other_values: [ "all" ],
     invalid_values: [ "auto", "all 2", "none all", "digits -3", "digits 0",
--- a/layout/style/test/test_computed_style_prefs.html
+++ b/layout/style/test/test_computed_style_prefs.html
@@ -63,17 +63,16 @@ function step() {
   gPrefsPushed = true;
   SpecialPowers.pushPrefEnv(gTests[gTestIndex].settings,
                             function() { fn(); SimpleTest.executeSoon(step); });
 }
 
 // ----
 
 var gProps = {
-  "layout.css.vertical-text.enabled": ["text-orientation", "writing-mode"],
   "layout.css.text-combine-upright.enabled": ["text-combine-upright"],
   "layout.css.image-orientation.enabled": ["image-orientation"],
   "layout.css.mix-blend-mode.enabled": ["mix-blend-mode"],
   "layout.css.isolation.enabled": [ "isolation"],
   "layout.css.masking.enabled": ["mask-type"],
   "layout.css.touch_action.enabled": ["touch-action"],
   "svg.transform-box.enabled": ["transform-box"]
 };
--- a/layout/style/test/test_logical_properties.html
+++ b/layout/style/test/test_logical_properties.html
@@ -160,17 +160,16 @@ function make_declaration(aObject) {
     for (var p in aObject) {
       decl += `${p}: ${aObject[p]}; `;
     }
   }
   return decl;
 }
 
 function start() {
-  // load property_database.js once the pref change has gone into effect
   var script = document.createElement("script");
   script.src = "property_database.js";
   script.onload = function() {
     init();
     run_tests();
   };
   document.body.appendChild(script);
 }
@@ -414,10 +413,10 @@ function run_tests() {
       });
     });
   });
 
   SimpleTest.finish();
 }
 
 SimpleTest.waitForExplicitFinish();
-SpecialPowers.pushPrefEnv({ "set": [["layout.css.vertical-text.enabled", true]] }, start);
+start();
 </script>
--- a/layout/style/test/test_value_computation.html
+++ b/layout/style/test/test_value_computation.html
@@ -9,20 +9,20 @@
   <style type="text/css" id="stylesheet"></style>
   <style type="text/css">
   /* For 'width', 'height', etc., need a constant size container. */
   #display { width: 500px; height: 200px }
   </style>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
   <script type="text/javascript">
   var numAssertions = 9;
-  if (SpecialPowers.getBoolPref("layout.css.vertical-text.enabled")) {
-    // these are from the additional margin-inline-{start,end} tests
-    numAssertions += 2;
-  }
+
+  // these are from the additional margin-inline-{start,end} tests
+  numAssertions += 2;
+
   SimpleTest.expectAssertions(numAssertions);
   SimpleTest.waitForExplicitFinish();
   SimpleTest.requestLongerTimeout(2);
 
   var load_count = 0;
   function load_done() {
     if (++load_count == 3)
       run_tests();
--- a/media/webrtc/signaling/src/media-conduit/VideoConduit.cpp
+++ b/media/webrtc/signaling/src/media-conduit/VideoConduit.cpp
@@ -739,17 +739,17 @@ WebrtcVideoConduit::ConfigureSendMediaCo
   mVideoCodecStat->Register(true);
 
   mSendingWidth = 0;
   mSendingHeight = 0;
   mSendingFramerate = video_codec.maxFramerate;
 
   // See Bug 1297058, enabling FEC when NACK is set on H.264 is problematic
   bool use_fec = codecConfig->RtcpFbFECIsSet();
-  if (mExternalSendCodec && codecConfig->mType == mExternalSendCodec->mType
+  if ((mExternalSendCodec && codecConfig->mType == mExternalSendCodec->mType)
       || codecConfig->mType == webrtc::kVideoCodecH264) {
     if(codecConfig->RtcpFbNackIsSet("")) {
       use_fec = false;
     }
   }
 
   if (use_fec)
   {
--- a/mfbt/TypeTraits.h
+++ b/mfbt/TypeTraits.h
@@ -567,16 +567,37 @@ struct IsUnsignedHelper<T, false, false,
  * mozilla::IsUnsigned<int>::value is false;
  * mozilla::IsUnsigned<const unsigned int>::value is true;
  * mozilla::IsUnsigned<unsigned char>::value is true;
  * mozilla::IsUnsigned<float>::value is false.
  */
 template<typename T>
 struct IsUnsigned : detail::IsUnsignedHelper<T> {};
 
+namespace detail {
+
+struct DoIsDestructibleImpl
+{
+  template<typename T, typename = decltype(DeclVal<T&>().~T())>
+  static TrueType test(int);
+  template<typename T>
+  static FalseType test(...);
+};
+
+template<typename T>
+struct IsDestructibleImpl : public DoIsDestructibleImpl
+{
+  typedef decltype(test<T>(0)) Type;
+};
+
+} // namespace detail
+
+template<typename T>
+struct IsDestructible : public detail::IsDestructibleImpl<T>::Type {};
+
 /* 20.9.5 Type property queries [meta.unary.prop.query] */
 
 /* 20.9.6 Relationships between types [meta.rel] */
 
 /**
  * IsSame tests whether two types are the same type.
  *
  * mozilla::IsSame<int, int>::value is true;
--- a/mfbt/tests/TestTypeTraits.cpp
+++ b/mfbt/tests/TestTypeTraits.cpp
@@ -26,16 +26,17 @@ using mozilla::IsConvertible;
 using mozilla::IsEmpty;
 using mozilla::IsLvalueReference;
 using mozilla::IsPointer;
 using mozilla::IsReference;
 using mozilla::IsRvalueReference;
 using mozilla::IsSame;
 using mozilla::IsSigned;
 using mozilla::IsUnsigned;
+using mozilla::IsDestructible;
 using mozilla::MakeSigned;
 using mozilla::MakeUnsigned;
 using mozilla::RemoveExtent;
 using mozilla::RemovePointer;
 
 static_assert(!IsFunction<int>::value,
               "int is not a function type");
 static_assert(IsFunction<void(int)>::value,
@@ -347,16 +348,37 @@ class NotIntConstructible
   NotIntConstructible(int) = delete;
 };
 
 static_assert(!IsSigned<NotIntConstructible>::value,
               "non-arithmetic types are not signed");
 static_assert(!IsUnsigned<NotIntConstructible>::value,
               "non-arithmetic types are not unsigned");
 
+class PublicDestructible
+{
+public:
+  ~PublicDestructible();
+};
+class PrivateDestructible
+{
+private:
+  ~PrivateDestructible();
+};
+class TrivialDestructible
+{
+};
+
+static_assert(IsDestructible<PublicDestructible>::value,
+              "public destructible class is destructible");
+static_assert(!IsDestructible<PrivateDestructible>::value,
+              "private destructible class is not destructible");
+static_assert(IsDestructible<TrivialDestructible>::value,
+              "trivial destructible class is destructible");
+
 namespace CPlusPlus11IsBaseOf {
 
 // Adapted from C++11 § 20.9.6.
 struct B {};
 struct B1 : B {};
 struct B2 : B {};
 struct D : private B1, private B2 {};
 
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -541,18 +541,17 @@ pref("media.getusermedia.screensharing.a
  // includes Mozilla's test domain: mozilla.github.io (not intended for release)
 pref("media.getusermedia.screensharing.allowed_domains", "mozilla.github.io,webex.com,*.webex.com,ciscospark.com,*.ciscospark.com,projectsquared.com,*.projectsquared.com,*.room.co,room.co,beta.talky.io,talky.io,*.clearslide.com,appear.in,*.appear.in,tokbox.com,*.tokbox.com,*.sso.francetelecom.fr,*.si.francetelecom.fr,*.sso.infra.ftgroup,*.multimedia-conference.orange-business.com,*.espacecollaboration.orange-business.com,free.gotomeeting.com,g2m.me,*.g2m.me,*.mypurecloud.com,*.mypurecloud.com.au,spreed.me,*.spreed.me,*.spreed.com,air.mozilla.org,*.circuit.com,*.yourcircuit.com,circuit.siemens.com,yourcircuit.siemens.com,circuitsandbox.net,*.unify.com,tandi.circuitsandbox.net,*.ericsson.net,*.cct.ericsson.net,*.opentok.com,*.conf.meetecho.com,meet.jit.si,*.meet.jit.si,web.stage.speakeasyapp.net,web.speakeasyapp.net,*.hipchat.me,*.beta-wspbx.com,*.wspbx.com,*.unifiedcloudit.com,*.smartboxuc.com,*.smartbox-uc.com,*.panterranetworks.com,pexipdemo.com,*.pexipdemo.com,pex.me,*.pex.me,*.rd.pexip.com,1click.io,*.1click.io,*.fuze.com,*.fuzemeeting.com,*.thinkingphones.com,gotomeeting.com,*.gotomeeting.com,gotowebinar.com,*.gotowebinar.com,gototraining.com,*.gototraining.com,citrix.com,*.citrix.com,expertcity.com,*.expertcity.com,citrixonline.com,*.citrixonline.com,g2m.me,*.g2m.me,gotomeet.me,*.gotomeet.me,gotomeet.at,*.gotomeet.at,miriadaxdes.miriadax.net,certificacion.miriadax.net,miriadax.net,*.wire.com,sylaps.com,*.sylaps.com");
 #endif
 // OS/X 10.6 and XP have screen/window sharing off by default due to various issues - Caveat emptor
 pref("media.getusermedia.screensharing.allow_on_old_platforms", false);
 
 pref("media.getusermedia.audiocapture.enabled", false);
 
-// TextTrack support
-pref("media.webvtt.enabled", true);
+// TextTrack WebVTT Region extension support.
 pref("media.webvtt.regions.enabled", false);
 
 // AudioTrack and VideoTrack support
 pref("media.track.enabled", false);
 
 // Whether to enable MediaSource support.
 pref("media.mediasource.enabled", true);
 
@@ -2551,19 +2550,16 @@ pref("layout.css.unprefixing-service.glo
 pref("layout.css.scope-pseudo.enabled", true);
 
 // Is support for background-blend-mode enabled?
 pref("layout.css.background-blend-mode.enabled", true);
 
 // Is support for background-clip:text enabled?
 pref("layout.css.background-clip-text.enabled", true);
 
-// Is support for CSS vertical text enabled?
-pref("layout.css.vertical-text.enabled", true);
-
 // Is support for CSS text-combine-upright (tate-chu-yoko) enabled?
 pref("layout.css.text-combine-upright.enabled", true);
 // Is support for CSS text-combine-upright: digits 2-4 enabled?
 pref("layout.css.text-combine-upright-digits.enabled", false);
 
 // Is support for object-fit and object-position enabled?
 pref("layout.css.object-fit-and-position.enabled", true);
 
--- a/python/mozbuild/mozbuild/mach_commands.py
+++ b/python/mozbuild/mozbuild/mach_commands.py
@@ -414,17 +414,18 @@ class Build(MachCommandBase):
             else:
                 # Try to call the default backend's build() method. This will
                 # run configure to determine BUILD_BACKENDS if it hasn't run
                 # yet.
                 config = None
                 try:
                     config = self.config_environment
                 except Exception:
-                    config_rc = self.configure()
+                    config_rc = self.configure(buildstatus_messages=True,
+                                               line_handler=output.on_line)
                     if config_rc != 0:
                         return config_rc
 
                     # Even if configure runs successfully, we may have trouble
                     # getting the config_environment for some builds, such as
                     # OSX Universal builds. These have to go through client.mk
                     # regardless.
                     try:
@@ -540,26 +541,33 @@ class Build(MachCommandBase):
                 pass
 
         return status
 
     @Command('configure', category='build',
         description='Configure the tree (run configure and config.status).')
     @CommandArgument('options', default=None, nargs=argparse.REMAINDER,
                      help='Configure options')
-    def configure(self, options=None):
+    def configure(self, options=None, buildstatus_messages=False, line_handler=None):
         def on_line(line):
             self.log(logging.INFO, 'build_output', {'line': line}, '{line}')
 
+        line_handler = line_handler or on_line
+
         options = ' '.join(shell_quote(o) for o in options or ())
+        append_env = {b'CONFIGURE_ARGS': options.encode('utf-8')}
+
+        # Only print build status messages when we have an active
+        # monitor.
+        if not buildstatus_messages:
+            append_env[b'NO_BUILDSTATUS_MESSAGES'] =  b'1'
         status = self._run_make(srcdir=True, filename='client.mk',
-            target='configure', line_handler=on_line, log=False,
+            target='configure', line_handler=line_handler, log=False,
             print_directory=False, allow_parallel=False, ensure_exit_code=False,
-            append_env={b'CONFIGURE_ARGS': options.encode('utf-8'),
-                        b'NO_BUILDSTATUS_MESSAGES': b'1',})
+            append_env=append_env)
 
         if not status:
             print('Configure complete!')
             print('Be sure to run |mach build| to pick up any changes');
 
         return status
 
     @Command('resource-usage', category='post-build',
--- a/security/sandbox/chromium/sandbox/win/src/policy_target.cc
+++ b/security/sandbox/chromium/sandbox/win/src/policy_target.cc
@@ -76,16 +76,26 @@ NTSTATUS WINAPI TargetNtSetInformationTh
     NtSetInformationThreadFunction orig_SetInformationThread, HANDLE thread,
     NT_THREAD_INFORMATION_CLASS thread_info_class, PVOID thread_information,
     ULONG thread_information_bytes) {
   do {
     if (SandboxFactory::GetTargetServices()->GetState()->RevertedToSelf())
       break;
     if (ThreadImpersonationToken != thread_info_class)
       break;
+    if (!thread_information)
+      break;
+    HANDLE token;
+    if (sizeof(token) > thread_information_bytes)
+      break;
+
+    NTSTATUS ret = CopyData(&token, thread_information, sizeof(token));
+    if (!NT_SUCCESS(ret) || NULL != token)
+      break;
+
     // This is a revert to self.
     return STATUS_SUCCESS;
   } while (false);
 
   return orig_SetInformationThread(thread, thread_info_class,
                                    thread_information,
                                    thread_information_bytes);
 }
--- a/security/sandbox/chromium/sandbox/win/src/restricted_token_utils.cc
+++ b/security/sandbox/chromium/sandbox/win/src/restricted_token_utils.cc
@@ -48,29 +48,16 @@ DWORD CreateRestrictedToken(TokenLevel s
       break;
     }
     case USER_NON_ADMIN: {
       sid_exceptions.push_back(WinBuiltinUsersSid);
       sid_exceptions.push_back(WinWorldSid);
       sid_exceptions.push_back(WinInteractiveSid);
       sid_exceptions.push_back(WinAuthenticatedUserSid);
       privilege_exceptions.push_back(SE_CHANGE_NOTIFY_NAME);
-      // We need to make USER_NON_ADMIN into a restricted token to work around a
-      // conflict with a call to CoInitializeSecurity (see bug 1287426).
-      // To do this we add the same restricted SIDs as USER_INTERACTIVE, because
-      // USER_NON_ADMIN should have at least the same permissions. We also add
-      // in any that are in the deny only exception list above, which should
-      // give the new USER_NON_ADMIN token the same permissions as the old.
-      restricted_token.AddRestrictingSid(WinBuiltinUsersSid);
-      restricted_token.AddRestrictingSid(WinWorldSid);
-      restricted_token.AddRestrictingSid(WinInteractiveSid);
-      restricted_token.AddRestrictingSid(WinAuthenticatedUserSid);
-      restricted_token.AddRestrictingSid(WinRestrictedCodeSid);
-      restricted_token.AddRestrictingSidCurrentUser();
-      restricted_token.AddRestrictingSidLogonSession();
       break;
     }
     case USER_INTERACTIVE: {
       sid_exceptions.push_back(WinBuiltinUsersSid);
       sid_exceptions.push_back(WinWorldSid);
       sid_exceptions.push_back(WinInteractiveSid);
       sid_exceptions.push_back(WinAuthenticatedUserSid);
       privilege_exceptions.push_back(SE_CHANGE_NOTIFY_NAME);
--- a/security/sandbox/modifications-to-chromium-to-reapply-after-upstream-merge.txt
+++ b/security/sandbox/modifications-to-chromium-to-reapply-after-upstream-merge.txt
@@ -1,9 +1,8 @@
 Please add a link to the bugzilla bug and patch name that should be re-applied.
 Also, please update any existing links to their actual mozilla-central changeset.
 
 https://bugzilla.mozilla.org/show_bug.cgi?id=1287426 bug1287426part4.patch
 https://bugzilla.mozilla.org/show_bug.cgi?id=1287426 bug1287426part5.patch
 https://hg.mozilla.org/mozilla-central/rev/7df8d6639971
 https://bugzilla.mozilla.org/show_bug.cgi?id=1287426 bug1287426part6.patch
 https://bugzilla.mozilla.org/show_bug.cgi?id=1287426 bug1287426part7.patch
-https://bugzilla.mozilla.org/show_bug.cgi?id=1287426 bug1287426part8.patch
--- a/security/sandbox/moz-chromium-commit-status.txt
+++ b/security/sandbox/moz-chromium-commit-status.txt
@@ -1,3 +1,4 @@
 Chromium Commit                            Directory / File (relative to security/sandbox/)
 ----------------------------------------   ------------------------------------------------
 4ec79b7f2379a60cdc15599e93255c0fa417f1ed   chromium
+611754aea9d1c0ba5c7980fa267fd005dc249b85   chromium/sandbox/win/src/policy_target.cc
--- a/taskcluster/taskgraph/optimize.py
+++ b/taskcluster/taskgraph/optimize.py
@@ -40,17 +40,17 @@ def resolve_task_references(label, task_
     def repl(match):
         key = match.group(1)
         try:
             return taskid_for_edge_name[key]
         except KeyError:
             # handle escaping '<'
             if key == '<':
                 return key
-            raise KeyError("task '{}' has no dependency with label '{}'".format(label, key))
+            raise KeyError("task '{}' has no dependency named '{}'".format(label, key))
 
     def recurse(val):
         if isinstance(val, list):
             return [recurse(v) for v in val]
         elif isinstance(val, dict):
             if val.keys() == ['task-reference']:
                 return TASK_REFERENCE_PATTERN.sub(repl, val['task-reference'])
             else:
--- a/taskcluster/taskgraph/test/test_optimize.py
+++ b/taskcluster/taskgraph/test/test_optimize.py
@@ -43,17 +43,17 @@ class TestResolveTaskReferences(unittest
         "resolve_task_references resolves escapes in task references"
         self.do({'escape': {'task-reference': '<<><edge3>>'}},
                 {'escape': '<tid3>'})
 
     def test_invalid(self):
         "resolve_task_references raises a KeyError on reference to an invalid task"
         self.assertRaisesRegexp(
             KeyError,
-            "task 'subject' has no dependency with label 'no-such'",
+            "task 'subject' has no dependency named 'no-such'",
             lambda: resolve_task_references('subject', {'task-reference': '<no-such>'}, {})
         )
 
 
 class OptimizingTask(TestTask):
     # the `optimize` method on this class is overridden direclty in the tests
     # below.
     pass
new file mode 100644
--- /dev/null
+++ b/taskcluster/taskgraph/transforms/gecko_v2_whitelist.py
@@ -0,0 +1,72 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+"""
+This file contains a whitelist of gecko.v2 index route job names.  The intent
+of this whitelist is to raise an alarm when new jobs are added.  If those jobs
+already run in Buildbot, then it's important that the generated index routes
+match (and that only one of Buildbot and TaskCluster be tier-1 at any time).
+If the jobs are new and never ran in Buildbot, then their job name can be added
+here without any further fuss.
+
+Once all jobs have been ported from Buildbot, this file can be removed.
+"""
+
+from __future__ import absolute_import, print_function, unicode_literals
+
+# please keep me in lexical order
+JOB_NAME_WHITELIST = set([
+    'android-api-15-debug',
+    'android-api-15-gradle-dependencies-opt',
+    'android-api-15-gradle-opt',
+    'android-api-15-opt',
+    'android-api-15-partner-sample1-opt',
+    'android-l10n-opt',
+    'android-x86-opt',
+    'aries-debug',
+    'aries-eng-opt',
+    'browser-haz-debug',
+    'linux32-l10n-opt',
+    'linux64-artifact-opt',
+    'linux64-asan-debug',
+    'linux64-asan-opt',
+    'linux64-debug',
+    'linux64-l10n-opt',
+    'linux64-opt',
+    'linux64-pgo-opt',
+    'linux64-st-an-opt',
+    'linux64-valgrind-opt',
+    'linux-debug',
+    'linux-opt',
+    'macosx64-debug',
+    'macosx64-opt',
+    'macosx64-st-an-opt',
+    'mulet-dbg',
+    'mulet-haz-debug',
+    'mulet-opt',
+    'nexus-5-l-eng-debug',
+    'nexus-5-l-eng-opt',
+    'shell-haz-debug',
+    'sm-arm64-sim-debug',
+    'sm-arm-sim-debug',
+    'sm-asan-opt',
+    'sm-compacting-debug',
+    'sm-msan-opt',
+    'sm-nonunified-debug',
+    'sm-package-opt',
+    'sm-plaindebug-debug',
+    'sm-plain-opt',
+    'sm-rootanalysis-debug',
+    'sm-tsan-opt',
+    'win32-debug',
+    'win32-opt',
+    'win64-debug',
+    'win64-opt',
+])
+
+JOB_NAME_WHITELIST_ERROR = """\
+The gecko-v2 job name {} is not in the whitelist in __file__.
+If this job runs on Buildbot, please ensure that the job names match between
+Buildbot and TaskCluster, then add the job name to the whitelist.  If this is a
+new job, there is nothing to check -- just add the job to the whitelist.
+"""
--- a/taskcluster/taskgraph/transforms/task.py
+++ b/taskcluster/taskgraph/transforms/task.py
@@ -5,25 +5,28 @@
 These transformations take a task description and turn it into a TaskCluster
 task definition (along with attributes, label, etc.).  The input to these
 transformations is generic to any kind of task, but abstracts away some of the
 complexities of worker implementations, scopes, and treeherder annotations.
 """
 
 from __future__ import absolute_import, print_function, unicode_literals
 
+import json
 import time
 
 from taskgraph.util.treeherder import split_symbol
 from taskgraph.transforms.base import (
     validate_schema,
     TransformSequence
 )
 from voluptuous import Schema, Any, Required, Optional, Extra
 
+from .gecko_v2_whitelist import JOB_NAME_WHITELIST, JOB_NAME_WHITELIST_ERROR
+
 # shortcut for a string where task references are allowed
 taskref_or_string = Any(
     basestring,
     {Required('task-reference'): basestring})
 
 # A task description is a general description of a TaskCluster task
 task_description_schema = Schema({
     # the label for this task
@@ -403,16 +406,20 @@ def add_index_routes(config, tasks):
         # unpack the v2 name to v1 and buildbot names
         if isinstance(job_name, basestring):
             base_name, type_name = job_name.rsplit('-', 1)
             job_name = {
                 'buildbot': base_name,
                 'gecko-v1': '{}.{}'.format(base_name, type_name),
                 'gecko-v2': '{}-{}'.format(base_name, type_name),
             }
+
+        if job_name['gecko-v2'] not in JOB_NAME_WHITELIST:
+            raise Exception(JOB_NAME_WHITELIST_ERROR.format(job_name['gecko-v2']))
+
         subs = config.params.copy()
         for n in job_name:
             subs['job-name-' + n] = job_name[n]
         subs['pushdate_long'] = time.strftime(
             "%Y.%m.%d.%Y%m%d%H%M%S",
             time.gmtime(config.params['pushdate']))
         subs['product'] = index['product']
 
@@ -516,8 +523,33 @@ def build_task(config, tasks):
 
         yield {
             'label': task['label'],
             'task': task_def,
             'dependencies': task.get('dependencies', {}),
             'attributes': attributes,
             'when': task.get('when', {}),
         }
+
+
+# Check that the v2 route templates match those used by Mozharness.  This can
+# go away once Mozharness builds are no longer performed in Buildbot, and the
+# Mozharness code referencing routes.json is deleted.
+def check_v2_routes():
+    with open("testing/mozharness/configs/routes.json", "rb") as f:
+        routes_json = json.load(f)
+
+    # we only deal with the 'routes' key here
+    routes = routes_json['routes']
+
+    # we use different variables than mozharness
+    for mh, tg in [
+            ('{index}', 'index'),
+            ('{build_product}', '{product}'),
+            ('{build_name}-{build_type}', '{job-name-gecko-v2}'),
+            ('{year}.{month}.{day}.{pushdate}', '{pushdate_long}')]:
+        routes = [r.replace(mh, tg) for r in routes]
+
+    if sorted(routes) != sorted(V2_ROUTE_TEMPLATES):
+        raise Exception("V2_ROUTE_TEMPLATES does not match Mozharness's routes.json: "
+                        "%s vs %s" % (V2_ROUTE_TEMPLATES, routes))
+
+check_v2_routes()
--- a/testing/marionette/harness/marionette/tests/unit/test_click.py
+++ b/testing/marionette/harness/marionette/tests/unit/test_click.py
@@ -1,18 +1,16 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 from unittest import skip
 
 from marionette_driver.by import By
 from marionette_driver.errors import NoSuchElementException, ElementNotVisibleException
-from marionette_driver.keys import Keys
-from marionette_driver.marionette import Actions
 from marionette_driver.wait import Wait
 from marionette import MarionetteTestCase
 
 
 class TestLegacyClick(MarionetteTestCase):
     """Uses legacy Selenium element displayedness checks."""
 
     def setUp(self):
--- a/testing/mochitest/tests/SimpleTest/TestRunner.js
+++ b/testing/mochitest/tests/SimpleTest/TestRunner.js
@@ -558,17 +558,17 @@ TestRunner.testFinished = function(tests
 
         TestRunner.structuredLogger.testEnd(TestRunner.currentTestURL,
                                             "OK",
                                             undefined,
                                             "Finished in " + runtime + "ms",
                                             {runtime: runtime}
         );
 
-        if (TestRunner.slowestTestTime < runtime && TestRunner._timeoutFactor == 1) {
+        if (TestRunner.slowestTestTime < runtime && TestRunner._timeoutFactor >= 1) {
           TestRunner.slowestTestTime = runtime;
           TestRunner.slowestTestURL = TestRunner.currentTestURL;
         }
 
         TestRunner.updateUI(tests);
 
         // Don't show the interstitial if we just run one test with no repeats:
         if (TestRunner._urls.length == 1 && TestRunner.repeat <= 1) {
--- a/toolkit/components/places/UnifiedComplete.js
+++ b/toolkit/components/places/UnifiedComplete.js
@@ -891,25 +891,31 @@ Search.prototype = {
       queries.push(this._switchToTabQuery);
     }
     queries.push(this._searchQuery);
 
     // Add the first heuristic result, if any.  Set _addingHeuristicFirstMatch
     // to true so that when the result is added, "heuristic" can be included in
     // its style.
     this._addingHeuristicFirstMatch = true;
-    yield this._matchFirstHeuristicResult(conn);
+    let hasHeuristic = yield this._matchFirstHeuristicResult(conn);
     this._addingHeuristicFirstMatch = false;
+    if (!this.pending)
+      return;
 
     // We sleep a little between adding the heuristicFirstMatch and matching
     // any other searches so we aren't kicking off potentially expensive
     // searches on every keystroke.
-    yield this._sleep(Prefs.delay);
-    if (!this.pending)
-      return;
+    // Though, if there's no heuristic result, we start searching immediately,
+    // since autocomplete may be waiting for us.
+    if (hasHeuristic) {
+      yield this._sleep(Prefs.delay);
+      if (!this.pending)
+        return;
+    }
 
     if (this._enableActions) {
       yield this._matchSearchSuggestions();
       if (!this.pending)
         return;
     }
 
     for (let [query, params] of queries) {
@@ -945,68 +951,70 @@ Search.prototype = {
   *_matchFirstHeuristicResult(conn) {
     // We always try to make the first result a special "heuristic" result.  The
     // heuristics below determine what type of result it will be, if any.
 
     if (this._searchTokens.length > 0) {
       // This may be a Places keyword.
       let matched = yield this._matchPlacesKeyword();
       if (matched) {
-        return;
+        return true;
       }
     }
 
     if (this.pending && this._enableActions) {
       // If it's not a Places keyword, then it may be a search engine
       // with an alias - which works like a keyword.
       let matched = yield this._matchSearchEngineAlias();
       if (matched) {
-        return;
+        return true;
       }
     }
 
     let shouldAutofill = this._shouldAutofill;
     if (this.pending && shouldAutofill) {
       // It may also look like a URL we know from the database.
       let matched = yield this._matchKnownUrl(conn);
       if (matched) {
-        return;
+        return true;
       }
     }
 
     if (this.pending && shouldAutofill) {
       // Or it may look like a URL we know about from search engines.
       let matched = yield this._matchSearchEngineUrl();
       if (matched) {
-        return;
+        return true;
       }
     }
 
     if (this.pending && this._enableActions) {
       // If we don't have a result that matches what we know about, then
       // we use a fallback for things we don't know about.
 
       // We may not have auto-filled, but this may still look like a URL.
       // However, even if the input is a valid URL, we may not want to use
       // it as such. This can happen if the host would require whitelisting,
       // but isn't in the whitelist.
       let matched = yield this._matchUnknownUrl();
       if (matched) {
-        return;
+        return true;
       }
     }
 
     if (this.pending && this._enableActions && this._originalSearchString) {
       // When all else fails, and the search string is non-empty, we search
       // using the current search engine.
       let matched = yield this._matchCurrentSearchEngine();
       if (matched) {
-        return;
+        return true;
       }
     }
+
+    return false;
   },
 
   *_matchSearchSuggestions() {
     // Limit the string sent for search suggestions to a maximum length.
     let searchString = this._searchTokens.join(" ")
                            .substr(0, Prefs.maxCharsForSearchSuggestions);
     // Avoid fetching suggestions if they are not required, private browsing
     // mode is enabled, or the search string may expose sensitive information.
--- a/toolkit/content/widgets/autocomplete.xml
+++ b/toolkit/content/widgets/autocomplete.xml
@@ -1113,17 +1113,23 @@ extends="chrome://global/content/binding
 
           // Update the richlistbox height.
           if (this._adjustHeightTimeout) {
             clearTimeout(this._adjustHeightTimeout);
           }
           if (this._shrinkTimeout) {
             clearTimeout(this._shrinkTimeout);
           }
-          this._adjustHeightTimeout = setTimeout(() => this.adjustHeight(), 0);
+
+          if (this.mPopupOpen) {
+            delete this._adjustHeightOnPopupShown;
+            this._adjustHeightTimeout = setTimeout(() => this.adjustHeight(), 0);
+          } else {
+            this._adjustHeightOnPopupShown = true;
+          }
 
           this._currentIndex = 0;
           if (this._appendResultTimeout) {
             clearTimeout(this._appendResultTimeout);
           }
           this._appendCurrentResult(reason);
         ]]>
         </body>
@@ -1301,20 +1307,23 @@ extends="chrome://global/content/binding
             }
             else {
               // set the class at the end so we can use the attributes
               // in the xbl constructor
               item.className = "autocomplete-richlistitem";
               this.richlistbox.appendChild(item);
             }
 
-            let changed = item.adjustSiteIconStart(this._siteIconStart);
-            if (changed) {
-              item.handleOverUnderflow();
-            }
+            // The binding may have not been applied yet.
+            setTimeout(() => {
+              let changed = item.adjustSiteIconStart(this._siteIconStart);
+              if (changed) {
+                item.handleOverUnderflow();
+              }
+            }, 0);
 
             this._currentIndex++;
           }
 
           if (typeof this.onResultsAdded == "function")
             this.onResultsAdded();
 
           if (this._currentIndex < matchCount) {
@@ -1372,16 +1381,26 @@ extends="chrome://global/content/binding
         document.getAnonymousElementByAttribute(this, "anonid", "richlistbox");
       </field>
 
       <property name="view"
                 onget="return this.mInput.controller;"
                 onset="return val;"/>
 
     </implementation>
+    <handlers>
+      <handler event="popupshown">
+        <![CDATA[
+          if (this._adjustHeightOnPopupShown) {
+            delete this._adjustHeightOnPopupShown;
+            this.adjustHeight();
+          }
+      ]]>
+      </handler>
+    </handlers>
   </binding>
 
   <binding id="autocomplete-richlistitem" extends="chrome://global/content/bindings/richlistbox.xml#richlistitem">
 
     <content align="center"
              onoverflow="this._onOverflow();"
              onunderflow="this._onUnderflow();">
       <xul:image anonid="type-icon"
--- a/xpcom/glue/nsISupportsImpl.h
+++ b/xpcom/glue/nsISupportsImpl.h
@@ -24,69 +24,20 @@
 #include "mozilla/Attributes.h"
 #include "mozilla/Assertions.h"
 #include "mozilla/Compiler.h"
 #include "mozilla/Likely.h"
 #include "mozilla/MacroArgs.h"
 #include "mozilla/MacroForEach.h"
 #include "mozilla/TypeTraits.h"
 
-#if defined(__clang__)
-   // bug 1028428 shows that at least in FreeBSD 10.0 with Clang 3.4 and libc++ 3.4,
-   // std::is_destructible is buggy in that it returns false when it should return true
-   // on ipc::SharedMemory. On the other hand, all Clang versions currently in use
-   // seem to handle the fallback just fine.
-#  define MOZ_CAN_USE_IS_DESTRUCTIBLE_FALLBACK
-#elif defined(__GNUC__)
-   // GCC 4.7 has buggy std::is_destructible.
-#  if MOZ_USING_LIBSTDCXX
-#    define MOZ_HAVE_STD_IS_DESTRUCTIBLE
-#  endif
-   // Some GCC versions have an ICE when using destructors in decltype().
-   // Works on GCC 4.8 at least.
-#  define MOZ_CAN_USE_IS_DESTRUCTIBLE_FALLBACK
-#endif
-
-#ifdef MOZ_HAVE_STD_IS_DESTRUCTIBLE
-#  include <type_traits>
-#  define MOZ_IS_DESTRUCTIBLE(X) (std::is_destructible<X>::value)
-#elif defined MOZ_CAN_USE_IS_DESTRUCTIBLE_FALLBACK
-  namespace mozilla {
-    struct IsDestructibleFallbackImpl
-    {
-      template<typename T, typename = decltype(DeclVal<T>().~T())>
-      static TrueType Test(int);
-
-      template<typename>
-      static FalseType Test(...);
-
-      template<typename T>
-      struct Selector
-      {
-        typedef decltype(Test<T>(0)) type;
-      };
-    };
-
-    template<typename T>
-    struct IsDestructibleFallback
-      : IsDestructibleFallbackImpl::Selector<T>::type
-    {
-    };
-  } // namespace mozilla
-#  define MOZ_IS_DESTRUCTIBLE(X) (mozilla::IsDestructibleFallback<X>::value)
-#endif
-
-#ifdef MOZ_IS_DESTRUCTIBLE
 #define MOZ_ASSERT_TYPE_OK_FOR_REFCOUNTING(X) \
-  static_assert(!MOZ_IS_DESTRUCTIBLE(X), \
+  static_assert(!mozilla::IsDestructible<X>::value, \
                 "Reference-counted class " #X " should not have a public destructor. " \
                 "Make this class's destructor non-public");
-#else
-#define MOZ_ASSERT_TYPE_OK_FOR_REFCOUNTING(X)
-#endif
 
 inline nsISupports*
 ToSupports(nsISupports* aSupports)
 {
   return aSupports;
 }
 
 inline nsISupports*