diff options
author | upstream source tree <ports@midipix.org> | 2015-03-15 20:14:05 -0400 |
---|---|---|
committer | upstream source tree <ports@midipix.org> | 2015-03-15 20:14:05 -0400 |
commit | 554fd8c5195424bdbcabf5de30fdc183aba391bd (patch) | |
tree | 976dc5ab7fddf506dadce60ae936f43f58787092 /gcc/testsuite/g++.dg/torture/pr44813.C | |
download | cbb-gcc-4.6.4-upstream.tar.bz2 cbb-gcc-4.6.4-upstream.tar.xz |
obtained gcc-4.6.4.tar.bz2 from upstream website;upstream
verified gcc-4.6.4.tar.bz2.sig;
imported gcc-4.6.4 source tree from verified upstream tarball.
downloading a git-generated archive based on the 'upstream' tag
should provide you with a source tree that is binary identical
to the one extracted from the above tarball.
if you have obtained the source via the command 'git clone',
however, do note that line-endings of files in your working
directory might differ from line-endings of the respective
files in the upstream repository.
Diffstat (limited to 'gcc/testsuite/g++.dg/torture/pr44813.C')
-rw-r--r-- | gcc/testsuite/g++.dg/torture/pr44813.C | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/torture/pr44813.C b/gcc/testsuite/g++.dg/torture/pr44813.C new file mode 100644 index 000000000..1dc01b06a --- /dev/null +++ b/gcc/testsuite/g++.dg/torture/pr44813.C @@ -0,0 +1,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); +} |