Coverage Report

Created: 2018-09-25 14:53

/src/mozilla-central/layout/mathml/nsMathMLmrootFrame.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 nsMathMLmrootFrame_h___
8
#define nsMathMLmrootFrame_h___
9
10
#include "mozilla/Attributes.h"
11
#include "nsMathMLContainerFrame.h"
12
#include "nsMathMLChar.h"
13
14
//
15
// <msqrt> and <mroot> -- form a radical
16
//
17
18
class nsMathMLmrootFrame final : public nsMathMLContainerFrame
19
{
20
public:
21
  NS_DECL_FRAMEARENA_HELPERS(nsMathMLmrootFrame)
22
23
  friend nsIFrame* NS_NewMathMLmrootFrame(nsIPresShell* aPresShell, ComputedStyle* aStyle);
24
25
  virtual void
26
  SetAdditionalComputedStyle(int32_t          aIndex,
27
                            ComputedStyle*  aComputedStyle) override;
28
  virtual ComputedStyle*
29
  GetAdditionalComputedStyle(int32_t aIndex) const override;
30
31
  virtual void
32
  Init(nsIContent*       aContent,
33
       nsContainerFrame* aParent,
34
       nsIFrame*         aPrevInFlow) override;
35
36
  NS_IMETHOD
37
  TransmitAutomaticData() override;
38
39
  virtual void
40
  Reflow(nsPresContext*          aPresContext,
41
         ReflowOutput&     aDesiredSize,
42
         const ReflowInput& aReflowInput,
43
         nsReflowStatus&          aStatus) override;
44
45
  void
46
  GetRadicalXOffsets(nscoord aIndexWidth, nscoord aSqrWidth,
47
                     nsFontMetrics* aFontMetrics,
48
                     nscoord* aIndexOffset,
49
                     nscoord* aSqrOffset);
50
51
  virtual void
52
  GetIntrinsicISizeMetrics(gfxContext* aRenderingContext,
53
                           ReflowOutput& aDesiredSize) override;
54
55
  virtual void BuildDisplayList(nsDisplayListBuilder*   aBuilder,
56
                                const nsDisplayListSet& aLists) override;
57
58
  uint8_t
59
  ScriptIncrement(nsIFrame* aFrame) override
60
0
  {
61
0
    return (aFrame && aFrame == mFrames.LastChild()) ? 2 : 0;
62
0
  }
63
64
protected:
65
  explicit nsMathMLmrootFrame(ComputedStyle* aStyle);
66
  virtual ~nsMathMLmrootFrame();
67
68
  nsMathMLChar mSqrChar;
69
  nsRect       mBarRect;
70
};
71
72
#endif /* nsMathMLmrootFrame_h___ */