Merge mozilla-central to inbound. a=merge CLOSED TREE
authorOana Pop Rus <opoprus@mozilla.com>
Tue, 22 Jan 2019 11:50:10 +0200
changeset 514819 8c16a97e50ba68ab012048e7c9735d5d3e7c7ee2
parent 514818 faade3f1fa138c0abe93a88fd738307329b5d9a2 (current diff)
parent 514793 f0c23db0d035dbe81e23eb4d619e493e38582d24 (diff)
child 514820 b78ecfce1c782db32e171fc0854f41f886bcb8c0
push id1953
push userffxbld-merge
push dateMon, 11 Mar 2019 12:10:20 +0000
treeherdermozilla-release@9c35dcbaa899 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmerge
milestone66.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 mozilla-central to inbound. a=merge CLOSED TREE
--- a/browser/base/content/urlbarBindings.xml
+++ b/browser/base/content/urlbarBindings.xml
@@ -1491,17 +1491,18 @@ file, You can obtain one at http://mozil
               this.setAttribute("usertyping", "true");
             } else {
               this.removeAttribute("usertyping");
             }
             // If the popup already had accessibility focus, bring it back to
             // the input, since the user is editing.
             if (!this.popup.richlistbox.suppressMenuItemEvent &&
                 this.popup.richlistbox.currentItem) {
-              this.popup.richlistbox.currentItem._fireEvent("DOMMenuItemInactive");
+              this.popup.richlistbox._fireEvent(
+                this.popup.richlistbox.currentItem, "DOMMenuItemInactive");
             }
             // The user is typing, so don't give accessibility focus to the
             // popup, even if an item gets automatically selected.
             this.popup.richlistbox.suppressMenuItemEvent = true;
             // Only wait for a result when we are sure to get one.  In some
             // cases, like when pasting the same exact text, we may not fire
             // a new search and we won't get a result.
             this._onInputHandledText = this.mController.handleText();
