Bug 1398520 part 4 - Rename nsFormControlFrame to nsCheckboxRadioFrame. r=dholbert
authorMats Palmgren <mats@mozilla.com>
Wed, 27 Sep 2017 14:12:00 +0200
changeset 436552 051041ba94d6bac70258746672ba5a731ac43b6d
parent 436551 2a8bca0c06b6d7d56c7a822df9a5252131d3189c
child 436553 45e386a21c2a01c36c3f20aa5f868ac52d3d4285
push id1618
push userCallek@gmail.com
push dateThu, 11 Jan 2018 17:45:48 +0000
treeherdermozilla-release@882ca853e05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdholbert
bugs1398520
milestone58.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1398520 part 4 - Rename nsFormControlFrame to nsCheckboxRadioFrame. r=dholbert MozReview-Commit-ID: 9nwikVD1cd9
layout/base/nsCSSFrameConstructor.cpp
layout/base/nsLayoutUtils.cpp
layout/forms/moz.build
layout/forms/nsCheckboxRadioFrame.cpp
layout/forms/nsCheckboxRadioFrame.h
layout/forms/nsColorControlFrame.cpp
layout/forms/nsComboboxControlFrame.cpp
layout/forms/nsDateTimeControlFrame.cpp
layout/forms/nsFormControlFrame.cpp
layout/forms/nsFormControlFrame.h
layout/forms/nsHTMLButtonControlFrame.cpp
layout/forms/nsImageControlFrame.cpp
layout/forms/nsLegendFrame.cpp
layout/forms/nsListControlFrame.cpp
layout/forms/nsMeterFrame.cpp
layout/forms/nsNumberControlFrame.cpp
layout/forms/nsProgressFrame.cpp
layout/forms/nsRangeFrame.cpp
layout/forms/nsTextControlFrame.cpp
layout/generic/FrameTypeList.h
layout/generic/nsFrameIdList.h
layout/generic/nsHTMLParts.h
widget/cocoa/nsNativeThemeCocoa.mm
--- a/layout/base/nsCSSFrameConstructor.cpp
+++ b/layout/base/nsCSSFrameConstructor.cpp
@@ -3784,18 +3784,18 @@ nsCSSFrameConstructor::FindImgControlDat
 }
 
 /* static */
 const nsCSSFrameConstructor::FrameConstructionData*
 nsCSSFrameConstructor::FindInputData(Element* aElement,
                                      nsStyleContext* aStyleContext)
 {
   static const FrameConstructionDataByInt sInputData[] = {
-    SIMPLE_INT_CREATE(NS_FORM_INPUT_CHECKBOX, NS_NewFormControlFrame),
-    SIMPLE_INT_CREATE(NS_FORM_INPUT_RADIO, NS_NewFormControlFrame),
+    SIMPLE_INT_CREATE(NS_FORM_INPUT_CHECKBOX, NS_NewCheckboxRadioFrame),
+    SIMPLE_INT_CREATE(NS_FORM_INPUT_RADIO, NS_NewCheckboxRadioFrame),
     SIMPLE_INT_CREATE(NS_FORM_INPUT_FILE, NS_NewFileControlFrame),
     SIMPLE_INT_CHAIN(NS_FORM_INPUT_IMAGE,
                      nsCSSFrameConstructor::FindImgControlData),
     SIMPLE_INT_CREATE(NS_FORM_INPUT_EMAIL, NS_NewTextControlFrame),
     SIMPLE_INT_CREATE(NS_FORM_INPUT_SEARCH, NS_NewTextControlFrame),
     SIMPLE_INT_CREATE(NS_FORM_INPUT_TEXT, NS_NewTextControlFrame),
     SIMPLE_INT_CREATE(NS_FORM_INPUT_TEL, NS_NewTextControlFrame),
     SIMPLE_INT_CREATE(NS_FORM_INPUT_URL, NS_NewTextControlFrame),
--- a/layout/base/nsLayoutUtils.cpp
+++ b/layout/base/nsLayoutUtils.cpp
@@ -8205,17 +8205,17 @@ nsLayoutUtils::FontSizeInflationInner(co
     nsIFrame* parent = f->GetParent();
     // Also, if there is more than one frame corresponding to a single
     // content node, we want the outermost one.
     if (!(parent && parent->GetContent() == content) &&
         // ignore width/height on inlines since they don't apply
         fType != LayoutFrameType::Inline &&
         // ignore width on radios and checkboxes since we enlarge them and
         // they have width/height in ua.css
-        fType != LayoutFrameType::FormControl) {
+        fType != LayoutFrameType::CheckboxRadio) {
       // ruby annotations should have the same inflation as its
       // grandparent, which is the ruby frame contains the annotation.
       if (fType == LayoutFrameType::RubyText) {
         MOZ_ASSERT(parent && parent->IsRubyTextContainerFrame());
         nsIFrame* grandparent = parent->GetParent();
         MOZ_ASSERT(grandparent && grandparent->IsRubyFrame());
         return FontSizeInflationFor(grandparent);
       }
--- a/layout/forms/moz.build
+++ b/layout/forms/moz.build
@@ -15,22 +15,22 @@ EXPORTS += [
     'nsIFormControlFrame.h',
     'nsIListControlFrame.h',
     'nsISelectControlFrame.h',
     'nsITextControlFrame.h',
 ]
 
 UNIFIED_SOURCES += [
     'nsButtonFrameRenderer.cpp',
+    'nsCheckboxRadioFrame.cpp',
     'nsColorControlFrame.cpp',
     'nsComboboxControlFrame.cpp',
     'nsDateTimeControlFrame.cpp',
     'nsFieldSetFrame.cpp',
     'nsFileControlFrame.cpp',
-    'nsFormControlFrame.cpp',
     'nsGfxButtonControlFrame.cpp',
     'nsHTMLButtonControlFrame.cpp',
     'nsImageControlFrame.cpp',
     'nsLegendFrame.cpp',
     'nsListControlFrame.cpp',
     'nsMeterFrame.cpp',
     'nsNumberControlFrame.cpp',
     'nsProgressFrame.cpp',
rename from layout/forms/nsFormControlFrame.cpp
rename to layout/forms/nsCheckboxRadioFrame.cpp
--- a/layout/forms/nsFormControlFrame.cpp
+++ b/layout/forms/nsCheckboxRadioFrame.cpp
@@ -1,101 +1,101 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* 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/. */
 
-#include "nsFormControlFrame.h"
+#include "nsCheckboxRadioFrame.h"
 
 #include "nsGkAtoms.h"
 #include "nsLayoutUtils.h"
 #include "nsIDOMHTMLInputElement.h"
 #include "mozilla/EventStateManager.h"
 #include "mozilla/LookAndFeel.h"
 #include "nsDeviceContext.h"
 #include "nsIContent.h"
 #include "nsThemeConstants.h"
 
 using namespace mozilla;
 
 //#define FCF_NOISY
 
-nsFormControlFrame*
-NS_NewFormControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
+nsCheckboxRadioFrame*
+NS_NewCheckboxRadioFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
 {
-  return new (aPresShell) nsFormControlFrame(aContext);
+  return new (aPresShell) nsCheckboxRadioFrame(aContext);
 }
 
-nsFormControlFrame::nsFormControlFrame(nsStyleContext* aContext)
+nsCheckboxRadioFrame::nsCheckboxRadioFrame(nsStyleContext* aContext)
   : nsAtomicContainerFrame(aContext, kClassID)
 {
 }
 
-nsFormControlFrame::~nsFormControlFrame()
+nsCheckboxRadioFrame::~nsCheckboxRadioFrame()
 {
 }
 
 void
-nsFormControlFrame::DestroyFrom(nsIFrame* aDestructRoot)
+nsCheckboxRadioFrame::DestroyFrom(nsIFrame* aDestructRoot)
 {
   // Unregister the access key registered in reflow
-  nsFormControlFrame::RegUnRegAccessKey(static_cast<nsIFrame*>(this), false);
+  nsCheckboxRadioFrame::RegUnRegAccessKey(static_cast<nsIFrame*>(this), false);
   nsAtomicContainerFrame::DestroyFrom(aDestructRoot);
 }
 
-NS_IMPL_FRAMEARENA_HELPERS(nsFormControlFrame)
+NS_IMPL_FRAMEARENA_HELPERS(nsCheckboxRadioFrame)
 
-NS_QUERYFRAME_HEAD(nsFormControlFrame)
+NS_QUERYFRAME_HEAD(nsCheckboxRadioFrame)
   NS_QUERYFRAME_ENTRY(nsIFormControlFrame)
 NS_QUERYFRAME_TAIL_INHERITING(nsAtomicContainerFrame)
 
 /* virtual */ nscoord
-nsFormControlFrame::GetMinISize(gfxContext *aRenderingContext)
+nsCheckboxRadioFrame::GetMinISize(gfxContext *aRenderingContext)
 {
   nscoord result;
   DISPLAY_MIN_WIDTH(this, result);
   result = StyleDisplay()->mAppearance == NS_THEME_NONE ? 0 : DefaultSize();
   return result;
 }
 
 /* virtual */ nscoord
-nsFormControlFrame::GetPrefISize(gfxContext *aRenderingContext)
+nsCheckboxRadioFrame::GetPrefISize(gfxContext* aRenderingContext)
 {
   nscoord result;
   DISPLAY_PREF_WIDTH(this, result);
   result = StyleDisplay()->mAppearance == NS_THEME_NONE ? 0 : DefaultSize();
   return result;
 }
 
 /* virtual */
 LogicalSize
-nsFormControlFrame::ComputeAutoSize(gfxContext*         aRC,
-                                    WritingMode         aWM,
-                                    const LogicalSize&  aCBSize,
-                                    nscoord             aAvailableISize,
-                                    const LogicalSize&  aMargin,
-                                    const LogicalSize&  aBorder,
-                                    const LogicalSize&  aPadding,
-                                    ComputeSizeFlags    aFlags)
+nsCheckboxRadioFrame::ComputeAutoSize(gfxContext*         aRC,
+                                      WritingMode         aWM,
+                                      const LogicalSize&  aCBSize,
+                                      nscoord             aAvailableISize,
+                                      const LogicalSize&  aMargin,
+                                      const LogicalSize&  aBorder,
+                                      const LogicalSize&  aPadding,
+                                      ComputeSizeFlags    aFlags)
 {
   LogicalSize size(aWM, 0, 0);
   if (StyleDisplay()->mAppearance == NS_THEME_NONE) {
     return size;
   }
 
   // Note: this call always set the BSize to NS_UNCONSTRAINEDSIZE.
   size = nsAtomicContainerFrame::ComputeAutoSize(aRC, aWM, aCBSize,
                                                  aAvailableISize, aMargin,
                                                  aBorder, aPadding, aFlags);
   size.BSize(aWM) = DefaultSize();
   return size;
 }
 
 nscoord
-nsFormControlFrame::GetLogicalBaseline(WritingMode aWritingMode) const
+nsCheckboxRadioFrame::GetLogicalBaseline(WritingMode aWritingMode) const
 {
   NS_ASSERTION(!NS_SUBTREE_DIRTY(this),
                "frame must not be dirty");
 
   // For appearance:none we use a standard CSS baseline, i.e. synthesized from
   // our margin-box.
   if (StyleDisplay()->mAppearance == NS_THEME_NONE) {
     return nsAtomicContainerFrame::GetLogicalBaseline(aWritingMode);
@@ -109,53 +109,53 @@ nsFormControlFrame::GetLogicalBaseline(W
   // block-start end instead.
   return aWritingMode.IsLineInverted()
     ? GetLogicalUsedBorderAndPadding(aWritingMode).BStart(aWritingMode)
     : BSize(aWritingMode) -
          GetLogicalUsedBorderAndPadding(aWritingMode).BEnd(aWritingMode);
 }
 
 void
-nsFormControlFrame::Reflow(nsPresContext*          aPresContext,
-                           ReflowOutput&     aDesiredSize,
-                           const ReflowInput& aReflowInput,
-                           nsReflowStatus&          aStatus)
+nsCheckboxRadioFrame::Reflow(nsPresContext*     aPresContext,
+                             ReflowOutput&      aDesiredSize,
+                             const ReflowInput& aReflowInput,
+                             nsReflowStatus&    aStatus)
 {
   MarkInReflow();
-  DO_GLOBAL_REFLOW_COUNT("nsFormControlFrame");
+  DO_GLOBAL_REFLOW_COUNT("nsCheckboxRadioFrame");
   DISPLAY_REFLOW(aPresContext, this, aReflowInput, aDesiredSize, aStatus);
   MOZ_ASSERT(aStatus.IsEmpty(), "Caller should pass a fresh reflow status!");
   NS_FRAME_TRACE(NS_FRAME_TRACE_CALLS,
-                 ("enter nsFormControlFrame::Reflow: aMaxSize=%d,%d",
+                 ("enter nsCheckboxRadioFrame::Reflow: aMaxSize=%d,%d",
                   aReflowInput.AvailableWidth(), aReflowInput.AvailableHeight()));
 
   if (mState & NS_FRAME_FIRST_REFLOW) {
     RegUnRegAccessKey(static_cast<nsIFrame*>(this), true);
   }
 
   aDesiredSize.SetSize(aReflowInput.GetWritingMode(),
                        aReflowInput.ComputedSizeWithBorderPadding());
 
   if (nsLayoutUtils::FontSizeInflationEnabled(aPresContext)) {
     float inflation = nsLayoutUtils::FontSizeInflationFor(this);
     aDesiredSize.Width() *= inflation;
     aDesiredSize.Height() *= inflation;
   }
 
   NS_FRAME_TRACE(NS_FRAME_TRACE_CALLS,
-                 ("exit nsFormControlFrame::Reflow: size=%d,%d",
+                 ("exit nsCheckboxRadioFrame::Reflow: size=%d,%d",
                   aDesiredSize.Width(), aDesiredSize.Height()));
   NS_FRAME_SET_TRUNCATION(aStatus, aReflowInput, aDesiredSize);
 
   aDesiredSize.SetOverflowAreasToDesiredBounds();
   FinishAndStoreOverflow(&aDesiredSize);
 }
 
 nsresult
-nsFormControlFrame::RegUnRegAccessKey(nsIFrame * aFrame, bool aDoReg)
+nsCheckboxRadioFrame::RegUnRegAccessKey(nsIFrame* aFrame, bool aDoReg)
 {
   NS_ENSURE_ARG_POINTER(aFrame);
 
   nsPresContext* presContext = aFrame->PresContext();
 
   NS_ASSERTION(presContext, "aPresContext is NULL in RegUnRegAccessKey!");
 
   nsAutoString accessKey;
@@ -170,52 +170,52 @@ nsFormControlFrame::RegUnRegAccessKey(ns
       stateManager->UnregisterAccessKey(content, (uint32_t)accessKey.First());
     }
     return NS_OK;
   }
   return NS_ERROR_FAILURE;
 }
 
 void
-nsFormControlFrame::SetFocus(bool aOn, bool aRepaint)
+nsCheckboxRadioFrame::SetFocus(bool aOn, bool aRepaint)
 {
 }
 
 nsresult
-nsFormControlFrame::HandleEvent(nsPresContext* aPresContext,
-                                WidgetGUIEvent* aEvent,
-                                nsEventStatus* aEventStatus)
+nsCheckboxRadioFrame::HandleEvent(nsPresContext* aPresContext,
+                                  WidgetGUIEvent* aEvent,
+                                  nsEventStatus* aEventStatus)
 {
   // Check for user-input:none style
   const nsStyleUserInterface* uiStyle = StyleUserInterface();
   if (uiStyle->mUserInput == StyleUserInput::None ||
       uiStyle->mUserInput == StyleUserInput::Disabled) {
     return nsFrame::HandleEvent(aPresContext, aEvent, aEventStatus);
   }
   return NS_OK;
 }
 
 void
-nsFormControlFrame::GetCurrentCheckState(bool *aState)
+nsCheckboxRadioFrame::GetCurrentCheckState(bool* aState)
 {
   nsCOMPtr<nsIDOMHTMLInputElement> inputElement = do_QueryInterface(mContent);
   if (inputElement) {
     inputElement->GetChecked(aState);
   }
 }
 
 nsresult
-nsFormControlFrame::SetFormProperty(nsIAtom* aName, const nsAString& aValue)
+nsCheckboxRadioFrame::SetFormProperty(nsIAtom* aName, const nsAString& aValue)
 {
   return NS_OK;
 }
 
 // static
 nsRect
-nsFormControlFrame::GetUsableScreenRect(nsPresContext* aPresContext)
+nsCheckboxRadioFrame::GetUsableScreenRect(nsPresContext* aPresContext)
 {
   nsRect screen;
 
   nsDeviceContext *context = aPresContext->DeviceContext();
   int32_t dropdownCanOverlapOSBar =
     LookAndFeel::GetInt(LookAndFeel::eIntID_MenusCanOverlapOSBar, 0);
   if ( dropdownCanOverlapOSBar )
     context->GetRect(screen);
rename from layout/forms/nsFormControlFrame.h
rename to layout/forms/nsCheckboxRadioFrame.h
--- a/layout/forms/nsFormControlFrame.h
+++ b/layout/forms/nsCheckboxRadioFrame.h
@@ -1,45 +1,45 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* 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/. */
 
-#ifndef nsFormControlFrame_h___
-#define nsFormControlFrame_h___
+#ifndef nsCheckboxRadioFrame_h___
+#define nsCheckboxRadioFrame_h___
 
 #include "mozilla/Attributes.h"
 #include "nsIFormControlFrame.h"
 #include "nsAtomicContainerFrame.h"
 #include "nsDisplayList.h"
 
 /**
- * nsFormControlFrame is used for radio buttons and checkboxes.
+ * nsCheckboxRadioFrame is used for radio buttons and checkboxes.
  * It also has two static methods (RegUnRegAccessKey and
  * GetScreenHeight) that are used by other form controls.
  */
-class nsFormControlFrame final : public nsAtomicContainerFrame,
-                                 public nsIFormControlFrame
+class nsCheckboxRadioFrame final : public nsAtomicContainerFrame,
+                                   public nsIFormControlFrame
 {
 public:
   NS_DECL_QUERYFRAME
-  NS_DECL_FRAMEARENA_HELPERS(nsFormControlFrame)
+  NS_DECL_FRAMEARENA_HELPERS(nsCheckboxRadioFrame)
 
-  explicit nsFormControlFrame(nsStyleContext* aContext);
+  explicit nsCheckboxRadioFrame(nsStyleContext* aContext);
 
   // nsIFrame replacements
   virtual bool IsFrameOfType(uint32_t aFlags) const override
   {
     return nsAtomicContainerFrame::IsFrameOfType(aFlags &
       ~(nsIFrame::eReplaced | nsIFrame::eReplacedContainsBlock));
   }
 
   virtual void BuildDisplayList(nsDisplayListBuilder*   aBuilder,
                                 const nsDisplayListSet& aLists) override {
-    DO_GLOBAL_REFLOW_COUNT_DSP("nsFormControlFrame");
+    DO_GLOBAL_REFLOW_COUNT_DSP("nsCheckboxRadioFrame");
     DisplayBorderBackgroundOutline(aBuilder, aLists);
   }
 
   /**
    * Both GetMinISize and GetPrefISize will return whatever GetIntrinsicISize
    * returns.
    */
   virtual nscoord GetMinISize(gfxContext *aRenderingContext) override;
@@ -93,17 +93,17 @@ public:
   /**
    * Returns the usable screen rect in app units, eg the rect where we can
    * draw dropdowns.
    */
   static nsRect GetUsableScreenRect(nsPresContext* aPresContext);
 
 protected:
 
-  virtual ~nsFormControlFrame();
+  virtual ~nsCheckboxRadioFrame();
 
   static nscoord DefaultSize()
   {
     // XXXmats We have traditionally always returned 9px for GetMin/PrefISize
     // but we might want to factor in what the theme says, something like:
     // GetMinimumWidgetSize - GetWidgetPadding - GetWidgetBorder.
     return nsPresContext::CSSPixelsToAppUnits(9);
   }
--- a/layout/forms/nsColorControlFrame.cpp
+++ b/layout/forms/nsColorControlFrame.cpp
@@ -3,17 +3,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/. */
 
 #include "nsColorControlFrame.h"
 
 #include "nsContentCreatorFunctions.h"
 #include "nsContentUtils.h"
 #include "nsCSSPseudoElements.h"
-#include "nsFormControlFrame.h"
+#include "nsCheckboxRadioFrame.h"
 #include "nsGkAtoms.h"
 #include "nsIDOMNode.h"
 #include "nsIFormControl.h"
 #include "mozilla/StyleSetHandle.h"
 #include "mozilla/StyleSetHandleInlines.h"
 #include "mozilla/dom/HTMLInputElement.h"
 #include "nsIDocument.h"
 
@@ -37,17 +37,17 @@ NS_IMPL_FRAMEARENA_HELPERS(nsColorContro
 NS_QUERYFRAME_HEAD(nsColorControlFrame)
   NS_QUERYFRAME_ENTRY(nsColorControlFrame)
   NS_QUERYFRAME_ENTRY(nsIAnonymousContentCreator)
 NS_QUERYFRAME_TAIL_INHERITING(nsHTMLButtonControlFrame)
 
 
 void nsColorControlFrame::DestroyFrom(nsIFrame* aDestructRoot)
 {
-  nsFormControlFrame::RegUnRegAccessKey(static_cast<nsIFrame*>(this), false);
+  nsCheckboxRadioFrame::RegUnRegAccessKey(static_cast<nsIFrame*>(this), false);
   DestroyAnonymousContent(mColorContent.forget());
   nsHTMLButtonControlFrame::DestroyFrom(aDestructRoot);
 }
 
 #ifdef DEBUG_FRAME_DUMP
 nsresult
 nsColorControlFrame::GetFrameName(nsAString& aResult) const
 {
--- a/layout/forms/nsComboboxControlFrame.cpp
+++ b/layout/forms/nsComboboxControlFrame.cpp
@@ -6,17 +6,17 @@
 #include "nsComboboxControlFrame.h"
 
 #include "gfxContext.h"
 #include "gfxUtils.h"
 #include "mozilla/gfx/2D.h"
 #include "mozilla/gfx/PathHelpers.h"
 #include "nsCOMPtr.h"
 #include "nsFocusManager.h"
-#include "nsFormControlFrame.h"
+#include "nsCheckboxRadioFrame.h"
 #include "nsGkAtoms.h"
 #include "nsCSSAnonBoxes.h"
 #include "nsHTMLParts.h"
 #include "nsIFormControl.h"
 #include "nsNameSpaceManager.h"
 #include "nsIListControlFrame.h"
 #include "nsPIDOMWindow.h"
 #include "nsIPresShell.h"
@@ -590,17 +590,17 @@ nsComboboxControlFrame::GetAvailableDrop
   // introduce this hack so that the dropdown will show up in the right place.
   // Use null container size when converting a vector from logical to physical.
   const nsSize nullContainerSize;
   *aTranslation = LogicalPoint(aWM, GetCSSTransformTranslation(),
                                nullContainerSize);
   *aBefore = 0;
   *aAfter = 0;
 
-  nsRect screen = nsFormControlFrame::GetUsableScreenRect(PresContext());
+  nsRect screen = nsCheckboxRadioFrame::GetUsableScreenRect(PresContext());
   nsSize containerSize = screen.Size();
   LogicalRect logicalScreen(aWM, screen, containerSize);
   if (mLastDropDownAfterScreenBCoord == nscoord_MIN) {
     LogicalRect thisScreenRect(aWM, GetScreenRectInAppUnits(),
                                containerSize);
     mLastDropDownAfterScreenBCoord = thisScreenRect.BEnd(aWM) +
                                      aTranslation->B(aWM);
     mLastDropDownBeforeScreenBCoord = thisScreenRect.BStart(aWM) +
@@ -1401,17 +1401,17 @@ nsComboboxControlFrame::DestroyFrom(nsIF
 {
   if (sFocused == this) {
     sFocused = nullptr;
   }
 
   // Revoke any pending RedisplayTextEvent
   mRedisplayTextEvent.Revoke();
 
-  nsFormControlFrame::RegUnRegAccessKey(static_cast<nsIFrame*>(this), false);
+  nsCheckboxRadioFrame::RegUnRegAccessKey(static_cast<nsIFrame*>(this), false);
 
   if (mDroppedDown) {
     MOZ_ASSERT(mDropdownFrame, "mDroppedDown without frame");
     nsView* view = mDropdownFrame->GetView();
     MOZ_ASSERT(view);
     nsIWidget* widget = view->GetWidget();
     if (widget) {
       widget->CaptureRollupEvents(this, false);
--- a/layout/forms/nsDateTimeControlFrame.cpp
+++ b/layout/forms/nsDateTimeControlFrame.cpp
@@ -6,17 +6,17 @@
 /**
  * This frame type is used for input type=date, time, month, week, and
  * datetime-local.
  */
 
 #include "nsDateTimeControlFrame.h"
 
 #include "nsContentUtils.h"
-#include "nsFormControlFrame.h"
+#include "nsCheckboxRadioFrame.h"
 #include "nsGkAtoms.h"
 #include "nsContentUtils.h"
 #include "nsContentCreatorFunctions.h"
 #include "mozilla/dom/HTMLInputElement.h"
 #include "nsNodeInfoManager.h"
 #include "nsIDateTimeInputArea.h"
 #include "nsIObserverService.h"
 #include "nsIDOMHTMLInputElement.h"
--- a/layout/forms/nsHTMLButtonControlFrame.cpp
+++ b/layout/forms/nsHTMLButtonControlFrame.cpp
@@ -6,17 +6,17 @@
 #include "nsHTMLButtonControlFrame.h"
 
 #include "nsContainerFrame.h"
 #include "nsIFormControlFrame.h"
 #include "nsPresContext.h"
 #include "nsGkAtoms.h"
 #include "nsButtonFrameRenderer.h"
 #include "nsCSSAnonBoxes.h"
-#include "nsFormControlFrame.h"
+#include "nsCheckboxRadioFrame.h"
 #include "nsNameSpaceManager.h"
 #include "nsDisplayList.h"
 #include <algorithm>
 
 using namespace mozilla;
 
 nsContainerFrame*
 NS_NewHTMLButtonControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
@@ -34,17 +34,17 @@ nsHTMLButtonControlFrame::nsHTMLButtonCo
 
 nsHTMLButtonControlFrame::~nsHTMLButtonControlFrame()
 {
 }
 
 void
 nsHTMLButtonControlFrame::DestroyFrom(nsIFrame* aDestructRoot)
 {
-  nsFormControlFrame::RegUnRegAccessKey(static_cast<nsIFrame*>(this), false);
+  nsCheckboxRadioFrame::RegUnRegAccessKey(static_cast<nsIFrame*>(this), false);
   nsContainerFrame::DestroyFrom(aDestructRoot);
 }
 
 void
 nsHTMLButtonControlFrame::Init(nsIContent*       aContent,
                                nsContainerFrame* aParent,
                                nsIFrame*         aPrevInFlow)
 {
@@ -175,17 +175,17 @@ nsHTMLButtonControlFrame::Reflow(nsPresC
                                  nsReflowStatus& aStatus)
 {
   MarkInReflow();
   DO_GLOBAL_REFLOW_COUNT("nsHTMLButtonControlFrame");
   DISPLAY_REFLOW(aPresContext, this, aReflowInput, aDesiredSize, aStatus);
   MOZ_ASSERT(aStatus.IsEmpty(), "Caller should pass a fresh reflow status!");
 
   if (mState & NS_FRAME_FIRST_REFLOW) {
-    nsFormControlFrame::RegUnRegAccessKey(static_cast<nsIFrame*>(this), true);
+    nsCheckboxRadioFrame::RegUnRegAccessKey(static_cast<nsIFrame*>(this), true);
   }
 
   // Reflow the child
   nsIFrame* firstKid = mFrames.FirstChild();
 
   MOZ_ASSERT(firstKid, "Button should have a child frame for its contents");
   MOZ_ASSERT(!firstKid->GetNextSibling(),
              "Button should have exactly one child frame");
--- a/layout/forms/nsImageControlFrame.cpp
+++ b/layout/forms/nsImageControlFrame.cpp
@@ -3,17 +3,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/. */
 
 #include "nsImageFrame.h"
 #include "nsIFormControlFrame.h"
 #include "nsPresContext.h"
 #include "nsGkAtoms.h"
 #include "nsStyleConsts.h"
-#include "nsFormControlFrame.h"
+#include "nsCheckboxRadioFrame.h"
 #include "nsLayoutUtils.h"
 #include "mozilla/MouseEvents.h"
 #include "nsIContent.h"
 
 using namespace mozilla;
 
 class nsImageControlFrame : public nsImageFrame,
                             public nsIFormControlFrame
@@ -65,17 +65,17 @@ nsImageControlFrame::nsImageControlFrame
 nsImageControlFrame::~nsImageControlFrame()
 {
 }
 
 void
 nsImageControlFrame::DestroyFrom(nsIFrame* aDestructRoot)
 {
   if (!GetPrevInFlow()) {
-    nsFormControlFrame::RegUnRegAccessKey(this, false);
+    nsCheckboxRadioFrame::RegUnRegAccessKey(this, false);
   }
   nsImageFrame::DestroyFrom(aDestructRoot);
 }
 
 nsIFrame*
 NS_NewImageControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
 {
   return new (aPresShell) nsImageControlFrame(aContext);
@@ -120,17 +120,17 @@ nsImageControlFrame::Reflow(nsPresContex
                             ReflowOutput&     aDesiredSize,
                             const ReflowInput& aReflowInput,
                             nsReflowStatus&          aStatus)
 {
   DO_GLOBAL_REFLOW_COUNT("nsImageControlFrame");
   DISPLAY_REFLOW(aPresContext, this, aReflowInput, aDesiredSize, aStatus);
   MOZ_ASSERT(aStatus.IsEmpty(), "Caller should pass a fresh reflow status!");
   if (!GetPrevInFlow() && (mState & NS_FRAME_FIRST_REFLOW)) {
-    nsFormControlFrame::RegUnRegAccessKey(this, true);
+    nsCheckboxRadioFrame::RegUnRegAccessKey(this, true);
   }
   return nsImageFrame::Reflow(aPresContext, aDesiredSize, aReflowInput, aStatus);
 }
 
 nsresult
 nsImageControlFrame::HandleEvent(nsPresContext* aPresContext,
                                  WidgetGUIEvent* aEvent,
                                  nsEventStatus* aEventStatus)
--- a/layout/forms/nsLegendFrame.cpp
+++ b/layout/forms/nsLegendFrame.cpp
@@ -5,17 +5,17 @@
 
 #include "nsLegendFrame.h"
 #include "nsIContent.h"
 #include "nsGenericHTMLElement.h"
 #include "nsAttrValueInlines.h"
 #include "nsHTMLParts.h"
 #include "nsGkAtoms.h"
 #include "nsStyleConsts.h"
-#include "nsFormControlFrame.h"
+#include "nsCheckboxRadioFrame.h"
 
 nsIFrame*
 NS_NewLegendFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
 {
 #ifdef DEBUG
   const nsStyleDisplay* disp = aContext->StyleDisplay();
   NS_ASSERTION(!disp->IsAbsolutelyPositionedStyle() && !disp->IsFloatingStyle(),
                "Legends should not be positioned and should not float");
@@ -26,17 +26,17 @@ NS_NewLegendFrame(nsIPresShell* aPresShe
   return f;
 }
 
 NS_IMPL_FRAMEARENA_HELPERS(nsLegendFrame)
 
 void
 nsLegendFrame::DestroyFrom(nsIFrame* aDestructRoot)
 {
-  nsFormControlFrame::RegUnRegAccessKey(static_cast<nsIFrame*>(this), false);
+  nsCheckboxRadioFrame::RegUnRegAccessKey(static_cast<nsIFrame*>(this), false);
   nsBlockFrame::DestroyFrom(aDestructRoot);
 }
 
 NS_QUERYFRAME_HEAD(nsLegendFrame)
   NS_QUERYFRAME_ENTRY(nsLegendFrame)
 NS_QUERYFRAME_TAIL_INHERITING(nsBlockFrame)
 
 void
@@ -44,17 +44,17 @@ nsLegendFrame::Reflow(nsPresContext*    
                      ReflowOutput&     aDesiredSize,
                      const ReflowInput& aReflowInput,
                      nsReflowStatus&          aStatus)
 {
   DO_GLOBAL_REFLOW_COUNT("nsLegendFrame");
   DISPLAY_REFLOW(aPresContext, this, aReflowInput, aDesiredSize, aStatus);
   MOZ_ASSERT(aStatus.IsEmpty(), "Caller should pass a fresh reflow status!");
   if (mState & NS_FRAME_FIRST_REFLOW) {
-    nsFormControlFrame::RegUnRegAccessKey(static_cast<nsIFrame*>(this), true);
+    nsCheckboxRadioFrame::RegUnRegAccessKey(static_cast<nsIFrame*>(this), true);
   }
   return nsBlockFrame::Reflow(aPresContext, aDesiredSize, aReflowInput, aStatus);
 }
 
 int32_t
 nsLegendFrame::GetLogicalAlign(WritingMode aCBWM)
 {
   int32_t intValue = NS_STYLE_TEXT_ALIGN_START;
--- a/layout/forms/nsListControlFrame.cpp
+++ b/layout/forms/nsListControlFrame.cpp
@@ -2,17 +2,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nscore.h"
 #include "nsCOMPtr.h"
 #include "nsUnicharUtils.h"
 #include "nsListControlFrame.h"
-#include "nsFormControlFrame.h" // for COMPARE macro
+#include "nsCheckboxRadioFrame.h" // for COMPARE macro
 #include "nsGkAtoms.h"
 #include "nsIDOMHTMLSelectElement.h"
 #include "nsIDOMHTMLOptionElement.h"
 #include "nsComboboxControlFrame.h"
 #include "nsIPresShell.h"
 #include "nsIDOMMouseEvent.h"
 #include "nsIXULRuntime.h"
 #include "nsFontMetrics.h"
@@ -150,17 +150,17 @@ nsListControlFrame::DestroyFrom(nsIFrame
 
   if (ShouldFireDropDownEvent()) {
     nsContentUtils::AddScriptRunner(
       new AsyncEventDispatcher(mContent,
                                NS_LITERAL_STRING("mozhidedropdown"), true,
                                true));
   }
 
-  nsFormControlFrame::RegUnRegAccessKey(static_cast<nsIFrame*>(this), false);
+  nsCheckboxRadioFrame::RegUnRegAccessKey(static_cast<nsIFrame*>(this), false);
   nsHTMLScrollFrame::DestroyFrom(aDestructRoot);
 }
 
 void
 nsListControlFrame::BuildDisplayList(nsDisplayListBuilder*   aBuilder,
                                      const nsDisplayListSet& aLists)
 {
   // We allow visibility:hidden <select>s to contain visible options.
@@ -378,17 +378,17 @@ nsListControlFrame::Reflow(nsPresContext
       CheckIfAllFramesHere();
     }
     if (mIsAllFramesHere && !mHasBeenInitialized) {
       mHasBeenInitialized = true;
     }
   }
 
   if (GetStateBits() & NS_FRAME_FIRST_REFLOW) {
-    nsFormControlFrame::RegUnRegAccessKey(this, true);
+    nsCheckboxRadioFrame::RegUnRegAccessKey(this, true);
   }
 
   if (IsInDropDownMode()) {
     ReflowAsDropdown(aPresContext, aDesiredSize, aReflowInput, aStatus);
     return;
   }
 
   MarkInReflow();
--- a/layout/forms/nsMeterFrame.cpp
+++ b/layout/forms/nsMeterFrame.cpp
@@ -9,17 +9,17 @@
 #include "nsPresContext.h"
 #include "nsGkAtoms.h"
 #include "nsNameSpaceManager.h"
 #include "nsIDocument.h"
 #include "nsIPresShell.h"
 #include "nsNodeInfoManager.h"
 #include "nsContentCreatorFunctions.h"
 #include "nsContentUtils.h"
-#include "nsFormControlFrame.h"
+#include "nsCheckboxRadioFrame.h"
 #include "nsFontMetrics.h"
 #include "mozilla/dom/Element.h"
 #include "mozilla/dom/HTMLMeterElement.h"
 #include "nsCSSPseudoElements.h"
 #include "nsStyleSet.h"
 #include "mozilla/StyleSetHandle.h"
 #include "mozilla/StyleSetHandleInlines.h"
 #include "nsThemeConstants.h"
@@ -48,17 +48,17 @@ nsMeterFrame::~nsMeterFrame()
 }
 
 void
 nsMeterFrame::DestroyFrom(nsIFrame* aDestructRoot)
 {
   NS_ASSERTION(!GetPrevContinuation(),
                "nsMeterFrame should not have continuations; if it does we "
                "need to call RegUnregAccessKey only for the first.");
-  nsFormControlFrame::RegUnRegAccessKey(static_cast<nsIFrame*>(this), false);
+  nsCheckboxRadioFrame::RegUnRegAccessKey(static_cast<nsIFrame*>(this), false);
   DestroyAnonymousContent(mBarDiv.forget());
   nsContainerFrame::DestroyFrom(aDestructRoot);
 }
 
 nsresult
 nsMeterFrame::CreateAnonymousContent(nsTArray<ContentInfo>& aElements)
 {
   // Get the NodeInfoManager and tag necessary to create the meter bar div.
@@ -102,17 +102,17 @@ nsMeterFrame::Reflow(nsPresContext*     
   MOZ_ASSERT(aStatus.IsEmpty(), "Caller should pass a fresh reflow status!");
 
   NS_ASSERTION(mBarDiv, "Meter bar div must exist!");
   NS_ASSERTION(!GetPrevContinuation(),
                "nsMeterFrame should not have continuations; if it does we "
                "need to call RegUnregAccessKey only for the first.");
 
   if (mState & NS_FRAME_FIRST_REFLOW) {
-    nsFormControlFrame::RegUnRegAccessKey(this, true);
+    nsCheckboxRadioFrame::RegUnRegAccessKey(this, true);
   }
 
   nsIFrame* barFrame = mBarDiv->GetPrimaryFrame();
   NS_ASSERTION(barFrame, "The meter frame should have a child with a frame!");
 
   ReflowBarFrame(barFrame, aPresContext, aReflowInput, aStatus);
 
   aDesiredSize.SetSize(aReflowInput.GetWritingMode(),
--- a/layout/forms/nsNumberControlFrame.cpp
+++ b/layout/forms/nsNumberControlFrame.cpp
@@ -6,17 +6,17 @@
 #include "nsNumberControlFrame.h"
 
 #include "HTMLInputElement.h"
 #include "ICUUtils.h"
 #include "nsIFocusManager.h"
 #include "nsIPresShell.h"
 #include "nsFocusManager.h"
 #include "nsFontMetrics.h"
-#include "nsFormControlFrame.h"
+#include "nsCheckboxRadioFrame.h"
 #include "nsGkAtoms.h"
 #include "nsNameSpaceManager.h"
 #include "nsThemeConstants.h"
 #include "mozilla/BasicEvents.h"
 #include "mozilla/EventStates.h"
 #include "nsContentUtils.h"
 #include "nsContentCreatorFunctions.h"
 #include "nsCSSPseudoElements.h"
@@ -55,17 +55,17 @@ nsNumberControlFrame::nsNumberControlFra
 }
 
 void
 nsNumberControlFrame::DestroyFrom(nsIFrame* aDestructRoot)
 {
   NS_ASSERTION(!GetPrevContinuation() && !GetNextContinuation(),
                "nsNumberControlFrame should not have continuations; if it does we "
                "need to call RegUnregAccessKey only for the first");
-  nsFormControlFrame::RegUnRegAccessKey(static_cast<nsIFrame*>(this), false);
+  nsCheckboxRadioFrame::RegUnRegAccessKey(static_cast<nsIFrame*>(this), false);
   DestroyAnonymousContent(mOuterWrapper.forget());
   nsContainerFrame::DestroyFrom(aDestructRoot);
 }
 
 nscoord
 nsNumberControlFrame::GetMinISize(gfxContext* aRenderingContext)
 {
   nscoord result;
@@ -118,17 +118,17 @@ nsNumberControlFrame::Reflow(nsPresConte
                "nsNumberControlFrame should not have continuations; if it does we "
                "need to call RegUnregAccessKey only for the first");
 
   NS_ASSERTION(!mFrames.FirstChild() ||
                !mFrames.FirstChild()->GetNextSibling(),
                "We expect at most one direct child frame");
 
   if (mState & NS_FRAME_FIRST_REFLOW) {
-    nsFormControlFrame::RegUnRegAccessKey(this, true);
+    nsCheckboxRadioFrame::RegUnRegAccessKey(this, true);
   }
 
   const WritingMode myWM = aReflowInput.GetWritingMode();
 
   // The ISize of our content box, which is the available ISize
   // for our anonymous content:
   const nscoord contentBoxISize = aReflowInput.ComputedISize();
   nscoord contentBoxBSize = aReflowInput.ComputedBSize();
--- a/layout/forms/nsProgressFrame.cpp
+++ b/layout/forms/nsProgressFrame.cpp
@@ -9,17 +9,17 @@
 #include "nsPresContext.h"
 #include "nsGkAtoms.h"
 #include "nsNameSpaceManager.h"
 #include "nsIDocument.h"
 #include "nsIPresShell.h"
 #include "nsNodeInfoManager.h"
 #include "nsContentCreatorFunctions.h"
 #include "nsContentUtils.h"
-#include "nsFormControlFrame.h"
+#include "nsCheckboxRadioFrame.h"
 #include "nsFontMetrics.h"
 #include "mozilla/dom/Element.h"
 #include "mozilla/dom/HTMLProgressElement.h"
 #include "nsCSSPseudoElements.h"
 #include "nsStyleSet.h"
 #include "mozilla/StyleSetHandle.h"
 #include "mozilla/StyleSetHandleInlines.h"
 #include "nsThemeConstants.h"
@@ -47,17 +47,17 @@ nsProgressFrame::~nsProgressFrame()
 }
 
 void
 nsProgressFrame::DestroyFrom(nsIFrame* aDestructRoot)
 {
   NS_ASSERTION(!GetPrevContinuation(),
                "nsProgressFrame should not have continuations; if it does we "
                "need to call RegUnregAccessKey only for the first.");
-  nsFormControlFrame::RegUnRegAccessKey(static_cast<nsIFrame*>(this), false);
+  nsCheckboxRadioFrame::RegUnRegAccessKey(static_cast<nsIFrame*>(this), false);
   DestroyAnonymousContent(mBarDiv.forget());
   nsContainerFrame::DestroyFrom(aDestructRoot);
 }
 
 nsresult
 nsProgressFrame::CreateAnonymousContent(nsTArray<ContentInfo>& aElements)
 {
   // Create the progress bar div.
@@ -111,17 +111,17 @@ nsProgressFrame::Reflow(nsPresContext*  
   NS_ASSERTION(PrincipalChildList().GetLength() == 1 &&
                PrincipalChildList().FirstChild() == mBarDiv->GetPrimaryFrame(),
                "unexpected child frames");
   NS_ASSERTION(!GetPrevContinuation(),
                "nsProgressFrame should not have continuations; if it does we "
                "need to call RegUnregAccessKey only for the first.");
 
   if (mState & NS_FRAME_FIRST_REFLOW) {
-    nsFormControlFrame::RegUnRegAccessKey(this, true);
+    nsCheckboxRadioFrame::RegUnRegAccessKey(this, true);
   }
 
   aDesiredSize.SetSize(aReflowInput.GetWritingMode(),
                        aReflowInput.ComputedSizeWithBorderPadding());
   aDesiredSize.SetOverflowAreasToDesiredBounds();
 
   for (auto childFrame : PrincipalChildList()) {
     ReflowChildFrame(childFrame, aPresContext, aReflowInput, aStatus);
--- a/layout/forms/nsRangeFrame.cpp
+++ b/layout/forms/nsRangeFrame.cpp
@@ -8,17 +8,17 @@
 #include "mozilla/EventStates.h"
 #include "mozilla/TouchEvents.h"
 
 #include "gfxContext.h"
 #include "nsContentCreatorFunctions.h"
 #include "nsContentUtils.h"
 #include "nsCSSPseudoElements.h"
 #include "nsCSSRendering.h"
-#include "nsFormControlFrame.h"
+#include "nsCheckboxRadioFrame.h"
 #include "nsIContent.h"
 #include "nsIDocument.h"
 #include "nsNameSpaceManager.h"
 #include "nsIPresShell.h"
 #include "nsGkAtoms.h"
 #include "mozilla/dom/HTMLInputElement.h"
 #include "nsPresContext.h"
 #include "nsNodeInfoManager.h"
@@ -97,17 +97,17 @@ void
 nsRangeFrame::DestroyFrom(nsIFrame* aDestructRoot)
 {
   NS_ASSERTION(!GetPrevContinuation() && !GetNextContinuation(),
                "nsRangeFrame should not have continuations; if it does we "
                "need to call RegUnregAccessKey only for the first.");
 
   mContent->RemoveEventListener(NS_LITERAL_STRING("touchstart"), mDummyTouchListener, false);
 
-  nsFormControlFrame::RegUnRegAccessKey(static_cast<nsIFrame*>(this), false);
+  nsCheckboxRadioFrame::RegUnRegAccessKey(static_cast<nsIFrame*>(this), false);
   DestroyAnonymousContent(mTrackDiv.forget());
   DestroyAnonymousContent(mProgressDiv.forget());
   DestroyAnonymousContent(mThumbDiv.forget());
   nsContainerFrame::DestroyFrom(aDestructRoot);
 }
 
 nsresult
 nsRangeFrame::MakeAnonymousDiv(Element** aResult,
@@ -321,17 +321,17 @@ nsRangeFrame::Reflow(nsPresContext*     
   NS_ASSERTION(mTrackDiv, "::-moz-range-track div must exist!");
   NS_ASSERTION(mProgressDiv, "::-moz-range-progress div must exist!");
   NS_ASSERTION(mThumbDiv, "::-moz-range-thumb div must exist!");
   NS_ASSERTION(!GetPrevContinuation() && !GetNextContinuation(),
                "nsRangeFrame should not have continuations; if it does we "
                "need to call RegUnregAccessKey only for the first.");
 
   if (mState & NS_FRAME_FIRST_REFLOW) {
-    nsFormControlFrame::RegUnRegAccessKey(this, true);
+    nsCheckboxRadioFrame::RegUnRegAccessKey(this, true);
   }
 
   WritingMode wm = aReflowInput.GetWritingMode();
   nscoord computedBSize = aReflowInput.ComputedBSize();
   if (computedBSize == NS_AUTOHEIGHT) {
     computedBSize = 0;
   }
   LogicalSize
--- a/layout/forms/nsTextControlFrame.cpp
+++ b/layout/forms/nsTextControlFrame.cpp
@@ -12,17 +12,17 @@
 #include "nsIPlaintextEditor.h"
 #include "nsCaret.h"
 #include "nsCSSPseudoElements.h"
 #include "nsGenericHTMLElement.h"
 #include "nsIEditor.h"
 #include "nsTextFragment.h"
 #include "nsIDOMHTMLTextAreaElement.h"
 #include "nsNameSpaceManager.h"
-#include "nsFormControlFrame.h" //for registering accesskeys
+#include "nsCheckboxRadioFrame.h" //for registering accesskeys
 
 #include "nsIContent.h"
 #include "nsPresContext.h"
 #include "nsGkAtoms.h"
 #include "nsLayoutUtils.h"
 #include "nsIDOMElement.h"
 #include "nsIDOMHTMLElement.h"
 #include "nsIPresShell.h"
@@ -142,17 +142,17 @@ nsTextControlFrame::DestroyFrom(nsIFrame
   DeleteProperty(TextControlInitializer());
 
   // Unbind the text editor state object from the frame.  The editor will live
   // on, but things like controllers will be released.
   nsCOMPtr<nsITextControlElement> txtCtrl = do_QueryInterface(GetContent());
   NS_ASSERTION(txtCtrl, "Content not a text control element");
   txtCtrl->UnbindFromFrame(this);
 
-  nsFormControlFrame::RegUnRegAccessKey(static_cast<nsIFrame*>(this), false);
+  nsCheckboxRadioFrame::RegUnRegAccessKey(static_cast<nsIFrame*>(this), false);
 
   if (mMutationObserver) {
     mRootNode->RemoveMutationObserver(mMutationObserver);
     mMutationObserver = nullptr;
   }
 
   // FIXME(emilio, bug 1400618): Do this after the child frames are destroyed.
   DestroyAnonymousContent(mRootNode.forget());
@@ -608,17 +608,17 @@ nsTextControlFrame::Reflow(nsPresContext
 {
   MarkInReflow();
   DO_GLOBAL_REFLOW_COUNT("nsTextControlFrame");
   DISPLAY_REFLOW(aPresContext, this, aReflowInput, aDesiredSize, aStatus);
   MOZ_ASSERT(aStatus.IsEmpty(), "Caller should pass a fresh reflow status!");
 
   // make sure that the form registers itself on the initial/first reflow
   if (mState & NS_FRAME_FIRST_REFLOW) {
-    nsFormControlFrame::RegUnRegAccessKey(this, true);
+    nsCheckboxRadioFrame::RegUnRegAccessKey(this, true);
   }
 
   // set values of reflow's out parameters
   WritingMode wm = aReflowInput.GetWritingMode();
   LogicalSize
     finalSize(wm,
               aReflowInput.ComputedISize() +
               aReflowInput.ComputedLogicalBorderPadding().IStartEnd(wm),
--- a/layout/generic/FrameTypeList.h
+++ b/layout/generic/FrameTypeList.h
@@ -9,27 +9,27 @@
  */
 FRAME_TYPE(Backdrop)
 FRAME_TYPE(Block)
 FRAME_TYPE(Box)
 FRAME_TYPE(Br)
 FRAME_TYPE(Bullet)
 FRAME_TYPE(BCTableCell)
 FRAME_TYPE(Canvas)
+FRAME_TYPE(CheckboxRadio)
 FRAME_TYPE(ColorControl)
 FRAME_TYPE(ColumnSet)
 FRAME_TYPE(ComboboxControl)
 FRAME_TYPE(ComboboxDisplay)
 FRAME_TYPE(Deck)
 FRAME_TYPE(DateTimeControl)
 FRAME_TYPE(Details)
 FRAME_TYPE(FieldSet)
 FRAME_TYPE(FlexContainer)
 FRAME_TYPE(FrameSet)
-FRAME_TYPE(FormControl)
 FRAME_TYPE(GfxButtonControl)
 FRAME_TYPE(GridContainer)
 FRAME_TYPE(HTMLButtonControl)
 FRAME_TYPE(HTMLCanvas)
 FRAME_TYPE(HTMLVideo)
 FRAME_TYPE(Image)
 FRAME_TYPE(ImageBox)
 FRAME_TYPE(ImageControl)
--- a/layout/generic/nsFrameIdList.h
+++ b/layout/generic/nsFrameIdList.h
@@ -8,30 +8,30 @@ FRAME_ID(nsAutoRepeatBoxFrame, Box, NotL
 FRAME_ID(nsBCTableCellFrame, BCTableCell, NotLeaf)
 FRAME_ID(nsBackdropFrame, Backdrop, Leaf)
 FRAME_ID(nsBlockFrame, Block, NotLeaf)
 FRAME_ID(nsBox, None, NotLeaf)
 FRAME_ID(nsBoxFrame, Box, NotLeaf)
 FRAME_ID(nsBulletFrame, Bullet, Leaf)
 FRAME_ID(nsButtonBoxFrame, Box, NotLeaf)
 FRAME_ID(nsCanvasFrame, Canvas, NotLeaf)
+FRAME_ID(nsCheckboxRadioFrame, CheckboxRadio, Leaf)
 FRAME_ID(nsColorControlFrame, ColorControl, Leaf)
 FRAME_ID(nsColumnSetFrame, ColumnSet, NotLeaf)
 FRAME_ID(nsComboboxControlFrame, ComboboxControl, NotLeaf)
 FRAME_ID(nsComboboxDisplayFrame, ComboboxDisplay, NotLeaf)
 FRAME_ID(nsContinuingTextFrame, Text, Leaf)
 FRAME_ID(nsDateTimeControlFrame, DateTimeControl, NotLeaf)
 FRAME_ID(nsDeckFrame, Deck, NotLeaf)
 FRAME_ID(nsDocElementBoxFrame, Box, NotLeaf)
 FRAME_ID(nsFieldSetFrame, FieldSet, NotLeaf)
 FRAME_ID(nsFileControlFrame, Block, Leaf)
 FRAME_ID(nsFirstLetterFrame, Letter, NotLeaf)
 FRAME_ID(nsFirstLineFrame, Line, NotLeaf)
 FRAME_ID(nsFlexContainerFrame, FlexContainer, NotLeaf)
-FRAME_ID(nsFormControlFrame, FormControl, Leaf)
 FRAME_ID(nsFrame, None, NotLeaf)
 FRAME_ID(nsGfxButtonControlFrame, GfxButtonControl, Leaf)
 FRAME_ID(nsGridContainerFrame, GridContainer, NotLeaf)
 FRAME_ID(nsGridRowGroupFrame, Box, NotLeaf)
 FRAME_ID(nsGridRowLeafFrame, Box, NotLeaf)
 FRAME_ID(nsGroupBoxFrame, Box, NotLeaf)
 FRAME_ID(nsHTMLButtonControlFrame, HTMLButtonControl, NotLeaf)
 FRAME_ID(nsHTMLCanvasFrame, HTMLCanvas, NotLeaf)
--- a/layout/generic/nsHTMLParts.h
+++ b/layout/generic/nsHTMLParts.h
@@ -7,17 +7,17 @@
 
 #ifndef nsHTMLParts_h___
 #define nsHTMLParts_h___
 
 #include "nscore.h"
 #include "nsISupports.h"
 #include "nsIFrame.h"
 class nsComboboxControlFrame;
-class nsFormControlFrame;
+class nsCheckboxRadioFrame;
 class nsIAtom;
 class nsNodeInfoManager;
 class nsIContent;
 class nsIDocument;
 class nsIFrame;
 class nsIHTMLContentSink;
 class nsIFragmentContentSink;
 class nsStyleContext;
@@ -127,18 +127,18 @@ nsFirstLetterFrame*
 NS_NewFirstLetterFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
 class nsFirstLineFrame;
 nsFirstLineFrame*
 NS_NewFirstLineFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
 
 // forms
 nsContainerFrame*
 NS_NewGfxButtonControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
-nsFormControlFrame*
-NS_NewFormControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
+nsCheckboxRadioFrame*
+NS_NewCheckboxRadioFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
 nsIFrame*
 NS_NewImageControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
 nsContainerFrame*
 NS_NewHTMLButtonControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
 nsContainerFrame*
 NS_NewFieldSetFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
 nsIFrame*
 NS_NewFileControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
--- a/widget/cocoa/nsNativeThemeCocoa.mm
+++ b/widget/cocoa/nsNativeThemeCocoa.mm
@@ -2998,17 +2998,17 @@ nsNativeThemeCocoa::GetWidgetBorder(nsDe
     {
       *aResult = DirectionAwareMargin(nsIntMargin(1, 4, 1, 4), aFrame);
       break;
     }
 
     case NS_THEME_CHECKBOX:
     case NS_THEME_RADIO:
     {
-      // nsFormControlFrame::GetIntrinsicWidth and nsFormControlFrame::GetIntrinsicHeight
+      // nsCheckboxRadioFrame::GetIntrinsicWidth and nsCheckboxRadioFrame::GetIntrinsicHeight
       // assume a border width of 2px.
       aResult->SizeTo(2, 2, 2, 2);
       break;
     }
 
     case NS_THEME_MENULIST:
     case NS_THEME_MENULIST_BUTTON:
       *aResult = DirectionAwareMargin(kAquaDropdownBorder, aFrame);