Bug 1264837 Part 2 - Remove nsColorControlFrameSuper. draft
authorTing-Yu Lin <tlin@mozilla.com>
Mon, 18 Apr 2016 13:32:19 +0800
changeset 352501 4635a1c9fd16a1c76e5c44d03fba1a4a10445d9a
parent 352500 7024f08ffc19132867ec5eaae43ef528d091b417
child 352502 a4f7ce5f1db45825da110ee2974a2fd1a985ef45
push id15712
push userbmo:tlin@mozilla.com
push dateMon, 18 Apr 2016 08:47:18 +0000
bugs1264837
milestone48.0a1
Bug 1264837 Part 2 - Remove nsColorControlFrameSuper. MozReview-Commit-ID: DKaroibsqfQ
layout/forms/nsColorControlFrame.cpp
layout/forms/nsColorControlFrame.h
--- a/layout/forms/nsColorControlFrame.cpp
+++ b/layout/forms/nsColorControlFrame.cpp
@@ -15,40 +15,40 @@
 #include "nsIDOMNode.h"
 #include "nsIFormControl.h"
 #include "mozilla/StyleSetHandle.h"
 #include "mozilla/StyleSetHandleInlines.h"
 #include "nsIDocument.h"
 
 using mozilla::dom::Element;
 
-nsColorControlFrame::nsColorControlFrame(nsStyleContext* aContext):
-  nsColorControlFrameSuper(aContext)
+nsColorControlFrame::nsColorControlFrame(nsStyleContext* aContext)
+  : nsHTMLButtonControlFrame(aContext)
 {
 }
 
 nsIFrame*
 NS_NewColorControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
 {
   return new (aPresShell) nsColorControlFrame(aContext);
 }
 
 NS_IMPL_FRAMEARENA_HELPERS(nsColorControlFrame)
 
 NS_QUERYFRAME_HEAD(nsColorControlFrame)
   NS_QUERYFRAME_ENTRY(nsColorControlFrame)
   NS_QUERYFRAME_ENTRY(nsIAnonymousContentCreator)
-NS_QUERYFRAME_TAIL_INHERITING(nsColorControlFrameSuper)
+NS_QUERYFRAME_TAIL_INHERITING(nsHTMLButtonControlFrame)
 
 
 void nsColorControlFrame::DestroyFrom(nsIFrame* aDestructRoot)
 {
   nsFormControlFrame::RegUnRegAccessKey(static_cast<nsIFrame*>(this), false);
   nsContentUtils::DestroyAnonymousContent(&mColorContent);
-  nsColorControlFrameSuper::DestroyFrom(aDestructRoot);
+  nsHTMLButtonControlFrame::DestroyFrom(aDestructRoot);
 }
 
 nsIAtom*
 nsColorControlFrame::GetType() const
 {
   return nsGkAtoms::colorControlFrame;
 }
 
@@ -121,17 +121,17 @@ nsColorControlFrame::AttributeChanged(in
   // If the value attribute is set, update the color box, but only if we're
   // still a color control, which might not be the case if the type attribute
   // was removed/changed.
   nsCOMPtr<nsIFormControl> fctrl = do_QueryInterface(GetContent());
   if (fctrl->GetType() == NS_FORM_INPUT_COLOR &&
       aNameSpaceID == kNameSpaceID_None && nsGkAtoms::value == aAttribute) {
     UpdateColor();
   }
-  return nsColorControlFrameSuper::AttributeChanged(aNameSpaceID, aAttribute,
+  return nsHTMLButtonControlFrame::AttributeChanged(aNameSpaceID, aAttribute,
                                                     aModType);
 }
 
 nsContainerFrame*
 nsColorControlFrame::GetContentInsertionFrame()
 {
   return this;
 }
--- a/layout/forms/nsColorControlFrame.h
+++ b/layout/forms/nsColorControlFrame.h
@@ -9,21 +9,19 @@
 #include "nsCOMPtr.h"
 #include "nsHTMLButtonControlFrame.h"
 #include "nsIAnonymousContentCreator.h"
 
 namespace mozilla {
 enum class CSSPseudoElementType : uint8_t;
 } // namespace mozilla
 
-typedef nsHTMLButtonControlFrame nsColorControlFrameSuper;
-
 // Class which implements the input type=color
 
-class nsColorControlFrame final : public nsColorControlFrameSuper,
+class nsColorControlFrame final : public nsHTMLButtonControlFrame,
                                   public nsIAnonymousContentCreator
 {
   typedef mozilla::CSSPseudoElementType CSSPseudoElementType;
   typedef mozilla::dom::Element Element;
 
 public:
   friend nsIFrame* NS_NewColorControlFrame(nsIPresShell* aPresShell,
                                            nsStyleContext* aContext);