LCOV - code coverage report
Current view: top level - accessible/generic - TextLeafAccessible.h (source / functions) Hit Total Coverage
Test: output.info Lines: 0 4 0.0 %
Date: 2017-07-14 16:53:18 Functions: 0 3 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
       2             : /* This Source Code Form is subject to the terms of the Mozilla Public
       3             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       4             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
       5             : 
       6             : #ifndef mozilla_a11y_TextLeafAccessible_h__
       7             : #define mozilla_a11y_TextLeafAccessible_h__
       8             : 
       9             : #include "BaseAccessibles.h"
      10             : 
      11             : namespace mozilla {
      12             : namespace a11y {
      13             : 
      14             : /**
      15             :  * Generic class used for text nodes.
      16             :  */
      17             : class TextLeafAccessible : public LinkableAccessible
      18             : {
      19             : public:
      20             :   TextLeafAccessible(nsIContent* aContent, DocAccessible* aDoc);
      21             :   virtual ~TextLeafAccessible();
      22             : 
      23             :   // Accessible
      24             :   virtual mozilla::a11y::role NativeRole() override;
      25             :   virtual void AppendTextTo(nsAString& aText, uint32_t aStartOffset = 0,
      26             :                             uint32_t aLength = UINT32_MAX) override;
      27             :   virtual ENameValueFlag Name(nsString& aName) override;
      28             : 
      29             :   // TextLeafAccessible
      30           0 :   void SetText(const nsAString& aText) { mText = aText; }
      31           0 :   const nsString& Text() const { return mText; }
      32             : 
      33             : protected:
      34             :   nsString mText;
      35             : };
      36             : 
      37             : 
      38             : ////////////////////////////////////////////////////////////////////////////////
      39             : // Accessible downcast method
      40             : 
      41             : inline TextLeafAccessible*
      42           0 : Accessible::AsTextLeaf()
      43             : {
      44           0 :   return IsTextLeaf() ? static_cast<TextLeafAccessible*>(this) : nullptr;
      45             : }
      46             : 
      47             : } // namespace a11y
      48             : } // namespace mozilla
      49             : 
      50             : #endif
      51             : 

Generated by: LCOV version 1.13