layout/generic/nsPageContentFrame.h

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     2 /* This Source Code Form is subject to the terms of the Mozilla Public
     3  * License, v. 2.0. If a copy of the MPL was not distributed with this
     4  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     5 #ifndef nsPageContentFrame_h___
     6 #define nsPageContentFrame_h___
     8 #include "mozilla/Attributes.h"
     9 #include "nsViewportFrame.h"
    10 class nsPageFrame;
    11 class nsSharedPageData;
    13 // Page frame class used by the simple page sequence frame
    14 class nsPageContentFrame : public ViewportFrame {
    16 public:
    17   NS_DECL_FRAMEARENA_HELPERS
    19   friend nsIFrame* NS_NewPageContentFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
    20   friend class nsPageFrame;
    22   // nsIFrame
    23   virtual nsresult  Reflow(nsPresContext*      aPresContext,
    24                            nsHTMLReflowMetrics& aDesiredSize,
    25                            const nsHTMLReflowState& aMaxSize,
    26                            nsReflowStatus&      aStatus) MOZ_OVERRIDE;
    28   virtual bool IsFrameOfType(uint32_t aFlags) const MOZ_OVERRIDE
    29   {
    30     return ViewportFrame::IsFrameOfType(aFlags &
    31              ~(nsIFrame::eCanContainOverflowContainers));
    32   }
    34   virtual void SetSharedPageData(nsSharedPageData* aPD) { mPD = aPD; }
    36   virtual bool HasTransformGetter() const MOZ_OVERRIDE { return true; }
    38   /**
    39    * Get the "type" of the frame
    40    *
    41    * @see nsGkAtoms::pageContentFrame
    42    */
    43   virtual nsIAtom* GetType() const MOZ_OVERRIDE;
    45 #ifdef DEBUG_FRAME_DUMP
    46   // Debugging
    47   virtual nsresult  GetFrameName(nsAString& aResult) const MOZ_OVERRIDE;
    48 #endif
    50 protected:
    51   nsPageContentFrame(nsStyleContext* aContext) : ViewportFrame(aContext) {}
    53   nsSharedPageData*         mPD;
    54 };
    56 #endif /* nsPageContentFrame_h___ */

mercurial