Coverage Report

Created: 2018-09-25 14:53

/work/obj-fuzz/dist/include/nsIPresShellInlines.h
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
#ifndef nsIPresShellInlines_h
8
#define nsIPresShellInlines_h
9
10
#include "nsIDocument.h"
11
12
void
13
nsIPresShell::SetNeedLayoutFlush()
14
0
{
15
0
  mNeedLayoutFlush = true;
16
0
  if (nsIDocument* doc = mDocument->GetDisplayDocument()) {
17
0
    if (nsIPresShell* shell = doc->GetShell()) {
18
0
      shell->mNeedLayoutFlush = true;
19
0
    }
20
0
  }
21
0
22
0
#ifdef MOZ_GECKO_PROFILER
23
0
  if (!mReflowCause) {
24
0
    mReflowCause = profiler_get_backtrace();
25
0
  }
26
0
#endif
27
0
}
28
29
void
30
nsIPresShell::SetNeedStyleFlush()
31
{
32
  mNeedStyleFlush = true;
33
  if (nsIDocument* doc = mDocument->GetDisplayDocument()) {
34
    if (nsIPresShell* shell = doc->GetShell()) {
35
      shell->mNeedStyleFlush = true;
36
    }
37
  }
38
39
#ifdef MOZ_GECKO_PROFILER
40
  if (!mStyleCause) {
41
    mStyleCause = profiler_get_backtrace();
42
  }
43
#endif
44
}
45
46
void
47
nsIPresShell::EnsureStyleFlush()
48
{
49
  SetNeedStyleFlush();
50
  ObserveStyleFlushes();
51
}
52
53
void
54
nsIPresShell::SetNeedThrottledAnimationFlush()
55
{
56
  mNeedThrottledAnimationFlush = true;
57
  if (nsIDocument* doc = mDocument->GetDisplayDocument()) {
58
    if (nsIPresShell* shell = doc->GetShell()) {
59
      shell->mNeedThrottledAnimationFlush = true;
60
    }
61
  }
62
}
63
64
#endif // nsIPresShellInlines_h