layout/forms/nsColorControlFrame.h

Wed, 31 Dec 2014 13:27:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 13:27:57 +0100
branch
TOR_BUG_3246
changeset 6
8bccb770b82d
permissions
-rw-r--r--

Ignore runtime configuration files generated during quality assurance.

     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 nsColorControlFrame_h___
     7 #define nsColorControlFrame_h___
     9 #include "nsCOMPtr.h"
    10 #include "nsHTMLButtonControlFrame.h"
    11 #include "nsIAnonymousContentCreator.h"
    13 typedef nsHTMLButtonControlFrame nsColorControlFrameSuper;
    15 // Class which implements the input type=color
    17 class nsColorControlFrame MOZ_FINAL : public nsColorControlFrameSuper,
    18                                       public nsIAnonymousContentCreator
    19 {
    20   typedef mozilla::dom::Element Element;
    22 public:
    23   friend nsIFrame* NS_NewColorControlFrame(nsIPresShell* aPresShell,
    24                                            nsStyleContext* aContext);
    26   virtual void DestroyFrom(nsIFrame* aDestructRoot) MOZ_OVERRIDE;
    28   NS_DECL_QUERYFRAME_TARGET(nsColorControlFrame)
    29   NS_DECL_QUERYFRAME
    30   NS_DECL_FRAMEARENA_HELPERS
    32   virtual nsIAtom* GetType() const MOZ_OVERRIDE;
    34 #ifdef DEBUG_FRAME_DUMP
    35   virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE;
    36 #endif
    38   // nsIAnonymousContentCreator
    39   virtual nsresult CreateAnonymousContent(nsTArray<ContentInfo>& aElements) MOZ_OVERRIDE;
    40   virtual void AppendAnonymousContentTo(nsBaseContentList& aElements,
    41                                         uint32_t aFilter) MOZ_OVERRIDE;
    43   // nsIFrame
    44   virtual nsresult AttributeChanged(int32_t  aNameSpaceID,
    45                                     nsIAtom* aAttribute,
    46                                     int32_t  aModType) MOZ_OVERRIDE;
    47   virtual bool IsLeaf() const MOZ_OVERRIDE { return true; }
    48   virtual nsIFrame* GetContentInsertionFrame() MOZ_OVERRIDE;
    50   virtual Element* GetPseudoElement(nsCSSPseudoElements::Type aType) MOZ_OVERRIDE;
    52   // Refresh the color swatch, using associated input's value
    53   nsresult UpdateColor();
    55 private:
    56   nsColorControlFrame(nsStyleContext* aContext);
    58   nsCOMPtr<Element> mColorContent;
    59 };
    62 #endif // nsColorControlFrame_h___

mercurial