Coverage Report

Created: 2018-09-25 14:53

/src/mozilla-central/layout/base/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
{
15
  mNeedLayoutFlush = true;
16
  if (nsIDocument* doc = mDocument->GetDisplayDocument()) {
17
    if (nsIPresShell* shell = doc->GetShell()) {
18
      shell->mNeedLayoutFlush = true;
19
    }
20
  }
21
22
#ifdef MOZ_GECKO_PROFILER
23
  if (!mReflowCause) {
24
    mReflowCause = profiler_get_backtrace();
25
  }
26
#endif
27
}
28
29
void
30
nsIPresShell::SetNeedStyleFlush()
31
0
{
32
0
  mNeedStyleFlush = true;
33
0
  if (nsIDocument* doc = mDocument->GetDisplayDocument()) {
34
0
    if (nsIPresShell* shell = doc->GetShell()) {
35
0
      shell->mNeedStyleFlush = true;
36
0
    }
37
0
  }
38
0
39
0
#ifdef MOZ_GECKO_PROFILER
40
0
  if (!mStyleCause) {
41
0
    mStyleCause = profiler_get_backtrace();
42
0
  }
43
0
#endif
44
0
}
45
46
void
47
nsIPresShell::EnsureStyleFlush()
48
0
{
49
0
  SetNeedStyleFlush();
50
0
  ObserveStyleFlushes();
51
0
}
52
53
void
54
nsIPresShell::SetNeedThrottledAnimationFlush()
55
0
{
56
0
  mNeedThrottledAnimationFlush = true;
57
0
  if (nsIDocument* doc = mDocument->GetDisplayDocument()) {
58
0
    if (nsIPresShell* shell = doc->GetShell()) {
59
0
      shell->mNeedThrottledAnimationFlush = true;
60
0
    }
61
0
  }
62
0
}
63
64
#endif // nsIPresShellInlines_h