author L. David Baron <>
Sat, 13 Sep 2014 06:17:36 -0700
changeset 228423 c81eb3a1336b2ab5f4e83b8b5df394dfea8be37e
parent 224484 9d4e083655b993f73ba3eca84e0f14cdd270bcda
child 257987 a20c7910a82fa2df2f3398c1108d102bac9128b0
permissions -rw-r--r--
Bug 977991 patch 1 - Expose variant of RulesMatching on nsHTMLCSSStyleSheet that is less work to call. r=birtles This allows nsStyleSet::RuleNodeWithReplacement to call it without constructing an entire (and unnecessary) ElementRuleProcessorData, which will happen in patch 3.

/* -*- 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 */
#ifndef nsPageContentFrame_h___
#define nsPageContentFrame_h___

#include "mozilla/Attributes.h"
#include "nsViewportFrame.h"
class nsPageFrame;
class nsSharedPageData;

// Page frame class used by the simple page sequence frame
class nsPageContentFrame : public ViewportFrame {


  friend nsPageContentFrame* NS_NewPageContentFrame(nsIPresShell* aPresShell,
                                                    nsStyleContext* aContext);
  friend class nsPageFrame;

  // nsIFrame
  virtual void Reflow(nsPresContext*      aPresContext,
                      nsHTMLReflowMetrics& aDesiredSize,
                      const nsHTMLReflowState& aMaxSize,
                      nsReflowStatus&      aStatus) MOZ_OVERRIDE;

  virtual bool IsFrameOfType(uint32_t aFlags) const MOZ_OVERRIDE
    return ViewportFrame::IsFrameOfType(aFlags &

  virtual void SetSharedPageData(nsSharedPageData* aPD) { mPD = aPD; }

  virtual bool HasTransformGetter() const MOZ_OVERRIDE { return true; }

   * Get the "type" of the frame
   * @see nsGkAtoms::pageContentFrame
  virtual nsIAtom* GetType() const MOZ_OVERRIDE;
  // Debugging
  virtual nsresult  GetFrameName(nsAString& aResult) const MOZ_OVERRIDE;

  explicit nsPageContentFrame(nsStyleContext* aContext) : ViewportFrame(aContext) {}

  nsSharedPageData*         mPD;

#endif /* nsPageContentFrame_h___ */