LCOV - code coverage report
Current view: top level - dom/svg - SVGFEDistantLightElement.cpp (source / functions) Hit Total Coverage
Test: output.info Lines: 0 21 0.0 %
Date: 2017-07-14 16:53:18 Functions: 0 8 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
       2             : /* vim: set ts=8 sts=2 et sw=2 tw=80: */
       3             : /* This Source Code Form is subject to the terms of the Mozilla Public
       4             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       5             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
       6             : 
       7             : #include "mozilla/dom/SVGFEDistantLightElement.h"
       8             : #include "mozilla/dom/SVGFEDistantLightElementBinding.h"
       9             : #include "nsSVGFilterInstance.h"
      10             : 
      11           0 : NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(FEDistantLight)
      12             : 
      13             : using namespace mozilla::gfx;
      14             : 
      15             : namespace mozilla {
      16             : namespace dom {
      17             : 
      18             : JSObject*
      19           0 : SVGFEDistantLightElement::WrapNode(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
      20             : {
      21           0 :   return SVGFEDistantLightElementBinding::Wrap(aCx, this, aGivenProto);
      22             : }
      23             : 
      24             : nsSVGElement::NumberInfo SVGFEDistantLightElement::sNumberInfo[2] =
      25             : {
      26             :   { &nsGkAtoms::azimuth,   0, false },
      27             :   { &nsGkAtoms::elevation, 0, false }
      28             : };
      29             : 
      30             : //----------------------------------------------------------------------
      31             : //----------------------------------------------------------------------
      32             : // nsIDOMNode methods
      33             : 
      34           0 : NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGFEDistantLightElement)
      35             : 
      36             : // nsFEUnstyledElement methods
      37             : 
      38             : bool
      39           0 : SVGFEDistantLightElement::AttributeAffectsRendering(int32_t aNameSpaceID,
      40             :                                                     nsIAtom* aAttribute) const
      41             : {
      42           0 :   return aNameSpaceID == kNameSpaceID_None &&
      43           0 :          (aAttribute == nsGkAtoms::azimuth ||
      44           0 :           aAttribute == nsGkAtoms::elevation);
      45             : }
      46             : 
      47             : AttributeMap
      48           0 : SVGFEDistantLightElement::ComputeLightAttributes(nsSVGFilterInstance* aInstance)
      49             : {
      50             :   float azimuth, elevation;
      51           0 :   GetAnimatedNumberValues(&azimuth, &elevation, nullptr);
      52             : 
      53           0 :   AttributeMap map;
      54           0 :   map.Set(eLightType, (uint32_t)eLightTypeDistant);
      55           0 :   map.Set(eDistantLightAzimuth, azimuth);
      56           0 :   map.Set(eDistantLightElevation, elevation);
      57           0 :   return map;
      58             : }
      59             : 
      60             : already_AddRefed<SVGAnimatedNumber>
      61           0 : SVGFEDistantLightElement::Azimuth()
      62             : {
      63           0 :   return mNumberAttributes[AZIMUTH].ToDOMAnimatedNumber(this);
      64             : }
      65             : 
      66             : already_AddRefed<SVGAnimatedNumber>
      67           0 : SVGFEDistantLightElement::Elevation()
      68             : {
      69           0 :   return mNumberAttributes[ELEVATION].ToDOMAnimatedNumber(this);
      70             : }
      71             : 
      72             : //----------------------------------------------------------------------
      73             : // nsSVGElement methods
      74             : 
      75             : nsSVGElement::NumberAttributesInfo
      76           0 : SVGFEDistantLightElement::GetNumberInfo()
      77             : {
      78             :   return NumberAttributesInfo(mNumberAttributes, sNumberInfo,
      79           0 :                               ArrayLength(sNumberInfo));
      80             : }
      81             : 
      82             : } // namespace dom
      83             : } // namespace mozilla

Generated by: LCOV version 1.13