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