Merge inbound to mozilla-central. a=merge
authorshindli <shindli@mozilla.com>
Sat, 03 Mar 2018 01:06:35 +0200
changeset 406399 f4e33c42faa72907453381bc00fe40130c76b86e
parent 406326 9d34236d48ff16e71e5ba80692e5ba067949ac2e (current diff)
parent 406398 08dacca58847a6f0bd6690a66e7fdf08375a6cc3 (diff)
child 406411 8fb0418948834f071dd99f6b8256b746b4a8adce
child 406435 eb4f0b54214919a81d43a2b3255f4d5be93734e7
push id33554
push usershindli@mozilla.com
push dateFri, 02 Mar 2018 23:07:10 +0000
treeherdermozilla-central@f4e33c42faa7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmerge
milestone60.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 inbound to mozilla-central. a=merge
js/src/builtin/AtomicsObject.cpp
js/src/builtin/AtomicsObject.h
js/src/builtin/DataViewObject.cpp
js/src/builtin/DataViewObject.h
js/src/builtin/MapObject.cpp
js/src/builtin/MapObject.h
js/src/builtin/SymbolObject.cpp
js/src/builtin/SymbolObject.h
js/src/builtin/WeakMapObject-inl.h
js/src/builtin/WeakMapObject.cpp
js/src/builtin/WeakMapObject.h
js/src/builtin/WeakSetObject.cpp
js/src/builtin/WeakSetObject.h
js/src/builtin/intl/IntlObject.cpp
js/src/builtin/intl/IntlObject.h
js/src/builtin/intl/IntlObject.js
js/src/jsarray.cpp
js/src/jsarray.h
js/src/jsarrayinlines.h
js/src/jsbool.cpp
js/src/jsbool.h
js/src/jsboolinlines.h
js/src/jsdate.cpp
js/src/jsdate.h
js/src/jslibmath.h
js/src/jsmath.cpp
js/src/jsmath.h
js/src/jsnum.cpp
js/src/jsnum.h
js/src/jsstr.cpp
js/src/jsstr.h
js/src/vm/String-inl.h
js/src/vm/String.cpp
js/src/vm/String.h
js/src/vm/StringBuffer.cpp
js/src/vm/StringBuffer.h
js/src/vm/Symbol.cpp
js/src/vm/Symbol.h
js/src/vm/Unicode.cpp
js/src/vm/Unicode.h
js/src/vm/UnicodeData.txt
js/src/vm/UnicodeNonBMP.h
js/src/vm/make_unicode.py
--- a/browser/base/content/tabbrowser.js
+++ b/browser/base/content/tabbrowser.js
@@ -2479,28 +2479,29 @@ class TabBrowser {
         Cu.reportError(ex);
       }
     }
 
     // Move the new tab after another tab if needed.
     if ((openerTab &&
          Services.prefs.getBoolPref("browser.tabs.insertRelatedAfterCurrent")) ||
          Services.prefs.getBoolPref("browser.tabs.insertAfterCurrent")) {
-
-    let lastRelatedTab = openerTab && this._lastRelatedTabMap.get(openerTab);
-    let newTabPos = (lastRelatedTab || openerTab || this.mCurrentTab)._tPos + 1;
-
-    if (lastRelatedTab)
-      lastRelatedTab.owner = null;
-    else if (openerTab)
-      t.owner = openerTab;
-    this.moveTabTo(t, newTabPos, true);
-    if (openerTab)
-      this._lastRelatedTabMap.set(openerTab, t);
-  }
+      let lastRelatedTab = openerTab && this._lastRelatedTabMap.get(openerTab);
+      let newTabPos = (lastRelatedTab || openerTab || this.mCurrentTab)._tPos + 1;
+
+      if (lastRelatedTab) {
+        lastRelatedTab.owner = null;
+      } else if (openerTab) {
+        t.owner = openerTab;
+      }
+      this.moveTabTo(t, newTabPos, true);
+      if (openerTab) {
+        this._lastRelatedTabMap.set(openerTab, t);
+      }
+    }
 
     // This field is updated regardless if we actually animate
     // since it's important that we keep this count correct in all cases.
     this.tabAnimationsInProgress++;
 
     if (animate) {
       requestAnimationFrame(function() {
         // kick the animation off
--- a/browser/base/content/test/webrtc/browser_devices_get_user_media_in_frame.js
+++ b/browser/base/content/test/webrtc/browser_devices_get_user_media_in_frame.js
@@ -123,16 +123,77 @@ var gTests = [
     await promiseNoPopupNotification("webRTC-shareDevices");
 
     await expectNoObserverCalled();
     await checkNotSharing();
   }
 },
 
 {
+  desc: "getUserMedia audio+video: with two frames sharing at the same time, sharing UI shows all shared devices",
+  run: async function checkFrameOverridingSharingUI() {
+    // This tests an edge case discovered in bug 1440356 that works like this
+    // - Share audio and video in iframe 1.
+    // - Share only video in iframe 2.
+    // The WebRTC UI should still show both video and audio indicators.
+
+    let promise = promisePopupNotificationShown("webRTC-shareDevices");
+    await promiseRequestDevice(true, true, "frame1");
+    await promise;
+    await expectObserverCalled("getUserMedia:request");
+    checkDeviceSelectors(true, true);
+
+    let indicator = promiseIndicatorWindow();
+    await promiseMessage("ok", () => {
+      PopupNotifications.panel.firstChild.button.click();
+    });
+    await expectObserverCalled("getUserMedia:response:allow");
+    await expectObserverCalled("recording-device-events");
+    Assert.deepEqual((await getMediaCaptureState()), {audio: true, video: true},
+                     "expected camera and microphone to be shared");
+
+    await indicator;
+    await checkSharingUI({video: true, audio: true});
+    await expectNoObserverCalled();
+
+    // Check that requesting a new device from a different frame
+    // doesn't override sharing UI.
+    promise = promisePopupNotificationShown("webRTC-shareDevices");
+    await promiseRequestDevice(false, true, "frame2");
+    await promise;
+    await expectObserverCalled("getUserMedia:request");
+    checkDeviceSelectors(false, true);
+
+    await promiseMessage("ok", () => {
+      PopupNotifications.panel.firstChild.button.click();
+    });
+    await expectObserverCalled("getUserMedia:response:allow");
+    await expectObserverCalled("recording-device-events");
+    Assert.deepEqual((await getMediaCaptureState()), {audio: true, video: true},
+                     "expected camera and microphone to be shared");
+
+    await checkSharingUI({video: true, audio: true});
+
+    // Check that ending the stream with the other frame
+    // doesn't override sharing UI.
+    promise = promiseObserverCalled("recording-device-events");
+    await promiseReloadFrame("frame2");
+    await promise;
+
+    await expectObserverCalled("recording-window-ended");
+    await checkSharingUI({video: true, audio: true});
+    await expectNoObserverCalled();
+
+    await closeStream(false, "frame1");
+    await expectNoObserverCalled();
+    await checkNotSharing();
+  }
+},
+
+{
   desc: "getUserMedia audio+video: reloading a frame updates the sharing UI",
   run: async function checkUpdateWhenReloading() {
     // We'll share only the cam in the first frame, then share both in the
     // second frame, then reload the second frame. After each step, we'll check
     // the UI is in the correct state.
 
     let promise = promisePopupNotificationShown("webRTC-shareDevices");
     await promiseRequestDevice(false, true, "frame1");
--- a/browser/components/customizableui/CustomizableUI.jsm
+++ b/browser/components/customizableui/CustomizableUI.jsm
@@ -4368,17 +4368,20 @@ OverflowableToolbar.prototype = {
       PanelMultiView.openPopup(this._panel, anchor || this._chevron, {
         triggerEvent: aEvent,
       }).catch(Cu.reportError);
       this._chevron.open = true;
 
       this._panel.addEventListener("popupshown", () => {
         this._panel.addEventListener("dragover", this);
         this._panel.addEventListener("dragend", this);
-        resolve();
+        // Wait until the next tick to resolve so all popupshown
+        // handlers have a chance to run before our promise resolution
+        // handlers do.
+        Services.tm.dispatchToMainThread(resolve);
       }, {once: true});
     });
   },
 
   _onClickChevron(aEvent) {
     if (this._chevron.open) {
       this._chevron.open = false;
       PanelMultiView.hidePopup(this._panel);
--- a/dom/media/ChannelMediaDecoder.cpp
+++ b/dom/media/ChannelMediaDecoder.cpp
@@ -149,16 +149,39 @@ ChannelMediaDecoder::ResourceCallback::N
            "principal_changed",
            true);
   if (mDecoder) {
     mDecoder->NotifyPrincipalChanged();
   }
 }
 
 void
+ChannelMediaDecoder::NotifyPrincipalChanged()
+{
+  MOZ_ASSERT(NS_IsMainThread());
+  MediaDecoder::NotifyPrincipalChanged();
+  if (!mInitialChannelPrincipalKnown) {
+    // We'll receive one notification when the channel's initial principal
+    // is known, after all HTTP redirects have resolved. This isn't really a
+    // principal change, so return here to avoid the mSameOriginMedia check
+    // below.
+    mInitialChannelPrincipalKnown = true;
+    return;
+  }
+  if (!mSameOriginMedia &&
+      DecoderTraits::CrossOriginRedirectsProhibited(ContainerType())) {
+    // For some content types we block mid-flight channel redirects to cross
+    // origin destinations due to security constraints. See bug 1441153.
+    LOG("ChannnelMediaDecoder prohibited cross origin redirect blocked.");
+    NetworkError(MediaResult(NS_ERROR_DOM_BAD_URI,
+                             "Prohibited cross origin redirect blocked"));
+  }
+}
+
+void
 ChannelMediaDecoder::ResourceCallback::NotifySuspendedStatusChanged(
   bool aSuspendedByCache)
 {
   MOZ_ASSERT(NS_IsMainThread());
   DDLOGEX2("ChannelMediaDecoder::ResourceCallback",
            this,
            DDLogCategory::Log,
            "suspended_status_changed",
--- a/dom/media/ChannelMediaDecoder.h
+++ b/dom/media/ChannelMediaDecoder.h
@@ -61,16 +61,17 @@ class ChannelMediaDecoder
   };
 
 protected:
   void OnPlaybackEvent(MediaPlaybackEvent&& aEvent) override;
   void DurationChanged() override;
   void MetadataLoaded(UniquePtr<MediaInfo> aInfo,
                       UniquePtr<MetadataTags> aTags,
                       MediaDecoderEventVisibility aEventVisibility) override;
+  void NotifyPrincipalChanged() override;
 
   RefPtr<ResourceCallback> mResourceCallback;
   RefPtr<BaseMediaResource> mResource;
 
   explicit ChannelMediaDecoder(MediaDecoderInit& aInit);
 
   nsCString GetDebugInfo() override;
 
@@ -153,13 +154,17 @@ private:
 
   // Current playback position in the stream. This is (approximately)
   // where we're up to playing back the stream. This is not adjusted
   // during decoder seek operations, but it's updated at the end when we
   // start playing back again.
   int64_t mPlaybackPosition = 0;
 
   bool mCanPlayThrough = false;
+
+  // True if we've been notified that the ChannelMediaResource has
+  // a principal.
+  bool mInitialChannelPrincipalKnown = false;
 };
 
 } // namespace mozilla
 
 #endif // ChannelMediaDecoder_h_
--- a/dom/media/DecoderTraits.cpp
+++ b/dom/media/DecoderTraits.cpp
@@ -320,9 +320,16 @@ bool DecoderTraits::IsSupportedInVideoDo
     ADTSDecoder::IsSupportedType(*type) ||
     FlacDecoder::IsSupportedType(*type) ||
 #ifdef MOZ_ANDROID_HLS_SUPPORT
     HLSDecoder::IsSupportedType(*type) ||
 #endif
     false;
 }
 
+/* static */
+bool
+DecoderTraits::CrossOriginRedirectsProhibited(const MediaContainerType& aType)
+{
+  return WaveDecoder::IsSupportedType(aType);
+}
+
 } // namespace mozilla
--- a/dom/media/DecoderTraits.h
+++ b/dom/media/DecoderTraits.h
@@ -52,14 +52,18 @@ public:
 
   // Returns true if aType is MIME type of hls.
   static bool IsHttpLiveStreamingType(const MediaContainerType& aType);
 
   // Returns true if aType is matroska type.
   static bool IsMatroskaType(const MediaContainerType& aType);
 
   static bool IsSupportedType(const MediaContainerType& aType);
+
+  // For some content types we block channel redirects to cross origin
+  // destinations due to security constraints. See bug 1441153.
+  static bool CrossOriginRedirectsProhibited(const MediaContainerType& aType);
 };
 
 } // namespace mozilla
 
 #endif
 
--- a/dom/media/MediaDecoder.h
+++ b/dom/media/MediaDecoder.h
@@ -509,17 +509,17 @@ private:
 
 protected:
   void NotifyReaderDataArrived();
   void DiscardOngoingSeekIfExists();
   virtual void CallSeek(const SeekTarget& aTarget);
 
   // Called by MediaResource when the principal of the resource has
   // changed. Called on main thread only.
-  void NotifyPrincipalChanged();
+  virtual void NotifyPrincipalChanged();
 
   MozPromiseRequestHolder<SeekPromise> mSeekRequest;
 
   const char* PlayStateStr();
 
   void OnMetadataUpdate(TimedMetadata&& aMetadata);
 
   // This should only ever be accessed from the main thread.
--- a/dom/media/MediaManager.cpp
+++ b/dom/media/MediaManager.cpp
@@ -2191,31 +2191,16 @@ int MediaManager::AddDeviceChangeCallbac
     manager->GetBackend(0);
     if (fakeDeviceChangeEventOn)
       manager->GetBackend(0)->SetFakeDeviceChangeEvents();
   }));
 
   return DeviceChangeCallback::AddDeviceChangeCallback(aCallback);
 }
 
-static void
-StopRawIDCallback(MediaManager *aThis,
-                   uint64_t aWindowID,
-                   GetUserMediaWindowListener *aListener,
-                   void *aData)
-{
-  if (!aListener || !aData) {
-    return;
-  }
-
-  nsString* removedDeviceID = static_cast<nsString*>(aData);
-  aListener->StopRawID(*removedDeviceID);
-}
-
-
 void MediaManager::OnDeviceChange() {
   RefPtr<MediaManager> self(this);
   NS_DispatchToMainThread(media::NewRunnableFrom([self]() mutable {
     MOZ_ASSERT(NS_IsMainThread());
     if (sHasShutdown) {
       return NS_OK;
     }
     self->DeviceChangeCallback::OnDeviceChange();
@@ -2233,26 +2218,34 @@ void MediaManager::OnDeviceChange() {
         device->GetId(id);
         id.ReplaceSubstring(NS_LITERAL_STRING("default: "), NS_LITERAL_STRING(""));
         if (!deviceIDs.Contains(id)) {
           deviceIDs.AppendElement(id);
         }
       }
 
       for (auto& id : self->mDeviceIDs) {
-        if (!deviceIDs.Contains(id)) {
-          // Stop the coresponding SourceListener
-          nsGlobalWindowInner::InnerWindowByIdTable* windowsById =
-            nsGlobalWindowInner::GetWindowsTable();
-          if (windowsById) {
-            for (auto iter = windowsById->Iter(); !iter.Done(); iter.Next()) {
-              nsGlobalWindowInner* window = iter.Data();
-              self->IterateWindowListeners(window->AsInner(), StopRawIDCallback, &id);
-            }
-          }
+        if (deviceIDs.Contains(id)) {
+          continue;
+        }
+
+        // Stop the coresponding SourceListener
+        nsGlobalWindowInner::InnerWindowByIdTable* windowsById =
+          nsGlobalWindowInner::GetWindowsTable();
+        if (!windowsById) {
+          continue;
+        }
+
+        for (auto iter = windowsById->Iter(); !iter.Done(); iter.Next()) {
+          nsGlobalWindowInner* window = iter.Data();
+          self->IterateWindowListeners(window->AsInner(),
+              [&id](GetUserMediaWindowListener* aListener)
+              {
+                aListener->StopRawID(id);
+              });
         }
       }
 
       self->mDeviceIDs = deviceIDs;
     }, [](MediaStreamError*& reason) {});
     return NS_OK;
   }));
 }
@@ -3089,37 +3082,16 @@ MediaManager::GetBackend(uint64_t aWindo
 #else
     mBackend = new MediaEngineDefault();
 #endif
     mBackend->AddDeviceChangeCallback(this);
   }
   return mBackend;
 }
 
-static void
-StopSharingCallback(MediaManager *aThis,
-                    uint64_t aWindowID,
-                    GetUserMediaWindowListener *aListener,
-                    void *aData)
-{
-  MOZ_ASSERT(NS_IsMainThread());
-
-  // Grab a strong ref since RemoveAll() might destroy the listener mid-way
-  // when clearing the mActiveWindows reference.
-  RefPtr<GetUserMediaWindowListener> listener(aListener);
-  if (!listener) {
-    return;
-  }
-
-  listener->Stop();
-  listener->RemoveAll();
-  MOZ_ASSERT(!aThis->GetWindowListener(aWindowID));
-}
-
-
 void
 MediaManager::OnNavigation(uint64_t aWindowID)
 {
   MOZ_ASSERT(NS_IsMainThread());
   LOG(("OnNavigation for %" PRIu64, aWindowID));
 
   // Stop the streams for this window. The runnables check this value before
   // making a call to content.
@@ -3131,17 +3103,29 @@ MediaManager::OnNavigation(uint64_t aWin
     }
     mCallIds.Remove(aWindowID);
   }
 
   // This is safe since we're on main-thread, and the windowlist can only
   // be added to from the main-thread
   auto* window = nsGlobalWindowInner::GetInnerWindowWithId(aWindowID);
   if (window) {
-    IterateWindowListeners(window->AsInner(), StopSharingCallback, nullptr);
+    IterateWindowListeners(window->AsInner(),
+        [self = RefPtr<MediaManager>(this),
+         windowID = DebugOnly<decltype(aWindowID)>(aWindowID)]
+        (GetUserMediaWindowListener* aListener)
+        {
+          // Grab a strong ref since RemoveAll() might destroy the listener
+          // mid-way when clearing the mActiveWindows reference.
+          RefPtr<GetUserMediaWindowListener> listener(aListener);
+
+          listener->Stop();
+          listener->RemoveAll();
+          MOZ_ASSERT(!self->GetWindowListener(windowID));
+        });
   } else {
     RemoveWindowID(aWindowID);
   }
   MOZ_ASSERT(!GetWindowListener(aWindowID));
 
   RemoveMediaDevicesCallback(aWindowID);
 
   RefPtr<MediaManager> self = this;
@@ -3586,156 +3570,136 @@ struct CaptureWindowStateData {
   uint16_t* mCamera;
   uint16_t* mMicrophone;
   uint16_t* mScreenShare;
   uint16_t* mWindowShare;
   uint16_t* mAppShare;
   uint16_t* mBrowserShare;
 };
 
-static void
-CaptureWindowStateCallback(MediaManager *aThis,
-                           uint64_t aWindowID,
-                           GetUserMediaWindowListener *aListener,
-                           void *aData)
-{
-  MOZ_ASSERT(aData);
-
-  auto& data = *static_cast<CaptureWindowStateData*>(aData);
-
-  if (!aListener) {
-    return;
-  }
-
-  *data.mCamera =
-    FromCaptureState(aListener->CapturingSource(MediaSourceEnum::Camera));
-  *data.mMicrophone =
-    FromCaptureState(aListener->CapturingSource(MediaSourceEnum::Microphone));
-  *data.mScreenShare =
-    FromCaptureState(aListener->CapturingSource(MediaSourceEnum::Screen));
-  *data.mWindowShare =
-    FromCaptureState(aListener->CapturingSource(MediaSourceEnum::Window));
-  *data.mAppShare =
-    FromCaptureState(aListener->CapturingSource(MediaSourceEnum::Application));
-  *data.mBrowserShare =
-    FromCaptureState(aListener->CapturingSource(MediaSourceEnum::Browser));
-}
-
 NS_IMETHODIMP
-MediaManager::MediaCaptureWindowState(nsIDOMWindow* aWindow,
+MediaManager::MediaCaptureWindowState(nsIDOMWindow* aCapturedWindow,
                                       uint16_t* aCamera,
                                       uint16_t* aMicrophone,
-                                      uint16_t* aScreenShare,
-                                      uint16_t* aWindowShare,
-                                      uint16_t* aAppShare,
-                                      uint16_t* aBrowserShare)
+                                      uint16_t* aScreen,
+                                      uint16_t* aWindow,
+                                      uint16_t* aApplication,
+                                      uint16_t* aBrowser)
 {
   MOZ_ASSERT(NS_IsMainThread());
-  struct CaptureWindowStateData data;
-  data.mCamera = aCamera;
-  data.mMicrophone = aMicrophone;
-  data.mScreenShare = aScreenShare;
-  data.mWindowShare = aWindowShare;
-  data.mAppShare = aAppShare;
-  data.mBrowserShare = aBrowserShare;
-
-  *aCamera = nsIMediaManagerService::STATE_NOCAPTURE;
-  *aMicrophone = nsIMediaManagerService::STATE_NOCAPTURE;
-  *aScreenShare = nsIMediaManagerService::STATE_NOCAPTURE;
-  *aWindowShare = nsIMediaManagerService::STATE_NOCAPTURE;
-  *aAppShare = nsIMediaManagerService::STATE_NOCAPTURE;
-  *aBrowserShare = nsIMediaManagerService::STATE_NOCAPTURE;
-
-  nsCOMPtr<nsPIDOMWindowInner> piWin = do_QueryInterface(aWindow);
+
+  CaptureState camera = CaptureState::Off;
+  CaptureState microphone = CaptureState::Off;
+  CaptureState screen = CaptureState::Off;
+  CaptureState window = CaptureState::Off;
+  CaptureState application = CaptureState::Off;
+  CaptureState browser = CaptureState::Off;
+
+  nsCOMPtr<nsPIDOMWindowInner> piWin = do_QueryInterface(aCapturedWindow);
   if (piWin) {
-    IterateWindowListeners(piWin, CaptureWindowStateCallback, &data);
+    IterateWindowListeners(piWin,
+      [&camera, &microphone, &screen, &window, &application, &browser]
+      (GetUserMediaWindowListener* aListener)
+      {
+        camera = CombineCaptureState(
+            camera, aListener->CapturingSource(MediaSourceEnum::Camera));
+        microphone = CombineCaptureState(
+            microphone, aListener->CapturingSource(MediaSourceEnum::Microphone));
+        screen = CombineCaptureState(
+            screen, aListener->CapturingSource(MediaSourceEnum::Screen));
+        window = CombineCaptureState(
+            window, aListener->CapturingSource(MediaSourceEnum::Window));
+        application = CombineCaptureState(
+            application, aListener->CapturingSource(MediaSourceEnum::Application));
+        browser = CombineCaptureState(
+            browser, aListener->CapturingSource(MediaSourceEnum::Browser));
+      });
   }
+
+  *aCamera = FromCaptureState(camera);
+  *aMicrophone= FromCaptureState(microphone);
+  *aScreen = FromCaptureState(screen);
+  *aWindow = FromCaptureState(window);
+  *aApplication = FromCaptureState(application);
+  *aBrowser = FromCaptureState(browser);
+
 #ifdef DEBUG
   LOG(("%s: window %" PRIu64 " capturing %s %s %s %s %s %s", __FUNCTION__, piWin ? piWin->WindowID() : -1,
        *aCamera == nsIMediaManagerService::STATE_CAPTURE_ENABLED
          ? "camera (enabled)"
          : (*aCamera == nsIMediaManagerService::STATE_CAPTURE_DISABLED
             ? "camera (disabled)" : ""),
        *aMicrophone == nsIMediaManagerService::STATE_CAPTURE_ENABLED
          ? "microphone (enabled)"
          : (*aMicrophone == nsIMediaManagerService::STATE_CAPTURE_DISABLED
             ? "microphone (disabled)" : ""),
-       *aScreenShare ? "screenshare" : "",
-       *aWindowShare ? "windowshare" : "",
-       *aAppShare ? "appshare" : "",
-       *aBrowserShare ? "browsershare" : ""));
+       *aScreen ? "screenshare" : "",
+       *aWindow ? "windowshare" : "",
+       *aApplication ? "appshare" : "",
+       *aBrowser ? "browsershare" : ""));
 #endif
   return NS_OK;
 }
 
 NS_IMETHODIMP
 MediaManager::SanitizeDeviceIds(int64_t aSinceWhen)
 {
   MOZ_ASSERT(NS_IsMainThread());
   LOG(("%s: sinceWhen = %" PRId64, __FUNCTION__, aSinceWhen));
 
   media::SanitizeOriginKeys(aSinceWhen, false); // we fire and forget
   return NS_OK;
 }
 
-static void
-StopScreensharingCallback(MediaManager *aThis,
-                          uint64_t aWindowID,
-                          GetUserMediaWindowListener *aListener,
-                          void *aData)
-{
-  if (!aListener) {
-    return;
-  }
-
-  aListener->StopSharing();
-}
-
 void
 MediaManager::StopScreensharing(uint64_t aWindowID)
 {
   // We need to stop window/screensharing for all streams in all innerwindows that
   // correspond to that outerwindow.
 
   auto* window = nsGlobalWindowInner::GetInnerWindowWithId(aWindowID);
   if (!window) {
     return;
   }
-  IterateWindowListeners(window->AsInner(), &StopScreensharingCallback, nullptr);
+  IterateWindowListeners(window->AsInner(),
+    [](GetUserMediaWindowListener* aListener)
+    {
+      aListener->StopSharing();
+    });
 }
 
-// lets us do all sorts of things to the listeners
+template<typename FunctionType>
 void
 MediaManager::IterateWindowListeners(nsPIDOMWindowInner* aWindow,
-                                     WindowListenerCallback aCallback,
-                                     void *aData)
+                                     const FunctionType& aCallback)
 {
   // Iterate the docshell tree to find all the child windows, and for each
   // invoke the callback
   if (aWindow) {
     {
       uint64_t windowID = aWindow->WindowID();
       GetUserMediaWindowListener* listener = GetWindowListener(windowID);
-      (*aCallback)(this, windowID, listener, aData);
+      if (listener) {
+        aCallback(listener);
+      }
       // NB: `listener` might have been destroyed.
     }
 
     // iterate any children of *this* window (iframes, etc)
     nsCOMPtr<nsIDocShell> docShell = aWindow->GetDocShell();
     if (docShell) {
       int32_t i, count;
       docShell->GetChildCount(&count);
       for (i = 0; i < count; ++i) {
         nsCOMPtr<nsIDocShellTreeItem> item;
         docShell->GetChildAt(i, getter_AddRefs(item));
         nsCOMPtr<nsPIDOMWindowOuter> winOuter = item ? item->GetWindow() : nullptr;
 
         if (winOuter) {
-          IterateWindowListeners(winOuter->GetCurrentInnerWindow(),
-                                 aCallback, aData);
+          IterateWindowListeners(winOuter->GetCurrentInnerWindow(), aCallback);
         }
       }
     }
   }
 }
 
 
 void
--- a/dom/media/MediaManager.h
+++ b/dom/media/MediaManager.h
@@ -122,22 +122,16 @@ public:
   const nsString mType;
   const nsString mName;
   const nsString mID;
   const nsString mRawID;
 };
 
 typedef nsRefPtrHashtable<nsUint64HashKey, GetUserMediaWindowListener> WindowTable;
 
-// we could add MediaManager if needed
-typedef void (*WindowListenerCallback)(MediaManager *aThis,
-                                       uint64_t aWindowID,
-                                       GetUserMediaWindowListener *aListener,
-                                       void *aData);
-
 class MediaManager final : public nsIMediaManagerService,
                            public nsIObserver
                           ,public DeviceChangeCallback
 {
   friend SourceListener;
 public:
   static already_AddRefed<MediaManager> GetInstance();
 
@@ -248,19 +242,24 @@ private:
 
   // Make private because we want only one instance of this class
   MediaManager();
 
   ~MediaManager() {}
   void Shutdown();
 
   void StopScreensharing(uint64_t aWindowID);
+
+  /**
+   * Calls aCallback with a GetUserMediaWindowListener argument once for
+   * each window listener associated with aWindow and its child windows.
+   */
+  template<typename FunctionType>
   void IterateWindowListeners(nsPIDOMWindowInner *aWindow,
-                              WindowListenerCallback aCallback,
-                              void *aData);
+                              const FunctionType& aCallback);
 
   void StopMediaStreams();
   void RemoveMediaDevicesCallback(uint64_t aWindowID);
 
   // ONLY access from MainThread so we don't need to lock
   WindowTable mActiveWindows;
   nsRefPtrHashtable<nsStringHashKey, GetUserMediaTask> mActiveCallbacks;
   nsClassHashtable<nsUint64HashKey, nsTArray<nsString>> mCallIds;
--- a/dom/serviceworkers/ServiceWorkerPrivate.cpp
+++ b/dom/serviceworkers/ServiceWorkerPrivate.cpp
@@ -1942,17 +1942,17 @@ ServiceWorkerPrivate::SpawnWorkerIfNeede
 
   return NS_OK;
 }
 
 void
 ServiceWorkerPrivate::StoreISupports(nsISupports* aSupports)
 {
   MOZ_ASSERT(NS_IsMainThread());
-  MOZ_ASSERT(mWorkerPrivate);
+  MOZ_DIAGNOSTIC_ASSERT(mWorkerPrivate);
   MOZ_ASSERT(!mSupportsArray.Contains(aSupports));
 
   mSupportsArray.AppendElement(aSupports);
 }
 
 void
 ServiceWorkerPrivate::RemoveISupports(nsISupports* aSupports)
 {
--- a/dom/serviceworkers/ServiceWorkerRegistrationImpl.cpp
+++ b/dom/serviceworkers/ServiceWorkerRegistrationImpl.cpp
@@ -20,16 +20,17 @@
 #include "mozilla/dom/WorkerScope.h"
 #include "mozilla/Services.h"
 #include "mozilla/Unused.h"
 #include "nsCycleCollectionParticipant.h"
 #include "nsNetUtil.h"
 #include "nsServiceManagerUtils.h"
 #include "ServiceWorker.h"
 #include "ServiceWorkerManager.h"
+#include "ServiceWorkerPrivate.h"
 #include "ServiceWorkerRegistration.h"
 
 #include "nsIDocument.h"
 #include "nsIServiceWorkerManager.h"
 #include "nsISupportsPrimitives.h"
 #include "nsPIDOMWindow.h"
 #include "nsContentUtils.h"
 
@@ -128,30 +129,30 @@ ServiceWorkerRegistrationMainThread::Cle
   StopListeningForEvents();
   mOuter = nullptr;
 }
 
 namespace {
 
 void
 UpdateInternal(nsIPrincipal* aPrincipal,
-               const nsAString& aScope,
+               const nsACString& aScope,
                ServiceWorkerUpdateFinishCallback* aCallback)
 {
   MOZ_ASSERT(NS_IsMainThread());
   MOZ_ASSERT(aPrincipal);
   MOZ_ASSERT(aCallback);
 
   RefPtr<ServiceWorkerManager> swm = ServiceWorkerManager::GetInstance();
   if (!swm) {
     // browser shutdown
     return;
   }
 
-  swm->Update(aPrincipal, NS_ConvertUTF16toUTF8(aScope), aCallback);
+  swm->Update(aPrincipal, aScope, aCallback);
 }
 
 class MainThreadUpdateCallback final : public ServiceWorkerUpdateFinishCallback
 {
   PromiseWindowProxy mPromise;
 
   ~MainThreadUpdateCallback()
   { }
@@ -276,22 +277,62 @@ public:
     RefPtr<UpdateResultRunnable> r =
       new UpdateResultRunnable(proxy, aStatus);
     r->Dispatch();
   }
 };
 
 class SWRUpdateRunnable final : public Runnable
 {
+  class TimerCallback final : public nsITimerCallback
+  {
+    RefPtr<ServiceWorkerPrivate> mPrivate;
+    RefPtr<Runnable> mRunnable;
+
+  public:
+    TimerCallback(ServiceWorkerPrivate* aPrivate,
+                  Runnable* aRunnable)
+      : mPrivate(aPrivate)
+      , mRunnable(aRunnable)
+    {
+      MOZ_ASSERT(mPrivate);
+      MOZ_ASSERT(aRunnable);
+    }
+
+    NS_IMETHOD
+    Notify(nsITimer *aTimer) override
+    {
+      mRunnable->Run();
+      mPrivate->RemoveISupports(aTimer);
+
+      return NS_OK;
+    }
+
+    NS_DECL_THREADSAFE_ISUPPORTS
+
+  private:
+    ~TimerCallback()
+    { }
+  };
+
 public:
-  SWRUpdateRunnable(PromiseWorkerProxy* aPromiseProxy, const nsAString& aScope)
+  explicit SWRUpdateRunnable(PromiseWorkerProxy* aPromiseProxy)
     : Runnable("dom::SWRUpdateRunnable")
     , mPromiseProxy(aPromiseProxy)
-    , mScope(aScope)
-  {}
+    , mDescriptor(aPromiseProxy->GetWorkerPrivate()->GetServiceWorkerDescriptor())
+    , mDelayed(false)
+  {
+    MOZ_ASSERT(mPromiseProxy);
+
+    // This runnable is used for update calls originating from a worker thread,
+    // which may be delayed in some cases.
+    MOZ_ASSERT(mPromiseProxy->GetWorkerPrivate()->IsServiceWorker());
+    MOZ_ASSERT(mPromiseProxy->GetWorkerPrivate());
+    mPromiseProxy->GetWorkerPrivate()->AssertIsOnWorkerThread();
+  }
 
   NS_IMETHOD
   Run() override
   {
     MOZ_ASSERT(NS_IsMainThread());
     ErrorResult result;
 
     nsCOMPtr<nsIPrincipal> principal;
@@ -302,30 +343,75 @@ public:
       if (mPromiseProxy->CleanedUp()) {
         return NS_OK;
       }
 
       principal = mPromiseProxy->GetWorkerPrivate()->GetPrincipal();
     }
     MOZ_ASSERT(principal);
 
+    RefPtr<ServiceWorkerManager> swm = ServiceWorkerManager::GetInstance();
+    if (NS_WARN_IF(!swm)) {
+      return NS_OK;
+    }
+
+    // This will delay update jobs originating from a service worker thread.
+    // We don't currently handle ServiceWorkerRegistration.update() from other
+    // worker types. Also, we assume this registration matches self.registration
+    // on the service worker global. This is ok for now because service worker globals
+    // are the only worker contexts where we expose ServiceWorkerRegistration.
+    RefPtr<ServiceWorkerRegistrationInfo> registration =
+      swm->GetRegistration(principal, mDescriptor.Scope());
+    if (NS_WARN_IF(!registration)) {
+      return NS_OK;
+    }
+
+    RefPtr<ServiceWorkerInfo> worker = registration->GetByDescriptor(mDescriptor);
+    uint32_t delay = registration->GetUpdateDelay();
+
+    // if we have a timer object, it means we've already been delayed once.
+    if (delay && !mDelayed) {
+      nsCOMPtr<nsITimerCallback> cb = new TimerCallback(worker->WorkerPrivate(), this);
+      Result<nsCOMPtr<nsITimer>, nsresult> result =
+        NS_NewTimerWithCallback(cb, delay, nsITimer::TYPE_ONE_SHOT,
+                                SystemGroup::EventTargetFor(TaskCategory::Other));
+
+      nsCOMPtr<nsITimer> timer = result.unwrapOr(nullptr);
+      if (NS_WARN_IF(!timer)) {
+        return NS_OK;
+      }
+
+      mDelayed = true;
+      // We're storing the timer object on the calling service worker's private.
+      // ServiceWorkerPrivate will drop the reference if the worker terminates,
+      // which will cancel the timer.
+      worker->WorkerPrivate()->StoreISupports(timer);
+
+      return NS_OK;
+    }
+
     RefPtr<WorkerThreadUpdateCallback> cb =
       new WorkerThreadUpdateCallback(mPromiseProxy);
-    UpdateInternal(principal, mScope, cb);
+    UpdateInternal(principal, mDescriptor.Scope(), cb);
     return NS_OK;
   }
 
 private:
   ~SWRUpdateRunnable()
-  {}
+  {
+    MOZ_ASSERT(NS_IsMainThread());
+  }
 
   RefPtr<PromiseWorkerProxy> mPromiseProxy;
-  const nsString mScope;
+  const ServiceWorkerDescriptor mDescriptor;
+  bool mDelayed;
 };
 
+NS_IMPL_ISUPPORTS(SWRUpdateRunnable::TimerCallback, nsITimerCallback)
+
 class UnregisterCallback final : public nsIServiceWorkerUnregisterCallback
 {
   PromiseWindowProxy mPromise;
 
 public:
   NS_DECL_ISUPPORTS
 
   explicit UnregisterCallback(nsPIDOMWindowInner* aWindow,
@@ -528,17 +614,17 @@ ServiceWorkerRegistrationMainThread::Upd
     return nullptr;
   }
 
   nsCOMPtr<nsIDocument> doc = mOuter->GetOwner()->GetExtantDoc();
   MOZ_ASSERT(doc);
 
   RefPtr<MainThreadUpdateCallback> cb =
     new MainThreadUpdateCallback(mOuter->GetOwner(), promise);
-  UpdateInternal(doc->NodePrincipal(), mScope, cb);
+  UpdateInternal(doc->NodePrincipal(), NS_ConvertUTF16toUTF8(mScope), cb);
 
   return promise.forget();
 }
 
 already_AddRefed<Promise>
 ServiceWorkerRegistrationMainThread::Unregister(ErrorResult& aRv)
 {
   MOZ_ASSERT(NS_IsMainThread());
@@ -843,17 +929,17 @@ ServiceWorkerRegistrationWorkerThread::U
   }
 
   RefPtr<PromiseWorkerProxy> proxy = PromiseWorkerProxy::Create(worker, promise);
   if (!proxy) {
     aRv.Throw(NS_ERROR_DOM_ABORT_ERR);
     return nullptr;
   }
 
-  RefPtr<SWRUpdateRunnable> r = new SWRUpdateRunnable(proxy, mScope);
+  RefPtr<SWRUpdateRunnable> r = new SWRUpdateRunnable(proxy);
   MOZ_ALWAYS_SUCCEEDS(worker->DispatchToMainThread(r.forget()));
 
   return promise.forget();
 }
 
 already_AddRefed<Promise>
 ServiceWorkerRegistrationWorkerThread::Unregister(ErrorResult& aRv)
 {
--- a/dom/serviceworkers/ServiceWorkerRegistrationInfo.cpp
+++ b/dom/serviceworkers/ServiceWorkerRegistrationInfo.cpp
@@ -82,16 +82,17 @@ ServiceWorkerRegistrationInfo::Clear()
 
 ServiceWorkerRegistrationInfo::ServiceWorkerRegistrationInfo(
     const nsACString& aScope,
     nsIPrincipal* aPrincipal,
     ServiceWorkerUpdateViaCache aUpdateViaCache)
   : mPrincipal(aPrincipal)
   , mDescriptor(aPrincipal, aScope, aUpdateViaCache)
   , mControlledClientsCounter(0)
+  , mDelayMultiplier(0)
   , mUpdateState(NoUpdate)
   , mCreationTime(PR_Now())
   , mCreationTimeStamp(TimeStamp::Now())
   , mLastUpdateTime(0)
   , mPendingUninstall(false)
 {}
 
 ServiceWorkerRegistrationInfo::~ServiceWorkerRegistrationInfo()
@@ -704,10 +705,30 @@ ServiceWorkerRegistrationInfo::SetLastUp
 }
 
 const ServiceWorkerRegistrationDescriptor&
 ServiceWorkerRegistrationInfo::Descriptor() const
 {
   return mDescriptor;
 }
 
+uint32_t
+ServiceWorkerRegistrationInfo::GetUpdateDelay()
+{
+  uint32_t delay = Preferences::GetInt("dom.serviceWorkers.update_delay",
+                                       1000);
+  // This can potentially happen if you spam registration->Update(). We don't
+  // want to wrap to a lower value.
+  if (mDelayMultiplier >= INT_MAX / (delay ? delay : 1)) {
+    return INT_MAX;
+  }
+
+  delay *= mDelayMultiplier;
+
+  if (!mControlledClientsCounter && mDelayMultiplier < (INT_MAX / 30)) {
+    mDelayMultiplier = (mDelayMultiplier ? mDelayMultiplier : 1) * 30;
+  }
+
+  return delay;
+}
+
 } // namespace dom
 } // namespace mozilla
--- a/dom/serviceworkers/ServiceWorkerRegistrationInfo.h
+++ b/dom/serviceworkers/ServiceWorkerRegistrationInfo.h
@@ -18,16 +18,17 @@ namespace dom {
 class ServiceWorkerRegistrationInfo final
   : public nsIServiceWorkerRegistrationInfo
 {
   nsCOMPtr<nsIPrincipal> mPrincipal;
   ServiceWorkerRegistrationDescriptor mDescriptor;
   nsTArray<nsCOMPtr<nsIServiceWorkerRegistrationInfoListener>> mListeners;
 
   uint32_t mControlledClientsCounter;
+  uint32_t mDelayMultiplier;
 
   enum
   {
     NoUpdate,
     NeedTimeCheckAndUpdate,
     NeedUpdate
   } mUpdateState;
 
@@ -89,16 +90,17 @@ public:
 
   already_AddRefed<ServiceWorkerInfo>
   GetServiceWorkerInfoById(uint64_t aId);
 
   void
   StartControllingClient()
   {
     ++mControlledClientsCounter;
+    mDelayMultiplier = 0;
   }
 
   void
   StopControllingClient()
   {
     MOZ_ASSERT(mControlledClientsCounter);
     --mControlledClientsCounter;
   }
@@ -206,16 +208,19 @@ public:
   GetLastUpdateTime() const;
 
   void
   SetLastUpdateTime(const int64_t aTime);
 
   const ServiceWorkerRegistrationDescriptor&
   Descriptor() const;
 
+  uint32_t
+  GetUpdateDelay();
+
 private:
   // Roughly equivalent to [[Update Registration State algorithm]]. Make sure
   // this is called *before* updating SW instances' state, otherwise they
   // may get CC-ed.
   void
   UpdateRegistrationState();
 
   // Used by devtools to track changes to the properties of *nsIServiceWorkerRegistrationInfo*.
--- a/dom/serviceworkers/test/mochitest.ini
+++ b/dom/serviceworkers/test/mochitest.ini
@@ -227,16 +227,17 @@ support-files =
   nofetch_handler_worker.js
   service_worker.js
   service_worker_client.html
   utils.js
   bug1290951_worker_main.sjs
   bug1290951_worker_imported.sjs
   sw_storage_not_allow.js
   update_worker.sjs
+  self_update_worker.sjs
 
 [test_bug1151916.html]
 [test_bug1240436.html]
 [test_bug1408734.html]
 [test_claim.html]
 [test_claim_oninstall.html]
 [test_controller.html]
 [test_cookie_fetch.html]
@@ -343,8 +344,9 @@ tags = openwindow
 [test_workerupdatefoundevent.html]
 [test_xslt.html]
 [test_async_waituntil.html]
 [test_worker_reference_gc_timeout.html]
 [test_nofetch_handler.html]
 [test_bad_script_cache.html]
 [test_file_upload.html]
 support-files = script_file_upload.js sw_file_upload.js server_file_upload.sjs
+[test_self_update_worker.html]
new file mode 100644
--- /dev/null
+++ b/dom/serviceworkers/test/self_update_worker.sjs
@@ -0,0 +1,43 @@
+/* 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/. */
+"use strict";
+
+const WORKER_BODY = `
+onactivate = function(event) {
+  let promise = clients.matchAll({includeUncontrolled: true}).then(function(clients) {
+    for (i = 0; i < clients.length; i++) {
+      clients[i].postMessage({version: version});
+    }
+  }).then(function() {
+    return self.registration.update();
+  });
+  event.waitUntil(promise);
+};
+`;
+
+function handleRequest(request, response) {
+  if (request.queryString == 'clearcounter') {
+    setState('count', "1");
+    response.write("ok");
+    return;
+  }
+
+  let count = getState("count");
+  if (count === "") {
+    count = 1;
+  } else {
+    count = parseInt(count);
+  }
+
+  let worker = "var version = " + count + ";\n";
+  worker = worker + WORKER_BODY;
+
+  // This header is necessary for making this script able to be loaded.
+  response.setHeader("Content-Type", "application/javascript");
+
+  // If this is the first request, return the first source.
+  response.write(worker);
+  setState("count", "" + (count + 1));
+}
+
new file mode 100644
--- /dev/null
+++ b/dom/serviceworkers/test/test_self_update_worker.html
@@ -0,0 +1,79 @@
+<!DOCTYPE HTML>
+<html>
+<!--
+  Test that a self updating service worker can't keep running forever when the
+  script changes.
+  -->
+<head>
+  <title>Test for Bug 1432846</title>
+  <script src="/tests/SimpleTest/SimpleTest.js"></script>
+  <script src="/tests/SimpleTest/SpawnTask.js"></script>
+  <script src="error_reporting_helpers.js"></script>
+  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
+  <meta http-equiv="Content-type" content="text/html;charset=UTF-8">
+</head>
+<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1432846">Mozilla Bug 1432846</a>
+<p id="display"></p>
+<div id="content" style="display: none">
+
+</div>
+<pre id="test">
+</pre>
+
+<script src="utils.js"></script>
+<script class="testbody" type="text/javascript">
+add_task(function setupPrefs() {
+  return SpecialPowers.pushPrefEnv({"set": [
+    ["dom.serviceWorkers.enabled", true],
+    ["dom.serviceWorkers.testing.enabled", true],
+  ]});
+});
+
+function activateDummyWorker() {
+  return navigator.serviceWorker.register("empty.js",
+    { scope: "./empty?random=" + Date.now() })
+    .then(function(registration) {
+      var worker = registration.installing;
+      return waitForState(worker, 'activated', registration).then(function() {
+        ok(true, "got dummy!");
+        return registration.unregister();
+      });
+    });
+}
+
+add_task(async function test_update() {
+  navigator.serviceWorker.onmessage = function(event) {
+    ok (event.data.version < 3, "Service worker updated too many times." + event.data.version);
+  }
+
+  await SpecialPowers.pushPrefEnv({"set": [
+    ["dom.serviceWorkers.idle_timeout", 0],
+    ["dom.serviceWorkers.update_delay", 30000],
+    ["dom.serviceWorkers.idle_extended_timeout", 299999]]});
+
+  // clear version counter
+  await fetch("self_update_worker.sjs?clearcounter");
+
+  var worker;
+  let registration = await navigator.serviceWorker.register(
+    "self_update_worker.sjs",
+    { scope: "./test_self_update_worker.html?random=" + Date.now()})
+    .then(function(registration) {
+      worker = registration.installing;
+      return waitForState(worker, 'activated', registration);
+    });
+
+  // We need to wait a reasonable time to give the self updating worker a chance
+  // to change to a newer version. Register and activate an empty worker 5 times.
+  for (i = 0; i < 5; i++) {
+    await activateDummyWorker();
+  }
+
+
+  await registration.unregister();
+  await SpecialPowers.popPrefEnv();
+  await SpecialPowers.popPrefEnv();
+});
+</script>
+</body>
+</html>
--- a/dom/webauthn/u2f-hid-rs/README.md
+++ b/dom/webauthn/u2f-hid-rs/README.md
@@ -14,17 +14,17 @@ support additional protocols and transpo
 
 ## Usage
 
 There's only a simple example function that tries to register and sign right now. It uses
 [env_logger](http://rust-lang-nursery.github.io/log/env_logger/) for logging, which you
 configure with the `RUST_LOG` environment variable:
 
 ```
-cargo build
+cargo build --example main
 RUST_LOG=debug cargo run --example main
 ```
 
 Proper usage should be to call into this library from something else - e.g., Firefox. There are
 some [C headers exposed for the purpose](u2f-hid-rs/blob/master/src/u2fhid-capi.h).
 
 ## Tests
 
@@ -40,11 +40,11 @@ There are fuzzers for the USB protocol r
 There are not (yet) fuzzers for the C API used by callers (such as Gecko).
 
 To fuzz, you will need cargo-fuzz (the latest version from GitHub) as well as Rust Nightly.
 
 ```
 rustup install nightly
 cargo install --git https://github.com/rust-fuzz/cargo-fuzz/
 
-rustup run nightly cargo fuzz run u2f_read -- -max_len=512
-rustup run nightly cargo fuzz run u2f_read_write -- -max_len=512
+cargo +nightly fuzz run u2f_read -- -max_len=512
+cargo +nightly fuzz run u2f_read_write -- -max_len=512
 ```
--- a/dom/webauthn/u2f-hid-rs/examples/main.rs
+++ b/dom/webauthn/u2f-hid-rs/examples/main.rs
@@ -6,18 +6,27 @@ extern crate base64;
 extern crate crypto;
 extern crate u2fhid;
 use crypto::digest::Digest;
 use crypto::sha2::Sha256;
 use std::io;
 use std::sync::mpsc::channel;
 use u2fhid::{AuthenticatorTransports, KeyHandle, RegisterFlags, SignFlags, U2FManager};
 
+extern crate env_logger;
 extern crate log;
-extern crate env_logger;
+
+macro_rules! try_or {
+    ($val:expr, $or:expr) => {
+        match $val {
+            Ok(v) => { v }
+            Err(e) => { return $or(e); }
+        }
+    }
+}
 
 fn u2f_get_key_handle_from_register_response(register_response: &Vec<u8>) -> io::Result<Vec<u8>> {
     if register_response[0] != 0x05 {
         return Err(io::Error::new(
             io::ErrorKind::InvalidData,
             "Reserved byte not set correctly",
         ));
     }
@@ -29,18 +38,17 @@ fn u2f_get_key_handle_from_register_resp
 
     Ok(key_handle)
 }
 
 fn main() {
     env_logger::init().expect("Cannot start logger");
 
     println!("Asking a security key to register now...");
-    let challenge_str =
-        format!("{}{}",
+    let challenge_str = format!("{}{}",
         r#"{"challenge": "1vQ9mxionq0ngCnjD-wTsv1zUSrGRtFqG2xP09SbZ70","#,
         r#" "version": "U2F_V2", "appId": "http://demo.yubico.com"}"#);
     let mut challenge = Sha256::new();
     challenge.input_str(&challenge_str);
     let mut chall_bytes: Vec<u8> = vec![0; challenge.output_bytes()];
     challenge.result(&mut chall_bytes);
 
     let mut application = Sha256::new();
@@ -54,23 +62,24 @@ fn main() {
     let (tx, rx) = channel();
     manager
         .register(
             flags,
             15_000,
             chall_bytes.clone(),
             app_bytes.clone(),
             vec![],
-            move |rv| { tx.send(rv.unwrap()).unwrap(); },
+            move |rv| {
+                tx.send(rv.unwrap()).unwrap();
+            },
         )
         .unwrap();
 
     let register_data = try_or!(rx.recv(), |_| {
         panic!("Problem receiving, unable to continue");
-        return;
     });
     println!("Register result: {}", base64::encode(&register_data));
     println!("Asking a security key to sign now, with the data from the register...");
     let credential = u2f_get_key_handle_from_register_response(&register_data).unwrap();
     let key_handle = KeyHandle {
         credential,
         transports: AuthenticatorTransports::empty(),
     };
@@ -79,18 +88,21 @@ fn main() {
     let (tx, rx) = channel();
     manager
         .sign(
             flags,
             15_000,
             chall_bytes,
             vec![app_bytes],
             vec![key_handle],
-            move |rv| { tx.send(rv.unwrap()).unwrap(); },
+            move |rv| {
+                tx.send(rv.unwrap()).unwrap();
+            },
         )
         .unwrap();
 
-    let (_, sign_data) = try_or!(rx.recv(), |_| {
+    let (_, handle_used, sign_data) = try_or!(rx.recv(), |_| {
         println!("Problem receiving");
     });
     println!("Sign result: {}", base64::encode(&sign_data));
+    println!("Key handle used: {}", base64::encode(&handle_used));
     println!("Done.");
 }
--- a/dom/webauthn/u2f-hid-rs/src/capi.rs
+++ b/dom/webauthn/u2f-hid-rs/src/capi.rs
@@ -48,17 +48,17 @@ pub unsafe extern "C" fn rust_u2f_mgr_fr
 pub unsafe extern "C" fn rust_u2f_app_ids_new() -> *mut U2FAppIds {
     Box::into_raw(Box::new(vec![]))
 }
 
 #[no_mangle]
 pub unsafe extern "C" fn rust_u2f_app_ids_add(
     ids: *mut U2FAppIds,
     id_ptr: *const u8,
-    id_len: usize
+    id_len: usize,
 ) {
     (*ids).push(from_raw(id_ptr, id_len));
 }
 
 #[no_mangle]
 pub unsafe extern "C" fn rust_u2f_app_ids_free(ids: *mut U2FAppIds) {
     if !ids.is_null() {
         Box::from_raw(ids);
@@ -172,17 +172,21 @@ pub unsafe extern "C" fn rust_u2f_mgr_re
                 result.insert(RESBUF_ID_REGISTRATION, registration);
                 callback(tid, Box::into_raw(Box::new(result)));
             } else {
                 callback(tid, ptr::null_mut());
             };
         },
     );
 
-    if res.is_ok() { tid } else { 0 }
+    if res.is_ok() {
+        tid
+    } else {
+        0
+    }
 }
 
 #[no_mangle]
 pub unsafe extern "C" fn rust_u2f_mgr_sign(
     mgr: *mut U2FManager,
     flags: u64,
     timeout: u64,
     callback: U2FCallback,
@@ -206,36 +210,33 @@ pub unsafe extern "C" fn rust_u2f_mgr_si
     }
 
     let flags = ::SignFlags::from_bits_truncate(flags);
     let challenge = from_raw(challenge_ptr, challenge_len);
     let app_ids = (*app_ids).clone();
     let key_handles = (*khs).clone();
 
     let tid = new_tid();
-    let res = (*mgr).sign(
-        flags,
-        timeout,
-        challenge,
-        app_ids,
-        key_handles,
-        move |rv| {
-            if let Ok((app_id, key_handle, signature)) = rv {
-                let mut result = U2FResult::new();
-                result.insert(RESBUF_ID_KEYHANDLE, key_handle);
-                result.insert(RESBUF_ID_SIGNATURE, signature);
-                result.insert(RESBUF_ID_APPID, app_id);
-                callback(tid, Box::into_raw(Box::new(result)));
-            } else {
-                callback(tid, ptr::null_mut());
-            };
-        },
-    );
+    let res = (*mgr).sign(flags, timeout, challenge, app_ids, key_handles, move |rv| {
+        if let Ok((app_id, key_handle, signature)) = rv {
+            let mut result = U2FResult::new();
+            result.insert(RESBUF_ID_KEYHANDLE, key_handle);
+            result.insert(RESBUF_ID_SIGNATURE, signature);
+            result.insert(RESBUF_ID_APPID, app_id);
+            callback(tid, Box::into_raw(Box::new(result)));
+        } else {
+            callback(tid, ptr::null_mut());
+        };
+    });
 
-    if res.is_ok() { tid } else { 0 }
+    if res.is_ok() {
+        tid
+    } else {
+        0
+    }
 }
 
 #[no_mangle]
 pub unsafe extern "C" fn rust_u2f_mgr_cancel(mgr: *mut U2FManager) -> u64 {
     if !mgr.is_null() {
         // Ignore return value.
         let _ = (*mgr).cancel();
     }
--- a/dom/webauthn/u2f-hid-rs/src/lib.rs
+++ b/dom/webauthn/u2f-hid-rs/src/lib.rs
@@ -22,21 +22,21 @@ pub mod platform;
 #[cfg(any(target_os = "windows"))]
 #[path = "windows/mod.rs"]
 pub mod platform;
 
 #[cfg(not(any(target_os = "linux", target_os = "macos", target_os = "windows")))]
 #[path = "stub/mod.rs"]
 pub mod platform;
 
+extern crate boxfnonce;
+extern crate libc;
 #[macro_use]
 extern crate log;
 extern crate rand;
-extern crate libc;
-extern crate boxfnonce;
 extern crate runloop;
 
 #[macro_use]
 extern crate bitflags;
 
 mod consts;
 mod statemachine;
 mod u2ftypes;
--- a/dom/webauthn/u2f-hid-rs/src/linux/hidraw.rs
+++ b/dom/webauthn/u2f-hid-rs/src/linux/hidraw.rs
@@ -3,17 +3,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 extern crate libc;
 
 use std::io;
 use std::mem;
 use std::os::unix::io::RawFd;
 
-use consts::{FIDO_USAGE_PAGE, FIDO_USAGE_U2FHID};
+use consts::{FIDO_USAGE_U2FHID, FIDO_USAGE_PAGE};
 use util::{from_unix_result, io_err};
 
 #[allow(non_camel_case_types)]
 #[repr(C)]
 pub struct ReportDescriptor {
     size: ::libc::c_int,
     value: [u8; 4096],
 }
--- a/dom/webauthn/u2f-hid-rs/src/linux/monitor.rs
+++ b/dom/webauthn/u2f-hid-rs/src/linux/monitor.rs
@@ -84,37 +84,40 @@ where
 
         // Remove all tracked devices.
         self.remove_all_devices();
 
         Ok(())
     }
 
     fn process_event(&mut self, event: libudev::Event) {
-        let path = event.device().devnode().map(
-            |dn| dn.to_owned().into_os_string(),
-        );
+        let path = event
+            .device()
+            .devnode()
+            .map(|dn| dn.to_owned().into_os_string());
 
         match (event.event_type(), path) {
             (EventType::Add, Some(path)) => {
                 self.add_device(path);
             }
             (EventType::Remove, Some(path)) => {
                 self.remove_device(path);
             }
             _ => { /* ignore other types and failures */ }
         }
     }
 
     fn add_device(&mut self, path: OsString) {
         let f = self.new_device_cb.clone();
         let key = path.clone();
 
-        let runloop = RunLoop::new(move |alive| if alive() {
-            f(path, alive);
+        let runloop = RunLoop::new(move |alive| {
+            if alive() {
+                f(path, alive);
+            }
         });
 
         if let Ok(runloop) = runloop {
             self.runloops.insert(key, runloop);
         }
     }
 
     fn remove_device(&mut self, path: OsString) {
--- a/dom/webauthn/u2f-hid-rs/src/linux/transaction.rs
+++ b/dom/webauthn/u2f-hid-rs/src/linux/transaction.rs
@@ -28,16 +28,18 @@ impl Transaction {
                 try_or!(monitor.run(alive), |e| callback.call(Err(e)));
 
                 // Send an error, if the callback wasn't called already.
                 callback.call(Err(io_err("aborted or timed out")));
             },
             timeout,
         )?;
 
-        Ok(Self { thread: Some(thread) })
+        Ok(Self {
+            thread: Some(thread),
+        })
     }
 
     pub fn cancel(&mut self) {
         // This must never be None.
         self.thread.take().unwrap().cancel();
     }
 }
--- a/dom/webauthn/u2f-hid-rs/src/macos/iokit.rs
+++ b/dom/webauthn/u2f-hid-rs/src/macos/iokit.rs
@@ -2,45 +2,49 @@
  * 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/. */
 
 #![allow(non_snake_case, non_camel_case_types, non_upper_case_globals)]
 
 extern crate core_foundation_sys;
 extern crate libc;
 
-use consts::{FIDO_USAGE_PAGE, FIDO_USAGE_U2FHID};
+use consts::{FIDO_USAGE_U2FHID, FIDO_USAGE_PAGE};
 use core_foundation_sys::base::*;
 use core_foundation_sys::dictionary::*;
 use core_foundation_sys::number::*;
 use core_foundation_sys::runloop::*;
 use core_foundation_sys::string::*;
 use libc::c_void;
 use std::ops::Deref;
 
 type IOOptionBits = u32;
 
 pub type IOReturn = libc::c_int;
 
 pub type IOHIDManagerRef = *mut __IOHIDManager;
 pub type IOHIDManagerOptions = IOOptionBits;
 
-pub type IOHIDDeviceCallback = extern "C" fn(context: *mut c_void,
-                                             result: IOReturn,
-                                             sender: *mut c_void,
-                                             device: IOHIDDeviceRef);
+pub type IOHIDDeviceCallback = extern "C" fn(
+    context: *mut c_void,
+    result: IOReturn,
+    sender: *mut c_void,
+    device: IOHIDDeviceRef,
+);
 
 pub type IOHIDReportType = IOOptionBits;
-pub type IOHIDReportCallback = extern "C" fn(context: *mut c_void,
-                                             result: IOReturn,
-                                             sender: IOHIDDeviceRef,
-                                             report_type: IOHIDReportType,
-                                             report_id: u32,
-                                             report: *mut u8,
-                                             report_len: CFIndex);
+pub type IOHIDReportCallback = extern "C" fn(
+    context: *mut c_void,
+    result: IOReturn,
+    sender: IOHIDDeviceRef,
+    report_type: IOHIDReportType,
+    report_id: u32,
+    report: *mut u8,
+    report_len: CFIndex,
+);
 
 pub const kIOHIDManagerOptionNone: IOHIDManagerOptions = 0;
 
 pub const kIOHIDReportTypeOutput: IOHIDReportType = 1;
 
 #[repr(C)]
 pub struct __IOHIDManager {
     __private: c_void,
--- a/dom/webauthn/u2f-hid-rs/src/macos/monitor.rs
+++ b/dom/webauthn/u2f-hid-rs/src/macos/monitor.rs
@@ -1,14 +1,14 @@
 /* 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/. */
 
+extern crate libc;
 extern crate log;
-extern crate libc;
 
 use core_foundation_sys::base::*;
 use core_foundation_sys::runloop::*;
 use libc::c_void;
 use platform::iokit::*;
 use runloop::RunLoop;
 use std::{io, slice};
 use std::collections::HashMap;
--- a/dom/webauthn/u2f-hid-rs/src/manager.rs
+++ b/dom/webauthn/u2f-hid-rs/src/manager.rs
@@ -1,14 +1,14 @@
 /* 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/. */
 
 use std::io;
-use std::sync::mpsc::{channel, Sender, RecvTimeoutError};
+use std::sync::mpsc::{channel, RecvTimeoutError, Sender};
 use std::time::Duration;
 
 use consts::PARAMETER_SIZE;
 use statemachine::StateMachine;
 use runloop::RunLoop;
 use util::{to_io_err, OnceCallback};
 
 enum QueueAction {
@@ -42,50 +42,43 @@ impl U2FManager {
 
         // Start a new work queue thread.
         let queue = RunLoop::new(move |alive| {
             let mut sm = StateMachine::new();
 
             while alive() {
                 match rx.recv_timeout(Duration::from_millis(50)) {
                     Ok(QueueAction::Register {
-                           flags,
-                           timeout,
-                           challenge,
-                           application,
-                           key_handles,
-                           callback,
-                       }) => {
+                        flags,
+                        timeout,
+                        challenge,
+                        application,
+                        key_handles,
+                        callback,
+                    }) => {
                         // This must not block, otherwise we can't cancel.
                         sm.register(
                             flags,
                             timeout,
                             challenge,
                             application,
                             key_handles,
                             callback,
                         );
                     }
                     Ok(QueueAction::Sign {
-                           flags,
-                           timeout,
-                           challenge,
-                           app_ids,
-                           key_handles,
-                           callback,
-                       }) => {
+                        flags,
+                        timeout,
+                        challenge,
+                        app_ids,
+                        key_handles,
+                        callback,
+                    }) => {
                         // This must not block, otherwise we can't cancel.
-                        sm.sign(
-                            flags,
-                            timeout,
-                            challenge,
-                            app_ids,
-                            key_handles,
-                            callback,
-                        );
+                        sm.sign(flags, timeout, challenge, app_ids, key_handles, callback);
                     }
                     Ok(QueueAction::Cancel) => {
                         // Cancelling must block so that we don't start a new
                         // polling thread before the old one has shut down.
                         sm.cancel();
                     }
                     Err(RecvTimeoutError::Disconnected) => {
                         break;
@@ -168,22 +161,22 @@ impl U2FManager {
         if app_ids.len() < 1 {
             return Err(io::Error::new(
                 io::ErrorKind::InvalidInput,
                 "No app IDs given",
             ));
         }
 
         for app_id in &app_ids {
-          if app_id.len() != PARAMETER_SIZE {
-              return Err(io::Error::new(
-                  io::ErrorKind::InvalidInput,
-                  "Invalid app_id size",
-              ));
-          }
+            if app_id.len() != PARAMETER_SIZE {
+                return Err(io::Error::new(
+                    io::ErrorKind::InvalidInput,
+                    "Invalid app_id size",
+                ));
+            }
         }
 
         for key_handle in &key_handles {
             if key_handle.credential.len() > 256 {
                 return Err(io::Error::new(
                     io::ErrorKind::InvalidInput,
                     "Key handle too large",
                 ));
--- a/dom/webauthn/u2f-hid-rs/src/statemachine.rs
+++ b/dom/webauthn/u2f-hid-rs/src/statemachine.rs
@@ -19,26 +19,26 @@ fn find_valid_key_handles<'a, F>(
     key_handles: &'a Vec<::KeyHandle>,
     mut is_valid: F,
 ) -> (&'a ::AppId, Vec<&'a ::KeyHandle>)
 where
     F: FnMut(&Vec<u8>, &::KeyHandle) -> bool,
 {
     // Try all given app_ids in order.
     for app_id in app_ids {
-      // Find all valid key handles for the current app_id.
-      let valid_handles = key_handles
-          .iter()
-          .filter(|key_handle| is_valid(app_id, key_handle))
-          .collect::<Vec<_>>();
+        // Find all valid key handles for the current app_id.
+        let valid_handles = key_handles
+            .iter()
+            .filter(|key_handle| is_valid(app_id, key_handle))
+            .collect::<Vec<_>>();
 
-       // If there's at least one, stop.
-       if valid_handles.len() > 0 {
-           return (app_id, valid_handles);
-       }
+        // If there's at least one, stop.
+        if valid_handles.len() > 0 {
+            return (app_id, valid_handles);
+        }
     }
 
     return (&app_ids[0], vec![]);
 }
 
 #[derive(Default)]
 pub struct StateMachine {
     transaction: Option<Transaction>,
@@ -82,40 +82,46 @@ impl StateMachine {
             // Technically, this is a ConstraintError because we shouldn't talk
             // to this authenticator in the first place. But the result is the
             // same anyway.
             if !flags.is_empty() {
                 return;
             }
 
             // Iterate the exclude list and see if there are any matches.
-            // Abort the state machine if we found a valid key handle.
-            if key_handles.iter().any(|key_handle| {
-                is_valid_transport(key_handle.transports) &&
-                    u2f_is_keyhandle_valid(dev, &challenge, &application, &key_handle.credential)
+            // If so, we'll keep polling the device anyway to test for user
+            // consent, to be consistent with CTAP2 device behavior.
+            let excluded = key_handles.iter().any(|key_handle| {
+                is_valid_transport(key_handle.transports)
+                    && u2f_is_keyhandle_valid(dev, &challenge, &application, &key_handle.credential)
                         .unwrap_or(false) /* no match on failure */
-            })
-            {
-                return;
-            }
+            });
 
             while alive() {
-                if let Ok(bytes) = u2f_register(dev, &challenge, &application) {
-                    callback.call(Ok(bytes));
-                    break;
+                if excluded {
+                    let blank = vec![0u8; PARAMETER_SIZE];
+                    if let Ok(_) = u2f_register(dev, &blank, &blank) {
+                        callback.call(Err(io_err("duplicate registration")));
+                        break;
+                    }
+                } else {
+                    if let Ok(bytes) = u2f_register(dev, &challenge, &application) {
+                        callback.call(Ok(bytes));
+                        break;
+                    }
                 }
 
                 // Sleep a bit before trying again.
                 thread::sleep(Duration::from_millis(100));
             }
         });
 
-        self.transaction = Some(try_or!(transaction, |_| {
-            cbc.call(Err(io_err("couldn't create transaction")))
-        }));
+        self.transaction = Some(try_or!(transaction, |_| cbc.call(Err(io_err(
+            "couldn't create transaction"
+        )))));
     }
 
     pub fn sign(
         &mut self,
         flags: ::SignFlags,
         timeout: u64,
         challenge: Vec<u8>,
         app_ids: Vec<::AppId>,
@@ -148,28 +154,27 @@ impl StateMachine {
             // same anyway.
             if !flags.is_empty() {
                 return;
             }
 
             // For each appId, try all key handles. If there's at least one
             // valid key handle for an appId, we'll use that appId below.
             let (app_id, valid_handles) =
-                find_valid_key_handles(&app_ids, &key_handles,
-                    |app_id, key_handle| {
-                        u2f_is_keyhandle_valid(dev, &challenge, app_id,
-                                               &key_handle.credential)
-                            .unwrap_or(false) /* no match on failure */
-                    });
+                find_valid_key_handles(&app_ids, &key_handles, |app_id, key_handle| {
+                    u2f_is_keyhandle_valid(dev, &challenge, app_id, &key_handle.credential)
+                        .unwrap_or(false) /* no match on failure */
+                });
 
             // Aggregate distinct transports from all given credentials.
-            let transports = key_handles.iter().fold(
-                ::AuthenticatorTransports::empty(),
-                |t, k| t | k.transports,
-            );
+            let transports = key_handles
+                .iter()
+                .fold(::AuthenticatorTransports::empty(), |t, k| {
+                    t | k.transports
+                });
 
             // We currently only support USB. If the RP specifies transports
             // and doesn't include USB it's probably lying.
             if !is_valid_transport(transports) {
                 return;
             }
 
             while alive() {
@@ -179,39 +184,36 @@ impl StateMachine {
                     let blank = vec![0u8; PARAMETER_SIZE];
                     if let Ok(_) = u2f_register(dev, &blank, &blank) {
                         callback.call(Err(io_err("invalid key")));
                         break;
                     }
                 } else {
                     // Otherwise, try to sign.
                     for key_handle in &valid_handles {
-                        if let Ok(bytes) = u2f_sign(
-                            dev,
-                            &challenge,
-                            app_id,
-                            &key_handle.credential,
-                        )
+                        if let Ok(bytes) = u2f_sign(dev, &challenge, app_id, &key_handle.credential)
                         {
-                            callback.call(Ok((app_id.clone(),
-                                              key_handle.credential.clone(),
-                                              bytes)));
+                            callback.call(Ok((
+                                app_id.clone(),
+                                key_handle.credential.clone(),
+                                bytes,
+                            )));
                             break;
                         }
                     }
                 }
 
                 // Sleep a bit before trying again.
                 thread::sleep(Duration::from_millis(100));
             }
         });
 
-        self.transaction = Some(try_or!(transaction, |_| {
-            cbc.call(Err(io_err("couldn't create transaction")))
-        }));
+        self.transaction = Some(try_or!(transaction, |_| cbc.call(Err(io_err(
+            "couldn't create transaction"
+        )))));
     }
 
     // This blocks.
     pub fn cancel(&mut self) {
         if let Some(mut transaction) = self.transaction.take() {
             transaction.cancel();
         }
     }
--- a/dom/webauthn/u2f-hid-rs/src/u2fprotocol.rs
+++ b/dom/webauthn/u2f-hid-rs/src/u2fprotocol.rs
@@ -230,18 +230,18 @@ where
 ////////////////////////////////////////////////////////////////////////
 // Tests
 ////////////////////////////////////////////////////////////////////////
 
 #[cfg(test)]
 mod tests {
     use rand::{thread_rng, Rng};
 
-    use super::{U2FDevice, init_device, ping_device, sendrecv, send_apdu};
-    use consts::{CID_BROADCAST, U2FHID_INIT, U2FHID_PING, U2FHID_MSG, SW_NO_ERROR};
+    use super::{init_device, ping_device, send_apdu, sendrecv, U2FDevice};
+    use consts::{U2FHID_INIT, U2FHID_MSG, U2FHID_PING, CID_BROADCAST, SW_NO_ERROR};
 
     mod platform {
         use std::io;
         use std::io::{Read, Write};
 
         use consts::{CID_BROADCAST, HID_RPT_SIZE};
         use u2ftypes::U2FDevice;
 
@@ -353,31 +353,31 @@ mod tests {
     fn test_sendrecv_multiple() {
         let mut device = platform::TestDevice::new();
         let cid = [0x01, 0x02, 0x03, 0x04];
         device.set_cid(cid.clone());
 
         // init packet
         let mut msg = cid.to_vec();
         msg.extend(vec![U2FHID_PING, 0x00, 0xe4]); // cmd + length = 228
-        // write msg, append [1u8; 57], 171 bytes remaining
+                                                   // write msg, append [1u8; 57], 171 bytes remain
         device.add_write(&msg, 1);
         device.add_read(&msg, 1);
 
         // cont packet
         let mut msg = cid.to_vec();
         msg.push(0x00); // seq = 0
-        // write msg, append [1u8; 59], 112 bytes remaining
+                        // write msg, append [1u8; 59], 112 bytes remaining
         device.add_write(&msg, 1);
         device.add_read(&msg, 1);
 
         // cont packet
         let mut msg = cid.to_vec();
         msg.push(0x01); // seq = 1
-        // write msg, append [1u8; 59], 53 bytes remaining
+                        // write msg, append [1u8; 59], 53 bytes remaining
         device.add_write(&msg, 1);
         device.add_read(&msg, 1);
 
         // cont packet
         let mut msg = cid.to_vec();
         msg.push(0x02); // seq = 2
         msg.extend_from_slice(&[1u8; 53]);
         // write msg, append remaining 53 bytes.
@@ -395,17 +395,17 @@ mod tests {
         let cid = [0x01, 0x02, 0x03, 0x04];
         let data = [0x01, 0x02, 0x03, 0x04, 0x05];
         let mut device = platform::TestDevice::new();
         device.set_cid(cid.clone());
 
         let mut msg = cid.to_vec();
         // sendrecv header
         msg.extend(vec![U2FHID_MSG, 0x00, 0x0e]); // len = 14
-        // apdu header
+                                                  // apdu header
         msg.extend(vec![0x00, U2FHID_PING, 0xaa, 0x00, 0x00, 0x00, 0x05]);
         // apdu data
         msg.extend_from_slice(&data);
         device.add_write(&msg, 0);
 
         // Send data back
         let mut msg = cid.to_vec();
         msg.extend(vec![U2FHID_MSG, 0x00, 0x07]);
--- a/dom/webauthn/u2f-hid-rs/src/u2ftypes.rs
+++ b/dom/webauthn/u2f-hid-rs/src/u2ftypes.rs
@@ -130,17 +130,16 @@ impl U2FHIDCont {
         if dev.write(&frame)? != frame.len() {
             return Err(io_err("device write failed"));
         }
 
         Ok(count)
     }
 }
 
-
 // Reply sent after initialization command. Contains information about U2F USB
 // Key versioning, as well as the communication channel to be used for all
 // further requests.
 //
 // https://fidoalliance.org/specs/fido-u2f-v1.0-nfc-bt-amendment-20150514/fido-u2f-hid-protocol.
 // html#u2fhid_init
 pub struct U2FHIDInitResp {}
 
--- a/dom/webauthn/u2f-hid-rs/src/util.rs
+++ b/dom/webauthn/u2f-hid-rs/src/util.rs
@@ -59,25 +59,29 @@ pub struct OnceCallback<T> {
 
 impl<T> OnceCallback<T> {
     pub fn new<F>(cb: F) -> Self
     where
         F: FnOnce(io::Result<T>),
         F: Send + 'static,
     {
         let cb = Some(SendBoxFnOnce::from(cb));
-        Self { callback: Arc::new(Mutex::new(cb)) }
+        Self {
+            callback: Arc::new(Mutex::new(cb)),
+        }
     }
 
     pub fn call(&self, rv: io::Result<T>) {
         if let Ok(mut cb) = self.callback.lock() {
             if let Some(cb) = cb.take() {
                 cb.call(rv);
             }
         }
     }
 }
 
 impl<T> Clone for OnceCallback<T> {
     fn clone(&self) -> Self {
-        Self { callback: self.callback.clone() }
+        Self {
+            callback: self.callback.clone(),
+        }
     }
 }
--- a/dom/webauthn/u2f-hid-rs/src/windows/device.rs
+++ b/dom/webauthn/u2f-hid-rs/src/windows/device.rs
@@ -2,17 +2,17 @@
  * 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/. */
 
 use std::fs::{File, OpenOptions};
 use std::io;
 use std::io::{Read, Write};
 use std::os::windows::io::AsRawHandle;
 
-use consts::{CID_BROADCAST, HID_RPT_SIZE, FIDO_USAGE_PAGE, FIDO_USAGE_U2FHID};
+use consts::{FIDO_USAGE_U2FHID, CID_BROADCAST, FIDO_USAGE_PAGE, HID_RPT_SIZE};
 use super::winapi::DeviceCapabilities;
 
 use u2ftypes::U2FDevice;
 
 #[derive(Debug)]
 pub struct Device {
     path: String,
     file: File,
--- a/dom/webauthn/u2f-hid-rs/src/windows/monitor.rs
+++ b/dom/webauthn/u2f-hid-rs/src/windows/monitor.rs
@@ -60,18 +60,20 @@ where
         Ok(())
     }
 
     fn add_device(&mut self, path: &String) {
         let f = self.new_device_cb.clone();
         let path = path.clone();
         let key = path.clone();
 
-        let runloop = RunLoop::new(move |alive| if alive() {
-            f(path, alive);
+        let runloop = RunLoop::new(move |alive| {
+            if alive() {
+                f(path, alive);
+            }
         });
 
         if let Ok(runloop) = runloop {
             self.runloops.insert(key, runloop);
         }
     }
 
     fn remove_device(&mut self, path: &String) {
--- a/dom/webauthn/u2f-hid-rs/src/windows/transaction.rs
+++ b/dom/webauthn/u2f-hid-rs/src/windows/transaction.rs
@@ -27,16 +27,18 @@ impl Transaction {
                 try_or!(monitor.run(alive), |e| callback.call(Err(e)));
 
                 // Send an error, if the callback wasn't called already.
                 callback.call(Err(io_err("aborted or timed out")));
             },
             timeout,
         )?;
 
-        Ok(Self { thread: Some(thread) })
+        Ok(Self {
+            thread: Some(thread),
+        })
     }
 
     pub fn cancel(&mut self) {
         // This must never be None.
         self.thread.take().unwrap().cancel();
     }
 }
--- a/gfx/thebes/gfxPlatform.h
+++ b/gfx/thebes/gfxPlatform.h
@@ -717,16 +717,17 @@ public:
     // you probably want to use gfxVars::UseWebRender() instead of this
     static bool WebRenderEnvvarEnabled();
 
 protected:
     gfxPlatform();
     virtual ~gfxPlatform();
 
     virtual void InitAcceleration();
+    virtual void InitWebRenderConfig();
 
     /**
      * Called immediately before deleting the gfxPlatform object.
      */
     virtual void WillShutdown();
 
     /**
      * Initialized hardware vsync based on each platform.
@@ -834,17 +835,16 @@ private:
 
     /**
      * This uses nsIScreenManager to determine the screen size and color depth
      */
     void PopulateScreenInfo();
 
     void InitCompositorAccelerationPrefs();
     void InitGPUProcessPrefs();
-    void InitWebRenderConfig();
     void InitOMTPConfig();
 
     static bool IsDXInterop2Blocked();
 
     RefPtr<gfxASurface> mScreenReferenceSurface;
     nsCOMPtr<nsIObserver> mSRGBOverrideObserver;
     nsCOMPtr<nsIObserver> mFontPrefsObserver;
     nsCOMPtr<nsIObserver> mMemoryPressureObserver;
--- a/gfx/thebes/gfxWindowsPlatform.cpp
+++ b/gfx/thebes/gfxWindowsPlatform.cpp
@@ -365,16 +365,26 @@ gfxWindowsPlatform::InitAcceleration()
     InitDWriteSupport();
   }
 
   // CanUseHardwareVideoDecoding depends on DeviceManagerDx state,
   // so update the cached value now.
   UpdateCanUseHardwareVideoDecoding();
 }
 
+void
+gfxWindowsPlatform::InitWebRenderConfig()
+{
+  gfxPlatform::InitWebRenderConfig();
+
+  if (gfxVars::UseWebRender()) {
+    UpdateBackendPrefs();
+  }
+}
+
 bool
 gfxWindowsPlatform::CanUseHardwareVideoDecoding()
 {
   DeviceManagerDx* dm = DeviceManagerDx::Get();
   if (!dm) {
     return false;
   }
   if (!dm->TextureSharingWorks()) {
@@ -431,17 +441,18 @@ gfxWindowsPlatform::HandleDeviceReset()
 void
 gfxWindowsPlatform::UpdateBackendPrefs()
 {
   uint32_t canvasMask = BackendTypeBit(BackendType::CAIRO) |
                         BackendTypeBit(BackendType::SKIA);
   uint32_t contentMask = BackendTypeBit(BackendType::CAIRO) |
                          BackendTypeBit(BackendType::SKIA);
   BackendType defaultBackend = BackendType::SKIA;
-  if (gfxConfig::IsEnabled(Feature::DIRECT2D) && Factory::HasD2D1Device()) {
+  if (gfxConfig::IsEnabled(Feature::DIRECT2D) &&
+      Factory::HasD2D1Device() && !gfxVars::UseWebRender()) {
     contentMask |= BackendTypeBit(BackendType::DIRECT2D1_1);
     canvasMask |= BackendTypeBit(BackendType::DIRECT2D1_1);
     defaultBackend = BackendType::DIRECT2D1_1;
   }
   InitBackendPrefs(canvasMask, defaultBackend, contentMask, defaultBackend);
 }
 
 bool
--- a/gfx/thebes/gfxWindowsPlatform.h
+++ b/gfx/thebes/gfxWindowsPlatform.h
@@ -232,16 +232,17 @@ protected:
     void BuildContentDeviceData(mozilla::gfx::ContentDeviceData* aOut) override;
 
 protected:
     RenderMode mRenderMode;
 
 private:
     void Init();
     void InitAcceleration() override;
+    void InitWebRenderConfig() override;
 
     void InitializeDevices();
     void InitializeD3D11();
     void InitializeD2D();
     bool InitDWriteSupport();
     bool InitGPUProcessSupport();
 
     void DisableD2D(mozilla::gfx::FeatureStatus aStatus, const char* aMessage,
--- a/js/src/jit/CodeGenerator.cpp
+++ b/js/src/jit/CodeGenerator.cpp
@@ -2830,40 +2830,38 @@ CodeGenerator::visitClassConstructor(LCl
 
 typedef JSObject* (*LambdaFn)(JSContext*, HandleFunction, HandleObject);
 static const VMFunction LambdaInfo = FunctionInfo<LambdaFn>(js::Lambda, "Lambda");
 
 void
 CodeGenerator::visitLambdaForSingleton(LLambdaForSingleton* lir)
 {
     pushArg(ToRegister(lir->environmentChain()));
-    pushArg(ImmGCPtr(lir->mir()->info().fun));
+    pushArg(ImmGCPtr(lir->mir()->info().funUnsafe()));
     callVM(LambdaInfo, lir);
 }
 
 void
 CodeGenerator::visitLambda(LLambda* lir)
 {
     Register envChain = ToRegister(lir->environmentChain());
     Register output = ToRegister(lir->output());
     Register tempReg = ToRegister(lir->temp());
     const LambdaFunctionInfo& info = lir->mir()->info();
 
-    OutOfLineCode* ool = oolCallVM(LambdaInfo, lir, ArgList(ImmGCPtr(info.fun), envChain),
+    OutOfLineCode* ool = oolCallVM(LambdaInfo, lir, ArgList(ImmGCPtr(info.funUnsafe()), envChain),
                                    StoreRegisterTo(output));
 
     MOZ_ASSERT(!info.singletonType);
 
-    masm.createGCObject(output, tempReg, info.fun, gc::DefaultHeap, ool->entry());
+    masm.createGCObject(output, tempReg, info.funUnsafe(), gc::DefaultHeap, ool->entry());
 
     emitLambdaInit(output, envChain, info);
 
     if (info.flags & JSFunction::EXTENDED) {
-        MOZ_ASSERT(info.fun->allowSuperProperty() || info.fun->isSelfHostedBuiltin() ||
-                   info.fun->isAsync());
         static_assert(FunctionExtended::NUM_EXTENDED_SLOTS == 2, "All slots must be initialized");
         masm.storeValue(UndefinedValue(), Address(output, FunctionExtended::offsetOfExtendedSlot(0)));
         masm.storeValue(UndefinedValue(), Address(output, FunctionExtended::offsetOfExtendedSlot(1)));
     }
 
     masm.bind(ool->rejoin());
 }
 
@@ -2903,17 +2901,17 @@ CodeGenerator::visitOutOfLineLambdaArrow
     masm.pop(newTarget.scratchReg());
 
     masm.bind(ool->entryNoPop());
 
     saveLive(ool->lir);
 
     pushArg(newTarget);
     pushArg(envChain);
-    pushArg(ImmGCPtr(info.fun));
+    pushArg(ImmGCPtr(info.funUnsafe()));
 
     callVM(LambdaArrowInfo, ool->lir);
     StoreRegisterTo(output).generate(this);
 
     restoreLiveIgnore(ool->lir, StoreRegisterTo(output).clobbered());
 
     masm.jump(ool->rejoin());
 }
@@ -2940,17 +2938,17 @@ CodeGenerator::visitLambdaArrow(LLambdaA
     }
 
     // There's not enough registers on x86 with the profiler enabled to request
     // a temp. Instead, spill part of one of the values, being prepared to
     // restore it if necessary on the out of line path.
     Register tempReg = newTarget.scratchReg();
     masm.push(newTarget.scratchReg());
 
-    masm.createGCObject(output, tempReg, info.fun, gc::DefaultHeap, ool->entry());
+    masm.createGCObject(output, tempReg, info.funUnsafe(), gc::DefaultHeap, ool->entry());
 
     masm.pop(newTarget.scratchReg());
 
     emitLambdaInit(output, envChain, info);
 
     // Initialize extended slots. Lexical |this| is stored in the first one.
     MOZ_ASSERT(info.flags & JSFunction::EXTENDED);
     static_assert(FunctionExtended::NUM_EXTENDED_SLOTS == 2, "All slots must be initialized");
@@ -2981,17 +2979,18 @@ CodeGenerator::emitLambdaInit(Register o
     static_assert(JSFunction::offsetOfFlags() == JSFunction::offsetOfNargs() + 2,
                   "the code below needs to be adapted");
     masm.store32(Imm32(u.word), Address(output, JSFunction::offsetOfNargs()));
     masm.storePtr(ImmGCPtr(info.scriptOrLazyScript),
                   Address(output, JSFunction::offsetOfScriptOrLazyScript()));
     masm.storePtr(envChain, Address(output, JSFunction::offsetOfEnvironment()));
     // No post barrier needed because output is guaranteed to be allocated in
     // the nursery.
-    masm.storePtr(ImmGCPtr(info.fun->displayAtom()), Address(output, JSFunction::offsetOfAtom()));
+    masm.storePtr(ImmGCPtr(info.funUnsafe()->displayAtom()),
+                  Address(output, JSFunction::offsetOfAtom()));
 }
 
 typedef bool (*SetFunNameFn)(JSContext*, HandleFunction, HandleValue, FunctionPrefixKind);
 static const VMFunction SetFunNameInfo =
     FunctionInfo<SetFunNameFn>(js::SetFunctionNameIfNoOwnName, "SetFunName");
 
 void
 CodeGenerator::visitSetFunName(LSetFunName* lir)
--- a/js/src/jit/LIR.h
+++ b/js/src/jit/LIR.h
@@ -729,17 +729,16 @@ class LNode
     // Returns the number of outputs of this instruction. If an output is
     // unallocated, it is an LDefinition, defining a virtual register.
     size_t numDefs() const {
         return numDefs_;
     }
 
     // Returns information about operands.
     virtual LAllocation* getOperand(size_t index) = 0;
-    virtual void setOperand(size_t index, const LAllocation& a) = 0;
 
     bool isCall() const {
         return isCall_;
     }
 
     // Does this call preserve the given register?
     // By default, it is assumed that all registers are clobbered by a call.
     inline bool isCallPreserved(AnyRegister reg) const;
@@ -825,16 +824,19 @@ class LInstruction
     }
 
   public:
     inline LDefinition* getDef(size_t index);
 
     void setDef(size_t index, const LDefinition& def) {
         *getDef(index) = def;
     }
+    void setOperand(size_t index, const LAllocation& a) {
+        *getOperand(index) = a;
+    }
 
     // Returns information about temporary registers needed. Each temporary
     // register is an LDefinition with a fixed or virtual register and
     // either GENERAL, FLOAT32, or DOUBLE type.
     size_t numTemps() const {
         return numTemps_;
     }
     inline LDefinition* getTemp(size_t index);
@@ -964,17 +966,17 @@ class LPhi final : public LNode
     }
     size_t numOperands() const {
         return mir_->toPhi()->numOperands();
     }
     LAllocation* getOperand(size_t index) override {
         MOZ_ASSERT(index < numOperands());
         return &inputs_[index];
     }
-    void setOperand(size_t index, const LAllocation& a) override {
+    void setOperand(size_t index, const LAllocation& a) {
         MOZ_ASSERT(index < numOperands());
         inputs_[index] = a;
     }
 
     // Phis don't have temps, so calling numTemps/getTemp is pointless.
     size_t numTemps() const = delete;
     LDefinition* getTemp(size_t index) = delete;
 };
@@ -1161,17 +1163,17 @@ class LInstructionHelper : public detail
     LInstructionHelper()
       : details::LInstructionFixedDefsTempsHelper<Defs, Temps>(Operands)
     {}
 
   public:
     LAllocation* getOperand(size_t index) final {
         return &operands_[index];
     }
-    void setOperand(size_t index, const LAllocation& a) final {
+    void setOperand(size_t index, const LAllocation& a) {
         operands_[index] = a;
     }
     void setBoxOperand(size_t index, const LBoxAllocation& alloc) {
 #ifdef JS_NUNBOX32
         operands_[index + TYPE_INDEX] = alloc.type();
         operands_[index + PAYLOAD_INDEX] = alloc.payload();
 #else
         operands_[index] = alloc.value();
@@ -1207,17 +1209,17 @@ class LVariadicInstruction : public deta
 
   public:
     MOZ_MUST_USE bool init(TempAllocator& alloc) {
         return operands_.init(alloc, this->nonPhiNumOperands_);
     }
     LAllocation* getOperand(size_t index) final {
         return &operands_[index];
     }
-    void setOperand(size_t index, const LAllocation& a) final {
+    void setOperand(size_t index, const LAllocation& a) {
         operands_[index] = a;
     }
     void setBoxOperand(size_t index, const LBoxAllocation& a) {
 #ifdef JS_NUNBOX32
         operands_[index + TYPE_INDEX] = a.type();
         operands_[index + PAYLOAD_INDEX] = a.payload();
 #else
         operands_[index] = a.value();
--- a/js/src/jit/MIR.h
+++ b/js/src/jit/MIR.h
@@ -8793,38 +8793,58 @@ class MClassConstructor : public MNullar
     }
 };
 
 struct LambdaFunctionInfo
 {
     // The functions used in lambdas are the canonical original function in
     // the script, and are immutable except for delazification. Record this
     // information while still on the active thread to avoid races.
-    CompilerFunction fun;
+  private:
+    CompilerFunction fun_;
+
+  public:
     uint16_t flags;
     uint16_t nargs;
     gc::Cell* scriptOrLazyScript;
     bool singletonType;
     bool useSingletonForClone;
 
     explicit LambdaFunctionInfo(JSFunction* fun)
-      : fun(fun), flags(fun->flags()), nargs(fun->nargs()),
+      : fun_(fun), flags(fun->flags()), nargs(fun->nargs()),
         scriptOrLazyScript(fun->hasScript()
                            ? (gc::Cell*) fun->nonLazyScript()
                            : (gc::Cell*) fun->lazyScript()),
         singletonType(fun->isSingleton()),
         useSingletonForClone(ObjectGroup::useSingletonForClone(fun))
-    {}
+    {
+        // If this assert fails, make sure CodeGenerator::visitLambda does the
+        // right thing. We can't assert this off-thread in CodeGenerator,
+        // because fun->isAsync() accesses the script/lazyScript and can race
+        // with delazification on the main thread.
+        MOZ_ASSERT_IF(flags & JSFunction::EXTENDED,
+                      fun->isArrow() ||
+                      fun->allowSuperProperty() ||
+                      fun->isSelfHostedBuiltin() ||
+                      fun->isAsync());
+    }
+
+    // Be careful when calling this off-thread. Don't call any JSFunction*
+    // methods that depend on script/lazyScript - this can race with
+    // delazification on the main thread.
+    JSFunction* funUnsafe() const {
+        return fun_;
+    }
 
     bool appendRoots(MRootList& roots) const {
-        if (!roots.append(fun))
-            return false;
-        if (fun->hasScript())
-            return roots.append(fun->nonLazyScript());
-        return roots.append(fun->lazyScript());
+        if (!roots.append(fun_))
+            return false;
+        if (fun_->hasScript())
+            return roots.append(fun_->nonLazyScript());
+        return roots.append(fun_->lazyScript());
     }
 
   private:
     LambdaFunctionInfo(const LambdaFunctionInfo&) = delete;
     void operator=(const LambdaFunctionInfo&) = delete;
 };
 
 class MLambda
@@ -8834,18 +8854,19 @@ class MLambda
     const LambdaFunctionInfo info_;
 
     MLambda(TempAllocator& alloc, CompilerConstraintList* constraints, MDefinition* envChain,
             MConstant* cst)
       : MBinaryInstruction(classOpcode, envChain, cst),
         info_(&cst->toObject().as<JSFunction>())
     {
         setResultType(MIRType::Object);
-        if (!info().fun->isSingleton() && !ObjectGroup::useSingletonForClone(info().fun))
-            setResultTypeSet(MakeSingletonTypeSet(alloc, constraints, info().fun));
+        JSFunction* fun = info().funUnsafe();
+        if (!fun->isSingleton() && !ObjectGroup::useSingletonForClone(fun))
+            setResultTypeSet(MakeSingletonTypeSet(alloc, constraints, fun));
     }
 
   public:
     INSTRUCTION_HEADER(Lambda)
     TRIVIAL_NEW_WRAPPERS_WITH_ALLOC
     NAMED_OPERANDS((0, environmentChain))
 
     MConstant* functionOperand() const {
@@ -8870,19 +8891,20 @@ class MLambdaArrow
     const LambdaFunctionInfo info_;
 
     MLambdaArrow(TempAllocator& alloc, CompilerConstraintList* constraints, MDefinition* envChain,
                  MDefinition* newTarget, MConstant* cst)
       : MTernaryInstruction(classOpcode, envChain, newTarget, cst),
         info_(&cst->toObject().as<JSFunction>())
     {
         setResultType(MIRType::Object);
-        MOZ_ASSERT(!ObjectGroup::useSingletonForClone(info().fun));
-        if (!info().fun->isSingleton())
-            setResultTypeSet(MakeSingletonTypeSet(alloc, constraints, info().fun));
+        JSFunction* fun = info().funUnsafe();
+        MOZ_ASSERT(!ObjectGroup::useSingletonForClone(fun));
+        if (!fun->isSingleton())
+            setResultTypeSet(MakeSingletonTypeSet(alloc, constraints, fun));
     }
 
   public:
     INSTRUCTION_HEADER(LambdaArrow)
     TRIVIAL_NEW_WRAPPERS_WITH_ALLOC
     NAMED_OPERANDS((0, environmentChain), (1, newTargetDef))
 
     MConstant* functionOperand() const {
--- a/js/src/jit/RegisterAllocator.h
+++ b/js/src/jit/RegisterAllocator.h
@@ -351,22 +351,19 @@ class RegisterAllocator
         return outputOf(ins);
     }
 
     void dumpInstructions();
 
   public:
     template<typename TakeableSet>
     static void takeWasmRegisters(TakeableSet& regs) {
-#if defined(JS_CODEGEN_X64) || defined(JS_CODEGEN_ARM) || \
+#if defined(JS_CODEGEN_X64) || defined(JS_CODEGEN_ARM) || defined(JS_CODEGEN_ARM64) || \
     defined(JS_CODEGEN_MIPS32) || defined(JS_CODEGEN_MIPS64)
             regs.take(HeapReg);
-#elif defined(JS_CODEGEN_ARM64)
-            regs.take(HeapReg);
-            regs.take(HeapLenReg);
 #endif
             regs.take(FramePointer);
     }
 };
 
 static inline AnyRegister
 GetFixedRegister(const LDefinition* def, const LUse* use)
 {
--- a/js/src/jit/Snapshots.cpp
+++ b/js/src/jit/Snapshots.cpp
@@ -259,17 +259,17 @@ RValueAllocation::layoutFromMode(Mode mo
 
         if (mode >= TYPED_REG_MIN && mode <= TYPED_REG_MAX)
             return regLayout;
         if (mode >= TYPED_STACK_MIN && mode <= TYPED_STACK_MAX)
             return stackLayout;
       }
     }
 
-    MOZ_CRASH("Wrong mode type?");
+    MOZ_CRASH_UNSAFE_PRINTF("Unexpected mode: 0x%x", mode);
 }
 
 // Pad serialized RValueAllocations by a multiple of X bytes in the allocation
 // buffer.  By padding serialized value allocations, we are building an
 // indexable table of elements of X bytes, and thus we can safely divide any
 // offset within the buffer by X to obtain an index.
 //
 // By padding, we are loosing space within the allocation buffer, but we
--- a/js/src/jit/Snapshots.h
+++ b/js/src/jit/Snapshots.h
@@ -298,16 +298,19 @@ class RValueAllocation
     }
 
     void writeHeader(CompactBufferWriter& writer, JSValueType type, uint32_t regCode) const;
   public:
     static RValueAllocation read(CompactBufferReader& reader);
     void write(CompactBufferWriter& writer) const;
 
   public:
+    bool valid() const {
+        return mode_ != INVALID;
+    }
     Mode mode() const {
         return Mode(mode_ & MODE_BITS_MASK);
     }
     bool needSideEffect() const {
         return mode_ & RECOVER_SIDE_EFFECT_MASK;
     }
 
     uint32_t index() const {
--- a/js/src/jit/arm64/Architecture-arm64.cpp
+++ b/js/src/jit/arm64/Architecture-arm64.cpp
@@ -66,10 +66,16 @@ FloatRegister::GetPushSizeInBytes(const 
 
 uint32_t
 FloatRegister::getRegisterDumpOffsetInBytes()
 {
     // Although registers are 128-bits wide, only the first 64 need saving per ABI.
     return encoding() * sizeof(double);
 }
 
+uint32_t
+GetARM64Flags()
+{
+    return 0;
+}
+
 } // namespace jit
 } // namespace js
--- a/js/src/jit/arm64/Architecture-arm64.h
+++ b/js/src/jit/arm64/Architecture-arm64.h
@@ -486,12 +486,14 @@ hasUnaliasedDouble()
 // ARM prior to ARMv8 also has doubles that alias multiple floats.
 // Again, ARMv8 is in the clear.
 inline bool
 hasMultiAlias()
 {
     return false;
 }
 
+uint32_t GetARM64Flags();
+
 } // namespace jit
 } // namespace js
 
 #endif // jit_arm64_Architecture_arm64_h
--- a/js/src/jit/arm64/Assembler-arm64.h
+++ b/js/src/jit/arm64/Assembler-arm64.h
@@ -82,17 +82,16 @@ static constexpr Register IntArgReg0 { R
 static constexpr Register IntArgReg1 { Registers::x1 };
 static constexpr Register IntArgReg2 { Registers::x2 };
 static constexpr Register IntArgReg3 { Registers::x3 };
 static constexpr Register IntArgReg4 { Registers::x4 };
 static constexpr Register IntArgReg5 { Registers::x5 };
 static constexpr Register IntArgReg6 { Registers::x6 };
 static constexpr Register IntArgReg7 { Registers::x7 };
 static constexpr Register HeapReg { Registers::x21 };
-static constexpr Register HeapLenReg { Registers::x22 };
 
 // Define unsized Registers.
 #define DEFINE_UNSIZED_REGISTERS(N)  \
 static constexpr Register r##N { Registers::x##N };
 REGISTER_CODE_LIST(DEFINE_UNSIZED_REGISTERS)
 #undef DEFINE_UNSIZED_REGISTERS
 static constexpr Register ip0 { Registers::x16 };
 static constexpr Register ip1 { Registers::x16 };
new file mode 100644
--- /dev/null
+++ b/js/src/jit/arm64/Disassembler-arm64.cpp
@@ -0,0 +1,25 @@
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ * vim: set ts=8 sts=4 et sw=4 tw=99:
+ *
+ * Copyright 2018 Mozilla Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "jit/Disassembler.h"
+
+MOZ_COLD uint8_t*
+js::jit::Disassembler::DisassembleHeapAccess(uint8_t*, js::jit::Disassembler::HeapAccess*)
+{
+    MOZ_CRASH("NYI - asm.js not supported yet on this platform");
+}
--- a/js/src/jit/arm64/MacroAssembler-arm64.h
+++ b/js/src/jit/arm64/MacroAssembler-arm64.h
@@ -2022,39 +2022,16 @@ class MacroAssemblerCompat : public vixl
         const ARMRegister scratch32 = temps.AcquireW();
         MOZ_ASSERT(scratch32.asUnsized() != addr.base);
 
         load32(addr, scratch32.asUnsized());
         Add(scratch32, scratch32, Operand(1));
         store32(scratch32.asUnsized(), addr);
     }
 
-    void BoundsCheck(Register ptrReg, Label* onFail, vixl::CPURegister zeroMe = vixl::NoReg) {
-        // use tst rather than Tst to *ensure* that a single instrution is generated.
-        Cmp(ARMRegister(ptrReg, 32), ARMRegister(HeapLenReg, 32));
-        if (!zeroMe.IsNone()) {
-            if (zeroMe.IsRegister()) {
-                Csel(ARMRegister(zeroMe),
-                     ARMRegister(zeroMe),
-                     Operand(zeroMe.Is32Bits() ? vixl::wzr : vixl::xzr),
-                     Assembler::Below);
-            } else if (zeroMe.Is32Bits()) {
-                vixl::UseScratchRegisterScope temps(this);
-                const ARMFPRegister scratchFloat = temps.AcquireS();
-                Fmov(scratchFloat, JS::GenericNaN());
-                Fcsel(ARMFPRegister(zeroMe), ARMFPRegister(zeroMe), scratchFloat, Assembler::Below);
-            } else {
-                vixl::UseScratchRegisterScope temps(this);
-                const ARMFPRegister scratchDouble = temps.AcquireD();
-                Fmov(scratchDouble, JS::GenericNaN());
-                Fcsel(ARMFPRegister(zeroMe), ARMFPRegister(zeroMe), scratchDouble, Assembler::Below);
-            }
-        }
-        B(onFail, Assembler::AboveOrEqual);
-    }
     void breakpoint();
 
     // Emits a simulator directive to save the current sp on an internal stack.
     void simulatorMarkSP() {
 #ifdef JS_SIMULATOR_ARM64
         svc(vixl::kMarkStackPointer);
 #endif
     }
--- a/js/src/jit/shared/CodeGenerator-shared.cpp
+++ b/js/src/jit/shared/CodeGenerator-shared.cpp
@@ -447,23 +447,25 @@ CodeGeneratorShared::encodeAllocation(LS
             masm.propagateOOM(graph.addConstantToPool(constant->toJSValue(), &index));
             alloc = RValueAllocation::ConstantPool(index);
             break;
         }
 
         JSValueType valueType =
             (type == MIRType::ObjectOrNull) ? JSVAL_TYPE_OBJECT : ValueTypeFromMIRType(type);
 
-        MOZ_ASSERT(payload->isMemory() || payload->isRegister());
+        MOZ_DIAGNOSTIC_ASSERT(payload->isMemory() || payload->isRegister());
         if (payload->isMemory())
             alloc = RValueAllocation::Typed(valueType, ToStackIndex(payload));
         else if (payload->isGeneralReg())
             alloc = RValueAllocation::Typed(valueType, ToRegister(payload));
         else if (payload->isFloatReg())
             alloc = RValueAllocation::Double(ToFloatRegister(payload));
+        else
+            MOZ_CRASH("Unexpected payload type.");
         break;
       }
       case MIRType::Float32:
       case MIRType::Int8x16:
       case MIRType::Int16x8:
       case MIRType::Int32x4:
       case MIRType::Float32x4:
       case MIRType::Bool8x16:
@@ -536,16 +538,17 @@ CodeGeneratorShared::encodeAllocation(LS
         if (payload->isRegister())
             alloc = RValueAllocation::Untyped(ToRegister(payload));
         else
             alloc = RValueAllocation::Untyped(ToStackIndex(payload));
 #endif
         break;
       }
     }
+    MOZ_DIAGNOSTIC_ASSERT(alloc.valid());
 
     // This set an extra bit as part of the RValueAllocation, such that we know
     // that recover instruction have to be executed without wrapping the
     // instruction in a no-op recover instruction.
     if (mir->isIncompleteObject())
         alloc.setNeedSideEffect();
 
     masm.propagateOOM(snapshots_.add(alloc));
--- a/js/src/jit/shared/LIR-shared.h
+++ b/js/src/jit/shared/LIR-shared.h
@@ -6934,17 +6934,17 @@ class LGetPropertyPolymorphicV : public 
         setOperand(0, obj);
     }
     const LAllocation* obj() {
         return getOperand(0);
     }
     const MGetPropertyPolymorphic* mir() const {
         return mir_->toGetPropertyPolymorphic();
     }
-    virtual const char* extraName() const {
+    const char* extraName() const {
         return PropertyNameToExtraName(mir()->name());
     }
 };
 
 // Emit code to load a typed value from an object's slots if its shape matches
 // one of the shapes observed by the baseline IC, else bails out.
 class LGetPropertyPolymorphicT : public LInstructionHelper<1, 1, 1>
 {
@@ -6959,17 +6959,17 @@ class LGetPropertyPolymorphicT : public 
         return getOperand(0);
     }
     const LDefinition* temp() {
         return getTemp(0);
     }
     const MGetPropertyPolymorphic* mir() const {
         return mir_->toGetPropertyPolymorphic();
     }
-    virtual const char* extraName() const {
+    const char* extraName() const {
         return PropertyNameToExtraName(mir()->name());
     }
 };
 
 // Emit code to store a boxed value to an object's slots if its shape matches
 // one of the shapes observed by the baseline IC, else bails out.
 class LSetPropertyPolymorphicV : public LInstructionHelper<0, 1 + BOX_PIECES, 1>
 {
--- a/js/src/jit/x86-shared/Assembler-x86-shared.h
+++ b/js/src/jit/x86-shared/Assembler-x86-shared.h
@@ -3680,19 +3680,19 @@ class AssemblerX86Shared : public Assemb
 
     static void PatchWrite_Imm32(CodeLocationLabel dataLabel, Imm32 toWrite) {
         *((int32_t*) dataLabel.raw() - 1) = toWrite.value;
     }
 
     static void PatchDataWithValueCheck(CodeLocationLabel data, PatchedImmPtr newData,
                                         PatchedImmPtr expectedData) {
         // The pointer given is a pointer to *after* the data.
-        uintptr_t* ptr = ((uintptr_t*) data.raw()) - 1;
-        MOZ_ASSERT(*ptr == (uintptr_t)expectedData.value);
-        *ptr = (uintptr_t)newData.value;
+        uint8_t* ptr = data.raw() - sizeof(uintptr_t);
+        MOZ_ASSERT(mozilla::LittleEndian::readUintptr(ptr) == uintptr_t(expectedData.value));
+        mozilla::LittleEndian::writeUintptr(ptr, uintptr_t(newData.value));
     }
     static void PatchDataWithValueCheck(CodeLocationLabel data, ImmPtr newData, ImmPtr expectedData) {
         PatchDataWithValueCheck(data, PatchedImmPtr(newData.value), PatchedImmPtr(expectedData.value));
     }
 
     static uint32_t NopSize() {
         return 1;
     }
--- a/js/src/moz.build
+++ b/js/src/moz.build
@@ -514,16 +514,17 @@ elif CONFIG['JS_CODEGEN_ARM']:
         ]
 elif CONFIG['JS_CODEGEN_ARM64']:
     UNIFIED_SOURCES += [
         'jit/arm64/Architecture-arm64.cpp',
         'jit/arm64/Assembler-arm64.cpp',
         'jit/arm64/Bailouts-arm64.cpp',
         'jit/arm64/BaselineIC-arm64.cpp',
         'jit/arm64/CodeGenerator-arm64.cpp',
+        'jit/arm64/Disassembler-arm64.cpp',
         'jit/arm64/Lowering-arm64.cpp',
         'jit/arm64/MacroAssembler-arm64.cpp',
         'jit/arm64/MoveEmitter-arm64.cpp',
         'jit/arm64/SharedIC-arm64.cpp',
         'jit/arm64/Trampoline-arm64.cpp',
         'jit/arm64/vixl/Assembler-vixl.cpp',
         'jit/arm64/vixl/Cpu-vixl.cpp',
         'jit/arm64/vixl/Decoder-vixl.cpp',
@@ -647,21 +648,23 @@ DIRS += [
 FINAL_LIBRARY = 'js'
 
 if CONFIG['NIGHTLY_BUILD']:
     DEFINES['ENABLE_BINARYDATA'] = True
     DEFINES['ENABLE_SIMD'] = True
     DEFINES['ENABLE_WASM_SATURATING_TRUNC_OPS'] = True
     DEFINES['ENABLE_WASM_SIGNEXTEND_OPS'] = True
     DEFINES['ENABLE_WASM_THREAD_OPS'] = True
-    # An experiment we want to run on Nightly: Can we change the JS
-    # representation of an exported global from the global's value
-    # to an instance of WebAssembly.Global without breaking existing
-    # wasm content?
-    DEFINES['ENABLE_WASM_GLOBAL'] = True
+
+# An experiment we want to run on Nightly and early Beta: Can we change the JS
+# representation of an exported global from the global's value to an instance
+# of WebAssembly.Global without breaking existing wasm content?
+#
+# Additionally guarded by EARLY_BETA_OR_EARLIER in the code.
+DEFINES['ENABLE_WASM_GLOBAL'] = True
 
 if CONFIG['JS_BUILD_BINAST']:
     # Using SOURCES as UNIFIED_SOURCES causes mysterious bugs on 32-bit platforms.
     # These parts of BinAST are designed only to test evolutions of the
     # specification.
     SOURCES += ['frontend/BinTokenReaderTester.cpp']
     # These parts of BinAST should eventually move to release.
     SOURCES += [
@@ -674,17 +677,17 @@ if CONFIG['JS_BUILD_BINAST']:
         SOURCES['frontend/BinSource.cpp'].flags += ['-fsanitize-coverage=trace-pc-guard']
         SOURCES['frontend/BinToken.cpp'].flags += ['-fsanitize-coverage=trace-pc-guard']
         SOURCES['frontend/BinTokenReaderTester.cpp'].flags += ['-fsanitize-coverage=trace-pc-guard']
 
 # Wasm code should use WASM_HUGE_MEMORY instead of JS_CODEGEN_X64
 # so that it is easy to use the huge-mapping optimization for other
 # 64-bit platforms in the future.
 
-if CONFIG['JS_CODEGEN_X64']:
+if CONFIG['JS_CODEGEN_X64'] or CONFIG['JS_CODEGEN_ARM64']:
     DEFINES['WASM_HUGE_MEMORY'] = True
 
 if CONFIG['MOZ_DEBUG'] or CONFIG['NIGHTLY_BUILD']:
     DEFINES['JS_CACHEIR_SPEW'] = True
 
 # Also set in shell/moz.build
 DEFINES['ENABLE_SHARED_ARRAY_BUFFER'] = True
 
--- a/js/src/old-configure.in
+++ b/js/src/old-configure.in
@@ -1546,16 +1546,17 @@ AC_DEFINE_UNQUOTED(JS_DEFAULT_JITREPORT_
 dnl ========================================================
 dnl =
 dnl = Misc. Options
 dnl =
 dnl ========================================================
 MOZ_ARG_HEADER(Misc. Options)
 
 if test -z "$SKIP_COMPILER_CHECKS"; then
+
 dnl ========================================================
 dnl =
 dnl = Compiler Options
 dnl =
 dnl ========================================================
 MOZ_ARG_HEADER(Compiler Options)
 
 dnl ========================================================
@@ -1820,16 +1821,29 @@ AC_CHECK_FUNCS(posix_fadvise posix_fallo
 dnl Set various defines and substitutions
 dnl ========================================================
 
 AC_SUBST(MOZ_DEV_EDITION)
 if test -n "$MOZ_DEV_EDITION"; then
     AC_DEFINE(MOZ_DEV_EDITION)
 fi
 
+# Allow influencing configure with a defines.sh script.
+. "${srcdir}/build/defines.sh"
+
+# If we're not building a release build, define EARLY_BETA_OR_EARLIER if it is
+# set in defines.sh
+if test "$BUILDING_RELEASE"; then
+  # Override value in defines.sh, if any
+  EARLY_BETA_OR_EARLIER=
+elif test "$EARLY_BETA_OR_EARLIER"; then
+  AC_DEFINE(EARLY_BETA_OR_EARLIER)
+fi
+AC_SUBST(EARLY_BETA_OR_EARLIER)
+
 dnl ========================================================
 dnl JavaScript shell
 dnl ========================================================
 
 MOZ_CHECK_ALLOCATOR
 
 AC_CHECK_FUNCS(localeconv)
 
--- a/js/src/vm/JSScript-inl.h
+++ b/js/src/vm/JSScript-inl.h
@@ -106,31 +106,37 @@ JSScript::ensureNonLazyCanonicalFunction
     JSFunction* fun = function();
     if (fun && fun->isInterpretedLazy())
         functionDelazifying();
 }
 
 inline JSFunction*
 JSScript::getFunction(size_t index)
 {
-    JSFunction* fun = &getObject(index)->as<JSFunction>();
+    JSObject* obj = getObject(index);
+    MOZ_RELEASE_ASSERT(obj->is<JSFunction>(), "Script object is not JSFunction");
+    JSFunction* fun = &obj->as<JSFunction>();
     MOZ_ASSERT_IF(fun->isNative(), IsAsmJSModuleNative(fun->native()));
     return fun;
 }
 
 inline js::RegExpObject*
 JSScript::getRegExp(size_t index)
 {
-    return &getObject(index)->as<js::RegExpObject>();
+    JSObject* obj = getObject(index);
+    MOZ_RELEASE_ASSERT(obj->is<js::RegExpObject>(), "Script object is not RegExpObject");
+    return &obj->as<js::RegExpObject>();
 }
 
 inline js::RegExpObject*
 JSScript::getRegExp(jsbytecode* pc)
 {
-    return &getObject(pc)->as<js::RegExpObject>();
+    JSObject* obj = getObject(pc);
+    MOZ_RELEASE_ASSERT(obj->is<js::RegExpObject>(), "Script object is not RegExpObject");
+    return &obj->as<js::RegExpObject>();
 }
 
 inline js::GlobalObject&
 JSScript::global() const
 {
     /*
      * A JSScript always marks its compartment's global (via bindings) so we
      * can assert that maybeGlobal is non-null here.
--- a/js/src/vm/StructuredClone.cpp
+++ b/js/src/vm/StructuredClone.cpp
@@ -2370,31 +2370,32 @@ JSStructuredCloneReader::startRead(Mutab
 bool
 JSStructuredCloneReader::readHeader()
 {
     uint32_t tag, data;
     if (!in.getPair(&tag, &data))
         return in.reportTruncated();
 
     if (tag != SCTAG_HEADER) {
-        // Old structured clone buffer. We must have read it from disk or
-        // somewhere, so we can assume it's scope-compatible.
+        // Old structured clone buffer. We must have read it from disk.
+        storedScope = JS::StructuredCloneScope::DifferentProcess;
         return true;
     }
 
     MOZ_ALWAYS_TRUE(in.readPair(&tag, &data));
+    storedScope = JS::StructuredCloneScope(data);
+
     if (data != uint32_t(JS::StructuredCloneScope::SameProcessSameThread) &&
         data != uint32_t(JS::StructuredCloneScope::SameProcessDifferentThread) &&
         data != uint32_t(JS::StructuredCloneScope::DifferentProcess))
     {
         JS_ReportErrorNumberASCII(context(), GetErrorMessage, nullptr, JSMSG_SC_BAD_SERIALIZED_DATA,
                                   "invalid structured clone scope");
         return false;
     }
-    storedScope = JS::StructuredCloneScope(data);
     if (storedScope < allowedScope) {
         JS_ReportErrorNumberASCII(context(), GetErrorMessage, nullptr, JSMSG_SC_BAD_SERIALIZED_DATA,
                                   "incompatible structured clone scope");
         return false;
     }
 
     return true;
 }
--- a/js/src/wasm/WasmJS.cpp
+++ b/js/src/wasm/WasmJS.cpp
@@ -248,17 +248,17 @@ GetImports(JSContext* cx,
             break;
 
           case DefinitionKind::Global:
             Val val;
             const GlobalDesc& global = globals[globalIndex++];
             MOZ_ASSERT(global.importIndex() == globalIndex - 1);
             MOZ_ASSERT(!global.isMutable());
 
-#ifdef ENABLE_WASM_GLOBAL
+#if defined(ENABLE_WASM_GLOBAL) && defined(EARLY_BETA_OR_EARLIER)
             if (v.isObject() && v.toObject().is<WasmGlobalObject>())
                 v.set(v.toObject().as<WasmGlobalObject>().value());
 #endif
 
             if (global.type() == ValType::I64) {
                 JS_ReportErrorNumberUTF8(cx, GetErrorMessage, nullptr, JSMSG_WASM_BAD_I64_LINK);
                 return false;
             }
@@ -1930,17 +1930,17 @@ Table&
 WasmTableObject::table() const
 {
     return *(Table*)getReservedSlot(TABLE_SLOT).toPrivate();
 }
 
 // ============================================================================
 // WebAssembly.global class and methods
 
-#ifdef ENABLE_WASM_GLOBAL
+#if defined(ENABLE_WASM_GLOBAL) && defined(EARLY_BETA_OR_EARLIER)
 
 const ClassOps WasmGlobalObject::classOps_ =
 {
     nullptr, /* addProperty */
     nullptr, /* delProperty */
     nullptr, /* enumerate */
     nullptr, /* newEnumerate */
     nullptr, /* resolve */
@@ -2123,17 +2123,17 @@ WasmGlobalObject::isMutable() const
 }
 
 Value
 WasmGlobalObject::value() const
 {
     return getReservedSlot(VALUE_SLOT);
 }
 
-#endif // ENABLE_WASM_GLOBAL
+#endif // ENABLE_WASM_GLOBAL && EARLY_BETA_OR_EARLIER
 
 // ============================================================================
 // WebAssembly class and static methods
 
 static bool
 WebAssembly_toSource(JSContext* cx, unsigned argc, Value* vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
@@ -2963,28 +2963,28 @@ js::InitWebAssemblyClass(JSContext* cx, 
     RootedObject wasm(cx, NewObjectWithGivenProto(cx, &WebAssemblyClass, proto, SingletonObject));
     if (!wasm)
         return nullptr;
 
     if (!JS_DefineFunctions(cx, wasm, WebAssembly_static_methods))
         return nullptr;
 
     RootedObject moduleProto(cx), instanceProto(cx), memoryProto(cx), tableProto(cx);
-#ifdef ENABLE_WASM_GLOBAL
+#if defined(ENABLE_WASM_GLOBAL) && defined(EARLY_BETA_OR_EARLIER)
     RootedObject globalProto(cx);
 #endif
     if (!InitConstructor<WasmModuleObject>(cx, wasm, "Module", &moduleProto))
         return nullptr;
     if (!InitConstructor<WasmInstanceObject>(cx, wasm, "Instance", &instanceProto))
         return nullptr;
     if (!InitConstructor<WasmMemoryObject>(cx, wasm, "Memory", &memoryProto))
         return nullptr;
     if (!InitConstructor<WasmTableObject>(cx, wasm, "Table", &tableProto))
         return nullptr;
-#ifdef ENABLE_WASM_GLOBAL
+#if defined(ENABLE_WASM_GLOBAL) && defined(EARLY_BETA_OR_EARLIER)
     if (!InitConstructor<WasmGlobalObject>(cx, wasm, "Global", &globalProto))
         return nullptr;
 #endif
     if (!InitErrorClass(cx, wasm, "CompileError", JSEXN_WASMCOMPILEERROR))
         return nullptr;
     if (!InitErrorClass(cx, wasm, "LinkError", JSEXN_WASMLINKERROR))
         return nullptr;
     if (!InitErrorClass(cx, wasm, "RuntimeError", JSEXN_WASMRUNTIMEERROR))
@@ -2997,16 +2997,16 @@ js::InitWebAssemblyClass(JSContext* cx, 
 
     if (!JS_DefineProperty(cx, global, js_WebAssembly_str, wasm, JSPROP_RESOLVING))
         return nullptr;
 
     global->setPrototype(JSProto_WasmModule, ObjectValue(*moduleProto));
     global->setPrototype(JSProto_WasmInstance, ObjectValue(*instanceProto));
     global->setPrototype(JSProto_WasmMemory, ObjectValue(*memoryProto));
     global->setPrototype(JSProto_WasmTable, ObjectValue(*tableProto));
-#ifdef ENABLE_WASM_GLOBAL
+#if defined(ENABLE_WASM_GLOBAL) && defined(EARLY_BETA_OR_EARLIER)
     global->setPrototype(JSProto_WasmGlobal, ObjectValue(*globalProto));
 #endif
     global->setConstructor(JSProto_WebAssembly, ObjectValue(*wasm));
 
     MOZ_ASSERT(global->isStandardClassResolved(JSProto_WebAssembly));
     return wasm;
 }
--- a/js/src/wasm/WasmJS.h
+++ b/js/src/wasm/WasmJS.h
@@ -280,17 +280,17 @@ class WasmTableObject : public NativeObj
 
     // Note that, after creation, a WasmTableObject's table() is not initialized
     // and must be initialized before use.
 
     static WasmTableObject* create(JSContext* cx, const wasm::Limits& limits);
     wasm::Table& table() const;
 };
 
-#ifdef ENABLE_WASM_GLOBAL
+#if defined(ENABLE_WASM_GLOBAL) && defined(EARLY_BETA_OR_EARLIER)
 
 // The class of WebAssembly.Global.  A WasmGlobalObject holds either the value
 // of an immutable wasm global or the cell of a mutable wasm global.
 
 class WasmGlobalObject : public NativeObject
 {
     static const unsigned TYPE_SLOT = 0;
     static const unsigned MUTABLE_SLOT = 1;
@@ -314,13 +314,13 @@ class WasmGlobalObject : public NativeOb
     static WasmGlobalObject* create(JSContext* cx, wasm::ValType type, bool isMutable,
                                     HandleValue value);
 
     wasm::ValType type() const;
     bool isMutable() const;
     Value value() const;
 };
 
-#endif // ENABLE_WASM_GLOBAL
+#endif // ENABLE_WASM_GLOBAL && EARLY_BETA_OR_EARLIER
 
 } // namespace js
 
 #endif // wasm_js_h
--- a/js/src/wasm/WasmModule.cpp
+++ b/js/src/wasm/WasmModule.cpp
@@ -1011,17 +1011,17 @@ GetGlobalExport(JSContext* cx, const Glo
 
     if (val.type() == ValType::I64) {
         JS_ReportErrorNumberUTF8(cx, GetErrorMessage, nullptr, JSMSG_WASM_BAD_I64_LINK);
         return false;
     }
 
     ToJSValue(val, jsval);
 
-#ifdef ENABLE_WASM_GLOBAL
+#if defined(ENABLE_WASM_GLOBAL) && defined(EARLY_BETA_OR_EARLIER)
     Rooted<WasmGlobalObject*> go(cx, WasmGlobalObject::create(cx, ValType::I32, false, jsval));
     if (!go)
         return false;
     jsval.setObject(*go);
 #endif
 
     return true;
 }
--- a/js/src/wasm/WasmSignalHandlers.cpp
+++ b/js/src/wasm/WasmSignalHandlers.cpp
@@ -620,16 +620,17 @@ StoreValueFromGPReg(SharedMem<void*> add
 
 MOZ_COLD static void
 StoreValueFromGPImm(SharedMem<void*> addr, size_t size, int32_t imm)
 {
     MOZ_RELEASE_ASSERT(size <= sizeof(imm));
     AtomicOperations::memcpySafeWhenRacy(addr, static_cast<void*>(&imm), size);
 }
 
+#if defined(JS_CODEGEN_X64)
 # if !defined(XP_DARWIN)
 MOZ_COLD static void*
 AddressOfFPRegisterSlot(CONTEXT* context, FloatRegisters::Encoding encoding)
 {
     switch (encoding) {
       case X86Encoding::xmm0:  return &XMM_sig(context, 0);
       case X86Encoding::xmm1:  return &XMM_sig(context, 1);
       case X86Encoding::xmm2:  return &XMM_sig(context, 2);
@@ -721,16 +722,29 @@ AddressOfGPRegisterSlot(EMULATOR_CONTEXT
       case X86Encoding::r13: return &context->thread.__r13;
       case X86Encoding::r14: return &context->thread.__r14;
       case X86Encoding::r15: return &context->thread.__r15;
       default: break;
     }
     MOZ_CRASH();
 }
 # endif  // !XP_DARWIN
+#elif defined(JS_CODEGEN_ARM64)
+MOZ_COLD static void*
+AddressOfFPRegisterSlot(EMULATOR_CONTEXT* context, FloatRegisters::Encoding encoding)
+{
+    MOZ_CRASH("NYI - asm.js not supported yet on this platform");
+}
+
+MOZ_COLD static void*
+AddressOfGPRegisterSlot(EMULATOR_CONTEXT* context, Registers::Code code)
+{
+    MOZ_CRASH("NYI - asm.js not supported yet on this platform");
+}
+#endif
 
 MOZ_COLD static void
 SetRegisterToCoercedUndefined(EMULATOR_CONTEXT* context, size_t size,
                               const Disassembler::OtherOperand& value)
 {
     if (value.kind() == Disassembler::OtherOperand::FPR)
         SetFPRegToNaN(size, AddressOfFPRegisterSlot(context, value.fpr()));
     else
--- a/js/src/wasm/WasmTypes.cpp
+++ b/js/src/wasm/WasmTypes.cpp
@@ -27,21 +27,28 @@
 
 using namespace js;
 using namespace js::jit;
 using namespace js::wasm;
 
 using mozilla::IsPowerOfTwo;
 using mozilla::MakeEnumeratedRange;
 
-// A sanity check.  We have only tested WASM_HUGE_MEMORY on x64, and only tested
-// x64 with WASM_HUGE_MEMORY.
+// We have only tested x64 with WASM_HUGE_MEMORY.
+
+#if defined(JS_CODEGEN_X64) && !defined(WASM_HUGE_MEMORY)
+#    error "Not an expected configuration"
+#endif
 
-#if defined(WASM_HUGE_MEMORY) != defined(JS_CODEGEN_X64)
-#  error "Not an expected configuration"
+// We have only tested WASM_HUGE_MEMORY on x64 and arm64.
+
+#if defined(WASM_HUGE_MEMORY)
+#  if !(defined(JS_CODEGEN_X64) || defined(JS_CODEGEN_ARM64))
+#    error "Not an expected configuration"
+#  endif
 #endif
 
 // Another sanity check.
 
 static_assert(MaxMemoryInitialPages <= ArrayBufferObject::MaxBufferByteLength / PageSize,
               "Memory sizing constraint");
 
 void
@@ -97,30 +104,32 @@ static uint32_t
 GetCPUID()
 {
     enum Arch {
         X86 = 0x1,
         X64 = 0x2,
         ARM = 0x3,
         MIPS = 0x4,
         MIPS64 = 0x5,
+        ARM64 = 0x6,
         ARCH_BITS = 3
     };
 
 #if defined(JS_CODEGEN_X86)
     MOZ_ASSERT(uint32_t(jit::CPUInfo::GetSSEVersion()) <= (UINT32_MAX >> ARCH_BITS));
     return X86 | (uint32_t(jit::CPUInfo::GetSSEVersion()) << ARCH_BITS);
 #elif defined(JS_CODEGEN_X64)
     MOZ_ASSERT(uint32_t(jit::CPUInfo::GetSSEVersion()) <= (UINT32_MAX >> ARCH_BITS));
     return X64 | (uint32_t(jit::CPUInfo::GetSSEVersion()) << ARCH_BITS);
 #elif defined(JS_CODEGEN_ARM)
     MOZ_ASSERT(jit::GetARMFlags() <= (UINT32_MAX >> ARCH_BITS));
     return ARM | (jit::GetARMFlags() << ARCH_BITS);
 #elif defined(JS_CODEGEN_ARM64)
-    MOZ_CRASH("not enabled");
+    MOZ_ASSERT(jit::GetARM64Flags() <= (UINT32_MAX >> ARCH_BITS));
+    return ARM64 | (jit::GetARM64Flags() << ARCH_BITS);
 #elif defined(JS_CODEGEN_MIPS32)
     MOZ_ASSERT(jit::GetMIPSFlags() <= (UINT32_MAX >> ARCH_BITS));
     return MIPS | (jit::GetMIPSFlags() << ARCH_BITS);
 #elif defined(JS_CODEGEN_MIPS64)
     MOZ_ASSERT(jit::GetMIPSFlags() <= (UINT32_MAX >> ARCH_BITS));
     return MIPS64 | (jit::GetMIPSFlags() << ARCH_BITS);
 #elif defined(JS_CODEGEN_NONE)
     return 0;
--- a/layout/base/RestyleManager.cpp
+++ b/layout/base/RestyleManager.cpp
@@ -202,17 +202,17 @@ WhitespaceOnly(const CharT* aBuffer, siz
 }
 
 template<typename CharT>
 bool
 WhitespaceOnlyChangedOnAppend(const CharT* aBuffer,
                               size_t aOldLength,
                               size_t aNewLength)
 {
-  MOZ_ASSERT(aOldLength < aNewLength);
+  MOZ_ASSERT(aOldLength <= aNewLength);
   if (!WhitespaceOnly(aBuffer, aOldLength)) {
     // The old text was already not whitespace-only.
     return false;
   }
 
   return !WhitespaceOnly(aBuffer + aOldLength, aNewLength - aOldLength);
 }
 
new file mode 100644
--- /dev/null
+++ b/layout/base/crashtests/1442506.html
@@ -0,0 +1,10 @@
+<script>
+function go() {
+  var b = window.getSelection();
+  var c = document.getSelection();
+  b.setBaseAndExtent(document.getElementById("a"), 0, document.body.firstChild, 1);
+  c.deleteFromDocument();
+}
+</script>
+<body onload=go()>
+<p id="a">
--- a/layout/base/crashtests/crashtests.list
+++ b/layout/base/crashtests/crashtests.list
@@ -520,8 +520,9 @@ load 1420533.html
 load 1425959.html
 load 1425893.html
 load 1428353.html
 pref(dom.webcomponents.shadowdom.enabled,true) load 1429088.html
 load 1429961.html
 load 1435015.html
 load 1429962.html
 pref(dom.webcomponents.shadowdom.enabled,true) load 1439016.html
+load 1442506.html
--- a/layout/style/nsCSSValue.cpp
+++ b/layout/style/nsCSSValue.cpp
@@ -2906,17 +2906,17 @@ const nsString&
 css::URLValueData::GetUTF16String() const
 {
   MOZ_ASSERT(NS_IsMainThread());
 
   if (mUsingRustString) {
     nsDependentCSubstring rust = GetRustString();
     nsString converted = NS_ConvertUTF8toUTF16(rust);
     Servo_ReleaseArcStringData(&mStrings.mRustString);
-    mStrings.mString = converted;
+    new (&mStrings) RustOrGeckoString(converted);
     mUsingRustString = false;
   }
   return mStrings.mString;
 }
 
 nsString
 css::URLValueData::GetUTF16StringForAnyThread() const
 {
--- a/memory/mozalloc/mozalloc.h
+++ b/memory/mozalloc/mozalloc.h
@@ -129,25 +129,22 @@ MOZ_END_EXTERN_C
  * Suppress build warning spam (bug 578546).
  */
 #if _MSC_VER < 1912
 #define MOZALLOC_THROW_IF_HAS_EXCEPTIONS
 #else
 #define MOZALLOC_THROW_IF_HAS_EXCEPTIONS throw()
 #endif
 #define MOZALLOC_THROW_BAD_ALLOC_IF_HAS_EXCEPTIONS
-#elif __cplusplus >= 201103
+#else
 /*
  * C++11 has deprecated exception-specifications in favour of |noexcept|.
  */
 #define MOZALLOC_THROW_IF_HAS_EXCEPTIONS noexcept(true)
 #define MOZALLOC_THROW_BAD_ALLOC_IF_HAS_EXCEPTIONS noexcept(false)
-#else
-#define MOZALLOC_THROW_IF_HAS_EXCEPTIONS throw()
-#define MOZALLOC_THROW_BAD_ALLOC_IF_HAS_EXCEPTIONS throw(std::bad_alloc)
 #endif
 
 #define MOZALLOC_THROW_BAD_ALLOC MOZALLOC_THROW_BAD_ALLOC_IF_HAS_EXCEPTIONS
 
 MOZALLOC_EXPORT_NEW
 #if defined(__GNUC__) && !defined(__clang__) && defined(__SANITIZE_ADDRESS__)
 /* gcc's asan somehow doesn't like always_inline on this function. */
 __attribute__((gnu_inline)) inline
--- a/mfbt/EndianUtils.h
+++ b/mfbt/EndianUtils.h
@@ -4,17 +4,19 @@
  * 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/. */
 
 /* Functions for reading and writing integers in various endiannesses. */
 
 /*
  * The classes LittleEndian and BigEndian expose static methods for
  * reading and writing 16-, 32-, and 64-bit signed and unsigned integers
- * in their respective endianness.  The naming scheme is:
+ * in their respective endianness.  The addresses read from or written
+ * to may be misaligned (although misaligned accesses may incur
+ * architecture-specific performance costs).  The naming scheme is:
  *
  * {Little,Big}Endian::{read,write}{Uint,Int}<bitsize>
  *
  * For instance, LittleEndian::readInt32 will read a 32-bit signed
  * integer from memory in little endian format.  Similarly,
  * BigEndian::writeUint16 will write a 16-bit unsigned integer to memory
  * in big-endian format.
  *
@@ -356,16 +358,22 @@ protected:
   }
 
   /** Read a uint64_t in ThisEndian endianness from |aPtr| and return it. */
   static MOZ_MUST_USE uint64_t readUint64(const void* aPtr)
   {
     return read<uint64_t>(aPtr);
   }
 
+  /** Read a uintptr_t in ThisEndian endianness from |aPtr| and return it. */
+  static MOZ_MUST_USE uintptr_t readUintptr(const void* aPtr)
+  {
+    return read<uintptr_t>(aPtr);
+  }
+
   /** Read an int16_t in ThisEndian endianness from |aPtr| and return it. */
   static MOZ_MUST_USE int16_t readInt16(const void* aPtr)
   {
     return read<int16_t>(aPtr);
   }
 
   /** Read an int32_t in ThisEndian endianness from |aPtr| and return it. */
   static MOZ_MUST_USE int32_t readInt32(const void* aPtr)
@@ -374,16 +382,22 @@ protected:
   }
 
   /** Read an int64_t in ThisEndian endianness from |aPtr| and return it. */
   static MOZ_MUST_USE int64_t readInt64(const void* aPtr)
   {
     return read<int64_t>(aPtr);
   }
 
+  /** Read an intptr_t in ThisEndian endianness from |aPtr| and return it. */
+  static MOZ_MUST_USE intptr_t readIntptr(const void* aPtr)
+  {
+    return read<intptr_t>(aPtr);
+  }
+
   /** Write |aValue| to |aPtr| using ThisEndian endianness. */
   static void writeUint16(void* aPtr, uint16_t aValue)
   {
     write(aPtr, aValue);
   }
 
   /** Write |aValue| to |aPtr| using ThisEndian endianness. */
   static void writeUint32(void* aPtr, uint32_t aValue)
@@ -393,16 +407,22 @@ protected:
 
   /** Write |aValue| to |aPtr| using ThisEndian endianness. */
   static void writeUint64(void* aPtr, uint64_t aValue)
   {
     write(aPtr, aValue);
   }
 
   /** Write |aValue| to |aPtr| using ThisEndian endianness. */
+  static void writeUintptr(void* aPtr, uintptr_t aValue)
+  {
+    write(aPtr, aValue);
+  }
+
+  /** Write |aValue| to |aPtr| using ThisEndian endianness. */
   static void writeInt16(void* aPtr, int16_t aValue)
   {
     write(aPtr, aValue);
   }
 
   /** Write |aValue| to |aPtr| using ThisEndian endianness. */
   static void writeInt32(void* aPtr, int32_t aValue)
   {
@@ -410,16 +430,22 @@ protected:
   }
 
   /** Write |aValue| to |aPtr| using ThisEndian endianness. */
   static void writeInt64(void* aPtr, int64_t aValue)
   {
     write(aPtr, aValue);
   }
 
+  /** Write |aValue| to |aPtr| using ThisEndian endianness. */
+  static void writeIntptr(void* aPtr, intptr_t aValue)
+  {
+    write(aPtr, aValue);
+  }
+
   /*
    * Converts a value of type T to little-endian format.
    *
    * This function is intended for cases where you have data in your
    * native-endian format and you need it to appear in little-endian
    * format for transmission.
    */
   template<typename T>
@@ -625,25 +651,29 @@ class EndianReadWrite : public Endian<Th
 {
 private:
   typedef Endian<ThisEndian> super;
 
 public:
   using super::readUint16;
   using super::readUint32;
   using super::readUint64;
+  using super::readUintptr;
   using super::readInt16;
   using super::readInt32;
   using super::readInt64;
+  using super::readIntptr;
   using super::writeUint16;
   using super::writeUint32;
   using super::writeUint64;
+  using super::writeUintptr;
   using super::writeInt16;
   using super::writeInt32;
   using super::writeInt64;
+  using super::writeIntptr;
 };
 
 } /* namespace detail */
 
 class LittleEndian final : public detail::EndianReadWrite<detail::Little>
 {};
 
 class BigEndian final : public detail::EndianReadWrite<detail::Big>
--- a/mfbt/tests/TestEndian.cpp
+++ b/mfbt/tests/TestEndian.cpp
@@ -320,94 +320,138 @@ TestBulkInPlaceNoSwap(const T (&aBytes)[
                      Reader<T>::readBE);
 #endif
 }
 
 int
 main()
 {
   static const uint8_t unsigned_bytes[16] = {
-    0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8,
-    0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8
+    0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
+    0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08
   };
   static const int8_t signed_bytes[16] = {
     -0x0f, -0x0e, -0x0d, -0x0c, -0x0b, -0x0a, -0x09, -0x08,
     -0x0f, -0x0e, -0x0d, -0x0c, -0x0b, -0x0a, -0x09, -0x08
   };
   static const uint16_t uint16_values[8] = {
-    0x102, 0x304, 0x506, 0x708, 0x102, 0x304, 0x506, 0x708
+    0x0102, 0x0304, 0x0506, 0x0708, 0x0102, 0x0304, 0x0506, 0x0708
   };
   static const int16_t int16_values[8] = {
     int16_t(0xf1f2), int16_t(0xf3f4), int16_t(0xf5f6), int16_t(0xf7f8),
     int16_t(0xf1f2), int16_t(0xf3f4), int16_t(0xf5f6), int16_t(0xf7f8)
   };
   static const uint32_t uint32_values[4] = {
-    0x1020304, 0x5060708, 0x1020304, 0x5060708
+    0x01020304, 0x05060708, 0x01020304, 0x05060708
   };
   static const int32_t int32_values[4] = {
     int32_t(0xf1f2f3f4), int32_t(0xf5f6f7f8),
     int32_t(0xf1f2f3f4), int32_t(0xf5f6f7f8)
   };
   static const uint64_t uint64_values[2] = {
-    0x102030405060708, 0x102030405060708
+    0x0102030405060708, 0x0102030405060708
   };
   static const int64_t int64_values[2] = {
     int64_t(0xf1f2f3f4f5f6f7f8), int64_t(0xf1f2f3f4f5f6f7f8)
   };
   uint8_t buffer[8];
 
-  MOZ_RELEASE_ASSERT(LittleEndian::readUint16(&unsigned_bytes[0]) == 0x201);
-  MOZ_RELEASE_ASSERT(BigEndian::readUint16(&unsigned_bytes[0]) == 0x102);
+  MOZ_RELEASE_ASSERT(LittleEndian::readUint16(&unsigned_bytes[0]) == 0x0201);
+  MOZ_RELEASE_ASSERT(BigEndian::readUint16(&unsigned_bytes[0]) == 0x0102);
 
   MOZ_RELEASE_ASSERT(
-    LittleEndian::readUint32(&unsigned_bytes[0]) == 0x4030201U);
+    LittleEndian::readUint32(&unsigned_bytes[0]) == 0x04030201U);
   MOZ_RELEASE_ASSERT(
-    BigEndian::readUint32(&unsigned_bytes[0]) == 0x1020304U);
+    BigEndian::readUint32(&unsigned_bytes[0]) == 0x01020304U);
 
   MOZ_RELEASE_ASSERT(
-    LittleEndian::readUint64(&unsigned_bytes[0]) == 0x807060504030201ULL);
+    LittleEndian::readUint64(&unsigned_bytes[0]) == 0x0807060504030201ULL);
   MOZ_RELEASE_ASSERT(
-    BigEndian::readUint64(&unsigned_bytes[0]) == 0x102030405060708ULL);
+    BigEndian::readUint64(&unsigned_bytes[0]) == 0x0102030405060708ULL);
 
-  LittleEndian::writeUint16(&buffer[0], 0x201);
+  if (sizeof(uintptr_t) == 8) {
+    MOZ_RELEASE_ASSERT(
+      LittleEndian::readUintptr(&unsigned_bytes[0]) == 0x0807060504030201ULL);
+    MOZ_RELEASE_ASSERT(
+      BigEndian::readUintptr(&unsigned_bytes[0]) == 0x0102030405060708ULL);
+  } else {
+    MOZ_RELEASE_ASSERT(
+      LittleEndian::readUintptr(&unsigned_bytes[0]) == 0x04030201U);
+    MOZ_RELEASE_ASSERT(
+      BigEndian::readUintptr(&unsigned_bytes[0]) == 0x01020304U);
+  }
+
+  LittleEndian::writeUint16(&buffer[0], 0x0201);
   MOZ_RELEASE_ASSERT(
     memcmp(&unsigned_bytes[0], &buffer[0], sizeof(uint16_t)) == 0);
-  BigEndian::writeUint16(&buffer[0], 0x102);
+  BigEndian::writeUint16(&buffer[0], 0x0102);
   MOZ_RELEASE_ASSERT(
     memcmp(&unsigned_bytes[0], &buffer[0], sizeof(uint16_t)) == 0);
 
-  LittleEndian::writeUint32(&buffer[0], 0x4030201U);
+  LittleEndian::writeUint32(&buffer[0], 0x04030201U);
   MOZ_RELEASE_ASSERT(
     memcmp(&unsigned_bytes[0], &buffer[0], sizeof(uint32_t)) == 0);
-  BigEndian::writeUint32(&buffer[0], 0x1020304U);
+  BigEndian::writeUint32(&buffer[0], 0x01020304U);
   MOZ_RELEASE_ASSERT(
     memcmp(&unsigned_bytes[0], &buffer[0], sizeof(uint32_t)) == 0);
 
-  LittleEndian::writeUint64(&buffer[0], 0x807060504030201ULL);
+  LittleEndian::writeUint64(&buffer[0], 0x0807060504030201ULL);
+  MOZ_RELEASE_ASSERT(
+    memcmp(&unsigned_bytes[0], &buffer[0], sizeof(uint64_t)) == 0);
+  BigEndian::writeUint64(&buffer[0], 0x0102030405060708ULL);
   MOZ_RELEASE_ASSERT(
     memcmp(&unsigned_bytes[0], &buffer[0], sizeof(uint64_t)) == 0);
-  BigEndian::writeUint64(&buffer[0], 0x102030405060708ULL);
+
+  memset(&buffer[0], 0xff, sizeof(buffer));
+  LittleEndian::writeUintptr(&buffer[0], uintptr_t(0x0807060504030201ULL));
   MOZ_RELEASE_ASSERT(
-    memcmp(&unsigned_bytes[0], &buffer[0], sizeof(uint64_t)) == 0);
+    memcmp(&unsigned_bytes[0], &buffer[0], sizeof(uintptr_t)) == 0);
+  if (sizeof(uintptr_t) == 4) {
+    MOZ_RELEASE_ASSERT(
+      LittleEndian::readUint32(&buffer[4]) == 0xffffffffU);
+  }
+
+  memset(&buffer[0], 0xff, sizeof(buffer));
+  if (sizeof(uintptr_t) == 8) {
+    BigEndian::writeUintptr(&buffer[0], uintptr_t(0x0102030405060708ULL));
+  } else {
+    BigEndian::writeUintptr(&buffer[0], uintptr_t(0x01020304U));
+    MOZ_RELEASE_ASSERT(
+      LittleEndian::readUint32(&buffer[4]) == 0xffffffffU);
+  }
+  MOZ_RELEASE_ASSERT(
+    memcmp(&unsigned_bytes[0], &buffer[0], sizeof(uintptr_t)) == 0);
 
   MOZ_RELEASE_ASSERT(
     LittleEndian::readInt16(&signed_bytes[0]) == int16_t(0xf2f1));
   MOZ_RELEASE_ASSERT(
     BigEndian::readInt16(&signed_bytes[0]) == int16_t(0xf1f2));
 
   MOZ_RELEASE_ASSERT(
     LittleEndian::readInt32(&signed_bytes[0]) == int32_t(0xf4f3f2f1));
   MOZ_RELEASE_ASSERT(
     BigEndian::readInt32(&signed_bytes[0]) == int32_t(0xf1f2f3f4));
 
   MOZ_RELEASE_ASSERT(
     LittleEndian::readInt64(&signed_bytes[0]) == int64_t(0xf8f7f6f5f4f3f2f1LL));
   MOZ_RELEASE_ASSERT(
     BigEndian::readInt64(&signed_bytes[0]) == int64_t(0xf1f2f3f4f5f6f7f8LL));
 
+  if (sizeof(uintptr_t) == 8) {
+    MOZ_RELEASE_ASSERT(
+      LittleEndian::readIntptr(&signed_bytes[0]) == intptr_t(0xf8f7f6f5f4f3f2f1LL));
+    MOZ_RELEASE_ASSERT(
+      BigEndian::readIntptr(&signed_bytes[0]) == intptr_t(0xf1f2f3f4f5f6f7f8LL));
+  } else {
+    MOZ_RELEASE_ASSERT(
+      LittleEndian::readIntptr(&signed_bytes[0]) == intptr_t(0xf4f3f2f1));
+    MOZ_RELEASE_ASSERT(
+      BigEndian::readIntptr(&signed_bytes[0]) == intptr_t(0xf1f2f3f4));
+  }
+
   LittleEndian::writeInt16(&buffer[0], int16_t(0xf2f1));
   MOZ_RELEASE_ASSERT(
     memcmp(&signed_bytes[0], &buffer[0], sizeof(int16_t)) == 0);
   BigEndian::writeInt16(&buffer[0], int16_t(0xf1f2));
   MOZ_RELEASE_ASSERT(
     memcmp(&signed_bytes[0], &buffer[0], sizeof(int16_t)) == 0);
 
   LittleEndian::writeInt32(&buffer[0], 0xf4f3f2f1);
@@ -419,16 +463,36 @@ main()
 
   LittleEndian::writeInt64(&buffer[0], 0xf8f7f6f5f4f3f2f1LL);
   MOZ_RELEASE_ASSERT(
     memcmp(&signed_bytes[0], &buffer[0], sizeof(int64_t)) == 0);
   BigEndian::writeInt64(&buffer[0], 0xf1f2f3f4f5f6f7f8LL);
   MOZ_RELEASE_ASSERT(
     memcmp(&signed_bytes[0], &buffer[0], sizeof(int64_t)) == 0);
 
+  memset(&buffer[0], 0xff, sizeof(buffer));
+  LittleEndian::writeIntptr(&buffer[0], intptr_t(0xf8f7f6f5f4f3f2f1LL));
+  MOZ_RELEASE_ASSERT(
+    memcmp(&signed_bytes[0], &buffer[0], sizeof(intptr_t)) == 0);
+  if (sizeof(intptr_t) == 4) {
+    MOZ_RELEASE_ASSERT(
+      LittleEndian::readUint32(&buffer[4]) == 0xffffffffU);
+  }
+
+  memset(&buffer[0], 0xff, sizeof(buffer));
+  if (sizeof(intptr_t) == 8) {
+    BigEndian::writeIntptr(&buffer[0], intptr_t(0xf1f2f3f4f5f6f7f8LL));
+  } else {
+    BigEndian::writeIntptr(&buffer[0], intptr_t(0xf1f2f3f4));
+    MOZ_RELEASE_ASSERT(
+      LittleEndian::readUint32(&buffer[4]) == 0xffffffffU);
+  }
+  MOZ_RELEASE_ASSERT(
+    memcmp(&signed_bytes[0], &buffer[0], sizeof(intptr_t)) == 0);
+
   TestSingleSwap(uint16_t(0xf2f1), uint16_t(0xf1f2));
   TestSingleSwap(uint32_t(0xf4f3f2f1), uint32_t(0xf1f2f3f4));
   TestSingleSwap(uint64_t(0xf8f7f6f5f4f3f2f1), uint64_t(0xf1f2f3f4f5f6f7f8));
 
   TestSingleSwap(int16_t(0xf2f1), int16_t(0xf1f2));
   TestSingleSwap(int32_t(0xf4f3f2f1), int32_t(0xf1f2f3f4));
   TestSingleSwap(int64_t(0xf8f7f6f5f4f3f2f1), int64_t(0xf1f2f3f4f5f6f7f8));
 
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -169,16 +169,20 @@ pref("dom.workers.maxPerDomain", 512);
 pref("dom.serviceWorkers.enabled", false);
 
 // The amount of time (milliseconds) service workers keep running after each event.
 pref("dom.serviceWorkers.idle_timeout", 30000);
 
 // The amount of time (milliseconds) service workers can be kept running using waitUntil promises.
 pref("dom.serviceWorkers.idle_extended_timeout", 300000);
 
+// The amount of time (milliseconds) an update request is delayed when triggered
+// by a service worker that doesn't control any clients.
+pref("dom.serviceWorkers.update_delay", 1000);
+
 // Enable test for 24 hours update, service workers will always treat last update check time is over 24 hours
 pref("dom.serviceWorkers.testUpdateOverOneDay", false);
 
 // Whether nonzero values can be returned from performance.timing.*
 pref("dom.enable_performance", true);
 
 // Whether resource timing will be gathered and returned by performance.GetEntries*
 pref("dom.enable_resource_timing", true);
--- a/taskcluster/ci/release-generate-checksums-beetmover/kind.yml
+++ b/taskcluster/ci/release-generate-checksums-beetmover/kind.yml
@@ -9,8 +9,14 @@ transforms:
    - taskgraph.transforms.release_notifications:transforms
    - taskgraph.transforms.task:transforms
 
 kind-dependencies:
    - release-generate-checksums-signing
 
 job-template:
    shipping-phase: promote
+   worker-type:
+      by-project:
+         mozilla-central: scriptworker-prov-v1/beetmoverworker-v1
+         mozilla-beta: scriptworker-prov-v1/beetmoverworker-v1
+         mozilla-release: scriptworker-prov-v1/beetmoverworker-v1
+         default: scriptworker-prov-v1/beetmoverworker-dev
--- a/taskcluster/ci/test/talos.yml
+++ b/taskcluster/ci/test/talos.yml
@@ -197,17 +197,17 @@ talos-g4:
     try-name: g4
     treeherder-symbol: T(g4)
     run-on-projects:
         by-test-platform:
             .*-qr/.*: ['mozilla-central', 'try']
             default: ['mozilla-beta', 'mozilla-central', 'mozilla-inbound', 'autoland', 'try']
     max-run-time:
         by-test-platform:
-            linux64.*: 900
+            linux64.*: 1500
             default: 1800
     mozharness:
         extra-options:
             - --suite=g4
             - --add-option
             - --webServer,localhost
 
 talos-g4-profiling:
@@ -218,17 +218,17 @@ talos-g4-profiling:
     mozharness:
         extra-options:
             - --suite=g4
             - --geckoProfile
             - --add-option
             - --webServer,localhost
     max-run-time:
         by-test-platform:
-            linux64.*: 900
+            linux64.*: 1500
             default: 1800
 
 talos-g5:
     description: "Talos g5"
     try-name: g5
     treeherder-symbol: T(g5)
     run-on-projects:
         by-test-platform:
--- a/taskcluster/taskgraph/transforms/job/mozharness_test.py
+++ b/taskcluster/taskgraph/transforms/job/mozharness_test.py
@@ -363,16 +363,19 @@ def mozharness_test_on_native_engine(con
         ("public/logs/", "workspace/build/upload/logs/"),
         ("public/test", "artifacts/"),
         ("public/test_info/", "workspace/build/blobber_upload_dir/"),
     ]]
 
     if test['reboot']:
         worker['reboot'] = test['reboot']
 
+    if test['max-run-time']:
+        worker['max-run-time'] = test['max-run-time']
+
     worker['env'] = env = {
         'GECKO_HEAD_REPOSITORY': config.params['head_repository'],
         'GECKO_HEAD_REV': config.params['head_rev'],
         'MOZHARNESS_CONFIG': ' '.join(mozharness['config']),
         'MOZHARNESS_SCRIPT': mozharness['script'],
         'MOZHARNESS_URL': {'task-reference': mozharness_url},
         'MOZILLA_BUILD_URL': {'task-reference': installer_url},
         "MOZ_NO_REMOTE": '1',
--- a/taskcluster/taskgraph/transforms/release_generate_checksums_beetmover.py
+++ b/taskcluster/taskgraph/transforms/release_generate_checksums_beetmover.py
@@ -3,17 +3,17 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 """
 Transform the `release-generate-checksums-beetmover` task to also append `build` as dependency
 """
 from __future__ import absolute_import, print_function, unicode_literals
 
 from taskgraph.transforms.base import TransformSequence
 from taskgraph.util.attributes import copy_attributes_from_dependent_job
-from taskgraph.util.schema import validate_schema, Schema
+from taskgraph.util.schema import validate_schema, Schema, resolve_keyed_by, optionally_keyed_by
 from taskgraph.util.scriptworker import (get_beetmover_bucket_scope,
                                          get_beetmover_action_scope,
                                          get_phase)
 from taskgraph.transforms.beetmover import craft_release_properties
 from taskgraph.transforms.task import task_description_schema
 from voluptuous import Required, Optional
 
 transforms = TransformSequence()
@@ -49,16 +49,17 @@ release_generate_checksums_beetmover_sch
 
     # treeherder is allowed here to override any defaults we use for beetmover.  See
     # taskcluster/taskgraph/transforms/task.py for the schema details, and the
     # below transforms for defaults of various values.
     Optional('treeherder'): task_description_schema['treeherder'],
 
     Optional('shipping-phase'): task_description_schema['shipping-phase'],
     Optional('shipping-product'): task_description_schema['shipping-product'],
+    Required('worker-type'): optionally_keyed_by('project', basestring),
 })
 
 
 @transforms.add
 def validate(config, jobs):
     for job in jobs:
         label = job.get('dependent-task', object).__dict__.get('label', '?no-label?')
         validate_schema(
@@ -97,20 +98,24 @@ def make_task_description(config, jobs):
                 "Can't beetmove a signing task with multiple dependencies")
         # update the dependencies with the dependencies of the signing task
         dependencies.update(dep_job.dependencies)
 
         bucket_scope = get_beetmover_bucket_scope(config)
         action_scope = get_beetmover_action_scope(config)
         phase = get_phase(config)
 
+        resolve_keyed_by(
+            job, 'worker-type', item_name=label, project=config.params['project']
+        )
+
         task = {
             'label': label,
             'description': description,
-            'worker-type': 'scriptworker-prov-v1/beetmoverworker-dev',
+            'worker-type': job['worker-type'],
             'scopes': [bucket_scope, action_scope],
             'dependencies': dependencies,
             'attributes': attributes,
             'run-on-projects': dep_job.attributes.get('run_on_projects'),
             'treeherder': treeherder,
             'shipping-phase': phase,
         }
 
--- a/taskcluster/taskgraph/transforms/release_generate_checksums_signing.py
+++ b/taskcluster/taskgraph/transforms/release_generate_checksums_signing.py
@@ -72,18 +72,16 @@ def make_release_generate_checksums_sign
             "paths": [
                 "public/build/SHA256SUMS",
                 "public/build/SHA512SUMS",
             ],
             "formats": ["gpg"]
         }]
 
         signing_cert_scope = get_signing_cert_scope(config)
-        # XXX hardcode on maple to get a green graph. DO NOT UPLIFT
-        signing_cert_scope = 'project:releng:signing:cert:dep-signing'
 
         task = {
             'label': label,
             'description': description,
             'worker-type': get_worker_type_for_scope(config, signing_cert_scope),
             'worker': {'implementation': 'scriptworker-signing',
                        'upstream-artifacts': upstream_artifacts,
                        'max-run-time': 3600},
--- a/taskcluster/taskgraph/transforms/task.py
+++ b/taskcluster/taskgraph/transforms/task.py
@@ -444,16 +444,19 @@ task_description_schema = Schema({
             Optional('tuxedo_server_url'): optionally_keyed_by('project', basestring),
             Optional('release_eta'): basestring,
             Extra: taskref_or_string,  # additional properties are allowed
         },
     }, {
         Required('implementation'): 'native-engine',
         Required('os'): Any('macosx', 'linux'),
 
+        # the maximum time to run, in seconds
+        Required('max-run-time'): int,
+
         # A link for an executable to download
         Optional('context'): basestring,
 
         # Tells the worker whether machine should reboot
         # after the task is finished.
         Optional('reboot'):
             Any('always', 'on-exception', 'on-failure'),
 
@@ -1216,16 +1219,17 @@ def build_macosx_engine_payload(config, 
         'expires': task_def['expires'],
     }, worker.get('artifacts', []))
 
     task_def['payload'] = {
         'context': worker['context'],
         'command': worker['command'],
         'env': worker['env'],
         'artifacts': artifacts,
+        'maxRunTime': worker['max-run-time'],
     }
     if worker.get('reboot'):
         task_def['payload'] = worker['reboot']
 
     if task.get('needs-sccache'):
         raise Exception('needs-sccache not supported in native-engine')
 
 
--- a/testing/mozharness/mozharness/mozilla/building/buildbase.py
+++ b/testing/mozharness/mozharness/mozilla/building/buildbase.py
@@ -1576,56 +1576,55 @@ or run without that action (ie: --no-{ac
         for ext in ['apk', 'dmg', 'tar.bz2', 'zip']:
             name = 'target.' + ext
             if os.path.exists(os.path.join(dist_dir, name)):
                 packageName = name
                 break
         else:
             self.fatal("could not determine packageName")
 
-        interests = ['libxul.so', 'classes.dex', 'omni.ja']
-        installer = os.path.join(dirs['abs_obj_dir'], 'dist', packageName)
+        interests = ['libxul.so', 'classes.dex', 'omni.ja', 'xul.dll']
+        installer = os.path.join(dist_dir, packageName)
         installer_size = 0
         size_measurements = []
 
+        def paths_with_sizes(installer):
+            if zipfile.is_zipfile(installer):
+                with zipfile.ZipFile(installer, 'r') as zf:
+                    for zi in zf.infolist():
+                        yield zi.filename, zi.file_size
+            elif tarfile.is_tarfile(installer):
+                with tarfile.open(installer, 'r:*') as tf:
+                    for ti in tf:
+                        yield ti.name, ti.size
+
         if os.path.exists(installer):
             installer_size = self.query_filesize(installer)
             self.info('Size of %s: %s bytes' % (packageName, installer_size))
             try:
                 subtests = {}
-                if zipfile.is_zipfile(installer):
-                    with zipfile.ZipFile(installer, 'r') as zf:
-                        for zi in zf.infolist():
-                            name = os.path.basename(zi.filename)
-                            size = zi.file_size
-                            if name in interests:
-                                if name in subtests:
-                                    # File seen twice in same archive;
-                                    # ignore to avoid confusion.
-                                    subtests[name] = None
-                                else:
-                                    subtests[name] = size
-                elif tarfile.is_tarfile(installer):
-                    with tarfile.open(installer, 'r:*') as tf:
-                        for ti in tf:
-                            name = os.path.basename(ti.name)
-                            size = ti.size
-                            if name in interests:
-                                if name in subtests:
-                                    # File seen twice in same archive;
-                                    # ignore to avoid confusion.
-                                    subtests[name] = None
-                                else:
-                                    subtests[name] = size
+                for path, size in paths_with_sizes(installer):
+                    name = os.path.basename(path)
+                    if name in interests:
+                        # We have to be careful here: desktop Firefox installers
+                        # contain two omni.ja files: one for the general runtime,
+                        # and one for the browser proper.
+                        if name == 'omni.ja':
+                            containing_dir = os.path.basename(os.path.dirname(path))
+                            if containing_dir == 'browser':
+                                name = 'browser-omni.ja'
+                        if name in subtests:
+                            self.fatal('should not see %s (%s) multiple times!'
+                                       % (name, path))
+                        subtests[name] = size
                 for name in subtests:
-                    if subtests[name] is not None:
-                        self.info('Size of %s: %s bytes' % (name,
-                                                            subtests[name]))
-                        size_measurements.append(
-                            {'name': name, 'value': subtests[name]})
+                    self.info('Size of %s: %s bytes' % (name,
+                                                        subtests[name]))
+                    size_measurements.append(
+                        {'name': name, 'value': subtests[name]})
             except:
                 self.info('Unable to search %s for component sizes.' % installer)
                 size_measurements = []
 
         if not installer_size and not size_measurements:
             return
 
         # We want to always collect metrics. But alerts for installer size are
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -147404,16 +147404,52 @@
       [
        "/css/css-ui/text-overflow-026-ref.html",
        "=="
       ]
      ],
      {}
     ]
    ],
+   "css/css-ui/text-overflow-027.html": [
+    [
+     "/css/css-ui/text-overflow-027.html",
+     [
+      [
+       "/css/css-ui/reference/text-overflow-027-ref.html",
+       "=="
+      ]
+     ],
+     {}
+    ]
+   ],
+   "css/css-ui/text-overflow-028.html": [
+    [
+     "/css/css-ui/text-overflow-028.html",
+     [
+      [
+       "/css/css-ui/reference/text-overflow-028-ref.html",
+       "=="
+      ]
+     ],
+     {}
+    ]
+   ],
+   "css/css-ui/text-overflow-029.html": [
+    [
+     "/css/css-ui/text-overflow-029.html",
+     [
+      [
+       "/css/css-ui/reference/text-overflow-029-ref.html",
+       "=="
+      ]
+     ],
+     {}
+    ]
+   ],
    "css/css-values/attr-color-invalid-cast.html": [
     [
      "/css/css-values/attr-color-invalid-cast.html",
      [
       [
        "/css/css-values/reference/200-200-green.html",
        "=="
       ]
@@ -254364,16 +254400,21 @@
      {}
     ]
    ],
    "css/css-typed-om/stylevalue-subclasses/numeric-objects/resources/testhelper.js": [
     [
      {}
     ]
    ],
+   "css/css-typed-om/the-stylepropertymap/properties/resources/testsuite.js": [
+    [
+     {}
+    ]
+   ],
    "css/css-ui/OWNERS": [
     [
      {}
     ]
    ],
    "css/css-ui/reference/box-sizing-001-ref.html": [
     [
      {}
@@ -254504,16 +254545,31 @@
      {}
     ]
    ],
    "css/css-ui/reference/text-overflow-022-ref.html": [
     [
      {}
     ]
    ],
+   "css/css-ui/reference/text-overflow-027-ref.html": [
+    [
+     {}
+    ]
+   ],
+   "css/css-ui/reference/text-overflow-028-ref.html": [
+    [
+     {}
+    ]
+   ],
+   "css/css-ui/reference/text-overflow-029-ref.html": [
+    [
+     {}
+    ]
+   ],
    "css/css-ui/support/1x1-red.png": [
     [
      {}
     ]
    ],
    "css/css-ui/support/PTS/PngSuite.LICENSE": [
     [
      {}
@@ -291309,16 +291365,31 @@
      {}
     ]
    ],
    "webaudio/resources/audit.js": [
     [
      {}
     ]
    ],
+   "webaudio/resources/distance-model-testing.js": [
+    [
+     {}
+    ]
+   ],
+   "webaudio/resources/panner-formulas.js": [
+    [
+     {}
+    ]
+   ],
+   "webaudio/resources/panner-model-testing.js": [
+    [
+     {}
+    ]
+   ],
    "webaudio/resources/sin_440Hz_-6dBFS_1s.wav": [
     [
      {}
     ]
    ],
    "webaudio/resources/start-stop-exceptions.js": [
     [
      {}
@@ -312573,16 +312644,22 @@
     ]
    ],
    "css/css-typed-om/stylevalue-subclasses/cssSkew.tentative.html": [
     [
      "/css/css-typed-om/stylevalue-subclasses/cssSkew.tentative.html",
      {}
     ]
    ],
+   "css/css-typed-om/stylevalue-subclasses/cssSkewX.tentative.html": [
+    [
+     "/css/css-typed-om/stylevalue-subclasses/cssSkewX.tentative.html",
+     {}
+    ]
+   ],
    "css/css-typed-om/stylevalue-subclasses/cssTransformValue.tentative.html": [
     [
      "/css/css-typed-om/stylevalue-subclasses/cssTransformValue.tentative.html",
      {}
     ]
    ],
    "css/css-typed-om/stylevalue-subclasses/cssTranslate.tentative.html": [
     [
@@ -312879,16 +312956,28 @@
     ]
    ],
    "css/css-typed-om/the-stylepropertymap/inline/update.tentative.html": [
     [
      "/css/css-typed-om/the-stylepropertymap/inline/update.tentative.html",
      {}
     ]
    ],
+   "css/css-typed-om/the-stylepropertymap/properties/display.html": [
+    [
+     "/css/css-typed-om/the-stylepropertymap/properties/display.html",
+     {}
+    ]
+   ],
+   "css/css-typed-om/the-stylepropertymap/properties/margin-top.html": [
+    [
+     "/css/css-typed-om/the-stylepropertymap/properties/margin-top.html",
+     {}
+    ]
+   ],
    "css/css-ui/box-sizing-027.html": [
     [
      "/css/css-ui/box-sizing-027.html",
      {}
     ]
    ],
    "css/css-ui/caret-color-009.html": [
     [
@@ -315057,16 +315146,22 @@
     ]
    ],
    "custom-elements/parser/parser-uses-registry-of-owner-document.html": [
     [
      "/custom-elements/parser/parser-uses-registry-of-owner-document.html",
      {}
     ]
    ],
+   "custom-elements/pseudo-class-defined.html": [
+    [
+     "/custom-elements/pseudo-class-defined.html",
+     {}
+    ]
+   ],
    "custom-elements/reaction-timing.html": [
     [
      "/custom-elements/reaction-timing.html",
      {}
     ]
    ],
    "custom-elements/reactions/Attr.html": [
     [
@@ -359355,16 +359450,82 @@
     ]
    ],
    "webaudio/the-audio-api/the-offlineaudiocontext-interface/current-time-block-size.html": [
     [
      "/webaudio/the-audio-api/the-offlineaudiocontext-interface/current-time-block-size.html",
      {}
     ]
    ],
+   "webaudio/the-audio-api/the-pannernode-interface/distance-exponential.html": [
+    [
+     "/webaudio/the-audio-api/the-pannernode-interface/distance-exponential.html",
+     {}
+    ]
+   ],
+   "webaudio/the-audio-api/the-pannernode-interface/distance-inverse.html": [
+    [
+     "/webaudio/the-audio-api/the-pannernode-interface/distance-inverse.html",
+     {}
+    ]
+   ],
+   "webaudio/the-audio-api/the-pannernode-interface/distance-linear.html": [
+    [
+     "/webaudio/the-audio-api/the-pannernode-interface/distance-linear.html",
+     {}
+    ]
+   ],
+   "webaudio/the-audio-api/the-pannernode-interface/panner-automation-basic.html": [
+    [
+     "/webaudio/the-audio-api/the-pannernode-interface/panner-automation-basic.html",
+     {}
+    ]
+   ],
+   "webaudio/the-audio-api/the-pannernode-interface/panner-automation-equalpower-stereo.html": [
+    [
+     "/webaudio/the-audio-api/the-pannernode-interface/panner-automation-equalpower-stereo.html",
+     {}
+    ]
+   ],
+   "webaudio/the-audio-api/the-pannernode-interface/panner-automation-position.html": [
+    [
+     "/webaudio/the-audio-api/the-pannernode-interface/panner-automation-position.html",
+     {}
+    ]
+   ],
+   "webaudio/the-audio-api/the-pannernode-interface/panner-distance-clamping.html": [
+    [
+     "/webaudio/the-audio-api/the-pannernode-interface/panner-distance-clamping.html",
+     {}
+    ]
+   ],
+   "webaudio/the-audio-api/the-pannernode-interface/panner-equalpower-stereo.html": [
+    [
+     "/webaudio/the-audio-api/the-pannernode-interface/panner-equalpower-stereo.html",
+     {}
+    ]
+   ],
+   "webaudio/the-audio-api/the-pannernode-interface/panner-equalpower.html": [
+    [
+     "/webaudio/the-audio-api/the-pannernode-interface/panner-equalpower.html",
+     {}
+    ]
+   ],
+   "webaudio/the-audio-api/the-pannernode-interface/panner-rolloff-clamping.html": [
+    [
+     "/webaudio/the-audio-api/the-pannernode-interface/panner-rolloff-clamping.html",
+     {}
+    ]
+   ],
+   "webaudio/the-audio-api/the-pannernode-interface/pannernode-basic.html": [
+    [
+     "/webaudio/the-audio-api/the-pannernode-interface/pannernode-basic.html",
+     {}
+    ]
+   ],
    "webaudio/the-audio-api/the-pannernode-interface/test-pannernode-automation.html": [
     [
      "/webaudio/the-audio-api/the-pannernode-interface/test-pannernode-automation.html",
      {}
     ]
    ],
    "webaudio/the-audio-api/the-stereopanner-interface/no-dezippering.html": [
     [
@@ -514741,17 +514902,17 @@
    "b594b1907b2ca95278b8fc643b97480d693bab9f",
    "testharness"
   ],
   "css/css-typed-om/resources/1x1-green.png": [
    "51e7b6974a09eda6cb31337717c5eaeb9c44b443",
    "support"
   ],
   "css/css-typed-om/resources/testhelper.js": [
-   "62fc510703d52cd0894359c29d975920e26b594f",
+   "6bfe0c7b10e47c2f6acb95596ea11b8290b196ac",
    "support"
   ],
   "css/css-typed-om/styleMap-update-function.html": [
    "a1dee75d914b68753af742ce8e6dbbac0397a9a6",
    "testharness"
   ],
   "css/css-typed-om/stylevalue-normalization/normalize-ident.tentative.html": [
    "162ce70613e78bb007ea24ea525ec78ef17cd3bd",
@@ -514769,17 +514930,17 @@
    "4bc704fca50d3a114fe0fde76b6030516662d43a",
    "visual"
   ],
   "css/css-typed-om/stylevalue-normalization/positionvalue-normalization.tentative.html": [
    "9334ee684f4a2897f6a191d9217e63af5630cc0d",
    "testharness"
   ],
   "css/css-typed-om/stylevalue-normalization/transformvalue-normalization.tentative.html": [
-   "1b1af8a14ed0a1751ef3899e574e263c842440fd",
+   "a4c39f9ea72acba74027e6ffb26e221606dcd9ac",
    "testharness"
   ],
   "css/css-typed-om/stylevalue-objects/interface.html": [
    "5c9086db5b7f3a9d6e3109f1ce47385ad345f474",
    "testharness"
   ],
   "css/css-typed-om/stylevalue-objects/parse-invalid.html": [
    "d46bda9e4f7c50d27c9f1e18c643e2b1a8570896",
@@ -514805,17 +514966,17 @@
    "a71f7f5afdd97a55eeef2adc89914194ad5ecb0a",
    "testharness"
   ],
   "css/css-typed-om/stylevalue-serialization/cssPositionValue.html": [
    "155be052f2810afb0560b72e7c223293c02e61a8",
    "testharness"
   ],
   "css/css-typed-om/stylevalue-serialization/cssTransformValue.tentative.html": [
-   "71591a5fdc7f90841dcc204c70f1a3e611024edc",
+   "5bb6823ff35152e1a55f573d568e29b7edfcf2d7",
    "testharness"
   ],
   "css/css-typed-om/stylevalue-serialization/cssUnitValue.tentative.html": [
    "e1c27e0baa33d990c83ee3d562a3eeae3106b833",
    "testharness"
   ],
   "css/css-typed-om/stylevalue-serialization/cssUnparsedValue.html": [
    "7ba0e1c9db3799bad925036de1da7c51fd102610",
@@ -514856,16 +515017,20 @@
   "css/css-typed-om/stylevalue-subclasses/cssScale.tentative.html": [
    "779c99a24057f5a2c33fcda77f5897c142659518",
    "testharness"
   ],
   "css/css-typed-om/stylevalue-subclasses/cssSkew.tentative.html": [
    "91ff825d12373156b3c3b23d23bf866220ef1386",
    "testharness"
   ],
+  "css/css-typed-om/stylevalue-subclasses/cssSkewX.tentative.html": [
+   "be786095d55df3e6d9d4b10d8ef7c9da95beb1f6",
+   "testharness"
+  ],
   "css/css-typed-om/stylevalue-subclasses/cssTransformValue.tentative.html": [
    "c1ee0153bd654f64b64f74bf00b6b0709c7cb9ed",
    "testharness"
   ],
   "css/css-typed-om/stylevalue-subclasses/cssTranslate.tentative.html": [
    "700fae462f258404f3d0b8fad290613fc1929e1d",
    "testharness"
   ],
@@ -515064,16 +515229,28 @@
   "css/css-typed-om/the-stylepropertymap/inline/set.tentative.html": [
    "00d06230cd8f21d522ab895c853201f9910d0d90",
    "testharness"
   ],
   "css/css-typed-om/the-stylepropertymap/inline/update.tentative.html": [
    "30ee6179d77f18692867217c18852db94b1d10bb",
    "testharness"
   ],
+  "css/css-typed-om/the-stylepropertymap/properties/display.html": [
+   "344c75e256cf3284d6582c2cd3c9f726d6d7f443",
+   "testharness"
+  ],
+  "css/css-typed-om/the-stylepropertymap/properties/margin-top.html": [
+   "3a6cb963dd8ff07522ade6839f8de5493fd49414",
+   "testharness"
+  ],
+  "css/css-typed-om/the-stylepropertymap/properties/resources/testsuite.js": [
+   "b0099e66215cc2631bbcb5b2b0c87d16b6f60e21",
+   "support"
+  ],
   "css/css-ui/OWNERS": [
    "beeb8a77d396e48731fd1e69a922b6e2c84c2caa",
    "support"
   ],
   "css/css-ui/box-sizing-001.html": [
    "5e913f2edc75ae0369eb59f67f320ec552472160",
    "reftest"
   ],
@@ -516220,16 +516397,28 @@
   "css/css-ui/reference/text-overflow-021-ref.html": [
    "317e02ebc1fb90e7d91bed1fd982d2bf81a10cfc",
    "support"
   ],
   "css/css-ui/reference/text-overflow-022-ref.html": [
    "a223e8c0151a7ffc350466dd3b13f766f67425e8",
    "support"
   ],
+  "css/css-ui/reference/text-overflow-027-ref.html": [
+   "2ead9e9af4a591a5bf450f8449e9b658a24a8154",
+   "support"
+  ],
+  "css/css-ui/reference/text-overflow-028-ref.html": [
+   "86673d6286a6676157d19f000fa3b29b74f592b8",
+   "support"
+  ],
+  "css/css-ui/reference/text-overflow-029-ref.html": [
+   "4a01c40b4137a40b316be134899d33202b934850",
+   "support"
+  ],
   "css/css-ui/resize-001.html": [
    "cee9af6bf866dc360a2f6e8a8a8b29376205dfde",
    "manual"
   ],
   "css/css-ui/resize-002.html": [
    "6bac967ea52ac21e91e2360aadb98e8811a08174",
    "manual"
   ],
@@ -517356,16 +517545,28 @@
   "css/css-ui/text-overflow-026-ref.html": [
    "03c0337af58ba7bada64ab36721d9f1fe2f9a2f3",
    "support"
   ],
   "css/css-ui/text-overflow-026.html": [
    "5087fe90cb3ef8e340be316f1534cb6dba3e0d17",
    "reftest"
   ],
+  "css/css-ui/text-overflow-027.html": [
+   "3a3c0bc49087b5ae18c62fa2c50003f9ca8dccc2",
+   "reftest"
+  ],
+  "css/css-ui/text-overflow-028.html": [
+   "62dbaef147720aedb50e1ed682a72becee07f58d",
+   "reftest"
+  ],
+  "css/css-ui/text-overflow-029.html": [
+   "213162b8e95c0bf4f61a8fc01cc034310c87f6c9",
+   "reftest"
+  ],
   "css/css-ui/text-overflow-ref.html": [
    "db55b0b95a7406e9c4f00081b3e2cbe6b07363f7",
    "support"
   ],
   "css/css-ui/text-overflow.html": [
    "d3a6c835c23b82a85398e7981461a0cd3a75b861",
    "manual"
   ],
@@ -520409,73 +520610,73 @@
    "4cbcdb79cf6f1359855fd4c9668327bdbd15859b",
    "reftest"
   ],
   "css/css-writing-modes/float-lft-orthog-htb-in-vlr-002-ref.xht": [
    "3a6acd515d3631525965d274582b81f7df575a2d",
    "support"
   ],
   "css/css-writing-modes/float-lft-orthog-htb-in-vlr-002.xht": [
-   "f3e8f14fcaaa56c34406b30649f0587e49e74fb4",
+   "9f5089a9d34072d66d5be282abc2b4bda24717e0",
    "reftest"
   ],
   "css/css-writing-modes/float-lft-orthog-htb-in-vrl-002-ref.xht": [
    "83bbc497ac7e9124f1c1814a8867e46f33d84ccf",
    "support"
   ],
   "css/css-writing-modes/float-lft-orthog-htb-in-vrl-002.xht": [
-   "f87b363d913724d318af7424e624a0be494ec7a4",
+   "2c48926c21590e741a9cc0b895d9f3cc6839b345",
    "reftest"
   ],
   "css/css-writing-modes/float-lft-orthog-vlr-in-htb-002-ref.xht": [
    "cca786380598b2395ef041ade525cbb97bc063ac",
    "support"
   ],
   "css/css-writing-modes/float-lft-orthog-vlr-in-htb-002.xht": [
-   "66d49b63ea24b308023beef7fe0c572b13139110",
+   "a17d200553e582b65cb86a929f5c2d3d39274726",
    "reftest"
   ],
   "css/css-writing-modes/float-lft-orthog-vrl-in-htb-002-ref.xht": [
    "4d57c8be55869f0426185834f2d6cbbbe532027a",
    "support"
   ],
   "css/css-writing-modes/float-lft-orthog-vrl-in-htb-002.xht": [
-   "2644d7e8399b29cc6f8162c9962ee69a173c898e",
+   "f6ca89bfcb6e674bfdabe1c9537db0bafadbb032",
    "reftest"
   ],
   "css/css-writing-modes/float-rgt-orthog-htb-in-vlr-003-ref.xht": [
    "f55089e3f99e9316526460e31f975333b111d2ed",
    "support"
   ],
   "css/css-writing-modes/float-rgt-orthog-htb-in-vlr-003.xht": [
-   "0909fd3ad8e36dd2e18a2b29c2c0452854884a09",
+   "bfdcdbc8282ee66e17b1cae353302ea9b4f62937",
    "reftest"
   ],
   "css/css-writing-modes/float-rgt-orthog-htb-in-vrl-003-ref.xht": [
    "091209669a60176b10b508113938eff57dd9e09c",
    "support"
   ],
   "css/css-writing-modes/float-rgt-orthog-htb-in-vrl-003.xht": [
-   "a619d760c7c1c4ebd7e276fe8d9593cb89664e6b",
+   "b6c9bda1aeb5d641a3e316e3ddd2617ff0686b7b",
    "reftest"
   ],
   "css/css-writing-modes/float-rgt-orthog-vlr-in-htb-003-ref.xht": [
    "17ee3d60ef94c8b1939486a4149d635e677a49f4",
    "support"
   ],
   "css/css-writing-modes/float-rgt-orthog-vlr-in-htb-003.xht": [
-   "c1db3af5d5de4ab629dd51d843a5be33664fdfdb",
+   "794149a1b1bb8fe88e0ae451f544aeba5bdf8138",
    "reftest"
   ],
   "css/css-writing-modes/float-rgt-orthog-vrl-in-htb-003-ref.xht": [
    "2905ecba6a26413323a19b294fe0f848ff8a7314",
    "support"
   ],
   "css/css-writing-modes/float-rgt-orthog-vrl-in-htb-003.xht": [
-   "9912c24db61e65b88a4234466647bcafd1b30a88",
+   "03fce90ab3383410f008e868defeda95eec2518c",
    "reftest"
   ],
   "css/css-writing-modes/float-shrink-to-fit-vlr-003.xht": [
    "0d474ef72c50647a7a182abac0d661b73ec9c9f4",
    "reftest"
   ],
   "css/css-writing-modes/float-shrink-to-fit-vlr-005.xht": [
    "1c05ebcc852d6a31b9dde9609e7c73dfcedf86c9",
@@ -522025,289 +522226,289 @@
    "252c877b6b62e93b69b97a9dcc99498c5f56db65",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-htb-in-vlr-001-ref.xht": [
    "31223eeb2b9b8e7077fd90fc18d29221c63cdb6b",
    "support"
   ],
   "css/css-writing-modes/sizing-orthog-htb-in-vlr-001.xht": [
-   "062fa49d4917baad19d00f5b91a29424c8dde79d",
+   "901e425aec84a8b0d56cfc8e8a3b40131d1a954e",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-htb-in-vlr-003-ref.xht": [
    "1fbb431cff566cb5215613c1b9b7f728869449ef",
    "support"
   ],
   "css/css-writing-modes/sizing-orthog-htb-in-vlr-003.xht": [
-   "1c9e187e9ae9b0cd94067cb06b7dca1e7267ad62",
+   "05143b4edb1df38ef6c8e62a1889fac8b9cdf2ea",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-htb-in-vlr-004-ref.xht": [
    "1c243c95bd30d7bf3fc90d8e9fa5aed68b6f80f7",
    "support"
   ],
   "css/css-writing-modes/sizing-orthog-htb-in-vlr-004.xht": [
-   "e908a3973be90ed7f6e002e95dc32d488762a9fb",
+   "dd35913cd65c1afe305a1a7e1ff66286de6e6835",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-htb-in-vlr-006-ref.xht": [
    "709241f95c6f7fa95020e05010bbfd0b1de4725d",
    "support"
   ],
   "css/css-writing-modes/sizing-orthog-htb-in-vlr-006.xht": [
-   "0b678f8bf6b69e94a18d70b41a5c004eb3618b15",
+   "d8fdd3eb77926a78a3321d61347f3bfc8a1901d9",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-htb-in-vlr-007-ref.xht": [
    "3b76e682dd6e169d459e458d587b6fea5dc71ac7",
    "support"
   ],
   "css/css-writing-modes/sizing-orthog-htb-in-vlr-007.xht": [
-   "5a1443cd05c42ef1913b3286c954001ead7e4de0",
+   "14120c2ebd4c08b767b93a1edb7d267ab4f16941",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-htb-in-vlr-008-ref.xht": [
    "53c323c3e644c0e561d89fd9e64bf0482e188427",
    "support"
   ],
   "css/css-writing-modes/sizing-orthog-htb-in-vlr-008.xht": [
-   "3a77f22047e22a067cd1e5e73eee94b31fa5618a",
+   "b1a4db27c694fa023d6b309a3b54f2fd2b71dceb",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-htb-in-vlr-009.xht": [
-   "2d4f8e5e439ca4f7ab20950cb80d34a2761b6569",
+   "40a12c005d3a2c4b509e0fbda3a7249b0df70562",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-htb-in-vlr-010-ref.xht": [
    "7616fc5b8e0f7668aaf63cc29efdac03ec6ee6be",
    "support"
   ],
   "css/css-writing-modes/sizing-orthog-htb-in-vlr-010.xht": [
-   "b9998ffdb4744fe6d1d71016552b166056773d6b",
+   "2859517023f8eb400a34fe92c72a9271ea66b902",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-htb-in-vlr-011-ref.xht": [
    "b0735e7b25ee70a786a870ad2405e6f8c9c1b737",
    "support"
   ],
   "css/css-writing-modes/sizing-orthog-htb-in-vlr-011.xht": [
-   "d49dc741995575554327d7dc51a8de7addecc61c",
+   "b9b49fa21f1bdd06f7e041fa0dace8de79ea5c53",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-htb-in-vlr-012.xht": [
-   "ceb86c4d1018105f7323c52cd566ede0993dc57a",
+   "045640a233a5cbb2ea1986dda6e01f507a1ee52f",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-htb-in-vlr-013-ref.xht": [
    "d30b49445cf2ca371c055e80addbb9fadb555ef3",
    "support"
   ],
   "css/css-writing-modes/sizing-orthog-htb-in-vlr-013.xht": [
-   "786e589dfd035b20e20cd3095583f192f65166f3",
+   "26bdaabbeb5642186a4452122714d900f1f597fe",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-htb-in-vlr-015-ref.xht": [
    "7b896cfd0e378a3b10b3dd4076d230d76506b37c",
    "support"
   ],
   "css/css-writing-modes/sizing-orthog-htb-in-vlr-015.xht": [
-   "9e8449f6b72a4b18d1c020a3aa6a8232ae0efa4d",
+   "45eb0ef69a56268116f03430a0421b0e489797fb",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-htb-in-vlr-016-ref.xht": [
    "54558796716648716b1ec507177972a1e5d4c9eb",
    "support"
   ],
   "css/css-writing-modes/sizing-orthog-htb-in-vlr-016.xht": [
-   "85e1704703ff89d0d873a9054e1dba06d20149f8",
+   "f302fcfd9506a3bcd924afe1a6cd2ec4d9a2569c",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-htb-in-vlr-018-ref.xht": [
    "9e84251c0996327b4e7b783a662ce07bcecd2447",
    "support"
   ],
   "css/css-writing-modes/sizing-orthog-htb-in-vlr-018.xht": [
-   "bfbb7f84203ebb733d3c8ad527a80c9de3df0aa3",
+   "7ea64c9467f39293d4da4ce04f09d33c06143d4b",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-htb-in-vlr-019-ref.xht": [
    "e61715ead3ca3c9e5e95643f14a5376bcb1e2b3a",
    "support"
   ],
   "css/css-writing-modes/sizing-orthog-htb-in-vlr-019.xht": [
-   "f2b5731dd499062713db36d7d34312cb7f8888c7",
+   "7a4d00311194f62ddad5487ecf7c3a529330a14e",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-htb-in-vlr-020-ref.xht": [
    "8c7ddc2be2595d97bdc96cf2f182ff3f8133e528",
    "support"
   ],
   "css/css-writing-modes/sizing-orthog-htb-in-vlr-020.xht": [
-   "74e46119562afb3a4cb289e561c7da33ffadb0d4",
+   "ffc5650d73d9491bc9ea87c888566b7c07a43784",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-htb-in-vlr-021.xht": [
-   "e137ac2cf9bcb1c49b5c9cd0846ea721c8c3c864",
+   "ec343d85e1ff79e81d222bf0de15a926a8898ac2",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-htb-in-vlr-022-ref.xht": [
    "382ce632865ab6b2f7e3fe45c6f44037d1c0ea5e",
    "support"
   ],
   "css/css-writing-modes/sizing-orthog-htb-in-vlr-022.xht": [
-   "260cde729a1c749fc557d5c0877eca2eb93e4693",
+   "207d9b8288bb77b047e485d65f94960374110228",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-htb-in-vlr-023-ref.xht": [
    "865cba963a52939c284976fa080ca94b31a390ea",
    "support"
   ],
   "css/css-writing-modes/sizing-orthog-htb-in-vlr-023.xht": [
-   "6d2f4be5557a52e649b9c37140c248e3409fa6b5",
+   "8267b122163cbd1159d53bd46e70eabe54cda7d7",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-htb-in-vlr-024.xht": [
-   "ea5fc6d5713fd925dd61f0c1329a13cc2c6abeca",
+   "ba77e91c9fb816a870cf61683c2277e4fe1658d4",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-htb-in-vrl-001-ref.xht": [
    "3395ea2eff2432ec27e9c5442180d8fbfd72fe71",
    "support"
   ],
   "css/css-writing-modes/sizing-orthog-htb-in-vrl-001.xht": [
-   "56c614672c8af64ba8bdd19325479be07c29deec",
+   "e476bf16eaaddbaf7d73bb6689bf410d0af92d14",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-htb-in-vrl-003-ref.xht": [
    "8f6bb55295fbd5098f4926d881d867741db72d19",
    "support"
   ],
   "css/css-writing-modes/sizing-orthog-htb-in-vrl-003.xht": [
-   "a5faf8b2fd80d158afabf4719dc11233bea63c21",
+   "bebce317cde666a913e6d6c654efd93f3aa0c46d",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-htb-in-vrl-004.xht": [
-   "c007527fd14a528dfb28cb4c16b36e1bf248d9f3",
+   "9bea5e2666bf14be2d6b0d3588a400351a9f158a",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-htb-in-vrl-006-ref.xht": [
    "6e1b0e5b60c86c845225df52c47c146266bdfc6a",
    "support"
   ],
   "css/css-writing-modes/sizing-orthog-htb-in-vrl-006.xht": [
-   "3378a514319ee9987c519b9a535fec88258248d7",
+   "848c09a400cd57d16084ddee42c4fde05eb5f5bb",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-htb-in-vrl-007-ref.xht": [
    "4febcb6ab14d38a073b749f00ebedb2562bde1b1",
    "support"
   ],
   "css/css-writing-modes/sizing-orthog-htb-in-vrl-007.xht": [
-   "b8deeede88e4b6662aa993111fa8b3371fe1aec4",
+   "90cafa81f1c1224d7bc940c558dafce4a77b2e8d",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-htb-in-vrl-008-ref.xht": [
    "207d331cc97a52b75d86d53473a872b8965c270e",
    "support"
   ],
   "css/css-writing-modes/sizing-orthog-htb-in-vrl-008.xht": [
-   "ce09d940b2648fac1459aa2bb2c1a6025e135ebc",
+   "8fd1eca8e34927e478fcebfa954dbfab1a3f54df",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-htb-in-vrl-009.xht": [
-   "87faddc35a193b61b70cd4448fa54b82dbb56563",
+   "aa41835735ad65ae75209c460c09b66467cf5a62",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-htb-in-vrl-010-ref.xht": [
    "5401aa0f83edf64ae6f62ea242dab693b9d500bd",
    "support"
   ],
   "css/css-writing-modes/sizing-orthog-htb-in-vrl-010.xht": [
-   "c601018b690eb8fe31a990630a4eb78f70cb9ef8",
+   "cc7e3b465ab5610c9db0e93981ef68b82f15177e",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-htb-in-vrl-011-ref.xht": [
    "43d4b8c4c97279999db4146a17c4ce7652741701",
    "support"
   ],
   "css/css-writing-modes/sizing-orthog-htb-in-vrl-011.xht": [
-   "6626f2e3624dc8bba52894b85a672dc052f11775",
+   "7961f9e20605e59318b836b091eacbcd02f49292",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-htb-in-vrl-012.xht": [
-   "580d740a994fa7e4ed5f1f796221cb532a065418",
+   "1c5f31b836afa6a2e3a65abef90c0ccf346effbc",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-htb-in-vrl-013-ref.xht": [
    "e249c388687e85456d84bd9db4b619dd1a8686e5",
    "support"
   ],
   "css/css-writing-modes/sizing-orthog-htb-in-vrl-013.xht": [
-   "c84e96a87de1a3e53dd0abf7da31bf44ee2a8cf4",
+   "24c9838701a55a2b4635b945e1fa6123df1bdb8a",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-htb-in-vrl-015-ref.xht": [
    "8f72220cc50b410b1d42e8b15a37b313cf17a363",
    "support"
   ],
   "css/css-writing-modes/sizing-orthog-htb-in-vrl-015.xht": [
-   "69b1438ea40979c31fc58f4b9895155e2193de6e",
+   "f8b5a81827b4c514762148fdf7ae1ff779f81dd8",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-htb-in-vrl-016.xht": [
-   "bbb293297011d12a4f0b65a4531cc4f344582414",
+   "472102eb4c09e1cdae7234f32ae3761372e24271",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-htb-in-vrl-018-ref.xht": [
    "b8239a66ac9569b3f47a5e37c44443292c78d40c",
    "support"
   ],
   "css/css-writing-modes/sizing-orthog-htb-in-vrl-018.xht": [
-   "633d56d95065490256404ba0b6af4d42e08dd172",
+   "6d006bee854cc4eb666fda1ee7e8a377e2fe3ae0",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-htb-in-vrl-019-ref.xht": [
    "9d348a5c9d7e8661f7c23429a23da54e4d909add",
    "support"
   ],
   "css/css-writing-modes/sizing-orthog-htb-in-vrl-019.xht": [
-   "b4190272dcc03dd6cf4805f99d025035e6e53666",
+   "abfc982953a9a4eb022c88c9ba832b3ed6ac22da",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-htb-in-vrl-020-ref.xht": [
    "d65db617493cd491135bed7034b3b1a7f68a21a9",
    "support"
   ],
   "css/css-writing-modes/sizing-orthog-htb-in-vrl-020.xht": [
-   "cbcc15795b61c0fb0115332799bd1451205e8570",
+   "575344cec5208daa1a897bfe5383a6bd4b6ceed0",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-htb-in-vrl-021.xht": [
-   "7b5286b1a85f309d32ea7e79c99db59fe648c236",
+   "126c8c038a6911840d2c3b142933eac9a7814027",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-htb-in-vrl-022-ref.xht": [
    "93c74e1f4edd9a972bd961d5e0fe6c58754dc7b6",
    "support"
   ],
   "css/css-writing-modes/sizing-orthog-htb-in-vrl-022.xht": [
-   "9d75adf153d34f9f64c03a3b6a6df7a41aeead96",
+   "1f4331ecd50a115856e04633aca222e688e13af2",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-htb-in-vrl-023-ref.xht": [
    "8f98562ad7c5caabe40b4280681abf82f73c4c3f",
    "support"
   ],
   "css/css-writing-modes/sizing-orthog-htb-in-vrl-023.xht": [
-   "5a6b6fd245a48de4f9aec4914f6191c453ca3648",
+   "47e92d37e1c39bc207017b8fdbc313bc1fc3c8d5",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-htb-in-vrl-024.xht": [
-   "1d4fa6791fee2e7dac011966f27a23043181f08c",
+   "1ff60ed2d3504b206ce72a982e3c64a69f000ba9",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-prct-htb-in-vlr-001-ref.xht": [
    "15c27a50ebfc4f08ced0889b1ff63027593351e5",
    "support"
   ],
   "css/css-writing-modes/sizing-orthog-prct-htb-in-vlr-001.xht": [
    "54c034ffb25652897b9e29fa8327607caed57302",
@@ -522561,313 +522762,313 @@
    "592e40eff9a9b6f5a71d97eeed5b9873939b7f07",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-vlr-in-htb-001-ref.xht": [
    "8241a375d6aab302ac3c3511b30c9b188b9e160f",
    "support"
   ],
   "css/css-writing-modes/sizing-orthog-vlr-in-htb-001.xht": [
-   "a503274698e73601e160644439b9149c72dee0cf",
+   "0b98049173e4484d1feebe93dddaf7dfce2effca",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-vlr-in-htb-003-ref.xht": [
    "028f3950b8fbf622d33b071522dc4661d0d24554",
    "support"
   ],
   "css/css-writing-modes/sizing-orthog-vlr-in-htb-003.xht": [
-   "78ce838ba7870ef13f303d403a710052313ba5b7",
+   "e6d0c165a5082440cdb06538e6dab433a8fe42d9",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-vlr-in-htb-004-ref.xht": [
    "05c0d7b2dd2aa47932312b4ab00bc5cf5be2dafa",
    "support"
   ],
   "css/css-writing-modes/sizing-orthog-vlr-in-htb-004.xht": [
-   "6fce6cce59fd755d910dcf20cbc6ffa1150bc115",
+   "9775f488216af71fa8ef7b0e48bd9747bc21b09b",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-vlr-in-htb-006-ref.xht": [
    "b845c6296e8d1b486f35040371de40d5b61fc7f2",
    "support"
   ],
   "css/css-writing-modes/sizing-orthog-vlr-in-htb-006.xht": [
-   "cd6bf42940756a11bced234b08db2d34ed02e848",
+   "66fe7dbd070d2314bbbace86945adbec55f83478",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-vlr-in-htb-007-ref.xht": [
    "586b50b58d770c8946f4aef9ec7f63863992db76",
    "support"
   ],
   "css/css-writing-modes/sizing-orthog-vlr-in-htb-007.xht": [
-   "a1d52ce7cdc8f7c265c8f31337ab11d59b8d3289",
+   "b7962676e2a809a865f07b70eb457fd85c794706",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-vlr-in-htb-008-ref.xht": [
    "9e36d2c0769b18f9ef227827f6376feb3b78bf07",
    "support"
   ],
   "css/css-writing-modes/sizing-orthog-vlr-in-htb-008.xht": [
-   "ee9669997069ba792ea54b9e461c36b2de5df3bc",
+   "9d65e04e301dd1635daa24a1999131114dc84634",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-vlr-in-htb-009-ref.xht": [
    "2296abf2111e6512bfb632c931917eeacde45031",
    "support"
   ],
   "css/css-writing-modes/sizing-orthog-vlr-in-htb-009.xht": [
-   "c3363ddf411902cd7948cdba03dde2ba466801d6",
+   "25fd39a18025c51c28a7b73d1346e2e2fec505d4",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-vlr-in-htb-010-ref.xht": [
    "f48e6cdd98a5343cb245887bfbc4ef5199b84e69",
    "support"
   ],
   "css/css-writing-modes/sizing-orthog-vlr-in-htb-010.xht": [
-   "0d797c8456474b287533cc76cb3a82f16f0bf0a2",
+   "a5ff5ac0a5f198465a2ed6bbb75b4826e7fd1b0e",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-vlr-in-htb-011-ref.xht": [
    "d488abc088bed258b10494cc8f58397145f1d717",
    "support"
   ],
   "css/css-writing-modes/sizing-orthog-vlr-in-htb-011.xht": [
-   "10737fc5d803033123dff2339c63326103f29c37",
+   "551b986ea9094c7402993373dbae6e60038d0ebb",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-vlr-in-htb-012-ref.xht": [
    "7befc64b3f9a4abdc9c1826128dcffb853fec093",
    "support"
   ],
   "css/css-writing-modes/sizing-orthog-vlr-in-htb-012.xht": [
-   "63c626891651ce57f25e0f5ff02f3b399c4f54fe",
+   "4623a6952246c5d551420eee8d270fad765da16e",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-vlr-in-htb-013-ref.xht": [
    "9b6b9b2868cc234e3e7ed8998177f3a441e21e32",
    "support"
   ],
   "css/css-writing-modes/sizing-orthog-vlr-in-htb-013.xht": [
-   "9074ceab5bfd80cdbf9a20122aa4a4e714ccea1f",
+   "22266483e39f2224ad823cdd88a90daec0abe5e0",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-vlr-in-htb-015-ref.xht": [
    "42dc6d420aae2938fb10a41394d18b3fbb3178ce",
    "support"
   ],
   "css/css-writing-modes/sizing-orthog-vlr-in-htb-015.xht": [
-   "3422d57d67971aa4b3a4e89bfed9261ad9ab907f",
+   "5b777c91d90f461e746f7ca500b7383ff37346b0",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-vlr-in-htb-016-ref.xht": [
    "0e3e920223575f9f9e441e97e3155f00282b9c6d",
    "support"
   ],
   "css/css-writing-modes/sizing-orthog-vlr-in-htb-016.xht": [
-   "ec3d006c52ae738553545b5113a43cbb45941fb4",
+   "23b0b1e8e60077c7a308f78a9d501e994aac1970",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-vlr-in-htb-018-ref.xht": [
    "5f3d41ab46b03fcd2d08ae55fd3d64b4df36441e",
    "support"
   ],
   "css/css-writing-modes/sizing-orthog-vlr-in-htb-018.xht": [
-   "10903528f0d5fce57222066579a9849e22ebbe31",
+   "560cf570e9b5a9669f6c2d9496a6d4dca4c1624f",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-vlr-in-htb-019-ref.xht": [
    "0cef155326ec219fb3b9922fc75191ace4131bc4",
    "support"
   ],
   "css/css-writing-modes/sizing-orthog-vlr-in-htb-019.xht": [
-   "9e6bd5dc41e1d52cef3707e3536f9a72aa3ce0bd",
+   "f7d84c71be0494df9d8feb44711f6197bd1712d0",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-vlr-in-htb-020-ref.xht": [
    "a723fd3992bda407bcee9f8ca2b8712bea6023d3",
    "support"
   ],
   "css/css-writing-modes/sizing-orthog-vlr-in-htb-020.xht": [
-   "c9604dfbe57ec804862fca7d1679c92251179bf7",
+   "448a501ac157bbe1e385c3d24d04563d69dbc67a",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-vlr-in-htb-021.xht": [
-   "0fd5dcddba4846687b72309675d795a4dcd332ef",
+   "39a7c6a43fc8ab5d3d8d06dc96d37759574f5dbf",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-vlr-in-htb-022-ref.xht": [
    "8d2bc25abb24afc286b614265ebe60921adcdf0a",
    "support"
   ],
   "css/css-writing-modes/sizing-orthog-vlr-in-htb-022.xht": [
-   "f625da38b3a590b3e86bde764f29d0ca3f96a311",
+   "1e5cd3518f89413d49c79b87a3e9e1b174f90cc0",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-vlr-in-htb-023-ref.xht": [
    "34d6b9f280983490cba3567c71c5c11164306481",
    "support"
   ],
   "css/css-writing-modes/sizing-orthog-vlr-in-htb-023.xht": [
-   "f05105575e7f4b433bb7cfc78242e73422e14211",
+   "148bc23619af19f5f46aba4c510104bd83ecce96",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-vlr-in-htb-024.xht": [
-   "e8d83d586a0388aa20f76487f9573ab83a671f51",
+   "8734d242aff6d745f31590885b04959a01e56575",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-vrl-in-htb-001-ref.xht": [
    "a5af7fb66abfcc055659f1f7297889b3f1a5a418",
    "support"
   ],
   "css/css-writing-modes/sizing-orthog-vrl-in-htb-001.xht": [
-   "e734439a240603c66a2026d2f29b30b7b9c19380",
+   "f7528e5128ec256893239bbfe17e34b968b1f6a3",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-vrl-in-htb-003-ref.xht": [
    "bbe9d3ec9bcd9ce5c8d55bb3b1115bb61aa2c07c",
    "support"
   ],
   "css/css-writing-modes/sizing-orthog-vrl-in-htb-003.xht": [
-   "1399708a98eb73fa58846153afb366c95abf9e60",
+   "752f53a16758fe90656b93a245c4c88b4e9d7251",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-vrl-in-htb-004-ref.xht": [
    "b32e4c8ca10c6715ef0794cbe1c34cd98e1af35a",
    "support"
   ],
   "css/css-writing-modes/sizing-orthog-vrl-in-htb-004.xht": [
-   "6b3f40fdf1109e896260af19415665a4990235ae",
+   "72fb45c82e9ef4beb5b7c7a48c41b72fbc6dc27d",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-vrl-in-htb-006-ref.xht": [
    "1960b3ca876ca764bae07e827a659f4ab1609925",
    "support"
   ],
   "css/css-writing-modes/sizing-orthog-vrl-in-htb-006.xht": [
-   "d2921ce48fd18d470c7a9832e8efcfb1cfe3ddee",
+   "5896ee59ab55c09f6b6d4d41873152b53b1d1255",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-vrl-in-htb-007-ref.xht": [
    "a6a7cb5b5d9b66f8e164b768b4febe9cba916abb",
    "support"
   ],
   "css/css-writing-modes/sizing-orthog-vrl-in-htb-007.xht": [
-   "3a9e1291085511838539c1d660191f52983ea9d5",
+   "42e5de9da46adb6fffdc9a9901d2996305bf7d7f",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-vrl-in-htb-008-ref.xht": [
    "650381805263bc7570564044cc16047513a7a5cd",
    "support"
   ],
   "css/css-writing-modes/sizing-orthog-vrl-in-htb-008.xht": [
-   "8ffd5250ca99768e52b70466837185136cc5cb03",
+   "03825c7965f99db672b1bb255a0b50b8a2a374ea",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-vrl-in-htb-009-ref.xht": [
    "67b482ca2bba31b822e4d291c5dd1e4e6a36a61c",
    "support"
   ],
   "css/css-writing-modes/sizing-orthog-vrl-in-htb-009.xht": [
-   "82466fdc317cb3571af93da0a7afc977d7acd587",
+   "5692884df8c2402c729d0ee09ba74e62247c62ee",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-vrl-in-htb-010-ref.xht": [
    "50dafd70a50970bca0019ebb6ad54d20005d8528",
    "support"
   ],
   "css/css-writing-modes/sizing-orthog-vrl-in-htb-010.xht": [
-   "6da1576e5b89d01f685f173350022026f33abe4a",
+   "97390eb81ba0f0b694f1858313702c8ff88c30b6",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-vrl-in-htb-011-ref.xht": [
    "cd77fe75ef0beafbd7d593b360197cc72ff265da",
    "support"
   ],
   "css/css-writing-modes/sizing-orthog-vrl-in-htb-011.xht": [
-   "fd684bf6abf99a3b1aa54d179659645cc4a2fdea",
+   "1f8530d1738f1890876bf569bd2588312f31f367",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-vrl-in-htb-012-ref.xht": [
    "4c7b503f89562a3827e307c1fcdc8da5b3e3ab95",
    "support"
   ],
   "css/css-writing-modes/sizing-orthog-vrl-in-htb-012.xht": [
-   "6e0c7bfc9a2dd850226ed5e2337be1660c58cb2b",
+   "0c8601a96ec72775ccb9ae52edd617aba6f609d9",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-vrl-in-htb-013-ref.xht": [
    "0118d2f7b8297dd6a6d10759ca029aef9db1cc33",
    "support"
   ],
   "css/css-writing-modes/sizing-orthog-vrl-in-htb-013.xht": [
-   "c28d87a65f6a5218f4ed7915a422a5ecc82c3f68",
+   "b6ab9350512058ca1c209382f66ceac2a2ceef3d",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-vrl-in-htb-015-ref.xht": [
    "176a57b8b1ca386428c385c6b1f5c8ce918b597e",
    "support"
   ],
   "css/css-writing-modes/sizing-orthog-vrl-in-htb-015.xht": [
-   "8b5784b22d09a53f594fd658d56de338ae6fd8e9",
+   "c87df0ba948b61fd91e61ddbbacbe1c8d8a7e56a",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-vrl-in-htb-016-ref.xht": [
    "598be8711537b9e293ccd4ebdc3dba30e9cfa7c5",
    "support"
   ],
   "css/css-writing-modes/sizing-orthog-vrl-in-htb-016.xht": [
-   "46c21a215a48e884142b52a54ba34bfd02e19a4b",
+   "d273e6c00c4fa8cd37a6326f43fff8ae28720851",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-vrl-in-htb-018-ref.xht": [
    "be5951266b80edf3b27e29384875dfb107a020fa",
    "support"
   ],
   "css/css-writing-modes/sizing-orthog-vrl-in-htb-018.xht": [
-   "255802f531cbf3cc9e02cd47dc52c0052a607494",
+   "623381f2b77421b5d7846bbe5852da2a2e45f566",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-vrl-in-htb-019-ref.xht": [
    "798d0be68512f0c59f403857b6e523266121b2a6",
    "support"
   ],
   "css/css-writing-modes/sizing-orthog-vrl-in-htb-019.xht": [
-   "ef30488fa45a543d1c12c60868e9cada1a5d9cee",
+   "65ef8912d1681c0b72246f6dd26547704bae55ae",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-vrl-in-htb-020-ref.xht": [
    "cf47bdbf58e4ffccbbb05cd71e3387cf3c901791",
    "support"
   ],
   "css/css-writing-modes/sizing-orthog-vrl-in-htb-020.xht": [
-   "2883e0047361b95e3176e84fe0fee27d31e32f5e",
+   "1b65ce90afe50637dda87568855027bc48d3949b",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-vrl-in-htb-021.xht": [
-   "871795a6d8e31bbab05ceb9965f8234aa115cf43",
+   "953ccfc3d0c9069f34146da22b5621f0d7356ed6",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-vrl-in-htb-022-ref.xht": [
    "abc45262786f76c5d82ab19a6e697ea7a0781042",
    "support"
   ],
   "css/css-writing-modes/sizing-orthog-vrl-in-htb-022.xht": [
-   "9832a45c218ebe19e611130f00247f07a27788f5",
+   "7b7d75785df63a55945ddc3c2887bc9af6d73bba",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-vrl-in-htb-023-ref.xht": [
    "eb077b86b6f0a95ce3cf7e4c4019a3f91b1c210f",
    "support"
   ],
   "css/css-writing-modes/sizing-orthog-vrl-in-htb-023.xht": [
-   "1dea70c22f83b26e4bee4f0658a4236559a19d74",
+   "5faf4ab2bdb4f36cc51e499b90bac966763bbdbf",
    "reftest"
   ],
   "css/css-writing-modes/sizing-orthog-vrl-in-htb-024.xht": [
-   "82f45245816a1ecb4de68f919e88bd7cd96057c5",
+   "770cfe7939de94e221926b65bccfa057ee7711f2",
    "reftest"
   ],
   "css/css-writing-modes/support/100x100-lime.png": [
    "b02fc2d0ad1d95a2aeb6011022e63928841b183f",
    "support"
   ],
   "css/css-writing-modes/support/100x100-red.png": [
    "6fdfe9cdb3f6aca4564a08e443784e3abd952b52",
@@ -525005,17 +525206,17 @@
    "f0d47464da9d30e70733f09af78f3e9f982c4406",
    "testharness"
   ],
   "css/cssom/GetBoundingRect.html": [
    "7e5a8b25753ac970c2d192376c9dd93943b3dbb5",
    "testharness"
   ],
   "css/cssom/MediaList.html": [
-   "784bc428e8e65a0784dcf89c6e3e27305781cc72",
+   "0357bff95fc870624d13ad3bf61cdfff5b2ad1cf",
    "testharness"
   ],
   "css/cssom/MediaList2.xhtml": [
    "c7481f3c0fe943abb6d67004d6c4aaff12180e34",
    "testharness"
   ],
   "css/cssom/OWNERS": [
    "f131f271cb2f747e845584abcc445348e8c86521",
@@ -525033,33 +525234,33 @@
    "9199534f3b6cc473832562b1701ade3a05dde172",
    "testharness"
   ],
   "css/cssom/css-style-declaration-modifications.html": [
    "c169d758c1d91b75697b04cf72750f8ac1650e1a",
    "testharness"
   ],
   "css/cssom/cssimportrule.html": [
-   "da36c32a7ecad7542c73572917709ee394dc843c",
+   "f8a110a236529e78b528117b25866015d67568d9",
    "testharness"
   ],
   "css/cssom/cssom-cssText-serialize.html": [
    "66ad91da39c1e1da9021f6443e9b6d34baf57dcb",
    "testharness"
   ],
   "css/cssom/cssom-cssstyledeclaration-set.html": [
    "12f5dce3d37a718ac5c872f662cc9f3d9cf09179",
    "testharness"
   ],
   "css/cssom/cssom-fontfacerule-constructors.html": [
    "c064661df74571d374f49a693f3263fcf138e670",
    "testharness"
   ],
   "css/cssom/cssom-fontfacerule.html": [
-   "965a8f6289fa5c6e34bfd447de3b8ef86573fea1",
+   "ca5e2f162a4a0dd02f3c46e72b9e43e1b61d621a",
    "testharness"
   ],
   "css/cssom/cssom-ruleTypeAndOrder.html": [
    "3940c95b6c5664b0efee76cc90ffc466c218366f",
    "testharness"
   ],
   "css/cssom/cssom-setProperty-shorthand.html": [
    "14c752e5dbeab2d58983d53aceab08519379bf0f",
@@ -536961,17 +537162,17 @@
    "3eaf4dbfe67edd892c9a950c20a87c9b9ed565fa",
    "testharness"
   ],
   "custom-elements/attribute-changed-callback.html": [
    "320fb2bb26e7495d0829c39c113df3ea7ec1f4ef",
    "testharness"
   ],
   "custom-elements/builtin-coverage.html": [
-   "9163c06e2bf06b67e5ddf16a6b6d95ca7d64fb4d",
+   "47f6021a5d55b9fb0bd435cd42ceb022ef2b7f6e",
    "testharness"
   ],
   "custom-elements/connected-callbacks.html": [
    "615db12371d6f1f0ed6763abee3a84af9f87c0b2",
    "testharness"
   ],
   "custom-elements/custom-element-reaction-queue.html": [
    "68b226d776736e6044f842c440b42606b63c7175",
@@ -537032,16 +537233,20 @@
   "custom-elements/parser/parser-uses-create-an-element-for-a-token-svg.svg": [
    "51ecc75f42124e8071a767ef908ecc915cbf0fc1",
    "testharness"
   ],
   "custom-elements/parser/parser-uses-registry-of-owner-document.html": [
    "a62669ffcc75d54df38b65e33463566238c8644c",
    "testharness"
   ],
+  "custom-elements/pseudo-class-defined.html": [
+   "cf29756830dc12e60390c08486bbb3170c9c9c71",
+   "testharness"
+  ],
   "custom-elements/reaction-timing.html": [
    "2e390d9b3f4b725cfcaf02e4a5b088a2b7ca7f4d",
    "testharness"
   ],
   "custom-elements/reactions/Attr.html": [
    "f16c4bfdb097fbcaa4a039eaa25bc83ed72b2081",
    "testharness"
   ],
@@ -573589,17 +573794,17 @@
    "c2c952d562f601f2104014f6236368a7f6b84801",
    "testharness"
   ],
   "pointerevents/pointerlock/pointerevent_movementxy-manual.html": [
    "09da177c312d4112bc0177221cccaf787455db7e",
    "manual"
   ],
   "pointerevents/pointerlock/pointerevent_pointerlock_after_pointercapture-manual.html": [
-   "c3f3e1ed9ed8b404e4d6c68b9b518047ed87002f",
+   "272fc056c5a31a70d17fcde39fa99c27cde695b3",
    "manual"
   ],
   "pointerevents/pointerlock/pointerevent_pointerlock_supercedes_capture-manual.html": [
    "1968369ffe9917377fe3bb8801f8543aa9c0a9cf",
    "manual"
   ],
   "pointerevents/pointerlock/resources/pointerevent_movementxy-iframe.html": [
    "829b27c2a0f9281d65f7e2d760c7204781c71660",
@@ -583533,17 +583738,17 @@
    "b854db3540539d20aa0bef0f869edabd0b8b4d47",
    "testharness"
   ],
   "service-workers/service-worker/fetch-request-no-freshness-headers.https.html": [
    "9631947d3cec78547bd4666b8ca970d037648cc8",
    "testharness"
   ],
   "service-workers/service-worker/fetch-request-redirect.https.html": [
-   "e1ea127e72573e97a4d175c1780bfaae6f537972",
+   "d9df49b76012233e0aeb92f50a0613f90e8b3ee1",
    "testharness"
   ],
   "service-workers/service-worker/fetch-request-resources.https.html": [
    "d21ef5a4263e26cd3053a89171e2597424eaad82",
    "testharness"
   ],
   "service-workers/service-worker/fetch-request-xhr-sync.https.html": [
    "4aaa0b1995643f4e18c47d1947476a1a67fe997d",
@@ -583569,17 +583774,17 @@
    "989c30567eb1dd650dc7e2bf807e18961c991087",
    "testharness"
   ],
   "service-workers/service-worker/getregistrations.https.html": [
    "15c2be991ec5b02a0aecf54e6c7bb455f240141d",
    "testharness"
   ],
   "service-workers/service-worker/http-to-https-redirect-and-register.https.html": [
-   "95aee5b0d561467fb5da27f62210be9808539706",
+   "d9e1cc801c3ee075ceb5a5e68ce662cfb2432965",
    "testharness"
   ],
   "service-workers/service-worker/immutable-prototype-serviceworker.https.html": [
    "5c17042fa54cd1fdba6f7aae513412d4a223b432",
    "testharness"
   ],
   "service-workers/service-worker/import-scripts-redirect.https.html": [
    "ad5ca174b55222c41d1dc1a21fe0bc070357062b",
@@ -584945,17 +585150,17 @@
    "14d79d1008193c96f0eadaf3e47ef321a429b905",
    "testharness"
   ],
   "service-workers/service-worker/update-after-oneday.https.html": [
    "9f43ba359c4d564f75d4ce4b6a040aac6ba50d5b",
    "testharness"
   ],
   "service-workers/service-worker/update-bytecheck.https.html": [
-   "ab13a5489f964de56db2fe25c5895a8a55ab7d88",
+   "a39aa4877c3e47c8379b84f8520b6a726936867e",
    "testharness"
   ],
   "service-workers/service-worker/update-recovery.https.html": [
    "aac5705d6844e4a33200418504adb57053a45be2",
    "testharness"
   ],
   "service-workers/service-worker/update.https.html": [
    "d55da98b05b5885084474ebdbabdf6c0998f8bca",
@@ -592212,16 +592417,28 @@
   "webaudio/resources/audit-util.js": [
    "4405458b8f8bdc621c95c1d9ec1c1ad4e6002f1e",
    "support"
   ],
   "webaudio/resources/audit.js": [
    "1e7c1c4169bc54bd2046ff5b3392f846c6b7b40f",
    "support"
   ],
+  "webaudio/resources/distance-model-testing.js": [
+   "0be27d8bddd91a2c4c6e54d3b52af58bff2ed023",
+   "support"
+  ],
+  "webaudio/resources/panner-formulas.js": [
+   "872d9aa271558ee3e7aa293c8e3e44fd525461c0",
+   "support"
+  ],
+  "webaudio/resources/panner-model-testing.js": [
+   "4aa047ffeb14b216d1c329c8959f21e580e33b17",
+   "support"
+  ],
   "webaudio/resources/sin_440Hz_-6dBFS_1s.wav": [
    "09c866126524e4fc0d0fae84de8d34419b1a823b",
    "support"
   ],
   "webaudio/resources/start-stop-exceptions.js": [
    "70e0f890a721786f8afa4cd032e75ef85b5fc6bb",
    "support"
   ],
@@ -592420,16 +592637,60 @@
   "webaudio/the-audio-api/the-oscillatornode-interface/.gitkeep": [
    "da39a3ee5e6b4b0d3255bfef95601890afd80709",
    "support"
   ],
   "webaudio/the-audio-api/the-pannernode-interface/.gitkeep": [
    "da39a3ee5e6b4b0d3255bfef95601890afd80709",
    "support"
   ],
+  "webaudio/the-audio-api/the-pannernode-interface/distance-exponential.html": [
+   "c1c94753ebcd1930e326d73c085e6c3197967cd5",
+   "testharness"
+  ],
+  "webaudio/the-audio-api/the-pannernode-interface/distance-inverse.html": [
+   "400d2a373de3e4255279930fca2ec559aed19688",
+   "testharness"
+  ],
+  "webaudio/the-audio-api/the-pannernode-interface/distance-linear.html": [
+   "8e5d7d23f893b7e79446a82f46807b6106ea5643",
+   "testharness"
+  ],
+  "webaudio/the-audio-api/the-pannernode-interface/panner-automation-basic.html": [
+   "2916ba8f03b18c8da0aa71ea37d57bd604b1de81",
+   "testharness"
+  ],
+  "webaudio/the-audio-api/the-pannernode-interface/panner-automation-equalpower-stereo.html": [
+   "43edf7a7bef1f4e9989b048c571659c83ad234f2",
+   "testharness"
+  ],
+  "webaudio/the-audio-api/the-pannernode-interface/panner-automation-position.html": [
+   "81123665ad1f8201907251ddb0bb2707b14925e1",
+   "testharness"
+  ],
+  "webaudio/the-audio-api/the-pannernode-interface/panner-distance-clamping.html": [
+   "820c902b9bcfeed9611ec9c3cba3ee2179a8cee7",
+   "testharness"
+  ],
+  "webaudio/the-audio-api/the-pannernode-interface/panner-equalpower-stereo.html": [
+   "ebe3d2622a8bdc3802159fa0809c1aea28053b09",
+   "testharness"
+  ],
+  "webaudio/the-audio-api/the-pannernode-interface/panner-equalpower.html": [
+   "28120d05419bb478f49f6bb2449fdf282af6624e",
+   "testharness"
+  ],
+  "webaudio/the-audio-api/the-pannernode-interface/panner-rolloff-clamping.html": [
+   "60a763393acf1470fff8b7670b381e28ae6f9270",
+   "testharness"
+  ],
+  "webaudio/the-audio-api/the-pannernode-interface/pannernode-basic.html": [
+   "074d64146ad36b989d783bf93fe295846287538f",
+   "testharness"
+  ],
   "webaudio/the-audio-api/the-pannernode-interface/test-pannernode-automation.html": [
    "09241a8acbc3a556ac4fb24c0ae4de8c8f70c2ed",
    "testharness"
   ],
   "webaudio/the-audio-api/the-periodicwave-interface/.gitkeep": [
    "da39a3ee5e6b4b0d3255bfef95601890afd80709",
    "support"
   ],
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/css/css-typed-om/stylevalue-subclasses/cssSkewX.tentative.html.ini
@@ -0,0 +1,4 @@
+[cssSkewX.tentative.html]
+  [CSSSkewX tests]
+    expected: FAIL
+
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/css/css-typed-om/the-stylepropertymap/properties/display.html.ini
@@ -0,0 +1,4 @@
+[display.html]
+  ['display' property]
+    expected: FAIL
+
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/css/css-typed-om/the-stylepropertymap/properties/margin-top.html.ini
@@ -0,0 +1,4 @@
+[margin-top.html]
+  ['margin-top' property]
+    expected: FAIL
+
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/custom-elements/pseudo-class-defined.html.ini
@@ -0,0 +1,97 @@
+[pseudo-class-defined.html]
+  [<div> should be :defined]
+    expected: FAIL
+
+  [createElement("div") should be :defined]
+    expected: FAIL
+
+  [createElementNS("http://www.w3.org/1999/xhtml", "div") should be :defined]
+    expected: FAIL
+
+  [createElementNS("http://www.w3.org/2000/svg", "div") should be :defined]
+    expected: FAIL
+
+  [Without browsing context: createElement("div") should be :defined]
+    expected: FAIL
+
+  [Without browsing context: createElementNS("http://www.w3.org/1999/xhtml", "div") should be :defined]
+    expected: FAIL
+
+  [Without browsing context: createElementNS("http://www.w3.org/2000/svg", "div") should be :defined]
+    expected: FAIL
+
+  [<a-a> should not be :defined]
+    expected: FAIL
+
+  [createElement("a-a") should not be :defined]
+    expected: FAIL
+
+  [createElementNS("http://www.w3.org/1999/xhtml", "a-a") should not be :defined]
+    expected: FAIL
+
+  [createElementNS("http://www.w3.org/2000/svg", "a-a") should be :defined]
+    expected: FAIL
+
+  [Upgraded createElement("a-a") should be :defined]
+    expected: FAIL
+
+  [Upgraded createElementNS("http://www.w3.org/1999/xhtml", "a-a") should be :defined]
+    expected: FAIL
+
+  [Without browsing context: createElement("a-a") should not be :defined]
+    expected: FAIL
+
+  [Without browsing context: createElementNS("http://www.w3.org/1999/xhtml", "a-a") should not be :defined]
+    expected: FAIL
+
+  [Without browsing context: createElementNS("http://www.w3.org/2000/svg", "a-a") should be :defined]
+    expected: FAIL
+
+  [<font-face> should be :defined]
+    expected: FAIL
+
+  [createElement("font-face") should be :defined]
+    expected: FAIL
+
+  [createElementNS("http://www.w3.org/1999/xhtml", "font-face") should be :defined]
+    expected: FAIL
+
+  [createElementNS("http://www.w3.org/2000/svg", "font-face") should be :defined]
+    expected: FAIL
+
+  [Without browsing context: createElement("font-face") should be :defined]
+    expected: FAIL
+
+  [Without browsing context: createElementNS("http://www.w3.org/1999/xhtml", "font-face") should be :defined]
+    expected: FAIL
+
+  [Without browsing context: createElementNS("http://www.w3.org/2000/svg", "font-face") should be :defined]
+    expected: FAIL
+
+  [<abbr is=my-abbr> should not be :defined]
+    expected: FAIL
+
+  [createElement("abbr", { is: "my-abbr" }) should not be :defined]
+    expected: FAIL
+
+  [createElementNS("http://www.w3.org/1999/xhtml", "abbr", { is: "my-abbr" }) should not be :defined]
+    expected: FAIL
+
+  [createElementNS("http://www.w3.org/2000/svg", "abbr", { is: "my-abbr" }) should be :defined]
+    expected: FAIL
+
+  [Upgraded createElement("abbr", { is: "my-abbr" }) should be :defined]
+    expected: FAIL
+
+  [Upgraded createElementNS("http://www.w3.org/1999/xhtml", "abbr", { is: "my-abbr" }) should be :defined]
+    expected: FAIL
+
+  [Without browsing context: createElement("abbr", { is: "my-abbr" }) should not be :defined]
+    expected: FAIL
+
+  [Without browsing context: createElementNS("http://www.w3.org/1999/xhtml", "abbr", { is: "my-abbr" }) should not be :defined]
+    expected: FAIL
+
+  [Without browsing context: createElementNS("http://www.w3.org/2000/svg", "abbr", { is: "my-abbr" }) should be :defined]
+    expected: FAIL
+
--- a/testing/web-platform/meta/custom-elements/reactions/Element.html.ini
+++ b/testing/web-platform/meta/custom-elements/reactions/Element.html.ini
@@ -1,13 +1,12 @@
 [Element.html]
   prefs: [dom.webcomponents.shadowdom.enabled:true]
   disabled:
     if not stylo: Shadow DOM is stylo only.
-
   [removeAttribute on Element must not enqueue an attributeChanged reaction when removing an attribute that does not exist]
     expected: FAIL
 
   [removeAttributeNS on Element must not enqueue an attributeChanged reaction when removing an attribute that does not exist]
     expected: FAIL
 
   [removeAttributeNode on Element must not enqueue an attributeChanged reaction when removing an attribute that does not exist]
     expected: FAIL
--- a/testing/web-platform/meta/mozilla-sync
+++ b/testing/web-platform/meta/mozilla-sync
@@ -1,2 +1,2 @@
-local: c32b6b173c0008be57ce56cc78878c2e29ef5472
-upstream: bb1f35100ad0aedeeb6897dd640b360f80498027
+local: 001cf1ba27c3446ae6e4650a773a7022f4ce48b9
+upstream: 3197bbb8a67f73a36230d3c2deab7f70cd660727
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/webaudio/the-audio-api/the-pannernode-interface/panner-automation-basic.html.ini
@@ -0,0 +1,2 @@
+[panner-automation-basic.html]
+  expected: ERROR
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/webaudio/the-audio-api/the-pannernode-interface/panner-automation-position.html.ini
@@ -0,0 +1,2 @@
+[panner-automation-position.html]
+  expected: TIMEOUT
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/webaudio/the-audio-api/the-pannernode-interface/panner-distance-clamping.html.ini
@@ -0,0 +1,28 @@
+[panner-distance-clamping.html]
+  [X new PannerNode(c, {refDistance: -1}) did not throw an exception.]
+    expected: FAIL
+
+  [X panner.refDistance = -1 did not throw an exception.]
+    expected: FAIL
+
+  [< [ref-distance-error\] 2 out of 6 assertions were failed.]
+    expected: FAIL
+
+  [X new PannerNode(c, {maxDistance: -1}) did not throw an exception.]
+    expected: FAIL
+
+  [X new PannerNode(c, {maxDistance: 0}) did not throw an exception.]
+    expected: FAIL
+
+  [X panner.maxDistance = -1 did not throw an exception.]
+    expected: FAIL
+
+  [X panner.maxDistance = 0 did not throw an exception.]
+    expected: FAIL
+
+  [< [max-distance-error\] 4 out of 6 assertions were failed.]
+    expected: FAIL
+
+  [# AUDIT TASK RUNNER FINISHED: 2 out of 4 tasks were failed.]
+    expected: FAIL
+
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/webaudio/the-audio-api/the-pannernode-interface/panner-rolloff-clamping.html.ini
@@ -0,0 +1,40 @@
+[panner-rolloff-clamping.html]
+  [X Panner distanceModel: "linear", rolloffFactor: -1 expected to be equal to the array [0,0.018875712528824806,0.05621177703142166,0.06847958266735077,0.09856243431568146,0.12242205440998077,0.1495940238237381,0.16251686215400696,0.20651382207870483,0.21217726171016693,0.2435699999332428,0.2771494388580322,0.28300273418426514,0.32210540771484375,0.344368577003479,0.36553990840911865...\] but differs in 2047 places:\n\tIndex\tActual\t\t\tExpected\n\t[1\]\t2.8312625363469124e-2\t1.8875712528824806e-2\n\t[2\]\t8.4314860403537750e-2\t5.6211777031421661e-2\n\t[3\]\t1.0271595418453217e-1\t6.8479582667350769e-2\n\t[4\]\t1.4783872663974762e-1\t9.8562434315681458e-2\n\t...and 2043 more errors.]
+    expected: FAIL
+
+  [< [linear-clamp-low\] 1 out of 1 assertions were failed.]
+    expected: FAIL
+
+  [X Panner distanceModel: "linear", rolloffFactor: 2 expected to be equal to the array [0,0.009438800625503063,0.02810869924724102,0.03424321487545967,0.049286145716905594,0.06121714785695076,0.07480449229478836,0.08126655966043472,0.10326723754405975,0.10609924048185349,0.12179718166589737,0.1385885775089264,0.14151552319526672,0.16106881201267242,0.1722015142440796,0.18278823792934418...\] but differs in 2047 places:\n\tIndex\tActual\t\t\tExpected\n\t[1\]\t1.8877600496125524e-6\t9.4388006255030632e-3\n\t[2\]\t5.6217400015157182e-6\t2.8108699247241020e-2\n\t[3\]\t6.8486433519865386e-6\t3.4243214875459671e-2\n\t[4\]\t9.8572290880838409e-6\t4.9286145716905594e-2\n\t...and 2043 more errors.]
+    expected: FAIL
+
+  [< [linear-clamp-high\] 1 out of 1 assertions were failed.]
+    expected: FAIL
+
+  [X Panner distanceModel: "inverse", rolloffFactor: -1 expected to be equal to the array [0,0.018875712528824806,0.05621177703142166,0.06847958266735077,0.09856243431568146,0.12242205440998077,0.1495940238237381,0.16251686215400696,0.20651382207870483,0.21217726171016693,0.2435699999332428,0.2771494388580322,0.28300273418426514,0.32210540771484375,0.344368577003479,0.36553990840911865...\] but differs in 2047 places:\n\tIndex\tActual\t\t\tExpected\n\t[1\]\t0.0000000000000000e+0\t1.8875712528824806e-2\n\t[2\]\t0.0000000000000000e+0\t5.6211777031421661e-2\n\t[3\]\t0.0000000000000000e+0\t6.8479582667350769e-2\n\t[4\]\t0.0000000000000000e+0\t9.8562434315681458e-2\n\t...and 2043 more errors.]
+    expected: FAIL
+
+  [< [inverse-clamp\] 1 out of 1 assertions were failed.]
+    expected: FAIL
+
+  [X Panner distanceModel: "exponential", rolloffFactor: -2 expected to be equal to the array [0,0.018875712528824806,0.05621177703142166,0.06847958266735077,0.09856243431568146,0.12242205440998077,0.1495940238237381,0.16251686215400696,0.20651382207870483,0.21217726171016693,0.2435699999332428,0.2771494388580322,0.28300273418426514,0.32210540771484375,0.344368577003479,0.36553990840911865...\] but differs in 2047 places:\n\tIndex\tActual\t\t\tExpected\n\t[1\]\t4.7189281250000000e+5\t1.8875712528824806e-2\n\t[2\]\t1.4052943750000000e+6\t5.6211777031421661e-2\n\t[3\]\t1.7119896250000000e+6\t6.8479582667350769e-2\n\t[4\]\t2.4640607500000000e+6\t9.8562434315681458e-2\n\t...and 2043 more errors.]
+    expected: FAIL
+
+  [< [exponential-clamp\] 1 out of 1 assertions were failed.]
+    expected: FAIL
+
+  [# AUDIT TASK RUNNER FINISHED: 4 out of 4 tasks were failed.]
+    expected: FAIL
+
+  [X Panner distanceModel: "linear", rolloffFactor: -1 expected to be equal to the array [0,0.0188757237046957,0.056211769580841064,0.06847962737083435,0.09856244176626205,0.12242206931114197,0.1495940387248993,0.16251686215400696,0.2065138816833496,0.21217726171016693,0.24357002973556519,0.2771494686603546,0.2830027937889099,0.3221054673194885,0.344368577003479,0.36553993821144104...\] but differs in 2047 places:\n\tIndex\tActual\t\t\tExpected\n\t[1\]\t2.8312642127275467e-2\t1.8875723704695702e-2\n\t[2\]\t8.4314845502376556e-2\t5.6211769580841064e-2\n\t[3\]\t1.0271602123975754e-1\t6.8479627370834351e-2\n\t[4\]\t1.4783874154090881e-1\t9.8562441766262054e-2\n\t...and 2043 more errors.]
+    expected: FAIL
+
+  [X Panner distanceModel: "linear", rolloffFactor: 2 expected to be equal to the array [0,0.009438806213438511,0.028108695521950722,0.03424323722720146,0.04928614944219589,0.06121715530753136,0.07480449974536896,0.08126655966043472,0.10326726734638214,0.10609924048185349,0.12179719656705856,0.13858859241008759,0.1415155529975891,0.1610688418149948,0.1722015142440796,0.18278825283050537...\] but differs in 2047 places:\n\tIndex\tActual\t\t\tExpected\n\t[1\]\t1.8877611864809296e-6\t9.4388062134385109e-3\n\t[2\]\t5.6217390920210164e-6\t2.8108695521950722e-2\n\t[3\]\t6.8486474447126966e-6\t3.4243237227201462e-2\n\t[4\]\t9.8572299975785427e-6\t4.9286149442195892e-2\n\t...and 2043 more errors.]
+    expected: FAIL
+
+  [X Panner distanceModel: "inverse", rolloffFactor: -1 expected to be equal to the array [0,0.0188757237046957,0.056211769580841064,0.06847962737083435,0.09856244176626205,0.12242206931114197,0.1495940387248993,0.16251686215400696,0.2065138816833496,0.21217726171016693,0.24357002973556519,0.2771494686603546,0.2830027937889099,0.3221054673194885,0.344368577003479,0.36553993821144104...\] but differs in 2047 places:\n\tIndex\tActual\t\t\tExpected\n\t[1\]\t0.0000000000000000e+0\t1.8875723704695702e-2\n\t[2\]\t0.0000000000000000e+0\t5.6211769580841064e-2\n\t[3\]\t0.0000000000000000e+0\t6.8479627370834351e-2\n\t[4\]\t0.0000000000000000e+0\t9.8562441766262054e-2\n\t...and 2043 more errors.]
+    expected: FAIL
+
+  [X Panner distanceModel: "exponential", rolloffFactor: -2 expected to be equal to the array [0,0.0188757237046957,0.056211769580841064,0.06847962737083435,0.09856244176626205,0.12242206931114197,0.1495940387248993,0.16251686215400696,0.2065138816833496,0.21217726171016693,0.24357002973556519,0.2771494686603546,0.2830027937889099,0.3221054673194885,0.344368577003479,0.36553993821144104...\] but differs in 2047 places:\n\tIndex\tActual\t\t\tExpected\n\t[1\]\t4.7189309375000000e+5\t1.8875723704695702e-2\n\t[2\]\t1.4052942500000000e+6\t5.6211769580841064e-2\n\t[3\]\t1.7119906250000000e+6\t6.8479627370834351e-2\n\t[4\]\t2.4640610000000000e+6\t9.8562441766262054e-2\n\t...and 2043 more errors.]
+    expected: FAIL
+
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/webaudio/the-audio-api/the-pannernode-interface/pannernode-basic.html.ini
@@ -0,0 +1,2 @@
+[pannernode-basic.html]
+  expected: ERROR
--- a/testing/web-platform/tests/css/css-typed-om/resources/testhelper.js
+++ b/testing/web-platform/tests/css/css-typed-om/resources/testhelper.js
@@ -49,16 +49,19 @@ function assert_style_value_equals(a, b)
       assert_style_value_equals(a.y, b.y);
       assert_style_value_equals(a.z, b.z);
       assert_style_value_equals(a.is2D, b.is2D);
       break;
     case 'CSSSkew':
       assert_style_value_equals(a.ax, b.ax);
       assert_style_value_equals(a.ay, b.ay);
       break;
+    case 'CSSSkewX':
+      assert_style_value_equals(a.ax, b.ax);
+      break;
     case 'CSSPerspective':
       assert_style_value_equals(a.length, b.length);
       break;
     case 'CSSMatrixComponent':
       assert_matrix_approx_equals(a.matrix, b.matrix, 1e-6);
       break;
     case 'CSSURLImageValue':
       assert_equals(a.instrinsicWidth, b.instrinsicWidth);
--- a/testing/web-platform/tests/css/css-typed-om/stylevalue-normalization/transformvalue-normalization.tentative.html
+++ b/testing/web-platform/tests/css/css-typed-om/stylevalue-normalization/transformvalue-normalization.tentative.html
@@ -119,23 +119,28 @@ const gTestCases = [
     desc: 'rotateZ()'
   },
   {
     cssText: 'skew(90deg)',
     expected: new CSSSkew(CSS.deg(90), CSS.deg(0)),
     desc: 'skew() with only X'
   },
   {
+    cssText: 'skew(90deg, 0deg)',
+    expected: new CSSSkew(CSS.deg(90), CSS.deg(0)),
+    desc: 'skew() with X and Y which is 0 value'
+  },
+  {
     cssText: 'skew(90deg, 45deg)',
     expected: new CSSSkew(CSS.deg(90), CSS.deg(45)),
     desc: 'skew() with X and Y'
   },
   {
     cssText: 'skewX(90deg)',
-    expected: new CSSSkew(CSS.deg(90), CSS.deg(0)),
+    expected: new CSSSkewX(CSS.deg(90)),
     desc: 'skewX()'
   },
   {
     cssText: 'skewY(90deg)',
     expected: new CSSSkew(CSS.deg(0), CSS.deg(90)),
     desc: 'skewY()'
   },
   {
@@ -148,22 +153,23 @@ const gTestCases = [
 for (const {cssText, expected, desc} of gTestCases) {
   test(t => {
     test_transform_normalization(t, cssText, new CSSTransformValue([expected]));
   }, 'Normalizing a ' + desc + ' returns a ' + expected.constructor.name);
 }
 
 test(t => {
   test_transform_normalization(t,
-      'translate(1px) rotateX(90deg) perspective(1px) skew(90deg) scale3d(1, 2, 3)',
+      'translate(1px) rotateX(90deg) perspective(1px) skew(90deg) skewX(20deg) scale3d(1, 2, 3)',
       new CSSTransformValue([
         new CSSTranslate(CSS.px(1), CSS.px(0)),
         new CSSRotate(CSS.number(1), CSS.number(0), CSS.number(0), CSS.deg(90)),
         new CSSPerspective(CSS.px(1)),
         new CSSSkew(CSS.deg(90), CSS.deg(0)),
+        new CSSSkewX(CSS.deg(20)),
         new CSSScale(CSS.number(1), CSS.number(2), CSS.number(3)),
       ]));
 }, 'Normalizing a <transform-list> returns a CSSTransformValue containing all the transforms');
 
 test(t => {
   test_transform_normalization(t,
       'translate(calc(1px + 1em)) perspective(calc(1px + 1em))',
       new CSSTransformValue([
--- a/testing/web-platform/tests/css/css-typed-om/stylevalue-serialization/cssTransformValue.tentative.html
+++ b/testing/web-platform/tests/css/css-typed-om/stylevalue-serialization/cssTransformValue.tentative.html
@@ -45,16 +45,21 @@ const gTestCases = [
     desc: 'CSSSkew'
   },
   {
     value: new CSSSkew(CSS.deg(90), CSS.turn(0)),
     cssText: 'skew(90deg)',
     desc: 'CSSSkew with Y which is 0 value'
   },
   {
+    value: new CSSSkewX(CSS.deg(90)),
+    cssText: 'skewX(90deg)',
+    desc: 'CSSSkewX'
+  },
+  {
     value: new CSSPerspective(CSS.px(1)),
     cssText: 'perspective(1px)',
     desc: 'CSSPerspective'
   },
   {
     value: new CSSTransformValue([new CSSPerspective(CSS.px(1))]),
     cssText: 'perspective(1px)',
     desc: 'CSSTransformValue with a single transform'
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-typed-om/stylevalue-subclasses/cssSkewX.tentative.html
@@ -0,0 +1,62 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>CSSSkewX tests</title>
+<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#cssskewx">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="../resources/testhelper.js"></script>
+<script>
+'use strict';
+
+const gInvalidTestCases = [
+  { value: 'auto', desc: 'a keyword'},
+  { value: 3.14, desc: 'a double'},
+  { value: 0, desc: 'a unitless zero'},
+  { value: '10deg', desc: 'a string angle'},
+  { value: CSS.number(10), desc: 'a number CSSUnitValue'},
+  { value: CSS.s(10), desc: 'a time dimension CSSUnitValue'},
+  { value: new CSSMathSum(CSS.px(1)), desc: 'a CSSMathValue of length type' },
+];
+
+for (const {value, desc} of gInvalidTestCases) {
+  test(() => {
+    assert_throws(new TypeError(), () => new CSSSkewX(value));
+  }, 'Constructing a CSSSkewX with ' + desc + ' throws a TypeError');
+}
+
+for (const {value, desc} of gInvalidTestCases) {
+  test(() => {
+    let skewX = new CSSSkewX(CSS.deg(0));
+    assert_throws(new TypeError(), () => skewX.ax = value);
+    assert_style_value_equals(skewX.ax, CSS.deg(0));
+  }, 'Updating CSSSkewX.ax with ' + desc + ' throws a TypeError');
+}
+
+const gValidTestCases = [
+  { value: CSS.deg(-3.14), desc: 'an angle CSSUnitValue' },
+  { value: new CSSMathSum(CSS.deg(1)), desc: 'a CSSMathValue of angle type' },
+];
+
+for (const {value: ax, desc: axDesc} of gValidTestCases) {
+  test(() => {
+    const skewX = new CSSSkewX(ax);
+    assert_equals(skewX.ax, ax);
+    assert_true(skewX.is2D);
+  }, 'CSSSkewX can be constructed from ' + axDesc);
+}
+
+for (const {value, desc} of gValidTestCases) {
+  test(() => {
+    let skewX = new CSSSkewX(CSS.deg(0));
+    skewX.ax = value;
+    assert_style_value_equals(skewX.ax, value);
+  }, 'CSSSkew.ax can be updated to ' + desc);
+}
+
+test(() => {
+  let skewX = new CSSSkewX(CSS.deg(0));
+  skewX.is2D = false;
+  assert_true(skewX.is2D);
+}, 'Modifying skewX.is2D is a no-op');
+
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-typed-om/the-stylepropertymap/properties/display.html
@@ -0,0 +1,23 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>'display' property</title>
+<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-get">
+<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-set">
+<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#property-stle-value-normalization">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="../../resources/testhelper.js"></script>
+<script src="resources/testsuite.js"></script>
+<body>
+<div id="log">
+<script>
+'use strict';
+
+runPropertyTests('display', [
+  {
+    specified: '<ident>',
+    examples: [new CSSKeywordValue('none'), new CSSKeywordValue('block')]
+  },
+]);
+
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-typed-om/the-stylepropertymap/properties/margin-top.html
@@ -0,0 +1,23 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>'margin-top' property</title>
+<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-get">
+<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-set">
+<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#property-stle-value-normalization">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="../../resources/testhelper.js"></script>
+<script src="resources/testsuite.js"></script>
+<body>
+<div id="log">
+<script>
+'use strict';
+
+runPropertyTests('margin-top', [
+  { specified: '0' },
+  { specified: '<ident>', examples: [new CSSKeywordValue('auto')] },
+  { specified: '<percentage>' },
+  { specified: '<length>' },
+]);
+
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-typed-om/the-stylepropertymap/properties/resources/testsuite.js
@@ -0,0 +1,62 @@
+function testGet(propertyName, values, description) {
+  test(t => {
+    let element = createDivWithStyle(t);
+    let styleMap = element.attributeStyleMap;
+
+    for (const styleValue of values) {
+      element.style[propertyName] = styleValue.toString();
+
+      getComputedStyle(element); // Force a style recalc.
+      const result = styleMap.get(propertyName);
+      assert_style_value_equals(result, styleValue);
+    }
+  }, `Can get ${description} from '${propertyName}'`);
+}
+
+function testSet(propertyName, values, description) {
+  test(t => {
+    let element = createDivWithStyle(t);
+    let styleMap = element.attributeStyleMap;
+
+    for (const styleValue of values) {
+      styleMap.set(propertyName, styleValue);
+
+      getComputedStyle(element); // Force a style recalc.
+      assert_equals(element.style[propertyName], styleValue.toString());
+    }
+  }, `Can set '${propertyName}' to ${description}`);
+}
+
+function testGetSet(propertyName, values, description) {
+  testGet(propertyName, values, description);
+  testSet(propertyName, values, description);
+}
+
+function runPropertyTests(propertyName, testCases) {
+  for (const testCase of testCases) {
+    if (testCase.specified == '0') {
+      testSet(propertyName, [
+        new CSSUnitValue(0, 'number'),
+      ], 'unitless zero');
+    } else if (testCase.specified === '<length>') {
+      testGetSet(propertyName, [
+        new CSSUnitValue(0, 'px'),
+        new CSSUnitValue(-3.14, 'em'),
+        new CSSUnitValue(3.14, 'cm'),
+      ], 'a length CSSUnitValue');
+    } else if (testCase.specified == '<percentage>') {
+      testGetSet(propertyName, [
+        new CSSUnitValue(0, 'percent'),
+        new CSSUnitValue(-3.14, 'percent'),
+        new CSSUnitValue(3.14, 'percent'),
+      ], 'a percent CSSUnitValue');
+    } else if (testCase.specified == '<ident>') {
+      if (!testCase.examples) {
+        throw new Error('<ident> tests require examples');
+      }
+
+      testGetSet(propertyName, testCase.examples,
+        'a CSSKeywordValue');
+    }
+  }
+}
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-ui/reference/text-overflow-027-ref.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Basic User Interface Test Reference</title>
+<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
+<style>
+div { font-family: monospace; }
+</style>
+
+<p>The test passes if the following text is visible below: 123456 FE…</p>
+<div>123456 FE…</bdo></div>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-ui/reference/text-overflow-028-ref.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Basic User Interface Test Reference</title>
+<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
+<style>
+div { font-family: monospace; }
+</style>
+
+<p>The test passes if the following text is visible below: …56 FEDCBA</p>
+<div>…56 FEDCBA</div>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-ui/reference/text-overflow-029-ref.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html lang="en">
+<meta charset="utf-8">
+<title>CSS Basic User Interface Reference</title>
+<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/">
+<style>
+div { font: 20px monospace; }
+</style>
+
+<div>Test passed…</div>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-ui/text-overflow-027.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Basic User Interface Test: text-overflow applies visually to bidi</title>
+<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
+<link rel="help" href="http://www.w3.org/TR/css-ui-3/#text-overflow">
+<link rel="help" href="http://www.w3.org/TR/css-ui-4/#text-overflow">
+<link rel="match" href="reference/text-overflow-027-ref.html">
+<meta name="flags" content="">
+<meta name="assert" content="text-overflow is a visual operation that occurs after layout, and therfore ellides text from the visual end of the line, even in bidi situations">
+<style>
+div {
+  font-family: monospace;
+  width: 10ch;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: pre;
+}
+</style>
+
+<p>The test passes if the following text is visible below: 123456 FE…</p>
+<div>123456 <bdo dir=rtl>ABCDEF</bdo></div>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-ui/text-overflow-028.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Basic User Interface Test: text-overflow applies visually to bidi</title>
+<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
+<link rel="help" href="http://www.w3.org/TR/css-ui-3/#text-overflow">
+<link rel="help" href="http://www.w3.org/TR/css-ui-4/#text-overflow">
+<link rel="match" href="reference/text-overflow-028-ref.html">
+<meta name="flags" content="">
+<meta name="assert" content="text-overflow is a visual operation that occurs after layout, and therfore ellides text from the visual end of the line, even in bidi situations">
+<style>
+div {
+  font-family: monospace;
+  width: 10ch;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: pre;
+}
+</style>
+
+<p>The test passes if the following text is visible below: …56 FEDCBA</p>
+<div dir=rtl><bdo dir=rtl>ABCDEF</bdo> 123456</div>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-ui/text-overflow-029.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html lang="en">
+<meta charset="utf-8">
+<title>CSS Basic User Interface Test: text-overflow and bidi interaction</title>
+<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/">
+<link rel="help" href="http://www.w3.org/TR/css-ui-3/#text-overflow">
+<link rel="help" href="http://www.w3.org/TR/css-ui-4/#text-overflow">
+<link rel="match" href="reference/text-overflow-029-ref.html">
+<meta name="assert" content="When there's content of mixed directionality, text-overflow ellides the characters at the physical end of the line.">
+<meta name="flags" content="">
+<style>
+div {
+  font: 20px monospace;
+  width: 12.3ch; /* slightly more than 12ch because in some browsers (safari) the ellipsis is slightly large than other characters, even in monospace fonts. */
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  overflow: hidden;
+}
+</style>
+
+<div>Test &#x202E;deliafdessap&#x202C;</div>
--- a/testing/web-platform/tests/css/css-writing-modes/float-lft-orthog-htb-in-vlr-002.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/float-lft-orthog-htb-in-vlr-002.xht
@@ -10,17 +10,17 @@
   <meta name="DC.date.modified" content="2017-02-17T09:54:03+11:00" scheme="W3CDTF" />
 
   <!--
   Inspired by the test in
   http://lists.w3.org/Archives/Public/www-style/2016Nov/0044.html
   -->
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://drafts.csswg.org/css-writing-modes-3/#auto-multicol" title="7.3.2 Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="float-lft-orthog-htb-in-vlr-002-ref.xht" />
 
   <meta content="" name="flags" />
   <meta content="This test checks the horizontal position of an orthogonal floated left block box inside a vertical-lr parent. The orthogonal floated left block box must be put as far to the left as possible inside the vertical-lr line box." name="assert" />
 
   <style type="text/css"><![CDATA[
   html
     {
--- a/testing/web-platform/tests/css/css-writing-modes/float-lft-orthog-htb-in-vrl-002.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/float-lft-orthog-htb-in-vrl-002.xht
@@ -10,17 +10,17 @@
   <meta name="DC.date.modified" content="2017-02-17T09:54:03+11:00" scheme="W3CDTF" />
 
   <!--
   Inspired by the test in
   http://lists.w3.org/Archives/Public/www-style/2016Nov/0044.html
   -->
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://drafts.csswg.org/css-writing-modes-3/#auto-multicol" title="7.3.2 Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="float-lft-orthog-htb-in-vrl-002-ref.xht" />
 
   <meta content="" name="flags" />
   <meta content="This test checks the horizontal position of an orthogonal floated left block box inside an vertical-rl parent. The orthogonal floated left block box must be put as far to the right as possible inside the vertical-rl line box." name="assert" />
 
   <style type="text/css"><![CDATA[
   html
     {
--- a/testing/web-platform/tests/css/css-writing-modes/float-lft-orthog-vlr-in-htb-002.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/float-lft-orthog-vlr-in-htb-002.xht
@@ -10,17 +10,17 @@
   <meta name="DC.date.modified" content="2017-02-17T09:54:03+11:00" scheme="W3CDTF" />
 
   <!--
   Inspired by the test in
   http://lists.w3.org/Archives/Public/www-style/2016Nov/0044.html
   -->
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://drafts.csswg.org/css-writing-modes-3/#auto-multicol" title="7.3.2 Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="float-lft-orthog-vlr-in-htb-002-ref.xht" />
 
   <meta content="" name="flags" />
   <meta content="This test checks the vertical position of an orthogonal floated left block box inside an horizontal-tb parent. The orthogonal floated left block box must be put as high as possible inside the horizontal-tb line box." name="assert" />
 
   <style type="text/css"><![CDATA[
   div#horiz-parent
     {
--- a/testing/web-platform/tests/css/css-writing-modes/float-lft-orthog-vrl-in-htb-002.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/float-lft-orthog-vrl-in-htb-002.xht
@@ -10,17 +10,17 @@
   <meta name="DC.date.modified" content="2017-02-17T09:54:03+11:00" scheme="W3CDTF" />
 
   <!--
   Inspired by the test in
   http://lists.w3.org/Archives/Public/www-style/2016Nov/0044.html
   -->
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://drafts.csswg.org/css-writing-modes-3/#auto-multicol" title="7.3.2 Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="float-lft-orthog-vrl-in-htb-002-ref.xht" />
 
   <meta content="" name="flags" />
   <meta content="This test checks the vertical position of an orthogonal floated left block box inside an horizontal-tb parent. The orthogonal floated left block box must be put as high as possible inside the horizontal-tb line box." name="assert" />
 
   <style type="text/css"><![CDATA[
   div#horiz-parent
     {
--- a/testing/web-platform/tests/css/css-writing-modes/float-rgt-orthog-htb-in-vlr-003.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/float-rgt-orthog-htb-in-vlr-003.xht
@@ -10,17 +10,17 @@
   <meta name="DC.date.modified" content="2017-02-17T09:54:03+11:00" scheme="W3CDTF" />
 
   <!--
   Inspired by the test in
   http://lists.w3.org/Archives/Public/www-style/2016Nov/0044.html
   -->
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://drafts.csswg.org/css-writing-modes-3/#auto-multicol" title="7.3.2 Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="float-rgt-orthog-htb-in-vlr-003-ref.xht" />
 
   <meta content="" name="flags" />
   <meta content="This test checks the horizontal position of an orthogonal floated right block box inside a vertical-lr parent. The orthogonal floated right block box must be put as far to the left as possible inside the vertical-lr line box." name="assert" />
 
   <style type="text/css"><![CDATA[
   html
     {
--- a/testing/web-platform/tests/css/css-writing-modes/float-rgt-orthog-htb-in-vrl-003.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/float-rgt-orthog-htb-in-vrl-003.xht
@@ -10,17 +10,17 @@
   <meta name="DC.date.modified" content="2017-02-17T09:54:03+11:00" scheme="W3CDTF" />
 
   <!--
   Inspired by the test in
   http://lists.w3.org/Archives/Public/www-style/2016Nov/0044.html
   -->
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://drafts.csswg.org/css-writing-modes-3/#auto-multicol" title="7.3.2 Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="float-rgt-orthog-htb-in-vrl-003-ref.xht" />
 
   <meta content="" name="flags" />
   <meta content="This test checks the horizontal position of an orthogonal floated right block box inside a vertical-rl parent. The orthogonal floated right block box must be put as far to the right as possible inside the vertical-rl line box." name="assert" />
 
   <style type="text/css"><![CDATA[
   html
     {
--- a/testing/web-platform/tests/css/css-writing-modes/float-rgt-orthog-vlr-in-htb-003.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/float-rgt-orthog-vlr-in-htb-003.xht
@@ -10,17 +10,17 @@
   <meta name="DC.date.modified" content="2017-02-17T09:54:03+11:00" scheme="W3CDTF" />
 
   <!--
   Inspired by the test in
   http://lists.w3.org/Archives/Public/www-style/2016Nov/0044.html
   -->
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://drafts.csswg.org/css-writing-modes-3/#auto-multicol" title="7.3.2 Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="float-rgt-orthog-vlr-in-htb-003-ref.xht" />
 
   <meta content="" name="flags" />
   <meta content="This test checks the vertical position of an orthogonal floated right block box inside an horizontal-tb parent. The orthogonal floated right block box must be put as high as possible inside the horizontal-tb line box." name="assert" />
 
   <style type="text/css"><![CDATA[
   div#horiz-parent
     {
--- a/testing/web-platform/tests/css/css-writing-modes/float-rgt-orthog-vrl-in-htb-003.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/float-rgt-orthog-vrl-in-htb-003.xht
@@ -10,17 +10,17 @@
   <meta name="DC.date.modified" content="2017-02-17T09:54:03+11:00" scheme="W3CDTF" />
 
   <!--
   Inspired by the test in
   http://lists.w3.org/Archives/Public/www-style/2016Nov/0044.html
   -->
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://drafts.csswg.org/css-writing-modes-3/#auto-multicol" title="7.3.2 Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="float-rgt-orthog-vrl-in-htb-003-ref.xht" />
 
   <meta content="" name="flags" />
   <meta content="This test checks the vertical position of an orthogonal floated right block box inside an horizontal-tb parent. The orthogonal floated right block box must be put as high as possible inside the horizontal-tb line box." name="assert" />
 
   <style type="text/css"><![CDATA[
   div#horiz-parent
     {
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vlr-001.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vlr-001.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'horizontal-tb' block with 'auto' inline size inside auto-sized 'vertical-lr' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-htb-in-vlr-001-ref.xht" />
 
   <meta name="DC.date.created" content="2016-12-20T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-03T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is also 'auto'. Since the width of the containing block is indefinite in this test, then constrain is the width of initial containing block which is, in this test, equal to the width of the viewport." />
 
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vlr-003.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vlr-003.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'horizontal-tb' block with 'auto' inline size inside auto-sized 'vertical-lr' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-htb-in-vlr-003-ref.xht" />
 
   <meta name="DC.date.created" content="2016-12-20T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-03T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is also 'auto'. Since the width of the containing block is indefinite in this test, then constrain is the width of initial containing block which is, in this test, equal to the width of the viewport. In this test, the max-content will be less than the width of the initial containing block. Therefore the inline size of div#ortho-block-htb will be its max-content." />
 
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vlr-004.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vlr-004.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'horizontal-tb' block with 'auto' inline size inside auto-sized 'vertical-lr' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-htb-in-vlr-004-ref.xht" />
 
   <meta name="DC.date.created" content="2016-12-20T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-03T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is also 'auto'. Since the width of the containing block is indefinite in this test, then constrain is the width of initial containing block which is, in this test, equal to the width of the viewport." />
 
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vlr-006.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vlr-006.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'horizontal-tb' block with 'auto' inline size inside auto-sized 'vertical-lr' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-htb-in-vlr-006-ref.xht" />
 
   <meta name="DC.date.created" content="2016-12-20T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-03T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is also 'auto'. Since the width of the containing block is indefinite in this test, then constrain is the width of initial containing block which is, in this test, equal to the width of the viewport. In this test, the max-content will be less than the width of the initial containing block. Therefore the inline size of div#ortho-block-htb will be its max-content." />
 
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vlr-007.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vlr-007.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'horizontal-tb' block with 'auto' inline size inside definite-sized 'vertical-lr' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-htb-in-vlr-007-ref.xht" />
 
   <meta name="DC.date.created" content="2016-12-20T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-03T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is also '400px'. Since the width of the containing block is definite in this test, then constrain is the width of such containing block which is, in this test, 400px. This test presumes that the initial containing block's width is greater than 400px." />
 
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vlr-008.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vlr-008.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'horizontal-tb' block with 'auto' inline size inside definite-sized 'vertical-lr' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-htb-in-vlr-008-ref.xht" />
 
   <meta name="DC.date.created" content="2016-12-20T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-03T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is '400px'. Since the width of the containing block is definite in this test, then constrain is the width of such containing block which is, in this test, 400px. This test presumes that the initial containing block's width is greater than 400px. In this test, min-content inline size (50ch) is greater than the width (400px) of the containing block. Therefore, the inline size of the orthogonal block will be the min-content inline size." />
 
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vlr-009.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vlr-009.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'horizontal-tb' block with 'auto' inline size inside definite-sized 'vertical-lr' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-htb-in-vlr-003-ref.xht" />
 
   <meta name="DC.date.created" content="2016-12-20T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-03T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is also 'auto'. Since the width of the containing block is definite in this test, then constrain is the width of such containing block which is, in this test, 400px. This test presumes that the initial containing block's width is greater than 400px. In this test, the max-content will be less than the width of the containing block. Therefore the inline size of div#ortho-block-htb will be its max-content." />
 
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vlr-010.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vlr-010.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'horizontal-tb' block with 'auto' inline size inside definite-sized 'vertical-lr' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-htb-in-vlr-010-ref.xht" />
 
   <meta name="DC.date.created" content="2016-12-20T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-03T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is also 'auto'. Since the width of the containing block is definite in this test, then constrain is the width of such containing block which is, in this test, 400px. This test presumes that the initial containing block's width is greater than 400px." />
 
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vlr-011.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vlr-011.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'horizontal-tb' block with 'auto' inline size inside definite-sized 'vertical-lr' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-htb-in-vlr-011-ref.xht" />
 
   <meta name="DC.date.created" content="2016-12-20T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-03T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is '400px'. Since the width of the containing block is definite in this test, then constrain is the width of such containing block which is, in this test, 400px. This test presumes that the initial containing block's width is greater than 400px. In this test, we assume that the 50 characters long word is wider than the div#sized-400px-vlr-containing-block. Therefore, min-content is greater than constraint." />
 
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vlr-012.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vlr-012.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'horizontal-tb' block with 'auto' inline size inside definite-sized 'vertical-lr' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-htb-in-vlr-006-ref.xht" />
 
   <meta name="DC.date.created" content="2016-12-20T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-03T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is '400px'. Since the width of the containing block is definite in this test, then constrain is the width of such containing block which is, in this test, 400px. This test presumes that the initial containing block's width is greater than 400px. In this test, the max-content will be less than the width of the containing block. Therefore the inline size of div#ortho-block-htb will be its max-content." />
 
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vlr-013.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vlr-013.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'horizontal-tb' block with 'auto' inline size inside auto-sized 'vertical-lr' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-htb-in-vlr-013-ref.xht" />
 
   <meta name="DC.date.created" content="2016-12-20T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-03T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is also 'auto'. Since the width of the containing block is indefinite in this test, then constrain is the width of initial containing block which is, in this test, equal to the width of the viewport." />
 
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vlr-015.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vlr-015.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'horizontal-tb' block with 'auto' inline size inside auto-sized 'vertical-lr' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-htb-in-vlr-015-ref.xht" />
 
   <meta name="DC.date.created" content="2016-12-20T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-03T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is also 'auto'. Since the width of the containing block is indefinite in this test, then constrain is the width of initial containing block which is, in this test, equal to the width of the viewport. In this test, the max-content will be less than the width of the initial containing block. Therefore the inline size of div#ortho-block-htb will be its max-content." />
 
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vlr-016.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vlr-016.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'horizontal-tb' block with 'auto' inline size inside auto-sized 'vertical-lr' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-htb-in-vlr-016-ref.xht" />
 
   <meta name="DC.date.created" content="2016-12-20T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-03T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is also 'auto'. Since the width of the containing block is indefinite in this test, then constrain is the width of initial containing block which is, in this test, equal to the width of the viewport." />
 
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vlr-018.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vlr-018.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'horizontal-tb' block with 'auto' inline size inside auto-sized 'vertical-lr' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-htb-in-vlr-018-ref.xht" />
 
   <meta name="DC.date.created" content="2016-12-20T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-03T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is also 'auto'. Since the width of the containing block is indefinite in this test, then constrain is the width of initial containing block which is, in this test, equal to the width of the viewport. In this test, the max-content will be less than the width of the initial containing block. Therefore the inline size of div#ortho-block-vlr will be its max-content." />
 
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vlr-019.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vlr-019.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'horizontal-tb' block with 'auto' inline size inside definite-sized 'vertical-lr' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-htb-in-vlr-019-ref.xht" />
 
   <meta name="DC.date.created" content="2016-12-20T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-03T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is '400px'. Since the width of the containing block is definite in this test, then constrain is the width of such containing block which is, in this test, 400px. This test presumes that the initial containing block's width is greater than 400px." />
 
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vlr-020.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vlr-020.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'horizontal-tb' block with 'auto' inline size inside definite-sized 'vertical-lr' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-htb-in-vlr-020-ref.xht" />
 
   <meta name="DC.date.created" content="2016-12-20T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-03T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is '400px'. Since the width (inline-size) of the containing block is definite in this test, then the constrain is the width (inline-size) of such containing block which is, in this test, 400px. But the min-content inline size of the orthogonal block is greater than the width (inline-size) of the containing block. Therefore, the min-content inline-size will become the width of the orthogonal block." />
 
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vlr-021.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vlr-021.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'horizontal-tb' block with 'auto' inline size inside definite-sized 'vertical-lr' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-htb-in-vlr-015-ref.xht" />
 
   <meta name="DC.date.created" content="2016-12-20T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-03T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is '400px'. Since the width of the containing block is definite in this test, then constrain is the width of such containing block which is, in this test, 400px. This test presumes that the initial containing block's width is greater than 400px. In this test, the max-content will be less than the width of the containing block. Therefore the inline size of div#ortho-block-htb will be its max-content." />
 
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vlr-022.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vlr-022.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'horizontal-tb' block with 'auto' inline size inside definite-sized 'vertical-lr' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-htb-in-vlr-022-ref.xht" />
 
   <meta name="DC.date.created" content="2016-12-20T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-03T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is '400px'. Since the width of the containing block is definite in this test, then the constrain is the width of such containing block which is, in this test, 400px. This test presumes that the initial containing block's width is greater than 400px." />
 
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vlr-023.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vlr-023.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'horizontal-tb' block with 'auto' inline size inside definite-sized 'vertical-lr' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-htb-in-vlr-023-ref.xht" />
 
   <meta name="DC.date.created" content="2016-12-20T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-03T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is '400px'. Since the width of the containing block is definite in this test, then constrain is the width of such containing block which is, in this test, 400px. This test presumes that the initial containing block's width is greater than 400px. In this test, we assume that the 50 characters long word is wider than the div#sized-400px-vlr-containing-block. Therefore, min-content is greater than constraint." />
 
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vlr-024.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vlr-024.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'horizontal-tb' block with 'auto' inline size inside definite-sized 'vertical-lr' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-htb-in-vlr-018-ref.xht" />
 
   <meta name="DC.date.created" content="2016-12-20T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-03T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is '400px'. Since the width of the containing block is definite in this test, then constrain is the width of such containing block which is, in this test, 400px. This test presumes that the initial containing block's width is greater than 400px. In this test, the max-content will be less than the width of the containing block. Therefore the inline size of div#ortho-block-htb will be its max-content." />
 
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vrl-001.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vrl-001.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'horizontal-tb' block with 'auto' inline size inside auto-sized 'vertical-rl' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-htb-in-vrl-001-ref.xht" />
 
   <meta name="DC.date.created" content="2016-12-13T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-03T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is also 'auto'. Since the width of the containing block is indefinite in this test, then constrain is the width of initial containing block which is, in this test, equal to the width of the viewport." />
 
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vrl-003.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vrl-003.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'horizontal-tb' block with 'auto' inline size inside auto-sized 'vertical-rl' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-htb-in-vrl-003-ref.xht" />
 
   <meta name="DC.date.created" content="2016-12-19T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-03T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is also 'auto'. Since the width of the containing block is indefinite in this test, then constrain is the width of initial containing block which is, in this test, equal to the width of the viewport. In this test, the max-content will be less than the width of the initial containing block. Therefore the inline size of div#ortho-block-htb will be its max-content." />
 
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vrl-004.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vrl-004.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'horizontal-tb' block with 'auto' inline size inside auto-sized 'vertical-rl' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-htb-in-vlr-004-ref.xht" />
 
   <meta name="DC.date.created" content="2016-12-19T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-03T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is also 'auto'. Since the width of the containing block is indefinite in this test, then constrain is the width of initial containing block which is, in this test, equal to the width of the viewport." />
 
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vrl-006.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vrl-006.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'horizontal-tb' block with 'auto' inline size inside auto-sized 'vertical-rl' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-htb-in-vrl-006-ref.xht" />
 
   <meta name="DC.date.created" content="2016-12-19T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-03T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is also 'auto'. Since the width of the containing block is indefinite in this test, then constrain is the width of initial containing block which is, in this test, equal to the width of the viewport. In this test, the max-content will be less than the width of the initial containing block. Therefore the inline size of div#ortho-block-htb will be its max-content." />
 
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vrl-007.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vrl-007.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'horizontal-tb' block with 'auto' inline size inside definite-sized 'vertical-rl' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-htb-in-vrl-007-ref.xht" />
 
   <meta name="DC.date.created" content="2016-12-20T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-03T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is also 'auto'. Since the width of the containing block is definite in this test, then constrain is the width of such containing block which is, in this test, 400px. This test presumes that the initial containing block's width is greater than 400px." />
 
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vrl-008.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vrl-008.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'horizontal-tb' block with 'auto' inline size inside definite-sized 'vertical-rl' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-htb-in-vrl-008-ref.xht" />
 
   <meta name="DC.date.created" content="2016-12-20T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-03T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is '400px'. Since the width of the containing block is definite in this test, then constrain is the width of such containing block which is, in this test, 400px. This test presumes that the initial containing block's width is greater than 400px. In this test, min-content inline size (50ch) is greater than the width (400px) of the containing block. Therefore, the inline size of the orthogonal block will be the min-content inline size." />
 
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vrl-009.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vrl-009.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'horizontal-tb' block with 'auto' inline size inside definite-sized 'vertical-rl' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-htb-in-vrl-003-ref.xht" />
 
   <meta name="DC.date.created" content="2016-12-19T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-03T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is '400px'. In this test, the max-content inline size of the orthogonal block will be smaller than the width of its containing block. Therefore the inline size of div#ortho-block-htb will be its max-content inline-size." />
 
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vrl-010.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vrl-010.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'horizontal-tb' block with 'auto' inline size inside definite-sized 'vertical-rl' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-htb-in-vrl-010-ref.xht" />
 
   <meta name="DC.date.created" content="2016-12-19T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-03T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is '400px'. Since the width of the containing block is definite in this test, then constrain is the width of such containing block which is, in this test, 400px. This test presumes that the initial containing block's width is greater than 400px. Therefore, the outer edges of the inline-axis of the orthogonal block becomes '400px'." />
 
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vrl-011.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vrl-011.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'horizontal-tb' block with 'auto' inline size inside definite-sized 'vertical-rl' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-htb-in-vrl-011-ref.xht" />
 
   <meta name="DC.date.created" content="2016-12-20T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-03T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is '400px'. But the min-content inline size of the orthogonal block is greater than '400px' and less than the width of the initial containing block. In such case, the inline-size content edges of the orthogonal block becomes its min-content. In this test, we assume that the 50 characters long word is wider than the div#sized-400px-vrl-containing-block. Therefore, min-content is greater than constraint." />
 
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vrl-012.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vrl-012.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'horizontal-tb' block with 'auto' inline size inside definite-sized 'vertical-rl' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-htb-in-vrl-006-ref.xht" />
 
   <meta name="DC.date.created" content="2016-12-20T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-03T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is '400px'. The max-content is narrower than the definite-sized width of the containing block. Therefore the inline size of div#ortho-block-htb will be its max-content." />
 
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vrl-013.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vrl-013.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'horizontal-tb' block with 'auto' inline size inside auto-sized 'vertical-rl' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-htb-in-vrl-013-ref.xht" />
 
   <meta name="DC.date.created" content="2016-12-20T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-03T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is also 'auto'. Since the width of the containing block is indefinite in this test, then constrain is the width of initial containing block which is, in this test, equal to the width of the viewport." />
 
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vrl-015.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vrl-015.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'horizontal-tb' block with 'auto' inline size inside auto-sized 'vertical-rl' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-htb-in-vrl-015-ref.xht" />
 
 
   <meta name="DC.date.created" content="2016-12-20T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-03T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is also 'auto'. Since the width of the containing block is indefinite in this test, then constrain is the width of initial containing block which is, in this test, equal to the width of the viewport. But the max-content inline size of the orthogonal block is less than the width of the initial containing block. Therefore the inline size of div#ortho-block-htb will be its max-content." />
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vrl-016.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vrl-016.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'horizontal-tb' block with 'auto' inline size inside auto-sized 'vertical-rl' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-htb-in-vlr-016-ref.xht" />
 
   <meta name="DC.date.created" content="2016-12-20T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-03T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is also 'auto'. Since the width of the containing block is indefinite in this test, then constrain is the width of initial containing block which is, in this test, equal to the width of the viewport." />
 
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vrl-018.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vrl-018.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'horizontal-tb' block with 'auto' inline size inside auto-sized 'vertical-rl' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-htb-in-vrl-018-ref.xht" />
 
   <meta name="DC.date.created" content="2016-12-20T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-03T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is also 'auto'. Since the width of the containing block is indefinite in this test, then constrain is the width of initial containing block which is, in this test, equal to the width of the viewport. In this test, the max-content inline size of the orthogonal block is less than the width of the initial containing block. Therefore the inline size of div#ortho-block-vrl will be its max-content." />
 
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vrl-019.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vrl-019.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'horizontal-tb' block with 'auto' inline size inside definite-sized 'vertical-rl' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-htb-in-vrl-019-ref.xht" />
 
   <meta name="DC.date.created" content="2016-12-20T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-03T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is '400px'. Since the width of the containing block is definite in this test, then constrain is the width of such containing block which is, in this test, 400px. This test presumes that the initial containing block's width is greater than 400px." />
 
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vrl-020.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vrl-020.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'horizontal-tb' block with 'auto' inline size inside definite-sized 'vertical-rl' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-htb-in-vrl-020-ref.xht" />
 
   <meta name="DC.date.created" content="2016-12-20T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-03T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is '400px'. Since the width of the containing block is definite in this test, then constrain is the width of such containing block which is, in this test, 400px. min-content inline size is greater than 400px. Therefore, the inline size of the orthogonal block will be its min-content. This test presumes that the initial containing block's width is greater than 400px." />
 
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vrl-021.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vrl-021.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'horizontal-tb' block with 'auto' inline size inside definite-sized 'vertical-rl' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-htb-in-vrl-015-ref.xht" />
 
   <meta name="DC.date.created" content="2016-12-20T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-03T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is '400px'. Since the width of the containing block is definite in this test, then constrain is the width of such containing block which is, in this test, 400px. This test presumes that the initial containing block's width is greater than 400px. In this test, the max-content will be less than the width of the containing block. Therefore the inline size of div#ortho-block-htb will be its max-content." />
 
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vrl-022.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vrl-022.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'horizontal-tb' block with 'auto' inline size inside definite-sized 'vertical-rl' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-htb-in-vrl-022-ref.xht" />
 
   <meta name="DC.date.created" content="2016-12-20T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-03T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is '400px'. Since the width of the containing block is definite in this test, then constrain is the width of such containing block which is, in this test, 400px. This test presumes that the initial containing block's width is greater than 400px." />
 
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vrl-023.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vrl-023.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'horizontal-tb' block with 'auto' inline size inside definite-sized 'vertical-rl' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-htb-in-vrl-023-ref.xht" />
 
   <meta name="DC.date.created" content="2016-12-20T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-03T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is '400px'. Since the width of the containing block is definite in this test, then constrain is the width of such containing block which is, in this test, 400px. This test presumes that the initial containing block's width is greater than 400px. In this test, we assume that the 50 characters long word is wider than the div#sized-400px-vrl-containing-block. Therefore, min-content is greater than constraint." />
 
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vrl-024.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-htb-in-vrl-024.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'horizontal-tb' block with 'auto' inline size inside definite-sized 'vertical-rl' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-htb-in-vrl-018-ref.xht" />
 
   <meta name="DC.date.created" content="2016-12-20T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-03T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is '400px'. Since the width of the containing block is definite in this test, then constrain is the width of such containing block which is, in this test, 400px. This test presumes that the initial containing block's width is greater than 400px. In this test, the max-content will be less than the width of the containing block. Therefore the inline size of div#ortho-block-htb will be its max-content." />
 
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vlr-in-htb-001.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vlr-in-htb-001.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'vertical-lr' block with 'auto' inline size inside auto-sized 'horizontal-tb' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-vlr-in-htb-001-ref.xht" />
 
   <meta name="DC.date.created" content="2016-10-04T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-03T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is also 'auto'. Since the height of the containing block is indefinite in this test, then constrain is the height of initial containing block which is, in this test, equal to the height of the viewport." />
 
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vlr-in-htb-003.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vlr-in-htb-003.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'vertical-rl' block with 'auto' inline size inside auto-sized 'horizontal-tb' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-vlr-in-htb-003-ref.xht" />
 
   <meta name="DC.date.created" content="2016-10-04T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-03T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is also 'auto'. Since the height of the containing block is indefinite in this test, then constrain is the height of initial containing block which is, in this test, equal to the height of the viewport. In this test, the max-content will be smaller than the height of the initial containing block. Therefore the inline size of div#ortho-block-vlr will be its max-content." />
 
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vlr-in-htb-004.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vlr-in-htb-004.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'vertical-lr' block with 'auto' inline size inside auto-sized 'horizontal-tb' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-vlr-in-htb-004-ref.xht" />
 
   <meta name="DC.date.created" content="2016-10-04T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-03T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is also 'auto'. Since the height of the containing block is indefinite in this test, then constrain is the height of initial containing block which is, in this test, equal to the height of the viewport." />
 
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vlr-in-htb-006.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vlr-in-htb-006.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'vertical-lr' block with 'auto' inline size inside auto-sized 'horizontal-tb' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-vlr-in-htb-006-ref.xht" />
 
   <meta name="DC.date.created" content="2016-10-04T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-03T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is also 'auto'. Since the height of the containing block is indefinite in this test, then constrain is the height of initial containing block which is, in this test, equal to the height of the viewport. In this test, the max-content will be smaller than the height of the initial containing block. Therefore the inline size of div#ortho-block-vlr will be its max-content." />
 
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vlr-in-htb-007.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vlr-in-htb-007.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'vertical-lr' block with 'auto' inline size inside definite-sized 'horizontal-tb' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-vlr-in-htb-007-ref.xht" />
 
   <meta name="DC.date.created" content="2016-10-04T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-03T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is '400px'. Since the height of the containing block is definite in this test, then constrain is the height of such containing block which is, in this test, 400px. This test presumes that the initial containing block's height is greater than 400px." />
 
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vlr-in-htb-008.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vlr-in-htb-008.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'vertical-lr' block with 'auto' inline size inside definite-sized 'horizontal-tb' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-vlr-in-htb-008-ref.xht" />
 
   <meta name="DC.date.created" content="2016-10-04T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-03T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is '400px'. Since the height of the containing block is definite in this test, then constrain is the height of such containing block which is, in this test, 400px. This test presumes that the initial containing block's height is greater than 400px. In this test, min-content inline size is presumed to be greater than the height (400px) of the containing block. Therefore the content edges of the inline size of the orthogonal block will be its min-content." />
 
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vlr-in-htb-009.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vlr-in-htb-009.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'vertical-lr' block with 'auto' inline size inside definite-sized 'horizontal-tb' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-vlr-in-htb-009-ref.xht" />
 
   <meta name="DC.date.created" content="2016-10-04T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-08T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is '400px'. Since the height of the containing block is definite in this test, then constrain is the height of such containing block which is, in this test, 400px. This test presumes that the initial containing block's height is greater than 400px. In this test, the max-content will be smaller than the height of the containing block. Therefore the inline size of div#ortho-block-vlr will be its max-content." />
 
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vlr-in-htb-010.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vlr-in-htb-010.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'vertical-lr' block with 'auto' inline size inside definite-sized 'horizontal-tb' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-vlr-in-htb-010-ref.xht" />
 
   <meta name="DC.date.created" content="2016-09-15T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-03T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is '400px'. Since the height of the containing block is definite in this test, then constrain is the height of such containing block which is, in this test, 400px. This test presumes that the initial containing block's height is greater than 400px." />
 
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vlr-in-htb-011.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vlr-in-htb-011.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'vertical-lr' block with 'auto' inline size inside definite-sized 'horizontal-tb' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-vlr-in-htb-011-ref.xht" />
 
   <meta name="DC.date.created" content="2016-10-04T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-03T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is '400px'. Since the height of the containing block is definite in this test, then constrain is the height of such containing block which is, in this test, 400px. This test presumes that the initial containing block's height is greater than 400px. In this test, we assume that the 50 characters long word is greater than the height of div#sized-400px-htb-containing-block. Therefore, min-content is greater than constraint." />
 
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vlr-in-htb-012.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vlr-in-htb-012.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'vertical-lr' block with 'auto' inline size inside definite-sized 'horizontal-tb' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-vlr-in-htb-012-ref.xht" />
 
   <meta name="DC.date.created" content="2016-10-04T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-08T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is '400px'. Since the height of the containing block is definite in this test, then constrain is the height of such containing block which is, in this test, 400px. This test presumes that the initial containing block's height is greater than 400px. In this test, the max-content will be smaller than the height of the initial containing block. Therefore the inline size of div#ortho-block-vlr will be its max-content." />
 
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vlr-in-htb-013.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vlr-in-htb-013.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'vertical-lr' block with 'auto' inline size inside auto-sized 'horizontal-tb' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-vlr-in-htb-013-ref.xht" />
 
   <meta name="DC.date.created" content="2016-10-04T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-03T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is also 'auto'. Since the height of the containing block is indefinite in this test, then constrain is the height of initial containing block which is, in this test, equal to the height of the viewport." />
 
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vlr-in-htb-015.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vlr-in-htb-015.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'vertical-lr' block with 'auto' inline size inside auto-sized 'horizontal-tb' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-vlr-in-htb-015-ref.xht" />
 
   <meta name="DC.date.created" content="2016-10-04T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-03T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is also 'auto'. Since the height of the containing block is indefinite in this test, then constrain is the height of initial containing block which is, in this test, equal to the height of the viewport. In this test, the max-content will be smaller than the height of the initial containing block. Therefore the inline size of div#ortho-block-vlr will be its max-content." />
 
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vlr-in-htb-016.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vlr-in-htb-016.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'vertical-lr' block with 'auto' inline size inside auto-sized 'horizontal-tb' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-vlr-in-htb-016-ref.xht" />
 
   <meta name="DC.date.created" content="2016-10-04T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-03T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is also 'auto'. Since the height of the containing block is indefinite in this test, then constrain is the height of initial containing block which is, in this test, equal to the height of the viewport." />
 
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vlr-in-htb-018.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vlr-in-htb-018.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'vertical-lr' block with 'auto' inline size inside auto-sized 'horizontal-tb' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-vlr-in-htb-018-ref.xht" />
 
   <meta name="DC.date.created" content="2016-10-04T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-03T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is also 'auto'. Since the height of the containing block is indefinite in this test, then constrain is the height of initial containing block which is, in this test, equal to the height of the viewport. In this test, the max-content will be smaller than the height of the initial containing block. Therefore the inline size of div#ortho-block-vlr will be its max-content." />
 
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vlr-in-htb-019.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vlr-in-htb-019.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'vertical-lr' block with 'auto' inline size inside definite-sized 'horizontal-tb' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-vlr-in-htb-019-ref.xht" />
 
   <meta name="DC.date.created" content="2016-10-04T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-03T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is '400px'. Since the height of the containing block is definite in this test, then constrain is the height of such containing block which is, in this test, 400px. This test presumes that the initial containing block's height is greater than 400px." />
 
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vlr-in-htb-020.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vlr-in-htb-020.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'vertical-lr' block with 'auto' inline size inside definite-sized 'horizontal-tb' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-vlr-in-htb-020-ref.xht" />
 
   <meta name="DC.date.created" content="2016-10-04T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-03T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is '400px'. Since the height of the containing block is definite in this test, then constrain is the height of such containing block which is, in this test, 400px. This test presumes that the initial containing block's height is greater than 400px. In this test, min-content will be greater than the height of the containing block. Therefore, the inline size of the orthogonal block will be its min-content." />
 
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vlr-in-htb-021.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vlr-in-htb-021.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'vertical-lr' block with 'auto' inline size inside definite-sized 'horizontal-tb' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-vlr-in-htb-015-ref.xht" />
 
   <meta name="DC.date.created" content="2016-10-04T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-03T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is '400px'. Since the height of the containing block is definite in this test, then constrain is the height of such containing block which is, in this test, 400px. This test presumes that the initial containing block's height is greater than 400px. In this test, the max-content of the orthogonal block will be less than the height of its definite containing block. Therefore the inline size of div#ortho-block-vlr will be its max-content." />
 
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vlr-in-htb-022.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vlr-in-htb-022.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'vertical-lr' block with 'auto' inline size inside definite-sized 'horizontal-tb' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-vlr-in-htb-022-ref.xht" />
 
   <meta name="DC.date.created" content="2016-10-04T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-03T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is '400px'. Since the height of the containing block is definite in this test, then constrain is the height of such containing block which is, in this test, 400px. This test presumes that the initial containing block's height is greater than 400px." />
 
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vlr-in-htb-023.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vlr-in-htb-023.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'vertical-lr' block with 'auto' inline size inside definite-sized 'horizontal-tb' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-vlr-in-htb-023-ref.xht" />
 
   <meta name="DC.date.created" content="2016-10-04T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-03T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is '400px'. Since the height of the containing block is definite in this test, then constrain is the height of such containing block which is, in this test, 400px. This test presumes that the initial containing block's height is greater than 400px. In this test, we assume that the 50 characters long word is greater than the height of div#sized-400px-htb-containing-block. Therefore, min-content is greater than constraint." />
 
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vlr-in-htb-024.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vlr-in-htb-024.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'vertical-lr' block with 'auto' inline size inside definite-sized 'horizontal-tb' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-vlr-in-htb-018-ref.xht" />
 
   <meta name="DC.date.created" content="2016-10-04T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-03T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is '400px'. Since the height of the containing block is definite in this test, then constrain is the height of such containing block which is, in this test, 400px. This test presumes that the initial containing block's height is greater than 400px. In this test, the max-content will be smaller than the height of the containing block. Therefore the inline size of div#ortho-block-vlr will be its max-content." />
 
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vrl-in-htb-001.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vrl-in-htb-001.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'vertical-rl' block with 'auto' inline size inside auto-sized 'horizontal-tb' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-vrl-in-htb-001-ref.xht" />
 
   <meta name="DC.date.created" content="2016-09-02T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-03T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is also 'auto'. Since the height of the containing block is indefinite in this test, then constrain is the height of initial containing block which is, in this test, equal to the height of the viewport." />
 
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vrl-in-htb-003.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vrl-in-htb-003.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'vertical-rl' block with 'auto' inline size inside auto-sized 'horizontal-tb' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-vrl-in-htb-003-ref.xht" />
 
   <meta name="DC.date.created" content="2016-09-08T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-03T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is also 'auto'. Since the height of the containing block is indefinite in this test, then constrain is the height of initial containing block which is, in this test, equal to the height of the viewport. In this test, the max-content will be smaller than the height of the initial containing block. Therefore the inline size of div#ortho-block-vrl will be its max-content." />
 
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vrl-in-htb-004.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vrl-in-htb-004.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'vertical-rl' block with 'auto' inline size inside auto-sized 'horizontal-tb' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-vrl-in-htb-004-ref.xht" />
 
   <meta name="DC.date.created" content="2016-09-15T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-03T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is also 'auto'. Since the height of the containing block is indefinite in this test, then constrain is the height of initial containing block which is, in this test, equal to the height of the viewport." />
 
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vrl-in-htb-006.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vrl-in-htb-006.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'vertical-rl' block with 'auto' inline size inside auto-sized 'horizontal-tb' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-vrl-in-htb-006-ref.xht" />
 
   <meta name="DC.date.created" content="2016-09-15T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-03T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is also 'auto'. Since the height of the containing block is indefinite in this test, then constrain is the height of initial containing block which is, in this test, equal to the height of the viewport. In this test, the max-content will be smaller than the height of the initial containing block. Therefore the inline size of div#ortho-block-vrl will be its max-content." />
 
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vrl-in-htb-007.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vrl-in-htb-007.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'vertical-rl' block with 'auto' inline size inside definite-sized 'horizontal-tb' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-vrl-in-htb-007-ref.xht" />
 
   <meta name="DC.date.created" content="2016-09-15T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-03T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is '400px'. Since the height of the containing block is definite in this test, then constrain is the height of such containing block which is, in this test, 400px. This test presumes that the initial containing block's height is greater than 400px." />
 
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vrl-in-htb-008.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vrl-in-htb-008.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'vertical-rl' block with 'auto' inline size inside definite-sized 'horizontal-tb' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-vrl-in-htb-008-ref.xht" />
 
   <meta name="DC.date.created" content="2016-09-15T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-03T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is '400px'. Since the height of the containing block is definite in this test, then constrain is the height of such containing block which is, in this test, 400px. This test presumes that the initial containing block's height is greater than 400px. In this test, min-content inline size is presumed to be greater than the height (400px) of the containing block. Therefore the content edges of the inline size of the orthogonal block will be its min-content." />
 
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vrl-in-htb-009.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vrl-in-htb-009.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'vertical-rl' block with 'auto' inline size inside definite-sized 'horizontal-tb' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-vrl-in-htb-009-ref.xht" />
 
   <meta name="DC.date.created" content="2016-09-15T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-08T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is '400px'. Since the height of the containing block is definite in this test, then constrain is the height of such containing block which is, in this test, 400px. This test presumes that the initial containing block's height is greater than 400px. In this test, the max-content will be smaller than the height of the containing block. Therefore the inline size of div#ortho-block-vrl will be its max-content." />
 
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vrl-in-htb-010.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vrl-in-htb-010.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'vertical-rl' block with 'auto' inline size inside definite-sized 'horizontal-tb' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-vrl-in-htb-010-ref.xht" />
 
   <meta name="DC.date.created" content="2016-09-15T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-03T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is '400px'. Since the height of the containing block is definite in this test, then constrain is the height of such containing block which is, in this test, 400px. This test presumes that the initial containing block's height is greater than 400px." />
 
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vrl-in-htb-011.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vrl-in-htb-011.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'vertical-rl' block with 'auto' inline size inside definite-sized 'horizontal-tb' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-vrl-in-htb-011-ref.xht" />
 
   <meta name="DC.date.created" content="2016-09-15T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-03T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is '400px'. Since the height of the containing block is definite in this test, then constrain is the height of such containing block which is, in this test, 400px. This test presumes that the initial containing block's height is greater than 400px. In this test, we assume that the 50 characters long word is greater than the height of div#sized-400px-htb-containing-block. Therefore, min-content is greater than constraint." />
 
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vrl-in-htb-012.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vrl-in-htb-012.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'vertical-rl' block with 'auto' inline size inside definite-sized 'horizontal-tb' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-vrl-in-htb-012-ref.xht" />
 
   <meta name="DC.date.created" content="2016-09-15T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-08T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is '400px'. Since the height of the containing block is definite in this test, then constrain is the height of such containing block which is, in this test, 400px. This test presumes that the initial containing block's height is greater than 400px. In this test, the max-content will be smaller than the height of the initial containing block. Therefore the inline size of div#ortho-block-vrl will be its max-content." />
 
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vrl-in-htb-013.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vrl-in-htb-013.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'vertical-rl' block with 'auto' inline size inside auto-sized 'horizontal-tb' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-vrl-in-htb-013-ref.xht" />
 
   <meta name="DC.date.created" content="2016-09-28T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-03T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is also 'auto'. Since the height of the containing block is indefinite in this test, then constrain is the height of initial containing block which is, in this test, equal to the height of the viewport." />
 
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vrl-in-htb-015.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vrl-in-htb-015.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'vertical-rl' block with 'auto' inline size inside auto-sized 'horizontal-tb' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-vrl-in-htb-015-ref.xht" />
 
   <meta name="DC.date.created" content="2016-09-28T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-03T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is also 'auto'. Since the height of the containing block is indefinite in this test, then constrain is the height of initial containing block which is, in this test, equal to the height of the viewport. In this test, the max-content will be smaller than the height of the initial containing block. Therefore the inline size of div#ortho-block-vrl will be its max-content." />
 
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vrl-in-htb-016.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vrl-in-htb-016.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'vertical-rl' block with 'auto' inline size inside auto-sized 'horizontal-tb' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-vrl-in-htb-016-ref.xht" />
 
   <meta name="DC.date.created" content="2016-09-28T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-03T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is also 'auto'. Since the height of the containing block is indefinite in this test, then constrain is the height of initial containing block which is, in this test, equal to the height of the viewport." />
 
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vrl-in-htb-018.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vrl-in-htb-018.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'vertical-rl' block with 'auto' inline size inside auto-sized 'horizontal-tb' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-vrl-in-htb-018-ref.xht" />
 
   <meta name="DC.date.created" content="2016-09-28T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-03T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is also 'auto'. Since the height of the containing block is indefinite in this test, then constrain is the height of initial containing block which is, in this test, equal to the height of the viewport. In this test, the max-content will be smaller than the height of the initial containing block. Therefore the inline size of div#ortho-block-vrl will be its max-content." />
 
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vrl-in-htb-019.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vrl-in-htb-019.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'vertical-rl' block with 'auto' inline size inside definite-sized 'horizontal-tb' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-vrl-in-htb-019-ref.xht" />
 
   <meta name="DC.date.created" content="2016-09-28T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-03T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is '400px'. Since the height of the containing block is definite in this test, then constrain is the height of such containing block which is, in this test, 400px. This test presumes that the initial containing block's height is greater than 400px." />
 
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vrl-in-htb-020.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vrl-in-htb-020.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'vertical-rl' block with 'auto' inline size inside definite-sized 'horizontal-tb' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-vrl-in-htb-020-ref.xht" />
 
   <meta name="DC.date.created" content="2016-09-285T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-03T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is '400px'. Since the height of the containing block is definite in this test, then constrain is the height of such containing block which is, in this test, 400px. This test presumes that the initial containing block's height is greater than 400px. In this test, min-content will be greater than the height of the containing block. Therefore, the inline size of the orthogonal block will be its min-content." />
 
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vrl-in-htb-021.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vrl-in-htb-021.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'vertical-rl' block with 'auto' inline size inside definite-sized 'horizontal-tb' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-vrl-in-htb-015-ref.xht" />
 
   <meta name="DC.date.created" content="2016-09-28T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-03T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is '400px'. Since the height of the containing block is definite in this test, then constrain is the height of such containing block which is, in this test, 400px. This test presumes that the initial containing block's height is greater than 400px. In this test, the max-content of the orthogonal block will be less than the height of its definite containing block. Therefore the inline size of div#ortho-block-vlr will be its max-content." />
 
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vrl-in-htb-022.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vrl-in-htb-022.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'vertical-rl' block with 'auto' inline size inside definite-sized 'horizontal-tb' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-vrl-in-htb-022-ref.xht" />
 
   <meta name="DC.date.created" content="2016-09-28T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-03T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is '400px'. Since the height of the containing block is definite in this test, then constrain is the height of such containing block which is, in this test, 400px. This test presumes that the initial containing block's height is greater than 400px." />
 
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vrl-in-htb-023.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vrl-in-htb-023.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'vertical-rl' block with 'auto' inline size inside definite-sized 'horizontal-tb' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-vrl-in-htb-023-ref.xht" />
 
   <meta name="DC.date.created" content="2016-09-28T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-03T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is '400px'. Since the height of the containing block is definite in this test, then constrain is the height of such containing block which is, in this test, 400px. This test presumes that the initial containing block's height is greater than 400px. In this test, we assume that the 50 characters long word is greater than the height of div#sized-400px-htb-containing-block. Therefore, min-content is greater than constraint." />
 
--- a/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vrl-in-htb-024.xht
+++ b/testing/web-platform/tests/css/css-writing-modes/sizing-orthog-vrl-in-htb-024.xht
@@ -2,17 +2,17 @@
 
 <html xmlns="http://www.w3.org/1999/xhtml">
 
  <head>
 
   <title>CSS Writing Modes Test: sizing of orthogonal 'vertical-rl' block with 'auto' inline size inside definite-sized 'horizontal-tb' containing block</title>
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
-  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#auto-multicol" title="7.3.2. Auto-sizing Block Containers in Orthogonal Flows" />
+  <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto" />
   <link rel="match" href="sizing-orthog-vrl-in-htb-018-ref.xht" />
 
   <meta name="DC.date.created" content="2016-09-28T09:54:03+11:00" scheme="W3CDTF" />
   <meta name="DC.date.modified" content="2017-01-03T09:54:03+11:00" scheme="W3CDTF" />
 
   <meta name="flags" content="" />
   <meta name="assert" content="In this test, the inline size of the orthogonal block is 'auto' and its containing block's block size is '400px'. Since the height of the containing block is definite in this test, then constrain is the height of such containing block which is, in this test, 400px. This test presumes that the initial containing block's height is greater than 400px. In this test, the max-content will be smaller than the height of the containing block. Therefore the inline size of div#ortho-block-vrl will be its max-content." />
 
--- a/testing/web-platform/tests/css/cssom/MediaList.html
+++ b/testing/web-platform/tests/css/cssom/MediaList.html
@@ -39,12 +39,16 @@
         assert_equals(media[2], "speech", "MediaList indexed getter after append method");
         assert_equals(media[3], undefined, "MediaList indexed getter with out of range after append method");
         assert_equals(media.item(2), "speech", "MediaList item method after append method");
         assert_equals(media.item(3), null, "MediaList item method after append method");
 
         media.mediaText = null;
         assert_equals(media.mediaText, "", "MediaList mediaText attribute should be empty string in case of null");
         assert_equals(media.toString(), "", "MediaList toString method should be empty string in case of null");
+
+        var rule = document.styleSheets[0].cssRules[0];
+        rule.media = "speech";
+        assert_equals(rule.media.mediaText, "speech", "MediaList mediaText attribute should be updated");
     });
     </script>
 </head>
 </html>
--- a/testing/web-platform/tests/css/cssom/cssimportrule.html
+++ b/testing/web-platform/tests/css/cssom/cssimportrule.html
@@ -78,11 +78,16 @@
 
         test(function() {
             assert_equals(typeof rule.href, "string");
             assert_true(rule.media instanceof MediaList);
             assert_true(rule.styleSheet instanceof CSSStyleSheet);
             assert_true(ruleWithMedia.media.length > 0);
             assert_equals(ruleWithMedia.media.mediaText, "screen");
         }, "Values of CSSImportRule attributes");
+
+        test(function() {
+            ruleWithMedia.media = "print";
+            assert_equals(ruleWithMedia.media.mediaText, "print");
+        }, "MediaList mediaText attribute should be updated");
     </script>
 </body>
 </html>
--- a/testing/web-platform/tests/css/cssom/cssom-fontfacerule.html
+++ b/testing/web-platform/tests/css/cssom/cssom-fontfacerule.html
@@ -1,14 +1,14 @@
 <!DOCTYPE html>
 <html>
     <head>
         <title>CSSOM Parsing Test: @font-face rules parsed into CSSOM CSSFontFaceRules</title>
         <link rel="author" title="Paul Irish" href="mailto:paul.irish@gmail.com">
-        <link rel="help" href="http://www.w3.org/TR/cssom-1/#css-font-face-rule">
+        <link rel="help" href="https://drafts.csswg.org/cssom/#css-rules">
 
         <meta name="flags" content="dom">
 
         <script src="/resources/testharness.js"></script>
         <script src="/resources/testharnessreport.js"></script>
     </head>
 
     <body>
@@ -39,17 +39,17 @@
         </style>
 
 
         <script>
             var validRules = document.getElementById('teststyles').sheet.cssRules;
 
             test(function(){
 
-                assert_equals(validRules[0].style.src, 'url(http://foo/bar/font.ttf)');
+                assert_equals(validRules[0].style.src, 'url("http://foo/bar/font.ttf")');
                 assert_equals(validRules[1].style.fontFamily, 'STIXGeneral');
 
                 /* unimplemented @font-face properties are not represented in CSSOM */
 
             }, 'CSSStyleDeclaration values are represented within CSSFontFaceRule')
 
         </script>
 
--- a/testing/web-platform/tests/custom-elements/builtin-coverage.html
+++ b/testing/web-platform/tests/custom-elements/builtin-coverage.html
@@ -1,14 +1,17 @@
 <!DOCTYPE html>
+<html is="my-html">
+<head>
 <meta charset="utf-8">
 <meta name="help" content="https://html.spec.whatwg.org/multipage/custom-elements.html#element-definition">
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
-<body>
+</head>
+<body is="my-body">
 <div id="container"></div>
 <script>
 class MyA extends HTMLAnchorElement {
   constructor() {
     super();
   }
 }
 
@@ -662,25 +665,25 @@ let testData = [
   {tag: 'article', klass: MyArticle},
   {tag: 'aside', klass: MyAside},
   {tag: 'audio', klass: MyAudio},
   {tag: 'b', klass: MyB},
   {tag: 'base', klass: MyBase},
   {tag: 'bdi', klass: MyBdi},
   {tag: 'bdo', klass: MyBdo},
   {tag: 'blockquote', klass: MyBlockquote},
-  {tag: 'body', klass: MyBody, innerHTML: 'skip'},
+  {tag: 'body', klass: MyBody, parsing: 'document'},
   {tag: 'br', klass: MyBr},
   {tag: 'button', klass: MyButton},
   {tag: 'canvas', klass: MyCanvas},
-  {tag: 'caption', klass: MyCaption, innerHTML: 'table'},
+  {tag: 'caption', klass: MyCaption, parsing: 'table'},
   {tag: 'cite', klass: MyCite},
   {tag: 'code', klass: MyCode},
-  {tag: 'col', klass: MyCol, innerHTML: 'table'},
-  {tag: 'colgroup', klass: MyColgroup, innerHTML: 'table'},
+  {tag: 'col', klass: MyCol, parsing: 'table'},
+  {tag: 'colgroup', klass: MyColgroup, parsing: 'table'},
   {tag: 'data', klass: MyData},
   {tag: 'dd', klass: MyDd},
   {tag: 'del', klass: MyDel},
   {tag: 'details', klass: MyDetails},
   {tag: 'dfn', klass: MyDfn},
   {tag: 'div', klass: MyDiv},
   {tag: 'dl', klass: MyDl},
   {tag: 'dt', klass: MyDt},
@@ -695,17 +698,17 @@ let testData = [
   {tag: 'h2', klass: MyH2},
   {tag: 'h3', klass: MyH3},
   {tag: 'h4', klass: MyH4},
   {tag: 'h5', klass: MyH5},
   {tag: 'h6', klass: MyH6},
   {tag: 'header', klass: MyHeader},
   {tag: 'hgroup', klass: MyHgroup},
   {tag: 'hr', klass: MyHr},
-  {tag: 'html', klass: MyHtml, innerHTML: 'skip'},
+  {tag: 'html', klass: MyHtml, parsing: 'document'},
   {tag: 'i', klass: MyI},
   {tag: 'iframe', klass: MyIframe},
   {tag: 'img', klass: MyImg},
   {tag: 'input', klass: MyInput},
   {tag: 'ins', klass: MyIns},
   {tag: 'kbd', klass: MyKbd},
   {tag: 'label', klass: MyLabel},
   {tag: 'legend', klass: MyLegend},
@@ -742,26 +745,26 @@ let testData = [
   {tag: 'source', klass: MySource},
   {tag: 'span', klass: MySpan},
   {tag: 'strong', klass: MyStrong},
   {tag: 'style', klass: MyStyle},
   {tag: 'sub', klass: MySub},
   {tag: 'summary', klass: MySummary},
   {tag: 'sup', klass: MySup},
   {tag: 'table', klass: MyTable},
-  {tag: 'tbody', klass: MyTbody, innerHTML: 'table'},
-  {tag: 'td', klass: MyTd, innerHTML: 'table'},
+  {tag: 'tbody', klass: MyTbody, parsing: 'table'},
+  {tag: 'td', klass: MyTd, parsing: 'table'},
   {tag: 'template', klass: MyTemplate},
   {tag: 'textarea', klass: MyTextarea},
-  {tag: 'tfoot', klass: MyTfoot, innerHTML: 'table'},
-  {tag: 'th', klass: MyTh, innerHTML: 'table'},
-  {tag: 'thead', klass: MyThead, innerHTML: 'table'},
+  {tag: 'tfoot', klass: MyTfoot, parsing: 'table'},
+  {tag: 'th', klass: MyTh, parsing: 'table'},
+  {tag: 'thead', klass: MyThead, parsing: 'table'},
   {tag: 'time', klass: MyTime},
   {tag: 'title', klass: MyTitle},
-  {tag: 'tr', klass: MyTr, innerHTML: 'table'},
+  {tag: 'tr', klass: MyTr, parsing: 'table'},
   {tag: 'track', klass: MyTrack},
   {tag: 'u', klass: MyU},
   {tag: 'ul', klass: MyUl},
   {tag: 'var', klass: MyVar},
   {tag: 'video', klass: MyVideo},
   {tag: 'wbr', klass: MyWbr},
 ];
 // HTMLDataListElement isn't implemented by all major browsers yet.
@@ -784,40 +787,46 @@ if (window.HTMLDialogElement) {
 if (window.HTMLSlotElement) {
   testData.push({tag: 'slot', klass: class extends HTMLSlotElement {
     constructor() {
       super();
     }
   }});
 }
 
-for (t of testData) {
+for (const t of testData) {
   test(() => {
     let name = 'my-' + t.tag;
     customElements.define(name, t.klass, { extends: t.tag });
 
     test(() => {
       let customized = new t.klass();
       assert_equals(customized.constructor, t.klass);
     }, `${t.tag}: Operator 'new' should instantiate a customized built-in element`);
 
     test(() => {
       let customized = document.createElement(t.tag, { is: name });
       assert_equals(customized.constructor, t.klass);
     }, `${t.tag}: document.createElement() should instantiate a customized built-in element`);
 
-    if (t.innerHTML == 'skip')
+    if (t.parsing == 'document') {
+      let test = async_test(`${t.tag}: document parser should instantiate a customized built-in element`);
+      window.addEventListener('load', test.step_func_done(() => {
+        assert_equals(document.querySelector(t.tag).constructor, t.klass);
+      }));
       return;
+    }
     test(() => {
       let container = document.getElementById('container');
-      if (t.innerHTML == 'table') {
+      if (t.parsing == 'table') {
         container.innerHTML = `<table><${t.tag} is="${name}" id="${name}">`;
       } else {
         container.innerHTML = `<${t.tag} is="${name}" id="${name}">`;
       }
       let customized = document.getElementById(name);
       assert_equals(customized.constructor, t.klass);
     }, `${t.tag}: innerHTML should instantiate a customized built-in element`);
 
   }, `${t.tag}: Define a customized built-in element`);
 }
 </script>
 </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/custom-elements/pseudo-class-defined.html
@@ -0,0 +1,90 @@
+<!DOCTYPE html>
+<link rel="help" href="https://html.spec.whatwg.org/multipage/semantics-other.html#selector-defined">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<iframe id="iframe"></iframe>
+<script>
+const testList = [
+  { tag_name: 'div', defined: true },
+  { tag_name: 'a-a', defined: false },
+  { tag_name: 'font-face', defined: true },
+  { tag_name: 'abbr', is: 'my-abbr', defined: false },
+];
+
+// Setup iframe to test the parser.
+const neither = 'rgb(255, 0, 0)';
+const defined = 'rgb(255, 165, 0)';
+const not_defined = 'rgb(0, 0, 255)';
+iframe.srcdoc = `<style>
+  * { color:${neither}; }
+  :defined { color:${defined}; }
+  :not(:defined) { color:${not_defined}; }
+</style>`
+  + testList.map(d => `<${d.tag_name}${d.is ? ' is=' + d.is : ''}></${d.tag_name}>`).join('');
+setup({ explicit_done: true });
+iframe.onload = () => {
+  const doc = iframe.contentDocument;
+  const doc_without_browsing_context = doc.implementation.createHTMLDocument();
+  for (const data of testList) {
+    // Test elements inserted by parser.
+    test_defined(data.defined, doc.getElementsByTagName(data.tag_name)[0],
+                 `<${data.tag_name}${data.is ? ' is=' + data.is : ''}>`);
+
+    // Test DOM createElement() methods.
+    test_defined_for_createElement(data.defined, !data.defined, doc, data.tag_name, data.is);
+
+    // Documents without browsing context should behave the same.
+    test_defined_for_createElement(data.defined, false, doc_without_browsing_context, data.tag_name, data.is, 'Without browsing context: ');
+  }
+
+  done();
+};
+
+function test_defined_for_createElement(defined, should_test_change, doc, tag_name, is, description = '') {
+  let is_desc = is ? `, { is: "${is}" }` : '';
+  // Test document.createElement().
+  let element = is ? doc.createElement(tag_name, { is: is }) : doc.createElement(tag_name);
+  doc.body.appendChild(element);
+  test_defined(defined, element, `${description}createElement("${tag_name}"${is_desc})`);
+
+  // Test document.createElementNS().
+  let html_element = is ? doc.createElementNS('http://www.w3.org/1999/xhtml', tag_name, { is: is })
+                        : doc.createElementNS('http://www.w3.org/1999/xhtml', tag_name);
+  doc.body.appendChild(html_element);
+  test_defined(defined, html_element, `${description}createElementNS("http://www.w3.org/1999/xhtml", "${tag_name}"${is_desc})`);
+
+  // If the element namespace is not HTML, it should be "uncustomized"; i.e., "defined".
+  let svg_element = is ? doc.createElementNS('http://www.w3.org/2000/svg', tag_name, { is: is })
+                       : doc.createElementNS('http://www.w3.org/2000/svg', tag_name);
+  doc.body.appendChild(svg_element);
+  test_defined(true, svg_element, `${description}createElementNS("http://www.w3.org/2000/svg", "${tag_name}"${is_desc})`);
+
+  // Test ":defined" changes when the custom element was defined.
+  if (should_test_change) {
+    let w = doc.defaultView;
+    assert_false(!w, 'defaultView required to test change');
+    if (is) {
+      w.customElements.define(is, class extends w.HTMLElement {}, { extends: tag_name });
+    } else {
+      w.customElements.define(tag_name, class extends w.HTMLElement {
+        constructor() { super(); }
+      });
+    }
+
+    test_defined(true, element, `Upgraded ${description}createElement("${tag_name}"${is_desc})`);
+    test_defined(true, html_element, `Upgraded ${description}createElementNS("http://www.w3.org/1999/xhtml", "${tag_name}"${is_desc})`);
+  }
+}
+
+function test_defined(expected, element, description) {
+  test(() => {
+    assert_equals(element.matches(':defined'), expected, 'matches(":defined")');
+    assert_equals(element.matches(':not(:defined)'), !expected, 'matches(":not(:defined")');
+    const view = element.ownerDocument.defaultView;
+    if (!view)
+      return;
+    const style = view.getComputedStyle(element);
+    assert_equals(style.color, expected ? defined : not_defined, 'getComputedStyle');
+  }, `${description} should ${expected ? 'be' : 'not be'} :defined`);
+}
+</script>
--- a/testing/web-platform/tests/pointerevents/pointerlock/pointerevent_pointerlock_after_pointercapture-manual.html
+++ b/testing/web-platform/tests/pointerevents/pointerlock/pointerevent_pointerlock_after_pointercapture-manual.html
@@ -15,52 +15,60 @@
 
             function resetTestState() {
             }
 
             function run() {
                 var test_pointerEvent = setup_pointerevent_test("no pointercapture while pointerlock", ['mouse']);
                 var div1 = document.getElementById("div1");
                 var div2 = document.getElementById("div2");
-                
+
                 on_event(div1, 'pointerdown', function(event) {
                     div2.setPointerCapture(event.pointerId);
                 });
                 on_event(div1, 'pointermove', function(event) {
                     if (lost_capture) {
                         test_pointerEvent.step(function() {
                             assert_equals(document.pointerLockElement, div1, "document.pointerLockElement should be div1.");
                             assert_true(lost_capture, "Pointer capture was lost after got a pointer lock.");
                         });
                         test_pointerEvent.done(); 
                     }
                 });
+                on_event(document, 'contextmenu', function(event) {
+                    event.preventDefault();
+                });
                 on_event(div2, 'pointermove', function(event) {
-                    if (got_capture && !lock_requested) {
+                    if (event.button == 2 && got_capture && !lock_requested) {
                         div1.requestPointerLock();
                         lock_requested = true;
                     }
                 });
                 on_event(div2, 'gotpointercapture', function(event) {
                     got_capture = true;
                 });
                 on_event(div2, 'lostpointercapture', function(event) {
                     lost_capture = true;
                 });
+                on_event(document,"pointerlockerror", function() {
+                    assert_unreached("Pointer lock error");
+                })
             }
         </script>
     </head>
     <body onload="run()">
         <h1>Pointer Events pointer lock test</h1>
         <h2 id="pointerTypeDescription"></h2>
         <h4>
             Test Description: This test checks that we release the exsiting pointer capture when any element in the page gets a pointer lock.
             <ol>
                  <li>Press left button down on the green rectangle and hold it.</li>
                  <li>Move the mouse inside the green rectangle.</li>
+                 <li>Click right button while keeping left button down</li>
+                 <li>Keep moving the mouse inside the green rectangle.</li>
             </ol>
 
             Test passes if the pointer capture is released on the yellow rectangle when the green rectangle gets the pointer lock.
         </h4>
         <div id="testContainer">
             <div id="div1" style="width:800px;height:250px;background:green"></div>
             <div id="div2" style="width:800px;height:250px;background:yellow"></div>
         </div>
--- a/testing/web-platform/tests/service-workers/service-worker/fetch-request-redirect.https.html
+++ b/testing/web-platform/tests/service-workers/service-worker/fetch-request-redirect.https.html
@@ -1,27 +1,30 @@
 <!DOCTYPE html>
 <title>Service Worker: FetchEvent for resources</title>
 <meta name="timeout" content="long">
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <script src="/common/get-host-info.sub.js"></script>
+<script src="/common/media.js"></script>
 <script src="resources/test-helpers.sub.js"></script>
 <script>
-
+var test_scope = ""
 function assert_resolves(promise, description) {
-  return promise.catch(function(reason) {
-      throw new Error(description + ' - ' + reason.message);
-  });
+    return promise.then(
+        () => test(() => {}, description + " - " + test_scope),
+        (e) => test(() => { throw e; }, description + " - " + test_scope)
+    );
 }
 
 function assert_rejects(promise, description) {
-  return promise.then(
-      function() { throw new Error(description); },
-      function() {});
+    return promise.then(
+        () => test(() => { assert_unreached(); }, description + " - " + test_scope),
+        () => test(() => {}, description + " - " + test_scope)
+    );
 }
 
 function iframe_test(url, timeout_enabled) {
   return new Promise(function(resolve, reject) {
       var frame = document.createElement('iframe');
       frame.src = url;
       if (timeout_enabled) {
         // We can't catch the network error on iframe. So we use the timer for
@@ -47,148 +50,150 @@ function iframe_test(url, timeout_enable
         }
         frame.remove();
       };
       document.body.appendChild(frame);
     });
 }
 
 promise_test(function(t) {
+    test_scope = "default";
+
     var SCOPE = 'resources/fetch-request-redirect-iframe.html';
     var SCRIPT = 'resources/fetch-rewrite-worker.js';
     var REDIRECT_URL = base_path() + 'resources/redirect.py?Redirect=';
     var IMAGE_URL = base_path() + 'resources/square.png';
-    var AUDIO_URL = base_path() + 'resources/silence.oga';
+    var AUDIO_URL = getAudioURI("/media/sound_5");
     var XHR_URL = base_path() + 'resources/simple.txt';
     var HTML_URL = base_path() + 'resources/dummy.html';
 
     var REDIRECT_TO_IMAGE_URL = REDIRECT_URL + encodeURIComponent(IMAGE_URL);
     var REDIRECT_TO_AUDIO_URL = REDIRECT_URL + encodeURIComponent(AUDIO_URL);
     var REDIRECT_TO_XHR_URL = REDIRECT_URL + encodeURIComponent(XHR_URL);
     var REDIRECT_TO_HTML_URL = REDIRECT_URL + encodeURIComponent(HTML_URL);
 
     var worker;
     var frame;
     return service_worker_unregister_and_register(t, SCRIPT, SCOPE)
       .then(function(registration) {
           worker = registration.installing;
           return wait_for_state(t, worker, 'activated');
         })
       .then(function() { return with_iframe(SCOPE); })
-      .then(function(f) {
-          frame = f;
-          return Promise.all([
+      .then(async function(f) {
+            frame = f;
             // XMLHttpRequest tests.
-            assert_resolves(frame.contentWindow.xhr(XHR_URL),
-                            'Normal XHR should succeed.'),
-            assert_resolves(frame.contentWindow.xhr(REDIRECT_TO_XHR_URL),
-                            'Redirected XHR should succeed.'),
-            assert_resolves(
+            await assert_resolves(frame.contentWindow.xhr(XHR_URL),
+                            'Normal XHR should succeed.');
+            await assert_resolves(frame.contentWindow.xhr(REDIRECT_TO_XHR_URL),
+                            'Redirected XHR should succeed.');
+            await assert_resolves(
                 frame.contentWindow.xhr(
                     './?url=' + encodeURIComponent(REDIRECT_TO_XHR_URL) +
                     '&redirect-mode=follow'),
-                'Redirected XHR with Request.redirect=follow should succeed.'),
-            assert_rejects(
+                'Redirected XHR with Request.redirect=follow should succeed.');
+            await assert_rejects(
                 frame.contentWindow.xhr(
                     './?url=' + encodeURIComponent(REDIRECT_TO_XHR_URL) +
                     '&redirect-mode=error'),
-                'Redirected XHR with Request.redirect=error should fail.'),
-            assert_rejects(
+                'Redirected XHR with Request.redirect=error should fail.');
+            await assert_rejects(
                 frame.contentWindow.xhr(
                     './?url=' + encodeURIComponent(REDIRECT_TO_XHR_URL) +
                     '&redirect-mode=manual'),
-                'Redirected XHR with Request.redirect=manual should fail.'),
+                'Redirected XHR with Request.redirect=manual should fail.');
 
             // Image loading tests.
-            assert_resolves(frame.contentWindow.load_image(IMAGE_URL),
-                            'Normal image resource should be loaded.'),
-            assert_resolves(
+            await assert_resolves(frame.contentWindow.load_image(IMAGE_URL),
+                            'Normal image resource should be loaded.');
+            await assert_resolves(
                 frame.contentWindow.load_image(REDIRECT_TO_IMAGE_URL),
-                'Redirected image resource should be loaded.'),
-            assert_resolves(
+                'Redirected image resource should be loaded.');
+            await assert_resolves(
                 frame.contentWindow.load_image(
                     './?url=' + encodeURIComponent(REDIRECT_TO_IMAGE_URL) +
                     '&redirect-mode=follow'),
                 'Loading redirected image with Request.redirect=follow should' +
-                ' succeed.'),
-            assert_rejects(
+                ' succeed.');
+            await assert_rejects(
                 frame.contentWindow.load_image(
                     './?url=' + encodeURIComponent(REDIRECT_TO_IMAGE_URL) +
                     '&redirect-mode=error'),
                 'Loading redirected image with Request.redirect=error should ' +
-                'fail.'),
-            assert_rejects(
+                'fail.');
+            await assert_rejects(
                 frame.contentWindow.load_image(
                     './?url=' + encodeURIComponent(REDIRECT_TO_IMAGE_URL) +
                     '&redirect-mode=manual'),
                 'Loading redirected image with Request.redirect=manual should' +
-                ' fail.'),
+                ' fail.');
 
             // Audio loading tests.
-            assert_resolves(frame.contentWindow.load_audio(AUDIO_URL),
-                            'Normal audio resource should be loaded.'),
-            assert_resolves(
+            await assert_resolves(frame.contentWindow.load_audio(AUDIO_URL),
+                            'Normal audio resource should be loaded.');
+            await assert_resolves(
                 frame.contentWindow.load_audio(REDIRECT_TO_AUDIO_URL),
-                'Redirected audio resource should be loaded.'),
-            assert_resolves(
+                'Redirected audio resource should be loaded.');
+            await assert_resolves(
                 frame.contentWindow.load_audio(
                     './?url=' + encodeURIComponent(REDIRECT_TO_AUDIO_URL) +
                     '&redirect-mode=follow'),
                 'Loading redirected audio with Request.redirect=follow should' +
-                ' succeed.'),
-            assert_rejects(
+                ' succeed.');
+            await assert_rejects(
                 frame.contentWindow.load_audio(
                     './?url=' + encodeURIComponent(REDIRECT_TO_AUDIO_URL) +
                     '&redirect-mode=error'),
                 'Loading redirected audio with Request.redirect=error should ' +
-                'fail.'),
-            assert_rejects(
+                'fail.');
+            await assert_rejects(
                 frame.contentWindow.load_audio(
                     './?url=' + encodeURIComponent(REDIRECT_TO_AUDIO_URL) +
                     '&redirect-mode=manual'),
                 'Loading redirected audio with Request.redirect=manual should' +
-                ' fail.'),
+                ' fail.');
 
             // Iframe tests.
-            assert_resolves(iframe_test(HTML_URL),
-                            'Normal iframe loading should succeed.'),
-            assert_resolves(
+            await assert_resolves(iframe_test(HTML_URL),
+                            'Normal iframe loading should succeed.');
+            await assert_resolves(
                 iframe_test(REDIRECT_TO_HTML_URL),
-                'Normal redirected iframe loading should succeed.'),
-            assert_rejects(
+                'Normal redirected iframe loading should succeed.');
+            await assert_rejects(
                 iframe_test(SCOPE + '?url=' +
                             encodeURIComponent(REDIRECT_TO_HTML_URL) +
                             '&redirect-mode=follow',
                             true /* timeout_enabled */),
                 'Redirected iframe loading with Request.redirect=follow should'+
-                ' fail.'),
-            assert_rejects(
+                ' fail.');
+            await assert_rejects(
                 iframe_test(SCOPE + '?url=' +
                             encodeURIComponent(REDIRECT_TO_HTML_URL) +
                             '&redirect-mode=error',
                             true /* timeout_enabled */),
                 'Redirected iframe loading with Request.redirect=error should '+
-                'fail.'),
-            assert_resolves(
+                'fail.');
+            await assert_resolves(
                 iframe_test(SCOPE + '?url=' +
                             encodeURIComponent(REDIRECT_TO_HTML_URL) +
                             '&redirect-mode=manual',
                             true /* timeout_enabled */),
                 'Redirected iframe loading with Request.redirect=manual should'+
-                ' succeed.'),
-          ]);
+                ' succeed.');
         })
       .then(function() {
           frame.remove();
           service_worker_unregister_and_done(t, SCOPE);
         });
   }, 'Verify redirect mode of Fetch API and ServiceWorker FetchEvent.');
 
 // test for reponse.redirected
 promise_test(function(t) {
+    test_scope = "redirected";
+
     var SCOPE = 'resources/fetch-request-redirect-iframe.html';
     var SCRIPT = 'resources/fetch-rewrite-worker.js';
     var REDIRECT_URL = base_path() + 'resources/redirect.py?Redirect=';
     var XHR_URL = base_path() + 'resources/simple.txt';
     var IMAGE_URL = base_path() + 'resources/square.png';
 
     var REDIRECT_TO_XHR_URL = REDIRECT_URL + encodeURIComponent(XHR_URL);
 
@@ -202,87 +207,87 @@ promise_test(function(t) {
     var worker;
     var frame;
     return service_worker_unregister_and_register(t, SCRIPT, SCOPE)
       .then(function(registration) {
           worker = registration.installing;
           return wait_for_state(t, worker, 'activated');
         })
       .then(function() { return with_iframe(SCOPE); })
-      .then(function(f) {
+      .then(async function(f) {
           frame = f;
-          return Promise.all([
             // XMLHttpRequest tests.
-            assert_resolves(
+            await assert_resolves(
                 frame.contentWindow.xhr(
                     './?url=' + encodeURIComponent(XHR_URL) +
                     '&expected_redirected=false' +
                     '&expected_resolves=true'),
                 'Normal XHR should be resolved and response should not be ' +
-                'redirected.'),
-            assert_resolves(
+                'redirected.');
+            await assert_resolves(
                 frame.contentWindow.xhr(
                     './?url=' + encodeURIComponent(REDIRECT_TO_XHR_URL) +
                     '&expected_redirected=true' +
                     '&expected_resolves=true'),
                 'Redirected XHR should be resolved and response should be ' +
-                'redirected.'),
+                'redirected.');
 
             // tests for request's mode = cors
-            assert_resolves(
+            await assert_resolves(
                 frame.contentWindow.xhr(
                     './?url=' + encodeURIComponent(XHR_URL) +
                     '&mode=cors' +
                     '&expected_redirected=false' +
                     '&expected_resolves=true'),
                 'Normal XHR should be resolved and response should not be ' +
-                'redirected even with CORS mode.'),
-            assert_resolves(
+                'redirected even with CORS mode.');
+            await assert_resolves(
                 frame.contentWindow.xhr(
                     './?url=' + encodeURIComponent(REDIRECT_TO_XHR_URL) +
                     '&mode=cors' +
                     '&redirect-mode=follow' +
                     '&expected_redirected=true' +
                     '&expected_resolves=true'),
                 'Redirected XHR should be resolved and response.redirected ' +
-                'should be redirected with CORS mode.'),
+                'should be redirected with CORS mode.');
 
             // tests for request's mode = no-cors
             // The response.redirect should be false since we will not add
             // redirected url list when redirect-mode is not follow.
-            assert_rejects(
+            await assert_rejects(
                 frame.contentWindow.xhr(
                     './?url=' + encodeURIComponent(REDIRECT_TO_XHR_URL) +
                     '&mode=no-cors' +
                     '&redirect-mode=manual' +
                     '&expected_redirected=false' +
                     '&expected_resolves=false'),
                 'Redirected XHR should be reject and response should be ' +
-                'redirected with NO-CORS mode and redirect-mode=manual.'),
+                'redirected with NO-CORS mode and redirect-mode=manual.');
 
             // tests for redirecting to a cors
-            assert_resolves(
+            await assert_resolves(
                 frame.contentWindow.load_image(
                     './?url=' + encodeURIComponent(REDIRECT_TO_CROSS_ORIGIN) +
                     '&mode=no-cors' +
                     '&redirect-mode=follow' +
                     '&expected_redirected=false' +
                     '&expected_resolves=true'),
-                'Redirected COS image should be reject and response should ' +
-                'not be redirected with NO-CORS mode.'),
-          ]);
+                'Redirected CORS image should be reject and response should ' +
+                'not be redirected with NO-CORS mode.');
         })
       .then(function() {
           frame.remove();
           service_worker_unregister_and_done(t, SCOPE);
         });
   }, 'Verify redirected of Response(Fetch API) and ServiceWorker FetchEvent.');
 
 // test for reponse.redirected after cached
 promise_test(function(t) {
+    test_scope = "cache";
+
     var SCOPE = 'resources/fetch-request-redirect-iframe.html';
     var SCRIPT = 'resources/fetch-rewrite-worker.js';
     var REDIRECT_URL = base_path() + 'resources/redirect.py?Redirect=';
     var XHR_URL = base_path() + 'resources/simple.txt';
     var IMAGE_URL = base_path() + 'resources/square.png';
 
     var REDIRECT_TO_XHR_URL = REDIRECT_URL + encodeURIComponent(XHR_URL);
 
@@ -296,84 +301,82 @@ promise_test(function(t) {
     var worker;
     var frame;
     return service_worker_unregister_and_register(t, SCRIPT, SCOPE)
       .then(function(registration) {
           worker = registration.installing;
           return wait_for_state(t, worker, 'activated');
         })
       .then(function() { return with_iframe(SCOPE); })
-      .then(function(f) {
+      .then(async function(f) {
           frame = f;
-          return Promise.all([
             // XMLHttpRequest tests.
-            assert_resolves(
+            await assert_resolves(
                 frame.contentWindow.xhr(
                     './?url=' + encodeURIComponent(XHR_URL) +
                     '&expected_redirected=false' +
                     '&expected_resolves=true' +
                     '&cache'),
                 'Normal XHR should be resolved and response should not be ' +
-                'redirected.'),
-            assert_resolves(
+                'redirected.');
+            await assert_resolves(
                 frame.contentWindow.xhr(
                     './?url=' + encodeURIComponent(REDIRECT_TO_XHR_URL) +
                     '&expected_redirected=true' +
                     '&expected_resolves=true' +
                     '&cache'),
                 'Redirected XHR should be resolved and response should be ' +
-                'redirected.'),
+                'redirected.');
 
             // tests for request's mode = cors
-            assert_resolves(
+            await assert_resolves(
                 frame.contentWindow.xhr(
                     './?url=' + encodeURIComponent(XHR_URL) +
                     '&mode=cors' +
                     '&expected_redirected=false' +
                     '&expected_resolves=true' +
                     '&cache'),
                 'Normal XHR should be resolved and response should not be ' +
-                'redirected even with CORS mode.'),
-            assert_resolves(
+                'redirected even with CORS mode.');
+            await assert_resolves(
                 frame.contentWindow.xhr(
                     './?url=' + encodeURIComponent(REDIRECT_TO_XHR_URL) +
                     '&mode=cors' +
                     '&redirect-mode=follow' +
                     '&expected_redirected=true' +
                     '&expected_resolves=true' +
                     '&cache'),
                 'Redirected XHR should be resolved and response.redirected ' +
-                'should be redirected with CORS mode.'),
+                'should be redirected with CORS mode.');
 
             // tests for request's mode = no-cors
             // The response.redirect should be false since we will not add
             // redirected url list when redirect-mode is not follow.
-            assert_rejects(
+            await assert_rejects(
                 frame.contentWindow.xhr(
                     './?url=' + encodeURIComponent(REDIRECT_TO_XHR_URL) +
                     '&mode=no-cors' +
                     '&redirect-mode=manual' +
                     '&expected_redirected=false' +
                     '&expected_resolves=false' +
                     '&cache'),
                 'Redirected XHR should be reject and response should be ' +
-                'redirected with NO-CORS mode and redirect-mode=manual.'),
+                'redirected with NO-CORS mode and redirect-mode=manual.');
 
             // tests for redirecting to a cors
-            assert_resolves(
+            await assert_resolves(
                 frame.contentWindow.load_image(
                     './?url=' + encodeURIComponent(REDIRECT_TO_CROSS_ORIGIN) +
                     '&mode=no-cors' +
                     '&redirect-mode=follow' +
                     '&expected_redirected=false' +
                     '&expected_resolves=true' +
                     '&cache'),
-                'Redirected COS image should be reject and response should ' +
-                'not be redirected with NO-CORS mode.'),
-          ]);
+                'Redirected CORS image should be reject and response should ' +
+                'not be redirected with NO-CORS mode.');
         })
       .then(function() {
           frame.remove();
           service_worker_unregister_and_done(t, SCOPE);
         });
   }, 'Verify redirected of Response(Fetch API), Cache API and ServiceWorker ' +
      'FetchEvent.');
 </script>
--- a/testing/web-platform/tests/service-workers/service-worker/http-to-https-redirect-and-register.https.html
+++ b/testing/web-platform/tests/service-workers/service-worker/http-to-https-redirect-and-register.https.html
@@ -3,21 +3,23 @@
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <script src="/common/get-host-info.sub.js"></script>
 <script src="resources/test-helpers.sub.js"></script>
 <body>
 <script>
 'use strict';
 
+var host_info = get_host_info();
+
 // Loads a non-secure url in a new window, which redirects to |target_url|.
 // That page then registers a service worker, and messages back with the result.
 // Returns a promise that resolves with the result.
 function redirect_and_register(target_url) {
-  var redirect_url = get_host_info()['UNAUTHENTICATED_ORIGIN'] + base_path() +
+  var redirect_url = host_info.HTTP_REMOTE_ORIGIN + base_path() +
     'resources/redirect.py?Redirect=';
   var child = window.open(redirect_url + encodeURIComponent(target_url));
   return new Promise(resolve => {
         window.addEventListener('message', e => resolve(e.data));
       })
     .then(function(result) {
         child.close();
         return result;
@@ -30,17 +32,17 @@ promise_test(function(t) {
 
     return redirect_and_register(target_url)
       .then(result => {
           assert_equals(result, 'OK');
         });
   }, 'register on a secure page after redirect from an non-secure url');
 
 promise_test(function(t) {
-    var target_url = get_host_info()['UNAUTHENTICATED_ORIGIN'] + base_path() +
+    var target_url = host_info.HTTP_REMOTE_ORIGIN + base_path() +
       'resources/http-to-https-redirect-and-register-iframe.html';
 
     return redirect_and_register(target_url)
       .then(result => {
           assert_equals(result, 'FAIL: SecurityError');
         });
   }, 'register on a non-secure page after redirect from an non-secure url');
 </script>
--- a/testing/web-platform/tests/service-workers/service-worker/update-bytecheck.https.html
+++ b/testing/web-platform/tests/service-workers/service-worker/update-bytecheck.https.html
@@ -1,15 +1,16 @@
 <!doctype html>
 <meta charset=utf-8>
 <title></title>
 <script src="/resources/testharness.js"></script>
 <script src="resources/testharness-helpers.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <script src="resources/test-helpers.sub.js"></script>
+<script src="/common/get-host-info.sub.js"></script>
 <script>
 
 /*
  * @param bolean cors
  *   Determine wether the imported script should be a cross origin script.
  * @param string main
  *   Decide the content of the main script, where 'default' is for constant
  *   content while 'time' is for time-variant content.
@@ -21,21 +22,22 @@ const settings = [{cors: false, main: 'd
                   {cors: false, main: 'default', imported: 'time'   },
                   {cors: false, main: 'time',    imported: 'default'},
                   {cors: false, main: 'time',    imported: 'time'   },
                   {cors: true,  main: 'default', imported: 'default'},
                   {cors: true,  main: 'default', imported: 'time'   },
                   {cors: true,  main: 'time',    imported: 'default'},
                   {cors: true,  main: 'time',    imported: 'time'   }];
 
+const host_info = get_host_info();
 settings.reduce((p, s) => {
   return p.then(promise_test(function(t) {
     var path = !s.cors ? ''
-                       : 'https://www1.web-platform.test:8443/' +
-                         'service-workers/service-worker/resources/';
+                       : host_info.HTTPS_REMOTE_ORIGIN +
+                         '/service-workers/service-worker/resources/';
     var script = 'resources/bytecheck-worker.py' +
                  '?main=' + s.main +
                  '&imported=' + s.imported +
                  '&path=' + path;
     var scope = 'resources/blank.html';
 
     var swr, sw;
     return Promise.resolve()
--- a/testing/web-platform/tests/tools/webdriver/webdriver/transport.py
+++ b/testing/web-platform/tests/tools/webdriver/webdriver/transport.py
@@ -34,18 +34,18 @@ class Response(object):
             return error.from_response(self)
         return None
 
     @classmethod
     def from_http(cls, http_response, decoder=json.JSONDecoder, **kwargs):
         try:
             body = json.load(http_response, cls=decoder, **kwargs)
         except ValueError:
-            raise ValueError("Failed to decode response body as JSON:\n"
-                "%s" % json.dumps(body, indent=2))
+            raise ValueError("Failed to decode response body as JSON:\n" +
+                http_response.read())
 
         return cls(http_response.status, body)
 
 
 class HTTPWireProtocol(object):
     """
     Transports messages (commands and responses) over the WebDriver
     wire protocol.
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/webaudio/resources/distance-model-testing.js
@@ -0,0 +1,193 @@
+let sampleRate = 44100.0;
+
+// How many panner nodes to create for the test.
+let nodesToCreate = 100;
+
+// Time step when each panner node starts.
+let timeStep = 0.001;
+
+// Make sure we render long enough to get all of our nodes.
+let renderLengthSeconds = timeStep * (nodesToCreate + 1);
+
+// Length of an impulse signal.
+let pulseLengthFrames = Math.round(timeStep * sampleRate);
+
+// Globals to make debugging a little easier.
+let context;
+let impulse;
+let bufferSource;
+let panner;
+let position;
+let time;
+
+// For the record, these distance formulas were taken from the OpenAL
+// spec
+// (http://connect.creativelabs.com/openal/Documentation/OpenAL%201.1%20Specification.pdf),
+// not the code.  The Web Audio spec follows the OpenAL formulas.
+
+function linearDistance(panner, x, y, z) {
+  let distance = Math.sqrt(x * x + y * y + z * z);
+  distance = Math.min(distance, panner.maxDistance);
+  let rolloff = panner.rolloffFactor;
+  let gain =
+      (1 -
+       rolloff * (distance - panner.refDistance) /
+           (panner.maxDistance - panner.refDistance));
+
+  return gain;
+}
+
+function inverseDistance(panner, x, y, z) {
+  let distance = Math.sqrt(x * x + y * y + z * z);
+  distance = Math.min(distance, panner.maxDistance);
+  let rolloff = panner.rolloffFactor;
+  let gain = panner.refDistance /
+      (panner.refDistance + rolloff * (distance - panner.refDistance));
+
+  return gain;
+}
+
+function exponentialDistance(panner, x, y, z) {
+  let distance = Math.sqrt(x * x + y * y + z * z);
+  distance = Math.min(distance, panner.maxDistance);
+  let rolloff = panner.rolloffFactor;
+  let gain = Math.pow(distance / panner.refDistance, -rolloff);
+
+  return gain;
+}
+
+// Map the distance model to the function that implements the model
+let distanceModelFunction = {
+  'linear': linearDistance,
+  'inverse': inverseDistance,
+  'exponential': exponentialDistance
+};
+
+function createGraph(context, distanceModel, nodeCount) {
+  bufferSource = new Array(nodeCount);
+  panner = new Array(nodeCount);
+  position = new Array(nodeCount);
+  time = new Array(nodesToCreate);
+
+  impulse = createImpulseBuffer(context, pulseLengthFrames);
+
+  // Create all the sources and panners.
+  //
+  // We MUST use the EQUALPOWER panning model so that we can easily
+  // figure out the gain introduced by the panner.
+  //
+  // We want to stay in the middle of the panning range, which means
+  // we want to stay on the z-axis.  If we don't, then the effect of
+  // panning model will be much more complicated.  We're not testing
+  // the panner, but the distance model, so we want the panner effect
+  // to be simple.
+  //
+  // The panners are placed at a uniform intervals between the panner
+  // reference distance and the panner max distance.  The source is
+  // also started at regular intervals.
+  for (let k = 0; k < nodeCount; ++k) {
+    bufferSource[k] = context.createBufferSource();
+    bufferSource[k].buffer = impulse;
+
+    panner[k] = context.createPanner();
+    panner[k].panningModel = 'equalpower';
+    panner[k].distanceModel = distanceModel;
+
+    let distanceStep =
+        (panner[k].maxDistance - panner[k].refDistance) / nodeCount;
+    position[k] = distanceStep * k + panner[k].refDistance;
+    panner[k].setPosition(0, 0, position[k]);
+
+    bufferSource[k].connect(panner[k]);
+    panner[k].connect(context.destination);
+
+    time[k] = k * timeStep;
+    bufferSource[k].start(time[k]);
+  }
+}
+
+// distanceModel should be the distance model string like
+// "linear", "inverse", or "exponential".
+function createTestAndRun(context, distanceModel, should) {
+  // To test the distance models, we create a number of panners at
+  // uniformly spaced intervals on the z-axis.  Each of these are
+  // started at equally spaced time intervals.  After rendering the
+  // signals, we examine where each impulse is located and the
+  // attenuation of the impulse.  The attenuation is compared
+  // against our expected attenuation.
+
+  createGraph(context, distanceModel, nodesToCreate);
+
+  return context.startRendering().then(
+      buffer => checkDistanceResult(buffer, distanceModel, should));
+}
+
+// The gain caused by the EQUALPOWER panning model, if we stay on the
+// z axis, with the default orientations.
+function equalPowerGain() {
+  return Math.SQRT1_2;
+}
+
+function checkDistanceResult(renderedBuffer, model, should) {
+  renderedData = renderedBuffer.getChannelData(0);
+
+  // The max allowed error between the actual gain and the expected
+  // value.  This is determined experimentally.  Set to 0 to see
+  // what the actual errors are.
+  let maxAllowedError = 3.3e-6;
+
+  let success = true;
+
+  // Number of impulses we found in the rendered result.
+  let impulseCount = 0;
+
+  // Maximum relative error in the gain of the impulses.
+  let maxError = 0;
+
+  // Array of locations of the impulses that were not at the
+  // expected location.  (Contains the actual and expected frame
+  // of the impulse.)
+  let impulsePositionErrors = new Array();
+
+  // Step through the rendered data to find all the non-zero points
+  // so we can find where our distance-attenuated impulses are.
+  // These are tested against the expected attenuations at that
+  // distance.
+  for (let k = 0; k < renderedData.length; ++k) {
+    if (renderedData[k] != 0) {
+      // Convert from string to index.
+      let distanceFunction = distanceModelFunction[model];
+      let expected =
+          distanceFunction(panner[impulseCount], 0, 0, position[impulseCount]);
+
+      // Adjust for the center-panning of the EQUALPOWER panning
+      // model that we're using.
+      expected *= equalPowerGain();
+
+      let error = Math.abs(renderedData[k] - expected) / Math.abs(expected);
+
+      maxError = Math.max(maxError, Math.abs(error));
+
+      should(renderedData[k]).beCloseTo(expected, {threshold: maxAllowedError});
+
+      // Keep track of any impulses that aren't where we expect them
+      // to be.
+      let expectedOffset = timeToSampleFrame(time[impulseCount], sampleRate);
+      if (k != expectedOffset) {
+        impulsePositionErrors.push({actual: k, expected: expectedOffset});
+      }
+      ++impulseCount;
+    }
+  }
+  should(impulseCount, 'Number of impulses').beEqualTo(nodesToCreate);
+
+  should(maxError, 'Max error in distance gains')
+      .beLessThanOrEqualTo(maxAllowedError);
+
+  // Display any timing errors that we found.
+  if (impulsePositionErrors.length > 0) {
+    let actual = impulsePositionErrors.map(x => x.actual);
+    let expected = impulsePositionErrors.map(x => x.expected);
+    should(actual, 'Actual impulse positions found').beEqualToArray(expected);
+  }
+}
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/webaudio/resources/panner-formulas.js
@@ -0,0 +1,190 @@
+// For the record, these distance formulas were taken from the OpenAL
+// spec
+// (http://connect.creativelabs.com/openal/Documentation/OpenAL%201.1%20Specification.pdf),
+// not the code.  The Web Audio spec follows the OpenAL formulas.
+
+function linearDistance(panner, x, y, z) {
+  let distance = Math.sqrt(x * x + y * y + z * z);
+  let dref = Math.min(panner.refDistance, panner.maxDistance);
+  let dmax = Math.max(panner.refDistance, panner.maxDistance);
+  distance = Math.max(Math.min(distance, dmax), dref);
+  let rolloff = Math.max(Math.min(panner.rolloffFactor, 1), 0);
+  if (dref === dmax)
+    return 1 - rolloff;
+
+  let gain = (1 - rolloff * (distance - dref) / (dmax - dref));
+
+  return gain;
+}
+
+function inverseDistance(panner, x, y, z) {
+  let distance = Math.sqrt(x * x + y * y + z * z);
+  distance = Math.max(distance, panner.refDistance);
+  let rolloff = panner.rolloffFactor;
+  let gain = panner.refDistance /
+      (panner.refDistance +
+       rolloff * (Math.max(distance, panner.refDistance) - panner.refDistance));
+
+  return gain;
+}
+
+function exponentialDistance(panner, x, y, z) {
+  let distance = Math.sqrt(x * x + y * y + z * z);
+  distance = Math.max(distance, panner.refDistance);
+  let rolloff = panner.rolloffFactor;
+  let gain = Math.pow(distance / panner.refDistance, -rolloff);
+
+  return gain;
+}
+
+// Simple implementations of 3D vectors implemented as a 3-element array.
+
+// x - y
+function vec3Sub(x, y) {
+  let z = new Float32Array(3);
+  z[0] = x[0] - y[0];
+  z[1] = x[1] - y[1];
+  z[2] = x[2] - y[2];
+
+  return z;
+}
+
+// x/|x|
+function vec3Normalize(x) {
+  let mag = Math.hypot(...x);
+  return x.map(function(c) {
+    return c / mag;
+  });
+}
+
+// x == 0?
+function vec3IsZero(x) {
+  return x[0] === 0 && x[1] === 0 && x[2] === 0;
+}
+
+// Vector cross product
+function vec3Cross(u, v) {
+  let cross = new Float32Array(3);
+  cross[0] = u[1] * v[2] - u[2] * v[1];
+  cross[1] = u[2] * v[0] - u[0] * v[2];
+  cross[2] = u[0] * v[1] - u[1] * v[0];
+  return cross;
+}
+
+// Dot product
+function vec3Dot(x, y) {
+  return x[0] * y[0] + x[1] * y[1] + x[2] * y[2];
+}
+
+// a*x, for scalar a
+function vec3Scale(a, x) {
+  return x.map(function(c) {
+    return a * c;
+  });
+}
+
+function calculateAzimuth(source, listener, listenerForward, listenerUp) {
+  let sourceListener = vec3Sub(source, listener);
+
+  if (vec3IsZero(sourceListener))
+    return 0;
+
+  sourceListener = vec3Normalize(sourceListener);
+
+  let listenerRight = vec3Normalize(vec3Cross(listenerForward, listenerUp));
+  let listenerForwardNorm = vec3Normalize(listenerForward);
+
+  let up = vec3Cross(listenerRight, listenerForwardNorm);
+  let upProjection = vec3Dot(sourceListener, up);
+
+  let projectedSource =
+      vec3Normalize(vec3Sub(sourceListener, vec3Scale(upProjection, up)));
+
+  let azimuth =
+      180 / Math.PI * Math.acos(vec3Dot(projectedSource, listenerRight));
+
+  // Source in front or behind the listener
+  let frontBack = vec3Dot(projectedSource, listenerForwardNorm);
+  if (frontBack < 0)
+    azimuth = 360 - azimuth;
+
+  // Make azimuth relative to "front" and not "right" listener vector.
+  if (azimuth >= 0 && azimuth <= 270)
+    azimuth = 90 - azimuth;
+  else
+    azimuth = 450 - azimuth;
+
+  // We don't need elevation, so we're skipping that computation.
+  return azimuth;
+}
+
+// Map our position angle to the azimuth angle (in degrees).
+//
+// An angle of 0 corresponds to an azimuth of 90 deg; pi, to -90 deg.
+function angleToAzimuth(angle) {
+  return 90 - angle * 180 / Math.PI;
+}
+
+// The gain caused by the EQUALPOWER panning model
+function equalPowerGain(azimuth, numberOfChannels) {
+  let halfPi = Math.PI / 2;
+
+  if (azimuth < -90)
+    azimuth = -180 - azimuth;
+  else
+    azimuth = 180 - azimuth;
+
+  if (numberOfChannels == 1) {
+    let panPosition = (azimuth + 90) / 180;
+
+    let gainL = Math.cos(halfPi * panPosition);
+    let gainR = Math.sin(halfPi * panPosition);
+
+    return {left: gainL, right: gainR};
+  } else {
+    if (azimuth <= 0) {
+      let panPosition = (azimuth + 90) / 90;
+
+      let gainL = Math.cos(halfPi * panPosition);
+      let gainR = Math.sin(halfPi * panPosition);
+
+      return {left: gainL, right: gainR};
+    } else {
+      let panPosition = azimuth / 90;
+
+      let gainL = Math.cos(halfPi * panPosition);
+      let gainR = Math.sin(halfPi * panPosition);
+
+      return {left: gainL, right: gainR};
+    }
+  }
+}
+
+function applyPanner(azimuth, srcL, srcR, numberOfChannels) {
+  let length = srcL.length;
+  let outL = new Float32Array(length);
+  let outR = new Float32Array(length);
+
+  if (numberOfChannels == 1) {
+    for (let k = 0; k < length; ++k) {
+      let gains = equalPowerGain(azimuth[k], numberOfChannels);
+
+      outL[k] = srcL[k] * gains.left;
+      outR[k] = srcR[k] * gains.right;
+    }
+  } else {
+    for (let k = 0; k < length; ++k) {
+      let gains = equalPowerGain(azimuth[k], numberOfChannels);
+
+      if (azimuth[k] <= 0) {
+        outL[k] = srcL[k] + srcR[k] * gains.left;
+        outR[k] = srcR[k] * gains.right;
+      } else {
+        outL[k] = srcL[k] * gains.left;
+        outR[k] = srcR[k] + srcL[k] * gains.right;
+      }
+    }
+  }
+
+  return {left: outL, right: outR};