layout/mathml/nsMathMLmactionFrame.h

Thu, 15 Jan 2015 21:03:48 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:03:48 +0100
branch
TOR_BUG_9701
changeset 11
deefc01c0e14
permissions
-rw-r--r--

Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)

     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/. */
     6 #ifndef nsMathMLmactionFrame_h___
     7 #define nsMathMLmactionFrame_h___
     9 #include "nsCOMPtr.h"
    10 #include "nsMathMLSelectedFrame.h"
    11 #include "nsIDOMEventListener.h"
    12 #include "mozilla/Attributes.h"
    14 //
    15 // <maction> -- bind actions to a subexpression
    16 //
    18 class nsMathMLmactionFrame : public nsMathMLSelectedFrame {
    19 public:
    20   NS_DECL_FRAMEARENA_HELPERS
    22   friend nsIFrame* NS_NewMathMLmactionFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
    24   virtual void
    25   Init(nsIContent*      aContent,
    26        nsIFrame*        aParent,
    27        nsIFrame*        aPrevInFlow) MOZ_OVERRIDE;
    29   virtual nsresult
    30   SetInitialChildList(ChildListID     aListID,
    31                       nsFrameList&    aChildList) MOZ_OVERRIDE;
    33   virtual nsresult
    34   ChildListChanged(int32_t aModType) MOZ_OVERRIDE;
    36   virtual nsresult
    37   AttributeChanged(int32_t  aNameSpaceID,
    38                    nsIAtom* aAttribute,
    39                    int32_t  aModType) MOZ_OVERRIDE;
    41 private:
    42   void MouseClick();
    43   void MouseOver();
    44   void MouseOut();
    46   class MouseListener MOZ_FINAL : public nsIDOMEventListener
    47   {
    48     NS_DECL_ISUPPORTS
    49     NS_DECL_NSIDOMEVENTLISTENER
    51     MouseListener(nsMathMLmactionFrame* aOwner) : mOwner(aOwner) { }
    53     nsMathMLmactionFrame* mOwner;
    54   };
    56 protected:
    57   nsMathMLmactionFrame(nsStyleContext* aContext) :
    58     nsMathMLSelectedFrame(aContext) {}
    59   virtual ~nsMathMLmactionFrame();
    61 private:
    62   int32_t         mActionType;
    63   int32_t         mChildCount;
    64   int32_t         mSelection;
    65   nsRefPtr<MouseListener> mListener;
    67   // helper to return the frame for the attribute selection="number"
    68   nsIFrame* 
    69   GetSelectedFrame() MOZ_OVERRIDE;
    70 };
    72 #endif /* nsMathMLmactionFrame_h___ */

mercurial