Bug 1264837 Part 14 - Remove nsSubDocumentFrameSuper. draft
authorTing-Yu Lin <tlin@mozilla.com>
Mon, 18 Apr 2016 14:17:58 +0800
changeset 352554 be9f0d42181259dc11f3cc0b5c3608dc3ef15a65
parent 352553 1dbf6adc1f7ea1d1415047aaacc3037474c2fc49
child 352555 1365d6f7d7612fedc1c9ae048d16796ac743f5aa
push id15714
push userbmo:tlin@mozilla.com
push dateMon, 18 Apr 2016 09:14:01 +0000
bugs1264837
milestone48.0a1
Bug 1264837 Part 14 - Remove nsSubDocumentFrameSuper. MozReview-Commit-ID: 21VMNckVco7
layout/generic/nsSubDocumentFrame.cpp
layout/generic/nsSubDocumentFrame.h
--- a/layout/generic/nsSubDocumentFrame.cpp
+++ b/layout/generic/nsSubDocumentFrame.cpp
@@ -51,17 +51,17 @@ GetDocumentFromView(nsView* aView)
   NS_PRECONDITION(aView, "");
 
   nsViewManager* vm = aView->GetViewManager();
   nsIPresShell* ps =  vm ? vm->GetPresShell() : nullptr;
   return ps ? ps->GetDocument() : nullptr;
 }
 
 nsSubDocumentFrame::nsSubDocumentFrame(nsStyleContext* aContext)
-  : nsSubDocumentFrameSuper(aContext)
+  : nsAtomicContainerFrame(aContext)
   , mIsInline(false)
   , mPostedReflowCallback(false)
   , mDidCreateDoc(false)
   , mCallingShow(false)
 {
 }
 
 #ifdef ACCESSIBILITY
@@ -69,17 +69,17 @@ a11y::AccType
 nsSubDocumentFrame::AccessibleType()
 {
   return a11y::eOuterDocType;
 }
 #endif
 
 NS_QUERYFRAME_HEAD(nsSubDocumentFrame)
   NS_QUERYFRAME_ENTRY(nsSubDocumentFrame)
