LCOV - code coverage report
Current view: top level - dom/svg - SVGMotionSMILAttr.cpp (source / functions) Hit Total Coverage
Test: output.info Lines: 0 14 0.0 %
Date: 2017-07-14 16:53:18 Functions: 0 5 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             : /* representation of a dummy attribute targeted by <animateMotion> element */
       8             : 
       9             : #include "SVGMotionSMILAttr.h"
      10             : #include "SVGMotionSMILType.h"
      11             : #include "mozilla/dom/SVGAnimationElement.h"
      12             : #include "nsSMILValue.h"
      13             : #include "nsDebug.h"
      14             : #include "nsSVGElement.h"
      15             : #include "gfx2DGlue.h"
      16             : 
      17             : namespace mozilla {
      18             : 
      19             : nsresult
      20           0 : SVGMotionSMILAttr::ValueFromString(const nsAString& aStr,
      21             :                                    const dom::SVGAnimationElement* aSrcElement,
      22             :                                    nsSMILValue& aValue,
      23             :                                    bool& aPreventCachingOfSandwich) const
      24             : {
      25           0 :   NS_NOTREACHED("Shouldn't using nsISMILAttr::ValueFromString for parsing "
      26             :                 "animateMotion's SMIL values.");
      27           0 :   return NS_ERROR_FAILURE;
      28             : }
      29             : 
      30             : nsSMILValue
      31           0 : SVGMotionSMILAttr::GetBaseValue() const
      32             : {
      33           0 :   return nsSMILValue(&SVGMotionSMILType::sSingleton);
      34             : }
      35             : 
      36             : void
      37           0 : SVGMotionSMILAttr::ClearAnimValue()
      38             : {
      39           0 :   mSVGElement->SetAnimateMotionTransform(nullptr);
      40           0 : }
      41             : 
      42             : nsresult
      43           0 : SVGMotionSMILAttr::SetAnimValue(const nsSMILValue& aValue)
      44             : {
      45           0 :   gfx::Matrix matrix = SVGMotionSMILType::CreateMatrix(aValue);
      46           0 :   mSVGElement->SetAnimateMotionTransform(&matrix);
      47           0 :   return NS_OK;
      48             : }
      49             : 
      50             : const nsIContent*
      51           0 : SVGMotionSMILAttr::GetTargetNode() const
      52             : {
      53           0 :   return mSVGElement;
      54             : }
      55             : 
      56             : } // namespace mozilla

Generated by: LCOV version 1.13