LCOV - code coverage report
Current view: directory - layout/mathml - nsMathMLForeignFrameWrapper.h (source / functions) Found Hit Coverage
Test: app.info Lines: 16 0 0.0 %
Date: 2012-06-02 Functions: 8 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 MathML Project.
      16                 :  *
      17                 :  * The Initial Developer of the Original Code is
      18                 :  * The University Of Queensland.
      19                 :  * Portions created by the Initial Developer are Copyright (C) 1999
      20                 :  * the Initial Developer. All Rights Reserved.
      21                 :  *
      22                 :  * Contributor(s):
      23                 :  *   Roger B. Sidje <rbs@maths.uq.edu.au>
      24                 :  *
      25                 :  * Alternatively, the contents of this file may be used under the terms of
      26                 :  * either of the GNU General Public License Version 2 or later (the "GPL"),
      27                 :  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
      28                 :  * in which case the provisions of the GPL or the LGPL are applicable instead
      29                 :  * of those above. If you wish to allow use of your version of this file only
      30                 :  * under the terms of either the GPL or the LGPL, and not to allow others to
      31                 :  * use your version of this file under the terms of the MPL, indicate your
      32                 :  * decision by deleting the provisions above and replace them with the notice
      33                 :  * and other provisions required by the GPL or the LGPL. If you do not delete
      34                 :  * the provisions above, a recipient may use your version of this file under
      35                 :  * the terms of any one of the MPL, the GPL or the LGPL.
      36                 :  *
      37                 :  * ***** END LICENSE BLOCK ***** */
      38                 : 
      39                 : //
      40                 : // a helper frame class to wrap non-MathML frames so that foreign elements 
      41                 : // (e.g., html:img) can mix better with other surrounding MathML markups
      42                 : //
      43                 : 
      44                 : #ifndef nsMathMLForeignFrameWrapper_h___
      45                 : #define nsMathMLForeignFrameWrapper_h___
      46                 : 
      47                 : #include "nsCOMPtr.h"
      48                 : #include "nsMathMLContainerFrame.h"
      49                 : 
      50                 : class nsMathMLForeignFrameWrapper : public nsBlockFrame,
      51                 :                                     public nsMathMLFrame {
      52                 : public:
      53                 :   friend nsIFrame* NS_NewMathMLForeignFrameWrapper(nsIPresShell* aPresShell, nsStyleContext* aContext);
      54                 : 
      55                 :   NS_DECL_QUERYFRAME
      56                 :   NS_DECL_FRAMEARENA_HELPERS
      57                 : 
      58                 :   // Overloaded nsIMathMLFrame methods
      59                 : 
      60                 :   NS_IMETHOD
      61               0 :   UpdatePresentationDataFromChildAt(PRInt32         aFirstIndex,
      62                 :                                     PRInt32         aLastIndex,
      63                 :                                     PRUint32        aFlagsValues,
      64                 :                                     PRUint32        aFlagsToUpdate)
      65                 :   {
      66                 :     nsMathMLContainerFrame::PropagatePresentationDataFromChildAt(this,
      67               0 :       aFirstIndex, aLastIndex, aFlagsValues, aFlagsToUpdate);
      68               0 :     return NS_OK;
      69                 :   }
      70                 : 
      71                 :   // overloaded nsBlockFrame methods
      72                 : 
      73                 : #ifdef NS_DEBUG
      74                 :   NS_IMETHOD
      75               0 :   SetInitialChildList(ChildListID     aListID,
      76                 :                       nsFrameList&    aChildList)
      77                 :   {
      78               0 :     NS_ASSERTION(aChildList.NotEmpty() && aChildList.GetLength() == 1,
      79                 :                  "there must be one and only one child frame");
      80               0 :     return nsBlockFrame::SetInitialChildList(aListID, aChildList);
      81                 :   }
      82                 : #endif
      83                 : 
      84                 :   NS_IMETHOD
      85                 :   Reflow(nsPresContext*          aPresContext,
      86                 :          nsHTMLReflowMetrics&     aDesiredSize,
      87                 :          const nsHTMLReflowState& aReflowState,
      88                 :          nsReflowStatus&          aStatus);
      89                 : 
      90                 :   // we are just a wrapper and these methods shouldn't be called
      91                 :   NS_IMETHOD
      92               0 :   AppendFrames(ChildListID     aListID,
      93                 :                nsFrameList&    aFrameList)
      94                 :   {
      95               0 :     NS_NOTREACHED("unsupported operation");
      96               0 :     return NS_ERROR_NOT_IMPLEMENTED;
      97                 :   }
      98                 : 
      99                 :   NS_IMETHOD
     100               0 :   InsertFrames(ChildListID     aListID,
     101                 :                nsIFrame*       aPrevFrame,
     102                 :                nsFrameList&    aFrameList)
     103                 :   {
     104               0 :     NS_NOTREACHED("unsupported operation");
     105               0 :     return NS_ERROR_NOT_IMPLEMENTED;
     106                 :   }
     107                 : 
     108                 :   // Our life is bound to the life of our unique child.
     109                 :   // When our child goes away, we ask our parent to delete us
     110                 :   NS_IMETHOD
     111               0 :   RemoveFrame(ChildListID     aListID,
     112                 :               nsIFrame*       aOldFrame)
     113                 :   {
     114               0 :     return mParent->RemoveFrame(aListID, this);
     115                 :   }
     116                 : 
     117                 : protected:
     118               0 :   nsMathMLForeignFrameWrapper(nsStyleContext* aContext) : nsBlockFrame(aContext) {}
     119               0 :   virtual ~nsMathMLForeignFrameWrapper() {}
     120                 : };
     121                 : 
     122                 : #endif /* nsMathMLForeignFrameWrapper_h___ */

Generated by: LCOV version 1.7