aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/torture/pr44813.C
blob: 1dc01b06a17ac90323f07a1ccb2c1e9f948de5f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
typedef unsigned int PRUint32;
typedef int PRInt32;
typedef unsigned long PRUint64;
typedef int PRIntn;
typedef PRIntn PRBool;
struct nsRect {
    nsRect(const nsRect& aRect) { }
};
enum nsCompatibility { eCompatibility_NavQuirks = 3 };
class gfxContext;
typedef PRUint64 nsFrameState;
class nsPresContext {
public:
    nsCompatibility CompatibilityMode() const { }
};
class nsStyleContext {
public:
    PRBool HasTextDecorations() const;
};
class nsIFrame {
public:
    nsPresContext* PresContext() const;
    nsStyleContext* GetStyleContext() const;
    nsFrameState GetStateBits() const;
    nsRect GetOverflowRect() const;
};
class nsFrame : public nsIFrame { };
class nsLineList_iterator { };
class nsLineList {
public:
    typedef nsLineList_iterator iterator;
};
class gfxSkipCharsIterator { };
class gfxTextRun {
public:
    class PropertyProvider { };
};
class nsTextFrame : public nsFrame
{
  virtual nsRect ComputeTightBounds(gfxContext* aContext) const;
  gfxSkipCharsIterator EnsureTextRun(gfxContext* aReferenceContext = 0L,
				     nsIFrame* aLineContainer = 0L,
				     const nsLineList::iterator* aLine = 0L,
				     PRUint32* aFlowEndInTextRun = 0L);
};
class PropertyProvider : public gfxTextRun::PropertyProvider
{
public:
    PropertyProvider(nsTextFrame* aFrame, const gfxSkipCharsIterator& aStart);
    PRInt32 mLength[64];
};
nsRect nsTextFrame::ComputeTightBounds(gfxContext* aContext) const
{
  if ((GetStyleContext()->HasTextDecorations()
       && eCompatibility_NavQuirks == PresContext()->CompatibilityMode())
      || (GetStateBits() & (nsFrameState(1) << (23))))
    return GetOverflowRect();
  gfxSkipCharsIterator iter = const_cast<nsTextFrame*>(this)->EnsureTextRun();
  PropertyProvider provider(const_cast<nsTextFrame*>(this), iter);
}