LCOV - code coverage report
Current view: top level - layout/generic - ReflowOutput.cpp (source / functions) Hit Total Coverage
Test: output.info Lines: 5 25 20.0 %
Date: 2018-08-07 16:42:27 Functions: 0 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             : /* struct containing the output from nsIFrame::Reflow */
       8             : 
       9             : #include "mozilla/ReflowOutput.h"
      10             : #include "mozilla/ReflowInput.h"
      11             : 
      12             : void
      13           0 : nsOverflowAreas::UnionWith(const nsOverflowAreas& aOther)
      14             : {
      15             :   // FIXME: We should probably change scrollable overflow to use
      16             :   // UnionRectIncludeEmpty (but leave visual overflow using UnionRect).
      17           0 :   NS_FOR_FRAME_OVERFLOW_TYPES(otype) {
      18           0 :     mRects[otype].UnionRect(mRects[otype], aOther.mRects[otype]);
      19             :   }
      20           0 : }
      21             : 
      22             : void
      23           0 : nsOverflowAreas::UnionAllWith(const nsRect& aRect)
      24             : {
      25             :   // FIXME: We should probably change scrollable overflow to use
      26             :   // UnionRectIncludeEmpty (but leave visual overflow using UnionRect).
      27           0 :   NS_FOR_FRAME_OVERFLOW_TYPES(otype) {
      28           0 :     mRects[otype].UnionRect(mRects[otype], aRect);
      29             :   }
      30           0 : }
      31             : 
      32             : void
      33           0 : nsOverflowAreas::SetAllTo(const nsRect& aRect)
      34             : {
      35           0 :   NS_FOR_FRAME_OVERFLOW_TYPES(otype) {
      36           0 :     mRects[otype] = aRect;
      37             :   }
      38           0 : }
      39             : 
      40             : namespace mozilla {
      41             : 
      42           0 : ReflowOutput::ReflowOutput(const ReflowInput& aReflowInput)
      43           0 :   : ReflowOutput(aReflowInput.GetWritingMode())
      44             : {
      45         154 : }
      46             : 
      47             : void
      48           0 : ReflowOutput::SetOverflowAreasToDesiredBounds()
      49             : {
      50           0 :   NS_FOR_FRAME_OVERFLOW_TYPES(otype) {
      51         648 :     mOverflowAreas.Overflow(otype).SetRect(0, 0, Width(), Height());
      52             :   }
      53           0 : }
      54             : 
      55             : void
      56           0 : ReflowOutput::UnionOverflowAreasWithDesiredBounds()
      57             : {
      58             :   // FIXME: We should probably change scrollable overflow to use
      59             :   // UnionRectIncludeEmpty (but leave visual overflow using UnionRect).
      60         249 :   nsRect rect(0, 0, Width(), Height());
      61           0 :   NS_FOR_FRAME_OVERFLOW_TYPES(otype) {
      62         166 :     nsRect& o = mOverflowAreas.Overflow(otype);
      63         166 :     o.UnionRect(o, rect);
      64             :   }
      65           0 : }
      66             : 
      67             : } // namespace mozilla

Generated by: LCOV version 1.13-14-ga5dd952