LCOV - code coverage report
Current view: top level - layout/generic - FrameChildList.cpp (source / functions) Hit Total Coverage
Test: output.info Lines: 9 29 31.0 %
Date: 2017-07-14 16:53:18 Functions: 1 2 50.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 shiftwidth=2 tabstop=8 autoindent cindent expandtab: */
       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/layout/FrameChildList.h"
       8             : 
       9             : #include "nsIFrame.h"
      10             : 
      11             : namespace mozilla {
      12             : namespace layout {
      13             : 
      14        4434 : FrameChildListIterator::FrameChildListIterator(const nsIFrame* aFrame)
      15        4434 :   : FrameChildListArrayIterator(mLists)
      16             : {
      17        4434 :   aFrame->GetChildLists(&mLists);
      18             : #ifdef DEBUG
      19             :   // Make sure that there are no duplicate list IDs.
      20        4434 :   FrameChildListIDs ids;
      21        4434 :   uint32_t count = mLists.Length();
      22        7956 :   for (uint32_t i = 0; i < count; ++i) {
      23        3522 :     NS_ASSERTION(!ids.Contains(mLists[i].mID),
      24             :                  "Duplicate item found!");
      25        3522 :     ids |= mLists[i].mID;
      26             :   }
      27             : #endif
      28        4434 : }
      29             : 
      30             : #ifdef DEBUG_FRAME_DUMP
      31             : const char*
      32           0 : ChildListName(FrameChildListID aListID)
      33             : {
      34           0 :   switch (aListID) {
      35           0 :     case kPrincipalList: return "";
      36           0 :     case kPopupList: return "PopupList";
      37           0 :     case kCaptionList: return "CaptionList";
      38           0 :     case kColGroupList: return "ColGroupList";
      39           0 :     case kSelectPopupList: return "SelectPopupList";
      40           0 :     case kAbsoluteList: return "AbsoluteList";
      41           0 :     case kFixedList: return "FixedList";
      42           0 :     case kOverflowList: return "OverflowList";
      43           0 :     case kOverflowContainersList: return "OverflowContainersList";
      44           0 :     case kExcessOverflowContainersList: return "ExcessOverflowContainersList";
      45           0 :     case kOverflowOutOfFlowList: return "OverflowOutOfFlowList";
      46           0 :     case kFloatList: return "FloatList";
      47           0 :     case kBulletList: return "BulletList";
      48           0 :     case kPushedFloatsList: return "PushedFloatsList";
      49           0 :     case kBackdropList: return "BackdropList";
      50           0 :     case kNoReflowPrincipalList: return "NoReflowPrincipalList";
      51             :   }
      52             : 
      53           0 :   NS_NOTREACHED("unknown list");
      54           0 :   return "UNKNOWN_FRAME_CHILD_LIST";
      55             : }
      56             : #endif
      57             : 
      58             : } // namespace layout
      59             : } // namespace mozilla

Generated by: LCOV version 1.13