LCOV - code coverage report
Current view: top level - obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom - DOMRectBinding.h (source / functions) Hit Total Coverage
Test: output.info Lines: 3 9 33.3 %
Date: 2017-07-14 16:53:18 Functions: 1 3 33.3 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* THIS FILE IS AUTOGENERATED FROM DOMRect.webidl BY Codegen.py - DO NOT EDIT */
       2             : 
       3             : #ifndef mozilla_dom_DOMRectBinding_h
       4             : #define mozilla_dom_DOMRectBinding_h
       5             : 
       6             : #include "js/RootingAPI.h"
       7             : #include "jspubtd.h"
       8             : #include "mozilla/ErrorResult.h"
       9             : #include "mozilla/dom/BindingDeclarations.h"
      10             : #include "mozilla/dom/Nullable.h"
      11             : 
      12             : namespace mozilla {
      13             : namespace dom {
      14             : 
      15             : class DOMRect;
      16             : struct DOMRectAtoms;
      17             : struct DOMRectInitAtoms;
      18             : class DOMRectReadOnly;
      19             : struct DOMRectReadOnlyAtoms;
      20             : struct NativePropertyHooks;
      21             : class ProtoAndIfaceCache;
      22             : 
      23             : } // namespace dom
      24             : } // namespace mozilla
      25             : 
      26             : namespace mozilla {
      27             : namespace dom {
      28             : 
      29             : struct DOMRectInit : public DictionaryBase
      30             : {
      31             :   MOZ_INIT_OUTSIDE_CTOR double mHeight;
      32             :   MOZ_INIT_OUTSIDE_CTOR double mWidth;
      33             :   MOZ_INIT_OUTSIDE_CTOR double mX;
      34             :   MOZ_INIT_OUTSIDE_CTOR double mY;
      35             : 
      36             :   DOMRectInit();
      37             : 
      38           0 :   explicit inline DOMRectInit(const FastDictionaryInitializer& )
      39           0 :   {
      40             :     // Do nothing here; this is used by our "Fast" subclass
      41           0 :   }
      42             : 
      43             :   explicit inline DOMRectInit(const DOMRectInit& aOther)
      44             :   {
      45             :     *this = aOther;
      46             :   }
      47             : 
      48             :   bool
      49             :   Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
      50             : 
      51             :   bool
      52             :   ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
      53             : 
      54             :   void
      55             :   TraceDictionary(JSTracer* trc);
      56             : 
      57             :   DOMRectInit&
      58             :   operator=(const DOMRectInit& aOther);
      59             : 
      60             : private:
      61             :   static bool
      62             :   InitIds(JSContext* cx, DOMRectInitAtoms* atomsCache);
      63             : };
      64             : 
      65             : namespace binding_detail {
      66             : struct FastDOMRectInit : public DOMRectInit
      67             : {
      68             :   inline FastDOMRectInit()
      69             :     : DOMRectInit(FastDictionaryInitializer())
      70             :   {
      71             :     // Doesn't matter what int we pass to the parent constructor
      72             :   }
      73             : };
      74             : } // namespace binding_detail
      75             : 
      76             : 
      77             : namespace DOMRectBinding {
      78             : 
      79             :   typedef mozilla::dom::DOMRect NativeType;
      80             : 
      81             :   JSObject*
      82             :   DefineDOMInterface(JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::Handle<jsid> id, bool aDefineOnGlobal);
      83             : 
      84             :   const JSClass*
      85             :   GetJSClass();
      86             : 
      87             :   bool
      88             :   Wrap(JSContext* aCx, mozilla::dom::DOMRect* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
      89             : 
      90             :   template <class T>
      91           7 :   inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
      92             :   {
      93          14 :     JS::Rooted<JSObject*> reflector(aCx);
      94          14 :     return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
      95             :   }
      96             : 
      97             :   // We declare this as an array so that retrieving a pointer to this
      98             :   // binding's property hooks only requires compile/link-time resolvable
      99             :   // address arithmetic.  Declaring it as a pointer instead would require
     100             :   // doing a run-time load to fetch a pointer to this binding's property
     101             :   // hooks.  And then structures which embedded a pointer to this structure
     102             :   // would require a run-time load for proper initialization, which would
     103             :   // then induce static constructors.  Lots of static constructors.
     104             :   extern const NativePropertyHooks sNativePropertyHooks[];
     105             : 
     106             :   void
     107             :   CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
     108             : 
     109             :   JS::Handle<JSObject*>
     110             :   GetProtoObjectHandle(JSContext* aCx);
     111             : 
     112             :   JS::Handle<JSObject*>
     113             :   GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true);
     114             : 
     115             :   JSObject*
     116             :   GetConstructorObject(JSContext* aCx);
     117             : 
     118             : } // namespace DOMRectBinding
     119             : 
     120             : 
     121             : 
     122             : namespace DOMRectReadOnlyBinding {
     123             : 
     124             :   typedef mozilla::dom::DOMRectReadOnly NativeType;
     125             : 
     126             :   JSObject*
     127             :   DefineDOMInterface(JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::Handle<jsid> id, bool aDefineOnGlobal);
     128             : 
     129             :   const JSClass*
     130             :   GetJSClass();
     131             : 
     132             :   bool
     133             :   Wrap(JSContext* aCx, mozilla::dom::DOMRectReadOnly* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
     134             : 
     135             :   template <class T>
     136           0 :   inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
     137             :   {
     138           0 :     JS::Rooted<JSObject*> reflector(aCx);
     139           0 :     return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
     140             :   }
     141             : 
     142             :   // We declare this as an array so that retrieving a pointer to this
     143             :   // binding's property hooks only requires compile/link-time resolvable
     144             :   // address arithmetic.  Declaring it as a pointer instead would require
     145             :   // doing a run-time load to fetch a pointer to this binding's property
     146             :   // hooks.  And then structures which embedded a pointer to this structure
     147             :   // would require a run-time load for proper initialization, which would
     148             :   // then induce static constructors.  Lots of static constructors.
     149             :   extern const NativePropertyHooks sNativePropertyHooks[];
     150             : 
     151             :   void
     152             :   CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
     153             : 
     154             :   JS::Handle<JSObject*>
     155             :   GetProtoObjectHandle(JSContext* aCx);
     156             : 
     157             :   JSObject*
     158             :   GetProtoObject(JSContext* aCx);
     159             : 
     160             :   JS::Handle<JSObject*>
     161             :   GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true);
     162             : 
     163             :   JSObject*
     164             :   GetConstructorObject(JSContext* aCx);
     165             : 
     166             : } // namespace DOMRectReadOnlyBinding
     167             : 
     168             : 
     169             : 
     170             : } // namespace dom
     171             : } // namespace mozilla
     172             : 
     173             : #endif // mozilla_dom_DOMRectBinding_h

Generated by: LCOV version 1.13