@@ -2221,17 +2222,18 @@ file, You can obtain one at http://mozil
             window.windowUtils.getBoundsWithoutFlushing(document.getElementById("nav-bar")).bottom -
             window.windowUtils.getBoundsWithoutFlushing(aInput).bottom);
 
           if (!this.richlistbox.suppressMenuItemEvent && this.richlistbox.currentItem) {
             // The richlistbox fired a DOMMenuItemActive for accessibility,
             // but because the popup isn't open yet, accessibility will ignore
             // it. Therefore, fire it again once the popup opens.
             this.addEventListener("popupshown", () => {
-              this.richlistbox.currentItem._fireEvent("DOMMenuItemActive");
+              this.richlistbox._fireEvent(this.richlistbox.currentItem,
+                "DOMMenuItemActive");
             }, {once: true});
           }
 
           this.openPopup(aElement, "after_start", 0, yOffset, false, false);
 
           // Do this immediately after we've requested the popup to open. This
           // will cause sync reflows but prevents flickering.
           if (needsHandleOverUnderflow) {
--- a/browser/installer/Makefile.in
+++ b/browser/installer/Makefile.in
@@ -24,16 +24,19 @@ ifdef MOZ_ARTIFACT_BUILDS
 MOZ_PKG_FATAL_WARNINGS =
 endif
 
 DEFINES += -DMOZ_APP_NAME=$(MOZ_APP_NAME) -DPREF_DIR=$(PREF_DIR)
 
 ifdef MOZ_DEBUG
 DEFINES += -DMOZ_DEBUG=1
 endif
+ifdef MOZ_LAYOUT_DEBUGGER
+DEFINES += -DMOZ_LAYOUT_DEBUGGER=1
+endif
 
 ifneq (,$(filter gtk%,$(MOZ_WIDGET_TOOLKIT)))
 DEFINES += -DMOZ_GTK=1
 ifeq ($(MOZ_WIDGET_TOOLKIT),gtk3)
 DEFINES += -DMOZ_GTK3=1
 endif
 endif
 
--- a/browser/installer/package-manifest.in
+++ b/browser/installer/package-manifest.in
@@ -494,17 +494,17 @@
 
 ; Content-accessible resources.
 @RESPATH@/contentaccessible/*
 
 ; svg
 @RESPATH@/res/svg.css
 
 ; [Layout Debugger]
-#ifdef MOZ_DEBUG
+#ifdef MOZ_LAYOUT_DEBUGGER
 @RESPATH@/chrome/layoutdebug@JAREXT@
 @RESPATH@/chrome/layoutdebug.manifest
 #endif
 
 ; [Personal Security Manager]
 ;
 ; NSS libraries are signed in the staging directory,
 ; meaning their .chk files are created there directly.
--- a/devtools/client/aboutdebugging-new/test/browser/browser.ini
+++ b/devtools/client/aboutdebugging-new/test/browser/browser.ini
@@ -38,16 +38,17 @@ skip-if = (os == 'linux' && bits == 32) 
 [browser_aboutdebugging_debug-target-pane_collapsibilities_interaction.js]
 [browser_aboutdebugging_debug-target-pane_collapsibilities_preference.js]
 [browser_aboutdebugging_debug-target-pane_empty.js]
 [browser_aboutdebugging_debug-target-pane_usb_runtime.js]
 [browser_aboutdebugging_devtools.js]
 [browser_aboutdebugging_devtoolstoolbox_contextmenu.js]
 [browser_aboutdebugging_devtoolstoolbox_menubar.js]
 [browser_aboutdebugging_devtoolstoolbox_shortcuts.js]
+skip-if = (os == "win" && ccov) # Bug 1521349
 [browser_aboutdebugging_navigate.js]
 [browser_aboutdebugging_persist_connection.js]
 [browser_aboutdebugging_routes.js]
 [browser_aboutdebugging_runtime_connection-prompt.js]
 [browser_aboutdebugging_runtime_usbclient_closed.js]
 [browser_aboutdebugging_select_network_runtime.js]
 [browser_aboutdebugging_select_page_with_serviceworker.js]
 [browser_aboutdebugging_serviceworker_multie10s.js]
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -7528,24 +7528,22 @@ nsresult nsDocShell::RestoreFromHistory(
     if (doc) {
       request = doc->GetChannel();
     }
     mSavingOldViewer = CanSavePresentation(mLoadType, request, doc);
   }
 
   nsCOMPtr<nsIContentViewer> oldCv(mContentViewer);
   nsCOMPtr<nsIContentViewer> newCv(viewer);
-  int32_t minFontSize = 0;
   float textZoom = 1.0f;
   float pageZoom = 1.0f;
   float overrideDPPX = 0.0f;
 
   bool styleDisabled = false;
   if (oldCv && newCv) {
-    oldCv->GetMinFontSize(&minFontSize);
     oldCv->GetTextZoom(&textZoom);
     oldCv->GetFullZoom(&pageZoom);
     oldCv->GetOverrideDPPX(&overrideDPPX);
     oldCv->GetAuthorStyleDisabled(&styleDisabled);
   }
 
   // Protect against mLSHE going away via a load triggered from
   // pagehide or unload.
@@ -7766,17 +7764,16 @@ nsresult nsDocShell::RestoreFromHistory(
 
   // Tell the event loop to favor plevents over user events, see comments
   // in CreateContentViewer.
   if (++gNumberOfDocumentsLoading == 1) {
     FavorPerformanceHint(true);
   }
 
   if (oldCv && newCv) {
-    newCv->SetMinFontSize(minFontSize);
     newCv->SetTextZoom(textZoom);
     newCv->SetFullZoom(pageZoom);
     newCv->SetOverrideDPPX(overrideDPPX);
     newCv->SetAuthorStyleDisabled(styleDisabled);
   }
 
   if (document) {
     RefPtr<nsDocShell> parent = GetParentDocshell();
@@ -8265,17 +8262,16 @@ nsresult nsDocShell::SetupNewViewer(nsIC
   nsCOMPtr<nsIDocShellTreeItem> parentAsItem;
   NS_ENSURE_SUCCESS(GetSameTypeParent(getter_AddRefs(parentAsItem)),
                     NS_ERROR_FAILURE);
   nsCOMPtr<nsIDocShell> parent(do_QueryInterface(parentAsItem));
 
   const Encoding* forceCharset = nullptr;
   const Encoding* hintCharset = nullptr;
   int32_t hintCharsetSource;
-  int32_t minFontSize;
   float textZoom;
   float pageZoom;
   float overrideDPPX;
   bool styleDisabled;
   // |newMUDV| also serves as a flag to set the data from the above vars
   nsCOMPtr<nsIContentViewer> newCv;
 
   if (mContentViewer || parent) {
@@ -8302,18 +8298,16 @@ nsresult nsDocShell::SetupNewViewer(nsIC
 
     if (oldCv) {
       newCv = aNewViewer;
       if (newCv) {
         forceCharset = oldCv->GetForceCharset();
         hintCharset = oldCv->GetHintCharset();
         NS_ENSURE_SUCCESS(oldCv->GetHintCharacterSetSource(&hintCharsetSource),
                           NS_ERROR_FAILURE);
-        NS_ENSURE_SUCCESS(oldCv->GetMinFontSize(&minFontSize),
-                          NS_ERROR_FAILURE);
         NS_ENSURE_SUCCESS(oldCv->GetTextZoom(&textZoom), NS_ERROR_FAILURE);
         NS_ENSURE_SUCCESS(oldCv->GetFullZoom(&pageZoom), NS_ERROR_FAILURE);
         NS_ENSURE_SUCCESS(oldCv->GetOverrideDPPX(&overrideDPPX),
                           NS_ERROR_FAILURE);
         NS_ENSURE_SUCCESS(oldCv->GetAuthorStyleDisabled(&styleDisabled),
                           NS_ERROR_FAILURE);
       }
     }
@@ -8369,17 +8363,16 @@ nsresult nsDocShell::SetupNewViewer(nsIC
 
   // If we have old state to copy, set the old state onto the new content
   // viewer
   if (newCv) {
     newCv->SetForceCharset(forceCharset);
     newCv->SetHintCharset(hintCharset);
     NS_ENSURE_SUCCESS(newCv->SetHintCharacterSetSource(hintCharsetSource),
                       NS_ERROR_FAILURE);
-    NS_ENSURE_SUCCESS(newCv->SetMinFontSize(minFontSize), NS_ERROR_FAILURE);
     NS_ENSURE_SUCCESS(newCv->SetTextZoom(textZoom), NS_ERROR_FAILURE);
     NS_ENSURE_SUCCESS(newCv->SetFullZoom(pageZoom), NS_ERROR_FAILURE);
     NS_ENSURE_SUCCESS(newCv->SetOverrideDPPX(overrideDPPX), NS_ERROR_FAILURE);
     NS_ENSURE_SUCCESS(newCv->SetAuthorStyleDisabled(styleDisabled),
                       NS_ERROR_FAILURE);
   }
 
   // Stuff the bgcolor from the old pres shell into the new
--- a/docshell/base/nsIContentViewer.idl
+++ b/docshell/base/nsIContentViewer.idl
@@ -294,19 +294,16 @@ interface nsIContentViewer : nsISupports
    * given maximum values. If either maxWidth or maxHeight is less than zero,
    * that dimension is not constrained.
    *
    * All input and output values are in device pixels, rather than CSS pixels.
    */
   void getContentSizeConstrained(in long maxWidth, in long maxHeight,
                                  out long width, out long height);
 
-  /** The minimum font size  */
-  attribute long minFontSize;
-
   /**
    * Append |this| and all of its descendants to the given array,
    * in depth-first pre-order traversal.
    */
   [noscript] void appendSubtree(in nsIContentViewerTArray array);
 
   /**
    * Instruct the refresh driver to discontinue painting until further
--- a/dom/base/Document.cpp
+++ b/dom/base/Document.cpp
@@ -794,17 +794,16 @@ void TransferZoomLevels(Document* aFromD
 
   nsPresContext* fromCtxt = aFromDoc->GetPresContext();
   if (!fromCtxt) return;
 
   nsPresContext* toCtxt = aToDoc->GetPresContext();
   if (!toCtxt) return;
 
   toCtxt->SetFullZoom(fromCtxt->GetFullZoom());
-  toCtxt->SetBaseMinFontSize(fromCtxt->BaseMinFontSize());
   toCtxt->SetTextZoom(fromCtxt->TextZoom());
   toCtxt->SetOverrideDPPX(fromCtxt->GetOverrideDPPX());
 }
 
 void TransferShowingState(Document* aFromDoc, Document* aToDoc) {
   MOZ_ASSERT(aFromDoc && aToDoc, "transferring showing state from/to null doc");
 
   if (aFromDoc->IsShowing()) {
--- a/gfx/wr/webrender/src/picture.rs
+++ b/gfx/wr/webrender/src/picture.rs
@@ -530,22 +530,16 @@ pub struct TileCache {
     map_local_to_world: SpaceMapper<LayoutPixel, WorldPixel>,
     /// A list of tiles to draw during batching.
     pub tiles_to_draw: Vec<TileIndex>,
     /// List of opacity bindings, with some extra information
     /// about whether they changed since last frame.
     opacity_bindings: FastHashMap<PropertyBindingId, OpacityBindingInfo>,
     /// The current dirty region tracker for this picture.
     pub dirty_region: DirtyRegion,
-    /// If true, we need to update the prim dependencies, due
-    /// to relative transforms changing. The dependencies are
-    /// stored in each tile, and are a list of things that
-    /// force the tile to re-rasterize if they change (e.g.
-    /// images, transforms).
-    needs_update: bool,
     /// The current world reference point that tiles are created around.
     world_origin: WorldPoint,
     /// Current size of tiles in world units.
     world_tile_size: WorldSize,
     /// Current number of tiles in the allocated grid.
     tile_count: TileSize,
     /// The current scroll offset for this frame builder. Reset when
     /// a new scene arrives.
@@ -675,17 +669,16 @@ impl TileCache {
             tiles: Vec::new(),
             map_local_to_world: SpaceMapper::new(
                 ROOT_SPATIAL_NODE_INDEX,
                 WorldRect::zero(),
             ),
             tiles_to_draw: Vec::new(),
             opacity_bindings: FastHashMap::default(),
             dirty_region: DirtyRegion::new(),
-            needs_update: true,
             world_origin: WorldPoint::zero(),
             world_tile_size: WorldSize::zero(),
             tile_count: TileSize::zero(),
             scroll_offset: None,
             pending_blits: Vec::new(),
             world_bounding_rect: WorldRect::zero(),
             root_clip_rect: WorldRect::max_rect(),
             reference_prims,
@@ -921,20 +914,16 @@ impl TileCache {
                 self.tiles.push(tile);
             }
         }
 
         if !old_tiles.is_empty() {
             // TODO(gw): Should we explicitly drop the tile texture cache handles here?
         }
 
-        // TODO(gw): We don't actually need to update the prim dependencies each frame.
-        //           For common cases, such as only being one main scroll root, we could
-        //           detect this and skip the dependency update on scroll frames.
-        self.needs_update = true;
         self.world_bounding_rect = WorldRect::zero();
         self.root_clip_rect = WorldRect::max_rect();
 
         // Calculate the world space of the root clip node, that every primitive has
         // at the root of its clip chain (this is enforced by the per-pipeline-root
         // clip node added implicitly during display list flattening). Doing it once
         // here saves doing it for every primitive during update_prim_dependencies.
         let root_clip_chain_node = &frame_state
@@ -976,77 +965,60 @@ impl TileCache {
                     };
                     if changed {
                         tile.is_same_content = false;
                         break;
                     }
                 }
             }
 
-            if self.needs_update {
-                // Clear any dependencies so that when we rebuild them we
-                // can compare if the tile has the same content.
-                tile.clear();
-            }
+            // Clear any dependencies so that when we rebuild them we
+            // can compare if the tile has the same content.
+            tile.clear();
         }
     }
 
     /// Update the dependencies for each tile for a given primitive instance.
     pub fn update_prim_dependencies(
         &mut self,
         prim_instance: &PrimitiveInstance,
+        prim_rect: LayoutRect,
         clip_scroll_tree: &ClipScrollTree,
         data_stores: &DataStores,
         clip_chain_nodes: &[ClipChainNode],
         pictures: &[PicturePrimitive],
         resource_cache: &ResourceCache,
         opacity_binding_store: &OpacityBindingStorage,
         image_instances: &ImageInstanceStorage,
-    ) {
-        if !self.needs_update {
-            return;
-        }
-
+    ) -> bool {
         self.map_local_to_world.set_target_spatial_node(
             prim_instance.spatial_node_index,
             clip_scroll_tree,
         );
 
-        let prim_data = &data_stores.as_common_data(&prim_instance);
-
-        let prim_rect = match prim_instance.kind {
-            PrimitiveInstanceKind::Picture { pic_index, .. } => {
-                let pic = &pictures[pic_index.0];
-                pic.local_rect
-            }
-            _ => {
-                LayoutRect::new(
-                    prim_instance.prim_origin,
-                    prim_data.prim_size,
-                )
-            }
-        };
-
         // Map the primitive local rect into world space.
         let world_rect = match self.map_local_to_world.map(&prim_rect) {
             Some(rect) => rect,
-            None => {
-                return;
-            }
+            None => return false,
         };
 
         // If the rect is invalid, no need to create dependencies.
-        // TODO(gw): Need to handle pictures with filters here.
         if world_rect.size.width <= 0.0 || world_rect.size.height <= 0.0 {
-            return;
+            return false;
         }
 
         // Get the tile coordinates in the picture space.
         let (p0, p1) = self.get_tile_coords_for_rect(&world_rect);
 
+        // If the primitive is outside the tiling rects, it's known to not
+        // be visible.
+        if p0.x == p1.x || p0.y == p1.y {
+            return false;
+        }
+
         // Build the list of resources that this primitive has dependencies on.
         let mut opacity_bindings: SmallVec<[OpacityBinding; 4]> = SmallVec::new();
         let mut clip_chain_uids: SmallVec<[ItemUid; 8]> = SmallVec::new();
         let mut clip_vertices: SmallVec<[WorldPoint; 8]> = SmallVec::new();
         let mut image_keys: SmallVec<[ImageKey; 8]> = SmallVec::new();
         let mut clip_spatial_nodes = FastHashSet::default();
 
         // TODO(gw): We only care about world clip rects that don't have the main
@@ -1293,16 +1265,18 @@ impl TileCache {
                 for spatial_node_index in &clip_spatial_nodes {
                     tile.transforms.insert(*spatial_node_index);
                 }
                 for (world_rect, spatial_node_index) in &world_clips {
                     tile.potential_clips.insert(world_rect.clone(), *spatial_node_index);
                 }
             }
         }
+
+        true
     }
 
     /// Apply any updates after prim dependency updates. This applies
     /// any late tile invalidations, and sets up the dirty rect and
     /// set of tile blits.
     pub fn post_update(
         &mut self,
         resource_cache: &mut ResourceCache,
--- a/gfx/wr/webrender/src/prim_store/mod.rs
+++ b/gfx/wr/webrender/src/prim_store/mod.rs
@@ -1914,16 +1914,33 @@ impl PrimitiveStore {
                         if prim_instance.is_chased() {
                             println!("\tculled for being out of the local clip rectangle: {:?}",
                                 prim_instance.local_clip_rect);
                         }
                         continue;
                     }
                 };
 
+                if let Some(ref mut tile_cache) = frame_state.tile_cache {
+                    if !tile_cache.update_prim_dependencies(
+                        prim_instance,
+                        prim_local_rect,
+                        frame_context.clip_scroll_tree,
+                        frame_state.data_stores,
+                        &frame_state.clip_store.clip_chain_nodes,
+                        &self.pictures,
+                        frame_state.resource_cache,
+                        &self.opacity_bindings,
+                        &self.images,
+                    ) {
+                        prim_instance.visibility_info = PrimitiveVisibilityIndex::INVALID;
+                        continue;
+                    }
+                }
+
                 let clip_chain = frame_state
                     .clip_store
                     .build_clip_chain_instance(
                         prim_instance,
                         local_rect,
                         prim_instance.local_clip_rect,
                         prim_context.spatial_node_index,
                         &map_local_to_surface,
@@ -1932,29 +1949,16 @@ impl PrimitiveStore {
                         frame_state.gpu_cache,
                         frame_state.resource_cache,
                         frame_context.device_pixel_scale,
                         &frame_context.screen_world_rect,
                         clip_node_collector.as_ref(),
                         &mut frame_state.data_stores.clip,
                     );
 
-                if let Some(ref mut tile_cache) = frame_state.tile_cache {
-                    tile_cache.update_prim_dependencies(
-                        prim_instance,
-                        frame_context.clip_scroll_tree,
-                        frame_state.data_stores,
-                        &frame_state.clip_store.clip_chain_nodes,
-                        &self.pictures,
-                        frame_state.resource_cache,
-                        &self.opacity_bindings,
-                        &self.images,
-                    );
-                }
-
                 let clip_chain = match clip_chain {
                     Some(clip_chain) => clip_chain,
                     None => {
                         if prim_instance.is_chased() {
                             println!("\tunable to build the clip chain, skipping");
                         }
                         prim_instance.visibility_info = PrimitiveVisibilityIndex::INVALID;
                         continue;
--- a/layout/base/nsDocumentViewer.cpp
+++ b/layout/base/nsDocumentViewer.cpp
@@ -418,17 +418,16 @@ class nsDocumentViewer final : public ns
 
   nsIntRect mBounds;
 
   // mTextZoom/mPageZoom record the textzoom/pagezoom of the first (galley)
   // presshell only.
   float mTextZoom;  // Text zoom, defaults to 1.0
   float mPageZoom;
   float mOverrideDPPX;  // DPPX overrided, defaults to 0.0
-  int mMinFontSize;
 
   int16_t mNumURLStarts;
   int16_t mDestroyBlockedCount;
 
   unsigned mStopped : 1;
   unsigned mLoaded : 1;
   unsigned mDeferredWindowClose : 1;
   // document management data
@@ -556,17 +555,16 @@ void nsDocumentViewer::PrepareToStartLoa
 }
 
 nsDocumentViewer::nsDocumentViewer()
     : mParentWidget(nullptr),
       mAttachedToParent(false),
       mTextZoom(1.0),
       mPageZoom(1.0),
       mOverrideDPPX(0.0),
-      mMinFontSize(0),
       mNumURLStarts(0),
       mDestroyBlockedCount(0),
       mStopped(false),
       mLoaded(false),
       mDeferredWindowClose(false),
       mIsSticky(true),
       mInPermitUnload(false),
       mInPermitUnloadPrompt(false),
@@ -763,17 +761,16 @@ nsresult nsDocumentViewer::InitPresentat
   nscoord width = p2a * mBounds.width;
   nscoord height = p2a * mBounds.height;
 
   mViewManager->SetWindowDimensions(width, height);
   mPresContext->SetVisibleArea(nsRect(0, 0, width, height));
   mPresContext->SetTextZoom(mTextZoom);
   mPresContext->SetFullZoom(mPageZoom);
   mPresContext->SetOverrideDPPX(mOverrideDPPX);
-  mPresContext->SetBaseMinFontSize(mMinFontSize);
 
   p2a = mPresContext->AppUnitsPerDevPixel();  // zoom may have changed it
   width = p2a * mBounds.width;
   height = p2a * mBounds.height;
   if (aDoInitialReflow) {
     nsCOMPtr<nsIPresShell> shell = mPresShell;
     // Initial reflow
     shell->Initialize();
@@ -2733,20 +2730,16 @@ struct ZoomInfo {
   float mZoom;
 };
 
 static void SetChildTextZoom(nsIContentViewer* aChild, void* aClosure) {
   struct ZoomInfo* ZoomInfo = (struct ZoomInfo*)aClosure;
   aChild->SetTextZoom(ZoomInfo->mZoom);
 }
 
-static void SetChildMinFontSize(nsIContentViewer* aChild, void* aClosure) {
-  aChild->SetMinFontSize(NS_PTR_TO_INT32(aClosure));
-}
-
 static void SetChildFullZoom(nsIContentViewer* aChild, void* aClosure) {
   struct ZoomInfo* ZoomInfo = (struct ZoomInfo*)aClosure;
   aChild->SetFullZoom(ZoomInfo->mZoom);
 }
 
 static void SetChildOverrideDPPX(nsIContentViewer* aChild, void* aClosure) {
   struct ZoomInfo* ZoomInfo = (struct ZoomInfo*)aClosure;
   aChild->SetOverrideDPPX(ZoomInfo->mZoom);
@@ -2758,25 +2751,16 @@ static bool SetExtResourceTextZoom(Docum
   if (ctxt) {
     struct ZoomInfo* ZoomInfo = static_cast<struct ZoomInfo*>(aClosure);
     ctxt->SetTextZoom(ZoomInfo->mZoom);
   }
 
   return true;
 }
 
-static bool SetExtResourceMinFontSize(Document* aDocument, void* aClosure) {
-  nsPresContext* ctxt = aDocument->GetPresContext();
-  if (ctxt) {
-    ctxt->SetBaseMinFontSize(NS_PTR_TO_INT32(aClosure));
-  }
-
-  return true;
-}
-
 static bool SetExtResourceFullZoom(Document* aDocument, void* aClosure) {
   // Would it be better to enumerate external resource viewers instead?
   nsPresContext* ctxt = aDocument->GetPresContext();
   if (ctxt) {
     struct ZoomInfo* ZoomInfo = static_cast<struct ZoomInfo*>(aClosure);
     ctxt->SetFullZoom(ZoomInfo->mZoom);
   }
 
@@ -2845,57 +2829,16 @@ NS_IMETHODIMP
 nsDocumentViewer::GetEffectiveTextZoom(float* aEffectiveTextZoom) {
   NS_ENSURE_ARG_POINTER(aEffectiveTextZoom);
   nsPresContext* pc = GetPresContext();
   *aEffectiveTextZoom = pc ? pc->EffectiveTextZoom() : 1.0f;
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsDocumentViewer::SetMinFontSize(int32_t aMinFontSize) {
-  // If we don't have a document, then we need to bail.
-  if (!mDocument) {
-    return NS_ERROR_FAILURE;
-  }
-
-  if (GetIsPrintPreview()) {
-    return NS_OK;
-  }
-
-  mMinFontSize = aMinFontSize;
-
-  // Set the min font on all children of mContainer (even if our min font didn't
-  // change, our children's min font may be different, though it would be
-  // unusual). Do this first, in case kids are auto-sizing and post reflow
-  // commands on our presshell (which should be subsumed into our own style
-  // change reflow).
-  CallChildren(SetChildMinFontSize, NS_INT32_TO_PTR(aMinFontSize));
-
-  // Now change our own min font
-  nsPresContext* pc = GetPresContext();
-  if (pc && aMinFontSize != mPresContext->MinFontSize(nullptr)) {
-    pc->SetBaseMinFontSize(aMinFontSize);
-  }
-
-  // And do the external resources
-  mDocument->EnumerateExternalResources(SetExtResourceMinFontSize,
-                                        NS_INT32_TO_PTR(aMinFontSize));
-
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsDocumentViewer::GetMinFontSize(int32_t* aMinFontSize) {
-  NS_ENSURE_ARG_POINTER(aMinFontSize);
-  nsPresContext* pc = GetPresContext();
-  *aMinFontSize = pc ? pc->BaseMinFontSize() : 0;
-  return NS_OK;
-}
-
-NS_IMETHODIMP
 nsDocumentViewer::SetFullZoom(float aFullZoom) {
 #ifdef NS_PRINT_PREVIEW
   if (GetIsPrintPreview()) {
     nsPresContext* pc = GetPresContext();
     NS_ENSURE_TRUE(pc, NS_OK);
     nsCOMPtr<nsIPresShell> shell = pc->GetPresShell();
     NS_ENSURE_TRUE(shell, NS_OK);
 
@@ -4173,17 +4116,16 @@ void nsDocumentViewer::ReturnToGalleyPre
   mPrintJob = nullptr;
 
   nsCOMPtr<nsIDocShell> docShell(mContainer);
   ResetFocusState(docShell);
 
   SetTextZoom(mTextZoom);
   SetFullZoom(mPageZoom);
   SetOverrideDPPX(mOverrideDPPX);
-  SetMinFontSize(mMinFontSize);
   Show();
 
 #endif  // NS_PRINTING && NS_PRINT_PREVIEW
 }
 
 //------------------------------------------------------------
 // This called ONLY when printing has completed and the DV
 // is being notified that it should get rid of the nsPrintJob.
--- a/layout/base/nsPresContext.cpp
+++ b/layout/base/nsPresContext.cpp
@@ -161,17 +161,16 @@ static bool IsVisualCharset(NotNull<cons
 nsPresContext::nsPresContext(dom::Document* aDocument, nsPresContextType aType)
     : mType(aType),
       mShell(nullptr),
       mDocument(aDocument),
       mMedium(aType == eContext_Galley ? nsGkAtoms::screen : nsGkAtoms::print),
       mMediaEmulated(mMedium),
       mLinkHandler(nullptr),
       mInflationDisabledForShrinkWrap(false),
-      mBaseMinFontSize(0),
       mSystemFontScale(1.0),
       mTextZoom(1.0),
       mEffectiveTextZoom(1.0),
       mFullZoom(1.0),
       mOverrideDPPX(0.0),
       mLastFontInflationScreenSize(gfxSize(-1.0, -1.0)),
       mCurAppUnitsPerDevPixel(0),
       mAutoQualityMinFontSizePixelsPref(0),
--- a/layout/base/nsPresContext.h
+++ b/layout/base/nsPresContext.h
@@ -566,41 +566,17 @@ class nsPresContext : public nsISupports
    * base minimum font size.
    */
   int32_t MinFontSize(nsAtom* aLanguage, bool* aNeedsToCache = nullptr) const {
     const auto* prefs =
         Document()->GetFontPrefsForLang(aLanguage, aNeedsToCache);
     if (aNeedsToCache && *aNeedsToCache) {
       return 0;
     }
-    return std::max(mBaseMinFontSize, prefs->mMinimumFontSize);
-  }
-
-  /**
-   * Get the per-presentation base minimum font size.  This size is
-   * independent of the language-specific global preference.
-   */
-  int32_t BaseMinFontSize() const { return mBaseMinFontSize; }
-
-  /**
-   * Set the per-presentation base minimum font size.  This size is
-   * independent of the language-specific global preference.
-   */
-  void SetBaseMinFontSize(int32_t aMinFontSize) {
-    if (aMinFontSize == mBaseMinFontSize) {
-      return;
-    }
-
-    mBaseMinFontSize = aMinFontSize;
-
-    // Media queries could have changed, since we changed the meaning
-    // of 'em' units in them.
-    MediaFeatureValuesChanged(
-        {eRestyle_ForceDescendants, NS_STYLE_HINT_REFLOW,
-         mozilla::MediaFeatureChangeReason::MinFontSizeChange});
+    return prefs->mMinimumFontSize;
   }
 
   float GetFullZoom() { return mFullZoom; }
   /**
    * Device full zoom differs from full zoom because it gets the zoom from
    * the device context, which may be using a different zoom due to rounding
    * of app units to device pixels.
    */
@@ -1233,19 +1209,16 @@ class nsPresContext : public nsISupports
 
   // Should we disable font size inflation because we're inside of
   // shrink-wrapping calculations on an inflation container?
   bool mInflationDisabledForShrinkWrap;
 
  protected:
   mozilla::WeakPtr<nsDocShell> mContainer;
 
-  // Base minimum font size, independent of the language-specific global
-  // preference. Defaults to 0
-  int32_t mBaseMinFontSize;
   float mSystemFontScale;    // Internal text zoom factor, defaults to 1.0
   float mTextZoom;           // Text zoom, defaults to 1.0
   float mEffectiveTextZoom;  // Text zoom * system font scale
   float mFullZoom;           // Page zoom, defaults to 1.0
   float mOverrideDPPX;       // DPPX overrided, defaults to 0.0
   gfxSize mLastFontInflationScreenSize;
 
   int32_t mCurAppUnitsPerDevPixel;
--- a/layout/printing/nsPrintJob.cpp
+++ b/layout/printing/nsPrintJob.cpp
@@ -650,17 +650,16 @@ nsresult nsPrintJob::DoCommonPrint(bool 
 
   if (aIsPrintPreview) {
     mIsCreatingPrintPreview = true;
     SetIsPrintPreview(true);
     nsCOMPtr<nsIContentViewer> viewer = do_QueryInterface(mDocViewerPrint);
     if (viewer) {
       viewer->SetTextZoom(1.0f);
       viewer->SetFullZoom(1.0f);
-      viewer->SetMinFontSize(0);
     }
   }
 
   // Create a print session and let the print settings know about it.
   // Don't overwrite an existing print session.
   // The print settings hold an nsWeakPtr to the session so it does not
   // need to be cleared from the settings at the end of the job.
   // XXX What lifetime does the printSession need to have?
--- a/layout/style/MediaFeatureChange.h
+++ b/layout/style/MediaFeatureChange.h
@@ -18,35 +18,32 @@ namespace mozilla {
 enum class MediaFeatureChangeReason {
   // The viewport size the document has used has changed.
   //
   // This affects size media queries like min-width.
   ViewportChange = 1 << 0,
   // The effective text zoom has changed. This affects the meaning of em units,
   // and thus affects any media query that uses a Length.
   ZoomChange = 1 << 1,
-  // The base min font size has changed. This can affect the meaning of em
-  // units, if the previous default font-size has changed, and also zoom.
-  MinFontSizeChange = 1 << 2,
   // The resolution has changed. This can affect device-pixel-ratio media
   // queries, for example.
-  ResolutionChange = 1 << 3,
+  ResolutionChange = 1 << 2,
   // The medium has changed.
-  MediumChange = 1 << 4,
+  MediumChange = 1 << 3,
   // The size-mode has changed.
-  SizeModeChange = 1 << 5,
+  SizeModeChange = 1 << 4,
   // A system metric or multiple have changed. This affects all the media
   // features that expose the presence of a system metric directly.
-  SystemMetricsChange = 1 << 6,
+  SystemMetricsChange = 1 << 5,
   // The fact of whether the device size is the page size has changed, thus
   // resolution media queries can change.
-  DeviceSizeIsPageSizeChange = 1 << 7,
+  DeviceSizeIsPageSizeChange = 1 << 6,
   // display-mode changed on the document, thus the display-mode media queries
   // may have changed.
-  DisplayModeChange = 1 << 8,
+  DisplayModeChange = 1 << 7,
 };
 
 MOZ_MAKE_ENUM_CLASS_BITWISE_OPERATORS(MediaFeatureChangeReason)
 
 struct MediaFeatureChange {
   nsRestyleHint mRestyleHint;
   nsChangeHint mChangeHint;
   MediaFeatureChangeReason mReason;
--- a/layout/style/ServoStyleSet.cpp
+++ b/layout/style/ServoStyleSet.cpp
@@ -221,19 +221,16 @@ void ServoStyleSet::InvalidateStyleForDo
 
   Servo_InvalidateStyleForDocStateChanges(
       root, mRawSet.get(), &nonDocumentStyles, aStatesChanged.ServoValue());
 }
 
 static const MediaFeatureChangeReason kMediaFeaturesAffectingDefaultStyle =
     // Zoom changes change the meaning of em units.
     MediaFeatureChangeReason::ZoomChange |
-    // Changes the meaning of em units, depending on which one is the actual
-    // min-font-size.
-    MediaFeatureChangeReason::MinFontSizeChange |
     // A resolution change changes the app-units-per-dev-pixels ratio, which
     // some structs (Border, Outline, Column) store for clamping. We should
     // arguably not do that, maybe doing it on layout directly, to try to avoid
     // relying on the pres context (bug 1418159).
     MediaFeatureChangeReason::ResolutionChange;
 
 nsRestyleHint ServoStyleSet::MediumFeaturesChanged(
     MediaFeatureChangeReason aReason) {
--- a/servo/ports/geckolib/error_reporter.rs
+++ b/servo/ports/geckolib/error_reporter.rs
@@ -241,24 +241,24 @@ impl<'a> ErrorHelpers<'a> for Contextual
                     ..
                 },
             ) => match *err {
                 StyleParseErrorKind::InvalidColor(_, _) => {
                     return (
                         Some(cstr!("PEColorNotColor")),
                         cstr!("PEValueParsingError"),
                         Action::Drop,
-                    )
+                    );
                 },
                 StyleParseErrorKind::InvalidFilter(_, _) => {
                     return (
                         Some(cstr!("PEExpectedNoneOrURLOrFilterFunction")),
                         cstr!("PEValueParsingError"),
                         Action::Drop,
-                    )
+                    );
                 },
                 StyleParseErrorKind::OtherInvalidValue(_) => {
                     (cstr!("PEValueParsingError"), Action::Drop)
                 },
                 _ => (cstr!("PEUnknownProperty"), Action::Drop),
             },
             ContextualParseError::UnsupportedPropertyDeclaration(..) => {
                 (cstr!("PEUnknownProperty"), Action::Drop)
--- a/servo/ports/geckolib/glue.rs
+++ b/servo/ports/geckolib/glue.rs
@@ -804,17 +804,17 @@ pub extern "C" fn Servo_AnimationValue_G
     use style::values::computed::color::Color as ComputedColor;
 
     let value = AnimationValue::as_arc(&value);
     match **value {
         AnimationValue::BackgroundColor(color) => {
             let computed: ComputedColor = ToAnimatedValue::from_animated_value(color);
             let foreground_color = convert_nscolor_to_rgba(foreground_color);
             convert_rgba_to_nscolor(&computed.to_rgba(foreground_color))
-        }
+        },
         _ => panic!("Other color properties are not supported yet"),
     }
 }
 
 #[no_mangle]
 pub extern "C" fn Servo_AnimationValue_GetOpacity(value: RawServoAnimationValueBorrowed) -> f32 {
     let value = AnimationValue::as_arc(&value);
     if let AnimationValue::Opacity(opacity) = **value {
@@ -827,33 +827,36 @@ pub extern "C" fn Servo_AnimationValue_G
 #[no_mangle]
 pub extern "C" fn Servo_AnimationValue_Opacity(opacity: f32) -> RawServoAnimationValueStrong {
     Arc::new(AnimationValue::Opacity(opacity)).into_strong()
 }
 
 #[no_mangle]
 pub extern "C" fn Servo_AnimationValue_Color(
     color_property: nsCSSPropertyID,
-    color: structs::nscolor
+    color: structs::nscolor,
 ) -> RawServoAnimationValueStrong {
     use style::gecko::values::convert_nscolor_to_rgba;
     use style::values::animated::color::RGBA as AnimatedRGBA;
 
     let property = LonghandId::from_nscsspropertyid(color_property)
         .expect("We don't have shorthand property animation value");
 
     let rgba = convert_nscolor_to_rgba(color);
 
-    let animatedRGBA = AnimatedRGBA::new(rgba.red_f32(),
-                                         rgba.green_f32(),
-                                         rgba.blue_f32(),
-                                         rgba.alpha_f32());
+    let animatedRGBA = AnimatedRGBA::new(
+        rgba.red_f32(),
+        rgba.green_f32(),
+        rgba.blue_f32(),
+        rgba.alpha_f32(),
+    );
     match property {
-        LonghandId::BackgroundColor =>
-            Arc::new(AnimationValue::BackgroundColor(animatedRGBA.into())).into_strong(),
+        LonghandId::BackgroundColor => {
+            Arc::new(AnimationValue::BackgroundColor(animatedRGBA.into())).into_strong()
+        },
         _ => panic!("Should be background-color property"),
     }
 }
 
 #[no_mangle]
 pub extern "C" fn Servo_AnimationValue_GetTransform(
     value: RawServoAnimationValueBorrowed,
     list: *mut structs::RefPtr<nsCSSValueSharedList>,
@@ -3567,22 +3570,17 @@ pub extern "C" fn Servo_StyleSet_Rebuild
 #[no_mangle]
 pub extern "C" fn Servo_StyleSet_Drop(data: RawServoStyleSetOwned) {
     let _ = data.into_box::<PerDocumentStyleData>();
 }
 
 #[no_mangle]
 pub unsafe extern "C" fn Servo_StyleSet_CompatModeChanged(raw_data: RawServoStyleSetBorrowed) {
     let mut data = PerDocumentStyleData::from_ffi(raw_data).borrow_mut();
-    let doc = &*data
-        .stylist
-        .device()
-        .pres_context()
-        .mDocument
-        .mRawPtr;
+    let doc = &*data.stylist.device().pres_context().mDocument.mRawPtr;
     data.stylist
         .set_quirks_mode(QuirksMode::from(doc.mCompatMode));
 }
 
 fn parse_property_into(
     declarations: &mut SourcePropertyDeclaration,
     property_id: PropertyId,
     value: *const nsACString,
@@ -4445,20 +4443,21 @@ pub extern "C" fn Servo_DeclarationBlock
 #[no_mangle]
 pub extern "C" fn Servo_DeclarationBlock_SetPixelValue(
     declarations: RawServoDeclarationBlockBorrowed,
     property: nsCSSPropertyID,
     value: f32,
 ) {
     use style::properties::longhands::border_spacing::SpecifiedValue as BorderSpacing;
     use style::properties::{LonghandId, PropertyDeclaration};
+    use style::values::generics::length::MozLength;
     use style::values::generics::NonNegative;
-    use style::values::generics::length::MozLength;
-    use style::values::specified::length::{NoCalcLength, NonNegativeLength, NonNegativeLengthPercentage};
-    use style::values::specified::length::{LengthPercentageOrAuto, LengthPercentage};
+    use style::values::specified::length::NonNegativeLengthPercentage;
+    use style::values::specified::length::{LengthPercentage, LengthPercentageOrAuto};
+    use style::values::specified::length::{NoCalcLength, NonNegativeLength};
     use style::values::specified::{BorderCornerRadius, BorderSideWidth};
 
     let long = get_longhand_from_id!(property);
     let nocalc = NoCalcLength::from_px(value);
     let lp = LengthPercentage::Length(nocalc);
     let lp_or_auto = LengthPercentageOrAuto::LengthPercentage(lp.clone());
     let prop = match_wrap_declared! { long,
         Height => MozLength::LengthPercentageOrAuto(lp_or_auto),
@@ -4506,18 +4505,19 @@ pub extern "C" fn Servo_DeclarationBlock
     declarations: RawServoDeclarationBlockBorrowed,
     property: nsCSSPropertyID,
     value: f32,
     unit: structs::nsCSSUnit,
 ) {
     use style::properties::longhands::_moz_script_min_size::SpecifiedValue as MozScriptMinSize;
     use style::properties::{LonghandId, PropertyDeclaration};
     use style::values::generics::length::MozLength;
+    use style::values::specified::length::NoCalcLength;
     use style::values::specified::length::{AbsoluteLength, FontRelativeLength};
-    use style::values::specified::length::{LengthPercentage, LengthPercentageOrAuto, NoCalcLength};
+    use style::values::specified::length::{LengthPercentage, LengthPercentageOrAuto};
 
     let long = get_longhand_from_id!(property);
     let nocalc = match unit {
         structs::nsCSSUnit::eCSSUnit_EM => {
             NoCalcLength::FontRelative(FontRelativeLength::Em(value))
         },
         structs::nsCSSUnit::eCSSUnit_XHeight => {
             NoCalcLength::FontRelative(FontRelativeLength::Ex(value))
@@ -4574,22 +4574,21 @@ pub extern "C" fn Servo_DeclarationBlock
 pub extern "C" fn Servo_DeclarationBlock_SetPercentValue(
     declarations: RawServoDeclarationBlockBorrowed,
     property: nsCSSPropertyID,
     value: f32,
 ) {
     use style::properties::{LonghandId, PropertyDeclaration};
     use style::values::computed::Percentage;
     use style::values::generics::length::MozLength;
-    use style::values::specified::length::{LengthPercentageOrAuto, LengthPercentage};
+    use style::values::specified::length::{LengthPercentage, LengthPercentageOrAuto};
 
     let long = get_longhand_from_id!(property);
     let pc = Percentage(value);
-    let lp_or_auto =
-        LengthPercentageOrAuto::LengthPercentage(LengthPercentage::Percentage(pc));
+    let lp_or_auto = LengthPercentageOrAuto::LengthPercentage(LengthPercentage::Percentage(pc));
 
     let prop = match_wrap_declared! { long,
         Height => MozLength::LengthPercentageOrAuto(lp_or_auto),
         Width => MozLength::LengthPercentageOrAuto(lp_or_auto),
         MarginTop => lp_or_auto,
         MarginRight => lp_or_auto,
         MarginBottom => lp_or_auto,
         MarginLeft => lp_or_auto,
--- a/servo/ports/geckolib/stylesheet_loader.rs
+++ b/servo/ports/geckolib/stylesheet_loader.rs
@@ -2,25 +2,25 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
 
 use cssparser::SourceLocation;
 use nsstring::nsCString;
 use servo_arc::Arc;
 use style::context::QuirksMode;
 use style::gecko::data::GeckoStyleSheet;
-use style::global_style_data::GLOBAL_STYLE_DATA;
 use style::gecko_bindings::bindings;
 use style::gecko_bindings::bindings::Gecko_LoadStyleSheet;
 use style::gecko_bindings::structs::{Loader, LoaderReusableStyleSheets};
 use style::gecko_bindings::structs::{
     SheetLoadData, SheetLoadDataHolder, StyleSheet as DomStyleSheet,
 };
 use style::gecko_bindings::sugar::ownership::{FFIArcHelpers, HasBoxFFI, OwnedOrNull};
 use style::gecko_bindings::sugar::refptr::RefPtr;
+use style::global_style_data::GLOBAL_STYLE_DATA;
 use style::media_queries::MediaList;
 use style::parser::ParserContext;
 use style::shared_lock::{Locked, SharedRwLock};
 use style::stylesheets::import_rule::ImportSheet;
 use style::stylesheets::{ImportRule, Origin, StylesheetLoader as StyleStylesheetLoader};
 use style::stylesheets::{StylesheetContents, UrlExtraData};
 use style::use_counters::UseCounters;
 use style::values::CssUrl;
--- a/servo/ports/geckolib/tests/specified_values.rs
+++ b/servo/ports/geckolib/tests/specified_values.rs
@@ -1,17 +1,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
 
 #[cfg(all(test, target_pointer_width = "64"))]
 #[test]
 fn size_of_specified_values() {
+    use std::mem::size_of;
     use style;
-    use std::mem::size_of;
 
     let threshold = 24;
 
     let mut bad_properties = vec![];
 
     macro_rules! check_property {
         ( $( { $name: ident, $boxed: expr } )+ ) => {
             $(
--- a/toolkit/content/widgets/richlistbox.js
+++ b/toolkit/content/widgets/richlistbox.js
@@ -107,17 +107,17 @@ MozElements.RichListBox = class RichList
       if (this.getRowCount() > 0) {
         if (this.currentIndex == -1) {
           this.currentIndex = this.getIndexOfFirstVisibleRow();
           let currentItem = this.getItemAtIndex(this.currentIndex);
           if (currentItem) {
             this.selectItem(currentItem);
           }
         } else {
-          this.currentItem._fireEvent("DOMMenuItemActive");
+          this._fireEvent(this.currentItem, "DOMMenuItemActive");
         }
       }
       this._lastKeyTime = 0;
     });
 
     this.addEventListener("click", event => {
       // clicking into nothing should unselect
       if (event.originalTarget == this) {
@@ -212,21 +212,30 @@ MozElements.RichListBox = class RichList
   // nsIDOMXULSelectControlElement
   set currentItem(val) {
     if (this._currentItem == val) {
       return val;
     }
 
     if (this._currentItem) {
       this._currentItem.current = false;
+      if (!val && !this.suppressMenuItemEvent) {
+        // An item is losing focus and there is no new item to focus.
+        // Notify a11y that there is no focused item.
+        this._fireEvent(this._currentItem, "DOMMenuItemInactive");
+      }
     }
     this._currentItem = val;
 
     if (val) {
       val.current = true;
+      if (!this.suppressMenuItemEvent) {
+        // Notify a11y that this item got focus.
+        this._fireEvent(val, "DOMMenuItemActive");
+      }
     }
 
     return val;
   }
   get currentItem() {
     return this._currentItem;
   }
 
@@ -810,16 +819,22 @@ MozElements.RichListBox = class RichList
 
   /**
    * For backwards-compatibility and for convenience.
    * Use ensureElementIsVisible instead
    */
   ensureSelectedElementIsVisible() {
     return this.ensureElementIsVisible(this.selectedItem);
   }
+
+  _fireEvent(aTarget, aName) {
+    let event = document.createEvent("Events");
+    event.initEvent(aName, true, true);
+    aTarget.dispatchEvent(event);
+  }
 };
 
 MozXULElement.implementCustomInterface(MozElements.RichListBox, [
   Ci.nsIDOMXULSelectControlElement,
   Ci.nsIDOMXULMultiSelectControlElement,
 ]);
 
 customElements.define("richlistbox", MozElements.RichListBox);
--- a/toolkit/content/widgets/richlistbox.xml
+++ b/toolkit/content/widgets/richlistbox.xml
@@ -100,36 +100,19 @@
       </property>
 
       <property name="current" onget="return this.getAttribute('current') == 'true';">
         <setter><![CDATA[
           if (val)
             this.setAttribute("current", "true");
           else
             this.removeAttribute("current");
-
-          let control = this.control;
-          if (!control || !control.suppressMenuItemEvent) {
-            this._fireEvent(val ? "DOMMenuItemActive" : "DOMMenuItemInactive");
-          }
-
           return val;
         ]]></setter>
       </property>
-
-      <method name="_fireEvent">
-        <parameter name="name"/>
-        <body>
-        <![CDATA[
-          var event = document.createEvent("Events");
-          event.initEvent(name, true, true);
-          this.dispatchEvent(event);
-        ]]>
-        </body>
-      </method>
     </implementation>
 
     <handlers>
       <!-- If there is no modifier key, we select on mousedown, not
            click, so that drags work correctly. -->
       <handler event="mousedown">
         <![CDATA[
           var control = this.control;