LCOV - code coverage report
Current view: directory - layout/xul/base/src - nsLeafBoxFrame.h (source / functions) Found Hit Coverage
Test: app.info Lines: 4 0 0.0 %
Date: 2012-06-02 Functions: 4 0 0.0 %

       1                 : /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
       2                 : /* ***** BEGIN LICENSE BLOCK *****
       3                 :  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
       4                 :  *
       5                 :  * The contents of this file are subject to the Mozilla Public License Version
       6                 :  * 1.1 (the "License"); you may not use this file except in compliance with
       7                 :  * the License. You may obtain a copy of the License at
       8                 :  * http://www.mozilla.org/MPL/
       9                 :  *
      10                 :  * Software distributed under the License is distributed on an "AS IS" basis,
      11                 :  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
      12                 :  * for the specific language governing rights and limitations under the
      13                 :  * License.
      14                 :  *
      15                 :  * The Original Code is Mozilla Communicator client code.
      16                 :  *
      17                 :  * The Initial Developer of the Original Code is
      18                 :  * Netscape Communications Corporation.
      19                 :  * Portions created by the Initial Developer are Copyright (C) 1998
      20                 :  * the Initial Developer. All Rights Reserved.
      21                 :  *
      22                 :  * Contributor(s):
      23                 :  *
      24                 :  * Alternatively, the contents of this file may be used under the terms of
      25                 :  * either of the GNU General Public License Version 2 or later (the "GPL"),
      26                 :  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
      27                 :  * in which case the provisions of the GPL or the LGPL are applicable instead
      28                 :  * of those above. If you wish to allow use of your version of this file only
      29                 :  * under the terms of either the GPL or the LGPL, and not to allow others to
      30                 :  * use your version of this file under the terms of the MPL, indicate your
      31                 :  * decision by deleting the provisions above and replace them with the notice
      32                 :  * and other provisions required by the GPL or the LGPL. If you do not delete
      33                 :  * the provisions above, a recipient may use your version of this file under
      34                 :  * the terms of any one of the MPL, the GPL or the LGPL.
      35                 :  *
      36                 :  * ***** END LICENSE BLOCK ***** */
      37                 : #ifndef nsLeafBoxFrame_h___
      38                 : #define nsLeafBoxFrame_h___
      39                 : 
      40                 : #include "nsLeafFrame.h"
      41                 : #include "nsBox.h"
      42                 : 
      43                 : class nsAccessKeyInfo;
      44                 : 
      45                 : class nsLeafBoxFrame : public nsLeafFrame
      46               0 : {
      47                 : public:
      48                 :   NS_DECL_FRAMEARENA_HELPERS
      49                 : 
      50                 :   friend nsIFrame* NS_NewLeafBoxFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
      51                 : 
      52                 :   virtual nsSize GetPrefSize(nsBoxLayoutState& aState);
      53                 :   virtual nsSize GetMinSize(nsBoxLayoutState& aState);
      54                 :   virtual nsSize GetMaxSize(nsBoxLayoutState& aState);
      55                 :   virtual nscoord GetFlex(nsBoxLayoutState& aState);
      56                 :   virtual nscoord GetBoxAscent(nsBoxLayoutState& aState);
      57                 : 
      58                 :   virtual nsIAtom* GetType() const;
      59               0 :   virtual bool IsFrameOfType(PRUint32 aFlags) const
      60                 :   {
      61                 :     // This is bogus, but it's what we've always done.
      62                 :     // Note that nsLeafFrame is also eReplacedContainsBlock.
      63                 :     return nsLeafFrame::IsFrameOfType(aFlags &
      64               0 :       ~(nsIFrame::eReplaced | nsIFrame::eReplacedContainsBlock | nsIFrame::eXULBox));
      65                 :   }
      66                 : 
      67                 : #ifdef DEBUG
      68                 :   NS_IMETHOD GetFrameName(nsAString& aResult) const;
      69                 : #endif
      70                 : 
      71                 :   // nsIHTMLReflow overrides
      72                 : 
      73                 :   virtual void MarkIntrinsicWidthsDirty();
      74                 :   virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext);
      75                 :   virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext);
      76                 : 
      77                 :   // Our auto size is that provided by nsFrame, not nsLeafFrame
      78                 :   virtual nsSize ComputeAutoSize(nsRenderingContext *aRenderingContext,
      79                 :                                  nsSize aCBSize, nscoord aAvailableWidth,
      80                 :                                  nsSize aMargin, nsSize aBorder,
      81                 :                                  nsSize aPadding, bool aShrinkWrap);
      82                 : 
      83                 :   NS_IMETHOD Reflow(nsPresContext*          aPresContext,
      84                 :                     nsHTMLReflowMetrics&     aDesiredSize,
      85                 :                     const nsHTMLReflowState& aReflowState,
      86                 :                     nsReflowStatus&          aStatus);
      87                 : 
      88                 :   NS_IMETHOD CharacterDataChanged(CharacterDataChangeInfo* aInfo);
      89                 : 
      90                 :   NS_IMETHOD  Init(
      91                 :                nsIContent*      aContent,
      92                 :                nsIFrame*        aParent,
      93                 :                nsIFrame*        asPrevInFlow);
      94                 : 
      95                 :   NS_IMETHOD BuildDisplayList(nsDisplayListBuilder*   aBuilder,
      96                 :                               const nsRect&           aDirtyRect,
      97                 :                               const nsDisplayListSet& aLists);
      98                 : 
      99                 :   NS_IMETHOD AttributeChanged(PRInt32 aNameSpaceID,
     100                 :                               nsIAtom* aAttribute,
     101                 :                               PRInt32 aModType);
     102                 : 
     103               0 :   virtual bool ComputesOwnOverflowArea() { return false; }
     104                 : 
     105                 : protected:
     106                 : 
     107                 :   NS_IMETHOD DoLayout(nsBoxLayoutState& aState);
     108                 : 
     109                 : #ifdef DEBUG_LAYOUT
     110                 :   virtual void GetBoxName(nsAutoString& aName);
     111                 : #endif
     112                 : 
     113                 :   virtual nscoord GetIntrinsicWidth();
     114                 : 
     115                 :  nsLeafBoxFrame(nsIPresShell* aShell, nsStyleContext* aContext);
     116                 : 
     117                 : private:
     118                 : 
     119                 :  void UpdateMouseThrough();
     120                 : 
     121                 : 
     122                 : }; // class nsLeafBoxFrame
     123                 : 
     124                 : #endif /* nsLeafBoxFrame_h___ */

Generated by: LCOV version 1.7