LCOV - code coverage report
Current view: top level - dom/svg - nsSVGDataParser.cpp (source / functions) Hit Total Coverage
Test: output.info Lines: 15 16 93.8 %
Date: 2017-07-14 16:53:18 Functions: 3 3 100.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 "nsSVGDataParser.h"
       8             : #include "SVGContentUtils.h"
       9             : 
      10          51 : nsSVGDataParser::nsSVGDataParser(const nsAString& aValue)
      11             :   : mIter(SVGContentUtils::GetStartRangedPtr(aValue)),
      12          51 :     mEnd(SVGContentUtils::GetEndRangedPtr(aValue))
      13             : {
      14          51 : }
      15             : 
      16             : bool
      17        2557 : nsSVGDataParser::SkipCommaWsp()
      18             : {
      19        2557 :   if (!SkipWsp()) {
      20             :     // end of string
      21           0 :     return false;
      22             :   }
      23        2557 :   if (*mIter != ',') {
      24        1808 :     return true;
      25             :   }
      26         749 :   ++mIter;
      27         749 :   return SkipWsp();
      28             : }
      29             : 
      30             : bool
      31        6744 : nsSVGDataParser::SkipWsp()
      32             : {
      33        7742 :   while (mIter != mEnd) {
      34        6605 :     if (!IsSVGWhitespace(*mIter)) {
      35        5607 :       return true;
      36             :     }
      37         998 :     ++mIter;
      38             :   }
      39         139 :   return false;
      40             : }

Generated by: LCOV version 1.13