LCOV - code coverage report
Current view: top level - dom/base - Text.h (source / functions) Hit Total Coverage
Test: output.info Lines: 10 13 76.9 %
Date: 2017-07-14 16:53:18 Functions: 4 6 66.7 %
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             : #ifndef mozilla_dom_Text_h
       8             : #define mozilla_dom_Text_h
       9             : 
      10             : #include "nsGenericDOMDataNode.h"
      11             : #include "mozilla/ErrorResult.h"
      12             : 
      13             : namespace mozilla {
      14             : namespace dom {
      15             : 
      16           3 : class Text : public nsGenericDOMDataNode
      17             : {
      18             : public:
      19          16 :   explicit Text(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo)
      20          16 :     : nsGenericDOMDataNode(aNodeInfo)
      21          16 :   {}
      22             : 
      23         331 :   explicit Text(already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo)
      24         331 :     : nsGenericDOMDataNode(aNodeInfo)
      25         331 :   {}
      26             : 
      27             :   using nsGenericDOMDataNode::GetWholeText;
      28             : 
      29             :   // WebIDL API
      30             :   already_AddRefed<Text> SplitText(uint32_t aOffset, ErrorResult& rv);
      31           0 :   void GetWholeText(nsAString& aWholeText, ErrorResult& rv)
      32             :   {
      33           0 :     rv = GetWholeText(aWholeText);
      34           0 :   }
      35             : 
      36             :   static already_AddRefed<Text>
      37             :   Constructor(const GlobalObject& aGlobal,
      38             :               const nsAString& aData, ErrorResult& aRv);
      39             : };
      40             : 
      41             : } // namespace dom
      42             : } // namespace mozilla
      43             : 
      44           1 : inline mozilla::dom::Text* nsINode::GetAsText()
      45             : {
      46           1 :   return IsNodeOfType(eTEXT) ? static_cast<mozilla::dom::Text*>(this)
      47           1 :                              : nullptr;
      48             : }
      49             : 
      50             : inline const mozilla::dom::Text* nsINode::GetAsText() const
      51             : {
      52             :   return IsNodeOfType(eTEXT) ? static_cast<const mozilla::dom::Text*>(this)
      53             :                              : nullptr;
      54             : }
      55             : 
      56             : #endif // mozilla_dom_Text_h

Generated by: LCOV version 1.13