-NS_QUERYFRAME_TAIL_INHERITING(nsSubDocumentFrameSuper)
+NS_QUERYFRAME_TAIL_INHERITING(nsAtomicContainerFrame)
 
 class AsyncFrameInit : public nsRunnable
 {
 public:
   explicit AsyncFrameInit(nsIFrame* aFrame) : mFrame(aFrame) {}
   NS_IMETHOD Run()
   {
     PROFILER_LABEL("mozilla", "AsyncFrameInit::Run", js::ProfileEntry::Category::OTHER);
@@ -102,17 +102,17 @@ void
 nsSubDocumentFrame::Init(nsIContent*       aContent,
                          nsContainerFrame* aParent,
                          nsIFrame*         aPrevInFlow)
 {
   // determine if we are a <frame> or <iframe>
   nsCOMPtr<nsIDOMHTMLFrameElement> frameElem = do_QueryInterface(aContent);
   mIsInline = frameElem ? false : true;
 
-  nsSubDocumentFrameSuper::Init(aContent, aParent, aPrevInFlow);
+  nsAtomicContainerFrame::Init(aContent, aParent, aPrevInFlow);
 
   // We are going to create an inner view.  If we need a view for the
   // OuterFrame but we wait for the normal view creation path in
   // nsCSSFrameConstructor, then we will lose because the inner view's
   // parent will already have been set to some outer view (e.g., the
   // canvas) when it really needs to have this frame's view as its
   // parent. So, create this frame's view right away, whether we
   // really need it or not, and the inner view will get it as the
@@ -684,27 +684,27 @@ nsSubDocumentFrame::GetPrefISize(nsRende
 
 /* virtual */ IntrinsicSize
 nsSubDocumentFrame::GetIntrinsicSize()
 {
   nsIFrame* subDocRoot = ObtainIntrinsicSizeFrame();
   if (subDocRoot) {
     return subDocRoot->GetIntrinsicSize();
   }
-  return nsSubDocumentFrameSuper::GetIntrinsicSize();
+  return nsAtomicContainerFrame::GetIntrinsicSize();
 }
 
 /* virtual */ nsSize
 nsSubDocumentFrame::GetIntrinsicRatio()
 {
   nsIFrame* subDocRoot = ObtainIntrinsicSizeFrame();
   if (subDocRoot) {
     return subDocRoot->GetIntrinsicRatio();
   }
-  return nsSubDocumentFrameSuper::GetIntrinsicRatio();
+  return nsAtomicContainerFrame::GetIntrinsicRatio();
 }
 
 /* virtual */
 LogicalSize
 nsSubDocumentFrame::ComputeAutoSize(nsRenderingContext *aRenderingContext,
                                     WritingMode aWM,
                                     const LogicalSize& aCBSize,
                                     nscoord aAvailableISize,
@@ -742,20 +742,20 @@ nsSubDocumentFrame::ComputeSize(nsRender
                             aRenderingContext, this,
                             subDocRoot->GetIntrinsicSize(),
                             subDocRoot->GetIntrinsicRatio(),
                             aCBSize,
                             aMargin,
                             aBorder,
                             aPadding);
   }
-  return nsSubDocumentFrameSuper::ComputeSize(aRenderingContext, aWM,
-                                              aCBSize, aAvailableISize,
-                                              aMargin, aBorder, aPadding,
-                                              aFlags);
+  return nsAtomicContainerFrame::ComputeSize(aRenderingContext, aWM,
+                                             aCBSize, aAvailableISize,
+                                             aMargin, aBorder, aPadding,
+                                             aFlags);
 }
 
 void
 nsSubDocumentFrame::Reflow(nsPresContext*           aPresContext,
                            nsHTMLReflowMetrics&     aDesiredSize,
                            const nsHTMLReflowState& aReflowState,
                            nsReflowStatus&          aStatus)
 {
@@ -990,17 +990,17 @@ nsSubDocumentFrame::DestroyFrom(nsIFrame
     // safely determine whether the frame is being reframed or destroyed.
     nsContentUtils::AddScriptRunner(
       new nsHideViewer(mContent,
                        frameloader,
                        PresContext()->PresShell(),
                        (mDidCreateDoc || mCallingShow)));
   }
 
-  nsSubDocumentFrameSuper::DestroyFrom(aDestructRoot);
+  nsAtomicContainerFrame::DestroyFrom(aDestructRoot);
 }
 
 CSSIntSize
 nsSubDocumentFrame::GetMarginAttributes()
 {
   CSSIntSize result(-1, -1);
   nsGenericHTMLElement *content = nsGenericHTMLElement::FromContent(mContent);
   if (content) {
--- a/layout/generic/nsSubDocumentFrame.h
+++ b/layout/generic/nsSubDocumentFrame.h
@@ -7,22 +7,20 @@
 #define NSSUBDOCUMENTFRAME_H_
 
 #include "mozilla/Attributes.h"
 #include "nsAtomicContainerFrame.h"
 #include "nsIReflowCallback.h"
 #include "nsFrameLoader.h"
 #include "Units.h"
 
-typedef nsAtomicContainerFrame nsSubDocumentFrameSuper;
-
 /******************************************************************************
  * nsSubDocumentFrame
  *****************************************************************************/
-class nsSubDocumentFrame : public nsSubDocumentFrameSuper,
+class nsSubDocumentFrame : public nsAtomicContainerFrame,
                            public nsIReflowCallback
 {
 public:
   NS_DECL_QUERYFRAME_TARGET(nsSubDocumentFrame)
   NS_DECL_FRAMEARENA_HELPERS
 
   explicit nsSubDocumentFrame(nsStyleContext* aContext);
 
@@ -32,17 +30,17 @@ public:
 #endif
 
   NS_DECL_QUERYFRAME
 
   virtual nsIAtom* GetType() const override;
 
   virtual bool IsFrameOfType(uint32_t aFlags) const override
   {
-    return nsSubDocumentFrameSuper::IsFrameOfType(aFlags &
+    return nsAtomicContainerFrame::IsFrameOfType(aFlags &
       ~(nsIFrame::eReplaced |
         nsIFrame::eReplacedSizing |
         nsIFrame::eReplacedContainsBlock));
   }
 
   virtual void Init(nsIContent*       aContent,
                     nsContainerFrame* aParent,
                     nsIFrame*         aPrevInFlow) override;