LCOV - code coverage report
Current view: top level - dom/events - TextClause.cpp (source / functions) Hit Total Coverage
Test: output.info Lines: 0 22 0.0 %
Date: 2017-07-14 16:53:18 Functions: 0 10 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             : /* vim:set ts=2 sw=2 sts=2 et cindent: */
       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/TextClause.h"
       8             : #include "mozilla/dom/TextClauseBinding.h"
       9             : #include "mozilla/TextEvents.h"
      10             : 
      11             : namespace mozilla {
      12             : namespace dom {
      13             : 
      14             : // Only needed for refcounted objects.
      15           0 : NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE_0(TextClause)
      16           0 : NS_IMPL_CYCLE_COLLECTING_ADDREF(TextClause)
      17           0 : NS_IMPL_CYCLE_COLLECTING_RELEASE(TextClause)
      18           0 : NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(TextClause)
      19           0 : NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
      20           0 : NS_INTERFACE_MAP_ENTRY(nsISupports)
      21           0 : NS_INTERFACE_MAP_END
      22             : 
      23           0 : TextClause::TextClause(nsPIDOMWindowInner* aOwner, const TextRange& aRange,
      24           0 :                        const TextRange* aTargetRange)
      25             :   : mOwner(aOwner)
      26           0 :   , mIsTargetClause(false)
      27             : {
      28           0 :   MOZ_ASSERT(aOwner);
      29           0 :   mStartOffset = aRange.mStartOffset;
      30           0 :   mEndOffset = aRange.mEndOffset;
      31           0 :   if (aRange.IsClause()) {
      32           0 :     mIsCaret = false;
      33           0 :     if (aTargetRange && aTargetRange->mStartOffset == mStartOffset) {
      34           0 :       mIsTargetClause = true;
      35             :     }
      36             :   } else {
      37           0 :     mIsCaret = true;
      38             :   }
      39           0 : }
      40             : 
      41             : JSObject*
      42           0 : TextClause::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
      43             : {
      44           0 :   return TextClauseBinding::Wrap(aCx, this, aGivenProto);
      45             : }
      46             : 
      47           0 : TextClause::~TextClause() {}
      48             : 
      49             : } // namespace dom
      50             : } // namespace mozilla

Generated by: LCOV version 1.13