Coverage Report

Created: 2018-09-25 14:53

/src/mozilla-central/layout/generic/ReflowOutput.cpp
Line
Count
Source (jump to first uncovered line)
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
nsOverflowAreas::UnionWith(const nsOverflowAreas& aOther)
14
0
{
15
0
  // FIXME: We should probably change scrollable overflow to use
16
0
  // 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
0
  }
20
0
}
21
22
void
23
nsOverflowAreas::UnionAllWith(const nsRect& aRect)
24
0
{
25
0
  // FIXME: We should probably change scrollable overflow to use
26
0
  // UnionRectIncludeEmpty (but leave visual overflow using UnionRect).
27
0
  NS_FOR_FRAME_OVERFLOW_TYPES(otype) {
28
0
    mRects[otype].UnionRect(mRects[otype], aRect);
29
0
  }
30
0
}
31
32
void
33
nsOverflowAreas::SetAllTo(const nsRect& aRect)
34
0
{
35
0
  NS_FOR_FRAME_OVERFLOW_TYPES(otype) {
36
0
    mRects[otype] = aRect;
37
0
  }
38
0
}
39
40
namespace mozilla {
41
42
ReflowOutput::ReflowOutput(const ReflowInput& aReflowInput)
43
  : ReflowOutput(aReflowInput.GetWritingMode())
44
0
{
45
0
}
46
47
void
48
ReflowOutput::SetOverflowAreasToDesiredBounds()
49
0
{
50
0
  NS_FOR_FRAME_OVERFLOW_TYPES(otype) {
51
0
    mOverflowAreas.Overflow(otype).SetRect(0, 0, Width(), Height());
52
0
  }
53
0
}
54
55
void
56
ReflowOutput::UnionOverflowAreasWithDesiredBounds()
57
0
{
58
0
  // FIXME: We should probably change scrollable overflow to use
59
0
  // UnionRectIncludeEmpty (but leave visual overflow using UnionRect).
60
0
  nsRect rect(0, 0, Width(), Height());
61
0
  NS_FOR_FRAME_OVERFLOW_TYPES(otype) {
62
0
    nsRect& o = mOverflowAreas.Overflow(otype);
63
0
    o.UnionRect(o, rect);
64
0
  }
65
0
}
66
67
} // namespace mozilla