LCOV - code coverage report
Current view: top level - dom/svg - SVGFEPointLightElement.cpp (source / functions) Hit Total Coverage
Test: output.info Lines: 0 24 0.0 %
Date: 2017-07-14 16:53:18 Functions: 0 9 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/SVGFEPointLightElement.h"
       8             : #include "mozilla/dom/SVGFEPointLightElementBinding.h"
       9             : #include "nsSVGFilterInstance.h"
      10             : 
      11           0 : NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(FEPointLight)
      12             : 
      13             : using namespace mozilla::gfx;
      14             : 
      15             : namespace mozilla {
      16             : namespace dom {
      17             : 
      18             : JSObject*
      19           0 : SVGFEPointLightElement::WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto)
      20             : {
      21           0 :   return SVGFEPointLightElementBinding::Wrap(aCx, this, aGivenProto);
      22             : }
      23             : 
      24             : nsSVGElement::NumberInfo SVGFEPointLightElement::sNumberInfo[3] =
      25             : {
      26             :   { &nsGkAtoms::x, 0, false },
      27             :   { &nsGkAtoms::y, 0, false },
      28             :   { &nsGkAtoms::z, 0, false }
      29             : };
      30             : 
      31             : //----------------------------------------------------------------------
      32             : // nsIDOMNode methods
      33             : 
      34           0 : NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGFEPointLightElement)
      35             : 
      36             : //----------------------------------------------------------------------
      37             : // nsFEUnstyledElement methods
      38             : 
      39             : bool
      40           0 : SVGFEPointLightElement::AttributeAffectsRendering(int32_t aNameSpaceID,
      41             :                                                   nsIAtom* aAttribute) const
      42             : {
      43           0 :   return aNameSpaceID == kNameSpaceID_None &&
      44           0 :          (aAttribute == nsGkAtoms::x ||
      45           0 :           aAttribute == nsGkAtoms::y ||
      46           0 :           aAttribute == nsGkAtoms::z);
      47             : }
      48             : 
      49             : //----------------------------------------------------------------------
      50             : 
      51             : AttributeMap
      52           0 : SVGFEPointLightElement::ComputeLightAttributes(nsSVGFilterInstance* aInstance)
      53             : {
      54           0 :   Point3D lightPos;
      55           0 :   GetAnimatedNumberValues(&lightPos.x, &lightPos.y, &lightPos.z, nullptr);
      56             : 
      57           0 :   AttributeMap map;
      58           0 :   map.Set(eLightType, (uint32_t)eLightTypePoint);
      59           0 :   map.Set(ePointLightPosition, aInstance->ConvertLocation(lightPos));
      60           0 :   return map;
      61             : }
      62             : 
      63             : already_AddRefed<SVGAnimatedNumber>
      64           0 : SVGFEPointLightElement::X()
      65             : {
      66           0 :   return mNumberAttributes[ATTR_X].ToDOMAnimatedNumber(this);
      67             : }
      68             : 
      69             : already_AddRefed<SVGAnimatedNumber>
      70           0 : SVGFEPointLightElement::Y()
      71             : {
      72           0 :   return mNumberAttributes[ATTR_Y].ToDOMAnimatedNumber(this);
      73             : }
      74             : 
      75             : already_AddRefed<SVGAnimatedNumber>
      76           0 : SVGFEPointLightElement::Z()
      77             : {
      78           0 :   return mNumberAttributes[ATTR_Z].ToDOMAnimatedNumber(this);
      79             : }
      80             : 
      81             : //----------------------------------------------------------------------
      82             : // nsSVGElement methods
      83             : 
      84             : nsSVGElement::NumberAttributesInfo
      85           0 : SVGFEPointLightElement::GetNumberInfo()
      86             : {
      87             :   return NumberAttributesInfo(mNumberAttributes, sNumberInfo,
      88           0 :                               ArrayLength(sNumberInfo));
      89             : }
      90             : 
      91             : } // namespace dom
      92             : } // namespace mozilla

Generated by: LCOV version 1.13