mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset 032ba47c6684 (bug 1022612)
This commit is contained in:
parent
19944c8798
commit
93aa7aad04
@ -2735,6 +2735,7 @@ ContainerState::ProcessDisplayItems(nsDisplayList* aList,
|
|||||||
}
|
}
|
||||||
|
|
||||||
aList->AppendToTop(&savedItems);
|
aList->AppendToTop(&savedItems);
|
||||||
|
aList->SetDidComputeVisibility();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -1221,6 +1221,9 @@ nsDisplayList::ComputeVisibilityForSublist(nsDisplayListBuilder* aBuilder,
|
|||||||
|
|
||||||
mIsOpaque = !aVisibleRegion->Intersects(mVisibleRect);
|
mIsOpaque = !aVisibleRegion->Intersects(mVisibleRect);
|
||||||
mForceTransparentSurface = forceTransparentSurface;
|
mForceTransparentSurface = forceTransparentSurface;
|
||||||
|
#if defined(DEBUG) || defined(MOZ_DUMP_PAINTING)
|
||||||
|
mDidComputeVisibility = true;
|
||||||
|
#endif
|
||||||
return anyVisible;
|
return anyVisible;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1425,12 +1425,14 @@ public:
|
|||||||
/**
|
/**
|
||||||
* Create an empty list.
|
* Create an empty list.
|
||||||
*/
|
*/
|
||||||
nsDisplayList()
|
nsDisplayList() :
|
||||||
: mIsOpaque(false)
|
mIsOpaque(false)
|
||||||
, mForceTransparentSurface(false)
|
|
||||||
{
|
{
|
||||||
mTop = &mSentinel;
|
mTop = &mSentinel;
|
||||||
mSentinel.mAbove = nullptr;
|
mSentinel.mAbove = nullptr;
|
||||||
|
#if defined(DEBUG) || defined(MOZ_DUMP_PAINTING)
|
||||||
|
mDidComputeVisibility = false;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
~nsDisplayList() {
|
~nsDisplayList() {
|
||||||
if (mSentinel.mAbove) {
|
if (mSentinel.mAbove) {
|
||||||
@ -1616,13 +1618,16 @@ public:
|
|||||||
* empty, i.e. everything visible in this list is opaque.
|
* empty, i.e. everything visible in this list is opaque.
|
||||||
*/
|
*/
|
||||||
bool IsOpaque() const {
|
bool IsOpaque() const {
|
||||||
|
NS_ASSERTION(mDidComputeVisibility, "Need to have called ComputeVisibility");
|
||||||
return mIsOpaque;
|
return mIsOpaque;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns true if any display item requires the surface to be transparent.
|
* Returns true if during ComputeVisibility any display item
|
||||||
|
* set the surface to be transparent.
|
||||||
*/
|
*/
|
||||||
bool NeedsTransparentSurface() const {
|
bool NeedsTransparentSurface() const {
|
||||||
|
NS_ASSERTION(mDidComputeVisibility, "Need to have called ComputeVisibility");
|
||||||
return mForceTransparentSurface;
|
return mForceTransparentSurface;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@ -1681,6 +1686,16 @@ public:
|
|||||||
nsDisplayItem::HitTestState* aState,
|
nsDisplayItem::HitTestState* aState,
|
||||||
nsTArray<nsIFrame*> *aOutFrames) const;
|
nsTArray<nsIFrame*> *aOutFrames) const;
|
||||||
|
|
||||||
|
#if defined(DEBUG) || defined(MOZ_DUMP_PAINTING)
|
||||||
|
bool DidComputeVisibility() const { return mDidComputeVisibility; }
|
||||||
|
#endif
|
||||||
|
|
||||||
|
void SetDidComputeVisibility()
|
||||||
|
{
|
||||||
|
#if defined(DEBUG) || defined(MOZ_DUMP_PAINTING)
|
||||||
|
mDidComputeVisibility = true;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
void SetIsOpaque()
|
void SetIsOpaque()
|
||||||
{
|
{
|
||||||
mIsOpaque = true;
|
mIsOpaque = true;
|
||||||
@ -1712,6 +1727,9 @@ private:
|
|||||||
// This is set to true by ComputeVisibility if any display item in this
|
// This is set to true by ComputeVisibility if any display item in this
|
||||||
// list needs to force the surface containing this list to be transparent.
|
// list needs to force the surface containing this list to be transparent.
|
||||||
bool mForceTransparentSurface;
|
bool mForceTransparentSurface;
|
||||||
|
#if defined(DEBUG) || defined(MOZ_DUMP_PAINTING)
|
||||||
|
bool mDidComputeVisibility;
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -154,7 +154,10 @@ PrintDisplayItemTo(nsDisplayListBuilder* aBuilder, nsDisplayItem* aItem,
|
|||||||
nsRect component = aItem->GetComponentAlphaBounds(aBuilder);
|
nsRect component = aItem->GetComponentAlphaBounds(aBuilder);
|
||||||
nsDisplayList* list = aItem->GetChildren();
|
nsDisplayList* list = aItem->GetChildren();
|
||||||
const DisplayItemClip& clip = aItem->GetClip();
|
const DisplayItemClip& clip = aItem->GetClip();
|
||||||
nsRegion opaque = aItem->GetOpaqueRegion(aBuilder, &snap);
|
nsRegion opaque;
|
||||||
|
if (!list || list->DidComputeVisibility()) {
|
||||||
|
opaque = aItem->GetOpaqueRegion(aBuilder, &snap);
|
||||||
|
}
|
||||||
if (aDumpHtml && aItem->Painted()) {
|
if (aDumpHtml && aItem->Painted()) {
|
||||||
nsCString string(aItem->Name());
|
nsCString string(aItem->Name());
|
||||||
string.Append('-');
|
string.Append('-');
|
||||||
|
Loading…
Reference in New Issue
Block a user