Bug 584282. Add nsDisplayItem::mToReferenceFrame and initialize it in the constructor. r=tnikkel,a=dbaron
This commit is contained in:
@@ -626,8 +626,9 @@ RegisterThemeWidgetGeometry(nsIFrame* aFrame)
|
|||||||
borderBox.ToNearestPixels(presContext->AppUnitsPerDevPixel()));
|
borderBox.ToNearestPixels(presContext->AppUnitsPerDevPixel()));
|
||||||
}
|
}
|
||||||
|
|
||||||
nsDisplayBackground::nsDisplayBackground(nsIFrame* aFrame)
|
nsDisplayBackground::nsDisplayBackground(nsDisplayListBuilder* aBuilder,
|
||||||
: nsDisplayItem(aFrame)
|
nsIFrame* aFrame)
|
||||||
|
: nsDisplayItem(aBuilder, aFrame)
|
||||||
{
|
{
|
||||||
MOZ_COUNT_CTOR(nsDisplayBackground);
|
MOZ_COUNT_CTOR(nsDisplayBackground);
|
||||||
const nsStyleDisplay* disp = mFrame->GetStyleDisplay();
|
const nsStyleDisplay* disp = mFrame->GetStyleDisplay();
|
||||||
@@ -1018,13 +1019,15 @@ nsDisplayBoxShadowInner::ComputeVisibility(nsDisplayListBuilder* aBuilder,
|
|||||||
return PR_TRUE;
|
return PR_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
nsDisplayWrapList::nsDisplayWrapList(nsIFrame* aFrame, nsDisplayList* aList)
|
nsDisplayWrapList::nsDisplayWrapList(nsDisplayListBuilder* aBuilder,
|
||||||
: nsDisplayItem(aFrame) {
|
nsIFrame* aFrame, nsDisplayList* aList)
|
||||||
|
: nsDisplayItem(aBuilder, aFrame) {
|
||||||
mList.AppendToTop(aList);
|
mList.AppendToTop(aList);
|
||||||
}
|
}
|
||||||
|
|
||||||
nsDisplayWrapList::nsDisplayWrapList(nsIFrame* aFrame, nsDisplayItem* aItem)
|
nsDisplayWrapList::nsDisplayWrapList(nsDisplayListBuilder* aBuilder,
|
||||||
: nsDisplayItem(aFrame) {
|
nsIFrame* aFrame, nsDisplayItem* aItem)
|
||||||
|
: nsDisplayItem(aBuilder, aFrame) {
|
||||||
mList.AppendToTop(aItem);
|
mList.AppendToTop(aItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1169,8 +1172,9 @@ nsresult nsDisplayWrapper::WrapListsInPlace(nsDisplayListBuilder* aBuilder,
|
|||||||
return WrapEachDisplayItem(aBuilder, aLists.Outlines(), this);
|
return WrapEachDisplayItem(aBuilder, aLists.Outlines(), this);
|
||||||
}
|
}
|
||||||
|
|
||||||
nsDisplayOpacity::nsDisplayOpacity(nsIFrame* aFrame, nsDisplayList* aList)
|
nsDisplayOpacity::nsDisplayOpacity(nsDisplayListBuilder* aBuilder,
|
||||||
: nsDisplayWrapList(aFrame, aList) {
|
nsIFrame* aFrame, nsDisplayList* aList)
|
||||||
|
: nsDisplayWrapList(aBuilder, aFrame, aList) {
|
||||||
MOZ_COUNT_CTOR(nsDisplayOpacity);
|
MOZ_COUNT_CTOR(nsDisplayOpacity);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1236,8 +1240,9 @@ PRBool nsDisplayOpacity::TryMerge(nsDisplayListBuilder* aBuilder, nsDisplayItem*
|
|||||||
return PR_TRUE;
|
return PR_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
nsDisplayOwnLayer::nsDisplayOwnLayer(nsIFrame* aFrame, nsDisplayList* aList)
|
nsDisplayOwnLayer::nsDisplayOwnLayer(nsDisplayListBuilder* aBuilder,
|
||||||
: nsDisplayWrapList(aFrame, aList) {
|
nsIFrame* aFrame, nsDisplayList* aList)
|
||||||
|
: nsDisplayWrapList(aBuilder, aFrame, aList) {
|
||||||
MOZ_COUNT_CTOR(nsDisplayOwnLayer);
|
MOZ_COUNT_CTOR(nsDisplayOwnLayer);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1256,16 +1261,18 @@ nsDisplayOwnLayer::BuildLayer(nsDisplayListBuilder* aBuilder,
|
|||||||
return layer.forget();
|
return layer.forget();
|
||||||
}
|
}
|
||||||
|
|
||||||
nsDisplayClip::nsDisplayClip(nsIFrame* aFrame, nsIFrame* aClippingFrame,
|
nsDisplayClip::nsDisplayClip(nsDisplayListBuilder* aBuilder,
|
||||||
nsDisplayItem* aItem, const nsRect& aRect)
|
nsIFrame* aFrame, nsIFrame* aClippingFrame,
|
||||||
: nsDisplayWrapList(aFrame, aItem),
|
nsDisplayItem* aItem, const nsRect& aRect)
|
||||||
|
: nsDisplayWrapList(aBuilder, aFrame, aItem),
|
||||||
mClippingFrame(aClippingFrame), mClip(aRect) {
|
mClippingFrame(aClippingFrame), mClip(aRect) {
|
||||||
MOZ_COUNT_CTOR(nsDisplayClip);
|
MOZ_COUNT_CTOR(nsDisplayClip);
|
||||||
}
|
}
|
||||||
|
|
||||||
nsDisplayClip::nsDisplayClip(nsIFrame* aFrame, nsIFrame* aClippingFrame,
|
nsDisplayClip::nsDisplayClip(nsDisplayListBuilder* aBuilder,
|
||||||
nsDisplayList* aList, const nsRect& aRect)
|
nsIFrame* aFrame, nsIFrame* aClippingFrame,
|
||||||
: nsDisplayWrapList(aFrame, aList),
|
nsDisplayList* aList, const nsRect& aRect)
|
||||||
|
: nsDisplayWrapList(aBuilder, aFrame, aList),
|
||||||
mClippingFrame(aClippingFrame), mClip(aRect) {
|
mClippingFrame(aClippingFrame), mClip(aRect) {
|
||||||
MOZ_COUNT_CTOR(nsDisplayClip);
|
MOZ_COUNT_CTOR(nsDisplayClip);
|
||||||
}
|
}
|
||||||
@@ -1317,12 +1324,14 @@ PRBool nsDisplayClip::TryMerge(nsDisplayListBuilder* aBuilder,
|
|||||||
nsDisplayWrapList* nsDisplayClip::WrapWithClone(nsDisplayListBuilder* aBuilder,
|
nsDisplayWrapList* nsDisplayClip::WrapWithClone(nsDisplayListBuilder* aBuilder,
|
||||||
nsDisplayItem* aItem) {
|
nsDisplayItem* aItem) {
|
||||||
return new (aBuilder)
|
return new (aBuilder)
|
||||||
nsDisplayClip(aItem->GetUnderlyingFrame(), mClippingFrame, aItem, mClip);
|
nsDisplayClip(aBuilder, aItem->GetUnderlyingFrame(), mClippingFrame, aItem, mClip);
|
||||||
}
|
}
|
||||||
|
|
||||||
nsDisplayZoom::nsDisplayZoom(nsIFrame* aFrame, nsDisplayList* aList,
|
nsDisplayZoom::nsDisplayZoom(nsDisplayListBuilder* aBuilder,
|
||||||
|
nsIFrame* aFrame, nsDisplayList* aList,
|
||||||
PRInt32 aAPD, PRInt32 aParentAPD)
|
PRInt32 aAPD, PRInt32 aParentAPD)
|
||||||
: nsDisplayOwnLayer(aFrame, aList), mAPD(aAPD), mParentAPD(aParentAPD) {
|
: nsDisplayOwnLayer(aBuilder, aFrame, aList), mAPD(aAPD),
|
||||||
|
mParentAPD(aParentAPD) {
|
||||||
MOZ_COUNT_CTOR(nsDisplayZoom);
|
MOZ_COUNT_CTOR(nsDisplayZoom);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1779,8 +1788,9 @@ nsRect nsDisplayTransform::UntransformRect(const nsRect &aUntransformedBounds,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef MOZ_SVG
|
#ifdef MOZ_SVG
|
||||||
nsDisplaySVGEffects::nsDisplaySVGEffects(nsIFrame* aFrame, nsDisplayList* aList)
|
nsDisplaySVGEffects::nsDisplaySVGEffects(nsDisplayListBuilder* aBuilder,
|
||||||
: nsDisplayWrapList(aFrame, aList), mEffectsFrame(aFrame),
|
nsIFrame* aFrame, nsDisplayList* aList)
|
||||||
|
: nsDisplayWrapList(aBuilder, aFrame, aList), mEffectsFrame(aFrame),
|
||||||
mBounds(aFrame->GetOverflowRectRelativeToSelf())
|
mBounds(aFrame->GetOverflowRectRelativeToSelf())
|
||||||
{
|
{
|
||||||
MOZ_COUNT_CTOR(nsDisplaySVGEffects);
|
MOZ_COUNT_CTOR(nsDisplaySVGEffects);
|
||||||
|
|||||||
@@ -436,7 +436,12 @@ public:
|
|||||||
|
|
||||||
// This is never instantiated directly (it has pure virtual methods), so no
|
// This is never instantiated directly (it has pure virtual methods), so no
|
||||||
// need to count constructors and destructors.
|
// need to count constructors and destructors.
|
||||||
nsDisplayItem(nsIFrame* aFrame) : mFrame(aFrame) {}
|
nsDisplayItem(nsDisplayListBuilder* aBuilder, nsIFrame* aFrame) :
|
||||||
|
mFrame(aFrame) {
|
||||||
|
if (aFrame) {
|
||||||
|
mToReferenceFrame = aBuilder->ToReferenceFrame(aFrame);
|
||||||
|
}
|
||||||
|
}
|
||||||
virtual ~nsDisplayItem() {}
|
virtual ~nsDisplayItem() {}
|
||||||
|
|
||||||
void* operator new(size_t aSize,
|
void* operator new(size_t aSize,
|
||||||
@@ -635,6 +640,11 @@ public:
|
|||||||
PRBool RecomputeVisibility(nsDisplayListBuilder* aBuilder,
|
PRBool RecomputeVisibility(nsDisplayListBuilder* aBuilder,
|
||||||
nsRegion* aVisibleRegion);
|
nsRegion* aVisibleRegion);
|
||||||
|
|
||||||
|
const nsPoint& ToReferenceFrame() {
|
||||||
|
NS_ASSERTION(mFrame, "No frame?");
|
||||||
|
return mToReferenceFrame;
|
||||||
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
friend class nsDisplayList;
|
friend class nsDisplayList;
|
||||||
|
|
||||||
@@ -643,6 +653,8 @@ protected:
|
|||||||
}
|
}
|
||||||
|
|
||||||
nsIFrame* mFrame;
|
nsIFrame* mFrame;
|
||||||
|
// Result of ToReferenceFrame(mFrame), if mFrame is non-null
|
||||||
|
nsPoint mToReferenceFrame;
|
||||||
// This is the rectangle that needs to be painted.
|
// This is the rectangle that needs to be painted.
|
||||||
// nsDisplayList::ComputeVisibility sets this to the visible region
|
// nsDisplayList::ComputeVisibility sets this to the visible region
|
||||||
// of the item by intersecting the current visible region with the bounds
|
// of the item by intersecting the current visible region with the bounds
|
||||||
@@ -1054,8 +1066,9 @@ public:
|
|||||||
typedef void (* PaintCallback)(nsIFrame* aFrame, nsIRenderingContext* aCtx,
|
typedef void (* PaintCallback)(nsIFrame* aFrame, nsIRenderingContext* aCtx,
|
||||||
const nsRect& aDirtyRect, nsPoint aFramePt);
|
const nsRect& aDirtyRect, nsPoint aFramePt);
|
||||||
|
|
||||||
nsDisplayGeneric(nsIFrame* aFrame, PaintCallback aPaint, const char* aName, Type aType)
|
nsDisplayGeneric(nsDisplayListBuilder* aBuilder, nsIFrame* aFrame,
|
||||||
: nsDisplayItem(aFrame), mPaint(aPaint)
|
PaintCallback aPaint, const char* aName, Type aType)
|
||||||
|
: nsDisplayItem(aBuilder, aFrame), mPaint(aPaint)
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
, mName(aName)
|
, mName(aName)
|
||||||
#endif
|
#endif
|
||||||
@@ -1096,9 +1109,10 @@ protected:
|
|||||||
*/
|
*/
|
||||||
class nsDisplayReflowCount : public nsDisplayItem {
|
class nsDisplayReflowCount : public nsDisplayItem {
|
||||||
public:
|
public:
|
||||||
nsDisplayReflowCount(nsIFrame* aFrame, const char* aFrameName,
|
nsDisplayReflowCount(nsDisplayListBuilder* aBuilder, nsIFrame* aFrame,
|
||||||
|
const char* aFrameName,
|
||||||
PRUint32 aColor = 0)
|
PRUint32 aColor = 0)
|
||||||
: nsDisplayItem(aFrame),
|
: nsDisplayItem(aBuilder, aFrame),
|
||||||
mFrameName(aFrameName),
|
mFrameName(aFrameName),
|
||||||
mColor(aColor)
|
mColor(aColor)
|
||||||
{
|
{
|
||||||
@@ -1128,8 +1142,8 @@ protected:
|
|||||||
if (!aBuilder->IsBackgroundOnly() && !aBuilder->IsForEventDelivery() && \
|
if (!aBuilder->IsBackgroundOnly() && !aBuilder->IsForEventDelivery() && \
|
||||||
PresContext()->PresShell()->IsPaintingFrameCounts()) { \
|
PresContext()->PresShell()->IsPaintingFrameCounts()) { \
|
||||||
nsresult _rv = \
|
nsresult _rv = \
|
||||||
aLists.Outlines()->AppendNewToTop(new (aBuilder) \
|
aLists.Outlines()->AppendNewToTop( \
|
||||||
nsDisplayReflowCount(this, _name)); \
|
new (aBuilder) nsDisplayReflowCount(aBuilder, this, _name)); \
|
||||||
NS_ENSURE_SUCCESS(_rv, _rv); \
|
NS_ENSURE_SUCCESS(_rv, _rv); \
|
||||||
} \
|
} \
|
||||||
PR_END_MACRO
|
PR_END_MACRO
|
||||||
@@ -1139,9 +1153,8 @@ protected:
|
|||||||
if (!aBuilder->IsBackgroundOnly() && !aBuilder->IsForEventDelivery() && \
|
if (!aBuilder->IsBackgroundOnly() && !aBuilder->IsForEventDelivery() && \
|
||||||
PresContext()->PresShell()->IsPaintingFrameCounts()) { \
|
PresContext()->PresShell()->IsPaintingFrameCounts()) { \
|
||||||
nsresult _rv = \
|
nsresult _rv = \
|
||||||
aLists.Outlines()->AppendNewToTop(new (aBuilder) \
|
aLists.Outlines()->AppendNewToTop( \
|
||||||
nsDisplayReflowCount(this, _name, \
|
new (aBuilder) nsDisplayReflowCount(aBuilder, this, _name, _color)); \
|
||||||
_color)); \
|
|
||||||
NS_ENSURE_SUCCESS(_rv, _rv); \
|
NS_ENSURE_SUCCESS(_rv, _rv); \
|
||||||
} \
|
} \
|
||||||
PR_END_MACRO
|
PR_END_MACRO
|
||||||
@@ -1167,8 +1180,9 @@ protected:
|
|||||||
|
|
||||||
class nsDisplayCaret : public nsDisplayItem {
|
class nsDisplayCaret : public nsDisplayItem {
|
||||||
public:
|
public:
|
||||||
nsDisplayCaret(nsIFrame* aCaretFrame, nsCaret *aCaret)
|
nsDisplayCaret(nsDisplayListBuilder* aBuilder, nsIFrame* aCaretFrame,
|
||||||
: nsDisplayItem(aCaretFrame), mCaret(aCaret) {
|
nsCaret *aCaret)
|
||||||
|
: nsDisplayItem(aBuilder, aCaretFrame), mCaret(aCaret) {
|
||||||
MOZ_COUNT_CTOR(nsDisplayCaret);
|
MOZ_COUNT_CTOR(nsDisplayCaret);
|
||||||
}
|
}
|
||||||
#ifdef NS_BUILD_REFCNT_LOGGING
|
#ifdef NS_BUILD_REFCNT_LOGGING
|
||||||
@@ -1192,7 +1206,8 @@ protected:
|
|||||||
*/
|
*/
|
||||||
class nsDisplayBorder : public nsDisplayItem {
|
class nsDisplayBorder : public nsDisplayItem {
|
||||||
public:
|
public:
|
||||||
nsDisplayBorder(nsIFrame* aFrame) : nsDisplayItem(aFrame) {
|
nsDisplayBorder(nsDisplayListBuilder* aBuilder, nsIFrame* aFrame) :
|
||||||
|
nsDisplayItem(aBuilder, aFrame) {
|
||||||
MOZ_COUNT_CTOR(nsDisplayBorder);
|
MOZ_COUNT_CTOR(nsDisplayBorder);
|
||||||
}
|
}
|
||||||
#ifdef NS_BUILD_REFCNT_LOGGING
|
#ifdef NS_BUILD_REFCNT_LOGGING
|
||||||
@@ -1220,8 +1235,9 @@ public:
|
|||||||
*/
|
*/
|
||||||
class nsDisplaySolidColor : public nsDisplayItem {
|
class nsDisplaySolidColor : public nsDisplayItem {
|
||||||
public:
|
public:
|
||||||
nsDisplaySolidColor(nsIFrame* aFrame, const nsRect& aBounds, nscolor aColor)
|
nsDisplaySolidColor(nsDisplayListBuilder* aBuilder, nsIFrame* aFrame,
|
||||||
: nsDisplayItem(aFrame), mBounds(aBounds), mColor(aColor) {
|
const nsRect& aBounds, nscolor aColor)
|
||||||
|
: nsDisplayItem(aBuilder, aFrame), mBounds(aBounds), mColor(aColor) {
|
||||||
MOZ_COUNT_CTOR(nsDisplaySolidColor);
|
MOZ_COUNT_CTOR(nsDisplaySolidColor);
|
||||||
}
|
}
|
||||||
#ifdef NS_BUILD_REFCNT_LOGGING
|
#ifdef NS_BUILD_REFCNT_LOGGING
|
||||||
@@ -1256,7 +1272,7 @@ private:
|
|||||||
*/
|
*/
|
||||||
class nsDisplayBackground : public nsDisplayItem {
|
class nsDisplayBackground : public nsDisplayItem {
|
||||||
public:
|
public:
|
||||||
nsDisplayBackground(nsIFrame* aFrame);
|
nsDisplayBackground(nsDisplayListBuilder* aBuilder, nsIFrame* aFrame);
|
||||||
#ifdef NS_BUILD_REFCNT_LOGGING
|
#ifdef NS_BUILD_REFCNT_LOGGING
|
||||||
virtual ~nsDisplayBackground() {
|
virtual ~nsDisplayBackground() {
|
||||||
MOZ_COUNT_DTOR(nsDisplayBackground);
|
MOZ_COUNT_DTOR(nsDisplayBackground);
|
||||||
@@ -1289,7 +1305,8 @@ protected:
|
|||||||
*/
|
*/
|
||||||
class nsDisplayBoxShadowOuter : public nsDisplayItem {
|
class nsDisplayBoxShadowOuter : public nsDisplayItem {
|
||||||
public:
|
public:
|
||||||
nsDisplayBoxShadowOuter(nsIFrame* aFrame) : nsDisplayItem(aFrame) {
|
nsDisplayBoxShadowOuter(nsDisplayListBuilder* aBuilder, nsIFrame* aFrame)
|
||||||
|
: nsDisplayItem(aBuilder, aFrame) {
|
||||||
MOZ_COUNT_CTOR(nsDisplayBoxShadowOuter);
|
MOZ_COUNT_CTOR(nsDisplayBoxShadowOuter);
|
||||||
}
|
}
|
||||||
#ifdef NS_BUILD_REFCNT_LOGGING
|
#ifdef NS_BUILD_REFCNT_LOGGING
|
||||||
@@ -1313,7 +1330,8 @@ private:
|
|||||||
*/
|
*/
|
||||||
class nsDisplayBoxShadowInner : public nsDisplayItem {
|
class nsDisplayBoxShadowInner : public nsDisplayItem {
|
||||||
public:
|
public:
|
||||||
nsDisplayBoxShadowInner(nsIFrame* aFrame) : nsDisplayItem(aFrame) {
|
nsDisplayBoxShadowInner(nsDisplayListBuilder* aBuilder, nsIFrame* aFrame)
|
||||||
|
: nsDisplayItem(aBuilder, aFrame) {
|
||||||
MOZ_COUNT_CTOR(nsDisplayBoxShadowInner);
|
MOZ_COUNT_CTOR(nsDisplayBoxShadowInner);
|
||||||
}
|
}
|
||||||
#ifdef NS_BUILD_REFCNT_LOGGING
|
#ifdef NS_BUILD_REFCNT_LOGGING
|
||||||
@@ -1336,7 +1354,8 @@ private:
|
|||||||
*/
|
*/
|
||||||
class nsDisplayOutline : public nsDisplayItem {
|
class nsDisplayOutline : public nsDisplayItem {
|
||||||
public:
|
public:
|
||||||
nsDisplayOutline(nsIFrame* aFrame) : nsDisplayItem(aFrame) {
|
nsDisplayOutline(nsDisplayListBuilder* aBuilder, nsIFrame* aFrame) :
|
||||||
|
nsDisplayItem(aBuilder, aFrame) {
|
||||||
MOZ_COUNT_CTOR(nsDisplayOutline);
|
MOZ_COUNT_CTOR(nsDisplayOutline);
|
||||||
}
|
}
|
||||||
#ifdef NS_BUILD_REFCNT_LOGGING
|
#ifdef NS_BUILD_REFCNT_LOGGING
|
||||||
@@ -1357,7 +1376,8 @@ public:
|
|||||||
*/
|
*/
|
||||||
class nsDisplayEventReceiver : public nsDisplayItem {
|
class nsDisplayEventReceiver : public nsDisplayItem {
|
||||||
public:
|
public:
|
||||||
nsDisplayEventReceiver(nsIFrame* aFrame) : nsDisplayItem(aFrame) {
|
nsDisplayEventReceiver(nsDisplayListBuilder* aBuilder, nsIFrame* aFrame)
|
||||||
|
: nsDisplayItem(aBuilder, aFrame) {
|
||||||
MOZ_COUNT_CTOR(nsDisplayEventReceiver);
|
MOZ_COUNT_CTOR(nsDisplayEventReceiver);
|
||||||
}
|
}
|
||||||
#ifdef NS_BUILD_REFCNT_LOGGING
|
#ifdef NS_BUILD_REFCNT_LOGGING
|
||||||
@@ -1396,8 +1416,10 @@ public:
|
|||||||
/**
|
/**
|
||||||
* Takes all the items from aList and puts them in our list.
|
* Takes all the items from aList and puts them in our list.
|
||||||
*/
|
*/
|
||||||
nsDisplayWrapList(nsIFrame* aFrame, nsDisplayList* aList);
|
nsDisplayWrapList(nsDisplayListBuilder* aBuilder, nsIFrame* aFrame,
|
||||||
nsDisplayWrapList(nsIFrame* aFrame, nsDisplayItem* aItem);
|
nsDisplayList* aList);
|
||||||
|
nsDisplayWrapList(nsDisplayListBuilder* aBuilder, nsIFrame* aFrame,
|
||||||
|
nsDisplayItem* aItem);
|
||||||
virtual ~nsDisplayWrapList();
|
virtual ~nsDisplayWrapList();
|
||||||
virtual void HitTest(nsDisplayListBuilder* aBuilder, const nsRect& aRect,
|
virtual void HitTest(nsDisplayListBuilder* aBuilder, const nsRect& aRect,
|
||||||
HitTestState* aState, nsTArray<nsIFrame*> *aOutFrames);
|
HitTestState* aState, nsTArray<nsIFrame*> *aOutFrames);
|
||||||
@@ -1477,7 +1499,8 @@ protected:
|
|||||||
*/
|
*/
|
||||||
class nsDisplayOpacity : public nsDisplayWrapList {
|
class nsDisplayOpacity : public nsDisplayWrapList {
|
||||||
public:
|
public:
|
||||||
nsDisplayOpacity(nsIFrame* aFrame, nsDisplayList* aList);
|
nsDisplayOpacity(nsDisplayListBuilder* aBuilder, nsIFrame* aFrame,
|
||||||
|
nsDisplayList* aList);
|
||||||
#ifdef NS_BUILD_REFCNT_LOGGING
|
#ifdef NS_BUILD_REFCNT_LOGGING
|
||||||
virtual ~nsDisplayOpacity();
|
virtual ~nsDisplayOpacity();
|
||||||
#endif
|
#endif
|
||||||
@@ -1499,7 +1522,8 @@ public:
|
|||||||
*/
|
*/
|
||||||
class nsDisplayOwnLayer : public nsDisplayWrapList {
|
class nsDisplayOwnLayer : public nsDisplayWrapList {
|
||||||
public:
|
public:
|
||||||
nsDisplayOwnLayer(nsIFrame* aFrame, nsDisplayList* aList);
|
nsDisplayOwnLayer(nsDisplayListBuilder* aBuilder, nsIFrame* aFrame,
|
||||||
|
nsDisplayList* aList);
|
||||||
#ifdef NS_BUILD_REFCNT_LOGGING
|
#ifdef NS_BUILD_REFCNT_LOGGING
|
||||||
virtual ~nsDisplayOwnLayer();
|
virtual ~nsDisplayOwnLayer();
|
||||||
#endif
|
#endif
|
||||||
@@ -1531,9 +1555,11 @@ public:
|
|||||||
* frame for this content, e.g. the frame whose z-index we have.
|
* frame for this content, e.g. the frame whose z-index we have.
|
||||||
* @param aClippingFrame the frame that is inducing the clipping.
|
* @param aClippingFrame the frame that is inducing the clipping.
|
||||||
*/
|
*/
|
||||||
nsDisplayClip(nsIFrame* aFrame, nsIFrame* aClippingFrame,
|
nsDisplayClip(nsDisplayListBuilder* aBuilder, nsIFrame* aFrame,
|
||||||
|
nsIFrame* aClippingFrame,
|
||||||
nsDisplayItem* aItem, const nsRect& aRect);
|
nsDisplayItem* aItem, const nsRect& aRect);
|
||||||
nsDisplayClip(nsIFrame* aFrame, nsIFrame* aClippingFrame,
|
nsDisplayClip(nsDisplayListBuilder* aBuilder, nsIFrame* aFrame,
|
||||||
|
nsIFrame* aClippingFrame,
|
||||||
nsDisplayList* aList, const nsRect& aRect);
|
nsDisplayList* aList, const nsRect& aRect);
|
||||||
#ifdef NS_BUILD_REFCNT_LOGGING
|
#ifdef NS_BUILD_REFCNT_LOGGING
|
||||||
virtual ~nsDisplayClip();
|
virtual ~nsDisplayClip();
|
||||||
@@ -1576,7 +1602,8 @@ public:
|
|||||||
* @param aParentAPD is the app units per dev pixel ratio of the parent
|
* @param aParentAPD is the app units per dev pixel ratio of the parent
|
||||||
* document.
|
* document.
|
||||||
*/
|
*/
|
||||||
nsDisplayZoom(nsIFrame* aFrame, nsDisplayList* aList,
|
nsDisplayZoom(nsDisplayListBuilder* aBuilder, nsIFrame* aFrame,
|
||||||
|
nsDisplayList* aList,
|
||||||
PRInt32 aAPD, PRInt32 aParentAPD);
|
PRInt32 aAPD, PRInt32 aParentAPD);
|
||||||
#ifdef NS_BUILD_REFCNT_LOGGING
|
#ifdef NS_BUILD_REFCNT_LOGGING
|
||||||
virtual ~nsDisplayZoom();
|
virtual ~nsDisplayZoom();
|
||||||
@@ -1606,7 +1633,8 @@ private:
|
|||||||
*/
|
*/
|
||||||
class nsDisplaySVGEffects : public nsDisplayWrapList {
|
class nsDisplaySVGEffects : public nsDisplayWrapList {
|
||||||
public:
|
public:
|
||||||
nsDisplaySVGEffects(nsIFrame* aFrame, nsDisplayList* aList);
|
nsDisplaySVGEffects(nsDisplayListBuilder* aBuilder, nsIFrame* aFrame,
|
||||||
|
nsDisplayList* aList);
|
||||||
#ifdef NS_BUILD_REFCNT_LOGGING
|
#ifdef NS_BUILD_REFCNT_LOGGING
|
||||||
virtual ~nsDisplaySVGEffects();
|
virtual ~nsDisplaySVGEffects();
|
||||||
#endif
|
#endif
|
||||||
@@ -1644,8 +1672,9 @@ public:
|
|||||||
/* Constructor accepts a display list, empties it, and wraps it up. It also
|
/* Constructor accepts a display list, empties it, and wraps it up. It also
|
||||||
* ferries the underlying frame to the nsDisplayItem constructor.
|
* ferries the underlying frame to the nsDisplayItem constructor.
|
||||||
*/
|
*/
|
||||||
nsDisplayTransform(nsIFrame *aFrame, nsDisplayList *aList) :
|
nsDisplayTransform(nsDisplayListBuilder* aBuilder, nsIFrame *aFrame,
|
||||||
nsDisplayItem(aFrame), mStoredList(aFrame, aList)
|
nsDisplayList *aList) :
|
||||||
|
nsDisplayItem(aBuilder, aFrame), mStoredList(aBuilder, aFrame, aList)
|
||||||
{
|
{
|
||||||
MOZ_COUNT_CTOR(nsDisplayTransform);
|
MOZ_COUNT_CTOR(nsDisplayTransform);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5368,7 +5368,8 @@ PresShell::ClipListToRange(nsDisplayListBuilder *aBuilder,
|
|||||||
// wrap the item in an nsDisplayClip so that it can be clipped to
|
// wrap the item in an nsDisplayClip so that it can be clipped to
|
||||||
// the selection. If the allocation fails, fall through and delete
|
// the selection. If the allocation fails, fall through and delete
|
||||||
// the item below.
|
// the item below.
|
||||||
itemToInsert = new (aBuilder)nsDisplayClip(frame, frame, i, textRect);
|
itemToInsert = new (aBuilder)
|
||||||
|
nsDisplayClip(aBuilder, frame, frame, i, textRect);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Don't try to descend into subdocuments.
|
// Don't try to descend into subdocuments.
|
||||||
@@ -5715,8 +5716,8 @@ PresShell::AddPrintPreviewBackgroundItem(nsDisplayListBuilder& aBuilder,
|
|||||||
nsIFrame* aFrame,
|
nsIFrame* aFrame,
|
||||||
const nsRect& aBounds)
|
const nsRect& aBounds)
|
||||||
{
|
{
|
||||||
return aList.AppendNewToBottom(
|
return aList.AppendNewToBottom(new (&aBuilder)
|
||||||
new (&aBuilder) nsDisplaySolidColor(aFrame, aBounds, NS_RGB(115, 115, 115)));
|
nsDisplaySolidColor(&aBuilder, aFrame, aBounds, NS_RGB(115, 115, 115)));
|
||||||
}
|
}
|
||||||
|
|
||||||
static PRBool
|
static PRBool
|
||||||
@@ -5772,7 +5773,7 @@ nsresult PresShell::AddCanvasBackgroundColorItem(nsDisplayListBuilder& aBuilder,
|
|||||||
}
|
}
|
||||||
|
|
||||||
return aList.AppendNewToBottom(
|
return aList.AppendNewToBottom(
|
||||||
new (&aBuilder) nsDisplaySolidColor(aFrame, aBounds, bgcolor));
|
new (&aBuilder) nsDisplaySolidColor(&aBuilder, aFrame, aBounds, bgcolor));
|
||||||
}
|
}
|
||||||
|
|
||||||
void PresShell::UpdateCanvasBackground()
|
void PresShell::UpdateCanvasBackground()
|
||||||
|
|||||||
@@ -93,8 +93,9 @@ nsButtonFrameRenderer::isDisabled()
|
|||||||
|
|
||||||
class nsDisplayButtonBoxShadowOuter : public nsDisplayItem {
|
class nsDisplayButtonBoxShadowOuter : public nsDisplayItem {
|
||||||
public:
|
public:
|
||||||
nsDisplayButtonBoxShadowOuter(nsButtonFrameRenderer* aRenderer)
|
nsDisplayButtonBoxShadowOuter(nsDisplayListBuilder* aBuilder,
|
||||||
: nsDisplayItem(aRenderer->GetFrame()), mBFR(aRenderer) {
|
nsButtonFrameRenderer* aRenderer)
|
||||||
|
: nsDisplayItem(aBuilder, aRenderer->GetFrame()), mBFR(aRenderer) {
|
||||||
MOZ_COUNT_CTOR(nsDisplayButtonBoxShadowOuter);
|
MOZ_COUNT_CTOR(nsDisplayButtonBoxShadowOuter);
|
||||||
}
|
}
|
||||||
#ifdef NS_BUILD_REFCNT_LOGGING
|
#ifdef NS_BUILD_REFCNT_LOGGING
|
||||||
@@ -130,8 +131,9 @@ nsDisplayButtonBoxShadowOuter::Paint(nsDisplayListBuilder* aBuilder,
|
|||||||
|
|
||||||
class nsDisplayButtonBorderBackground : public nsDisplayItem {
|
class nsDisplayButtonBorderBackground : public nsDisplayItem {
|
||||||
public:
|
public:
|
||||||
nsDisplayButtonBorderBackground(nsButtonFrameRenderer* aRenderer)
|
nsDisplayButtonBorderBackground(nsDisplayListBuilder* aBuilder,
|
||||||
: nsDisplayItem(aRenderer->GetFrame()), mBFR(aRenderer) {
|
nsButtonFrameRenderer* aRenderer)
|
||||||
|
: nsDisplayItem(aBuilder, aRenderer->GetFrame()), mBFR(aRenderer) {
|
||||||
MOZ_COUNT_CTOR(nsDisplayButtonBorderBackground);
|
MOZ_COUNT_CTOR(nsDisplayButtonBorderBackground);
|
||||||
}
|
}
|
||||||
#ifdef NS_BUILD_REFCNT_LOGGING
|
#ifdef NS_BUILD_REFCNT_LOGGING
|
||||||
@@ -153,8 +155,9 @@ private:
|
|||||||
|
|
||||||
class nsDisplayButtonForeground : public nsDisplayItem {
|
class nsDisplayButtonForeground : public nsDisplayItem {
|
||||||
public:
|
public:
|
||||||
nsDisplayButtonForeground(nsButtonFrameRenderer* aRenderer)
|
nsDisplayButtonForeground(nsDisplayListBuilder* aBuilder,
|
||||||
: nsDisplayItem(aRenderer->GetFrame()), mBFR(aRenderer) {
|
nsButtonFrameRenderer* aRenderer)
|
||||||
|
: nsDisplayItem(aBuilder, aRenderer->GetFrame()), mBFR(aRenderer) {
|
||||||
MOZ_COUNT_CTOR(nsDisplayButtonForeground);
|
MOZ_COUNT_CTOR(nsDisplayButtonForeground);
|
||||||
}
|
}
|
||||||
#ifdef NS_BUILD_REFCNT_LOGGING
|
#ifdef NS_BUILD_REFCNT_LOGGING
|
||||||
@@ -202,16 +205,16 @@ nsButtonFrameRenderer::DisplayButton(nsDisplayListBuilder* aBuilder,
|
|||||||
{
|
{
|
||||||
if (mFrame->GetStyleBorder()->mBoxShadow) {
|
if (mFrame->GetStyleBorder()->mBoxShadow) {
|
||||||
nsresult rv = aBackground->AppendNewToTop(new (aBuilder)
|
nsresult rv = aBackground->AppendNewToTop(new (aBuilder)
|
||||||
nsDisplayButtonBoxShadowOuter(this));
|
nsDisplayButtonBoxShadowOuter(aBuilder, this));
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
}
|
}
|
||||||
|
|
||||||
nsresult rv = aBackground->AppendNewToTop(new (aBuilder)
|
nsresult rv = aBackground->AppendNewToTop(new (aBuilder)
|
||||||
nsDisplayButtonBorderBackground(this));
|
nsDisplayButtonBorderBackground(aBuilder, this));
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
|
|
||||||
return aForeground->AppendNewToTop(new (aBuilder)
|
return aForeground->AppendNewToTop(new (aBuilder)
|
||||||
nsDisplayButtonForeground(this));
|
nsDisplayButtonForeground(aBuilder, this));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
@@ -1313,8 +1313,9 @@ nsComboboxControlFrame::UpdateRecentIndex(PRInt32 aIndex)
|
|||||||
|
|
||||||
class nsDisplayComboboxFocus : public nsDisplayItem {
|
class nsDisplayComboboxFocus : public nsDisplayItem {
|
||||||
public:
|
public:
|
||||||
nsDisplayComboboxFocus(nsComboboxControlFrame* aFrame)
|
nsDisplayComboboxFocus(nsDisplayListBuilder* aBuilder,
|
||||||
: nsDisplayItem(aFrame) {
|
nsComboboxControlFrame* aFrame)
|
||||||
|
: nsDisplayItem(aBuilder, aFrame) {
|
||||||
MOZ_COUNT_CTOR(nsDisplayComboboxFocus);
|
MOZ_COUNT_CTOR(nsDisplayComboboxFocus);
|
||||||
}
|
}
|
||||||
#ifdef NS_BUILD_REFCNT_LOGGING
|
#ifdef NS_BUILD_REFCNT_LOGGING
|
||||||
@@ -1367,8 +1368,8 @@ nsComboboxControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||||||
if ((!IsThemed(disp) ||
|
if ((!IsThemed(disp) ||
|
||||||
!presContext->GetTheme()->ThemeDrawsFocusForWidget(presContext, this, disp->mAppearance)) &&
|
!presContext->GetTheme()->ThemeDrawsFocusForWidget(presContext, this, disp->mAppearance)) &&
|
||||||
mDisplayFrame && IsVisibleForPainting(aBuilder)) {
|
mDisplayFrame && IsVisibleForPainting(aBuilder)) {
|
||||||
nsresult rv = aLists.Content()->AppendNewToTop(new (aBuilder)
|
nsresult rv = aLists.Content()->AppendNewToTop(
|
||||||
nsDisplayComboboxFocus(this));
|
new (aBuilder) nsDisplayComboboxFocus(aBuilder, this));
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -176,8 +176,9 @@ nsFieldSetFrame::SetInitialChildList(nsIAtom* aListName,
|
|||||||
|
|
||||||
class nsDisplayFieldSetBorderBackground : public nsDisplayItem {
|
class nsDisplayFieldSetBorderBackground : public nsDisplayItem {
|
||||||
public:
|
public:
|
||||||
nsDisplayFieldSetBorderBackground(nsFieldSetFrame* aFrame)
|
nsDisplayFieldSetBorderBackground(nsDisplayListBuilder* aBuilder,
|
||||||
: nsDisplayItem(aFrame) {
|
nsFieldSetFrame* aFrame)
|
||||||
|
: nsDisplayItem(aBuilder, aFrame) {
|
||||||
MOZ_COUNT_CTOR(nsDisplayFieldSetBorderBackground);
|
MOZ_COUNT_CTOR(nsDisplayFieldSetBorderBackground);
|
||||||
}
|
}
|
||||||
#ifdef NS_BUILD_REFCNT_LOGGING
|
#ifdef NS_BUILD_REFCNT_LOGGING
|
||||||
@@ -222,14 +223,14 @@ nsFieldSetFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||||||
if (IsVisibleForPainting(aBuilder)) {
|
if (IsVisibleForPainting(aBuilder)) {
|
||||||
if (GetStyleBorder()->mBoxShadow) {
|
if (GetStyleBorder()->mBoxShadow) {
|
||||||
nsresult rv = aLists.BorderBackground()->AppendNewToTop(new (aBuilder)
|
nsresult rv = aLists.BorderBackground()->AppendNewToTop(new (aBuilder)
|
||||||
nsDisplayBoxShadowOuter(this));
|
nsDisplayBoxShadowOuter(aBuilder, this));
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
}
|
}
|
||||||
|
|
||||||
// don't bother checking to see if we really have a border or background.
|
// don't bother checking to see if we really have a border or background.
|
||||||
// we usually will have a border.
|
// we usually will have a border.
|
||||||
nsresult rv = aLists.BorderBackground()->AppendNewToTop(new (aBuilder)
|
nsresult rv = aLists.BorderBackground()->AppendNewToTop(new (aBuilder)
|
||||||
nsDisplayFieldSetBorderBackground(this));
|
nsDisplayFieldSetBorderBackground(aBuilder, this));
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
|
|
||||||
rv = DisplayOutlineUnconditional(aBuilder, aLists);
|
rv = DisplayOutlineUnconditional(aBuilder, aLists);
|
||||||
|
|||||||
@@ -1007,7 +1007,7 @@ nsFileControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||||||
// box-shadow
|
// box-shadow
|
||||||
if (GetStyleBorder()->mBoxShadow) {
|
if (GetStyleBorder()->mBoxShadow) {
|
||||||
nsresult rv = aLists.BorderBackground()->AppendNewToTop(new (aBuilder)
|
nsresult rv = aLists.BorderBackground()->AppendNewToTop(new (aBuilder)
|
||||||
nsDisplayBoxShadowOuter(this));
|
nsDisplayBoxShadowOuter(aBuilder, this));
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1031,14 +1031,12 @@ nsFileControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||||||
// Disabled file controls don't pass mouse events to their children, so we
|
// Disabled file controls don't pass mouse events to their children, so we
|
||||||
// put an invisible item in the display list above the children
|
// put an invisible item in the display list above the children
|
||||||
// just to catch events
|
// just to catch events
|
||||||
// REVIEW: I'm not sure why we do this, but that's what nsFileControlFrame::
|
|
||||||
// GetFrameForPoint was doing
|
|
||||||
if (mContent->HasAttr(kNameSpaceID_None, nsGkAtoms::disabled) &&
|
if (mContent->HasAttr(kNameSpaceID_None, nsGkAtoms::disabled) &&
|
||||||
IsVisibleForPainting(aBuilder)) {
|
IsVisibleForPainting(aBuilder)) {
|
||||||
nsDisplayItem* item = new (aBuilder) nsDisplayEventReceiver(this);
|
rv = aLists.Content()->AppendNewToTop(
|
||||||
if (!item)
|
new (aBuilder) nsDisplayEventReceiver(aBuilder, this));
|
||||||
return NS_ERROR_OUT_OF_MEMORY;
|
if (NS_FAILED(rv))
|
||||||
aLists.Content()->AppendToTop(item);
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
return DisplaySelectionOverlay(aBuilder, aLists);
|
return DisplaySelectionOverlay(aBuilder, aLists);
|
||||||
|
|||||||
@@ -153,7 +153,7 @@ nsGfxCheckboxControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||||||
return NS_OK; // No need to paint the checkmark. The theme will do it.
|
return NS_OK; // No need to paint the checkmark. The theme will do it.
|
||||||
|
|
||||||
return aLists.Content()->AppendNewToTop(new (aBuilder)
|
return aLists.Content()->AppendNewToTop(new (aBuilder)
|
||||||
nsDisplayGeneric(this,
|
nsDisplayGeneric(aBuilder, this,
|
||||||
IsIndeterminate()
|
IsIndeterminate()
|
||||||
? PaintIndeterminateMark : PaintCheckMark,
|
? PaintIndeterminateMark : PaintCheckMark,
|
||||||
"CheckedCheckbox",
|
"CheckedCheckbox",
|
||||||
|
|||||||
@@ -120,6 +120,7 @@ nsGfxRadioControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
|
||||||
return aLists.Content()->AppendNewToTop(new (aBuilder)
|
return aLists.Content()->AppendNewToTop(new (aBuilder)
|
||||||
nsDisplayGeneric(this, PaintCheckedRadioButton, "CheckedRadioButton",
|
nsDisplayGeneric(aBuilder, this, PaintCheckedRadioButton,
|
||||||
|
"CheckedRadioButton",
|
||||||
nsDisplayItem::TYPE_CHECKED_RADIOBUTTON));
|
nsDisplayItem::TYPE_CHECKED_RADIOBUTTON));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -241,7 +241,7 @@ nsListControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||||||
// this frame as the root of a stacking context we need make sure to draw
|
// this frame as the root of a stacking context we need make sure to draw
|
||||||
// some opaque color over the whole widget. (Bug 511323)
|
// some opaque color over the whole widget. (Bug 511323)
|
||||||
aLists.BorderBackground()->AppendNewToBottom(
|
aLists.BorderBackground()->AppendNewToBottom(
|
||||||
new (aBuilder) nsDisplaySolidColor(
|
new (aBuilder) nsDisplaySolidColor(aBuilder,
|
||||||
this, nsRect(aBuilder->ToReferenceFrame(this), GetSize()),
|
this, nsRect(aBuilder->ToReferenceFrame(this), GetSize()),
|
||||||
mLastDropdownBackstopColor));
|
mLastDropdownBackstopColor));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -92,10 +92,12 @@ nsSelectsAreaFrame::IsOptionElementFrame(nsIFrame *aFrame)
|
|||||||
*/
|
*/
|
||||||
class nsDisplayOptionEventGrabber : public nsDisplayWrapList {
|
class nsDisplayOptionEventGrabber : public nsDisplayWrapList {
|
||||||
public:
|
public:
|
||||||
nsDisplayOptionEventGrabber(nsIFrame* aFrame, nsDisplayItem* aItem)
|
nsDisplayOptionEventGrabber(nsDisplayListBuilder* aBuilder,
|
||||||
: nsDisplayWrapList(aFrame, aItem) {}
|
nsIFrame* aFrame, nsDisplayItem* aItem)
|
||||||
nsDisplayOptionEventGrabber(nsIFrame* aFrame, nsDisplayList* aList)
|
: nsDisplayWrapList(aBuilder, aFrame, aItem) {}
|
||||||
: nsDisplayWrapList(aFrame, aList) {}
|
nsDisplayOptionEventGrabber(nsDisplayListBuilder* aBuilder,
|
||||||
|
nsIFrame* aFrame, nsDisplayList* aList)
|
||||||
|
: nsDisplayWrapList(aBuilder, aFrame, aList) {}
|
||||||
virtual void HitTest(nsDisplayListBuilder* aBuilder, const nsRect& aRect,
|
virtual void HitTest(nsDisplayListBuilder* aBuilder, const nsRect& aRect,
|
||||||
HitTestState* aState, nsTArray<nsIFrame*> *aOutFrames);
|
HitTestState* aState, nsTArray<nsIFrame*> *aOutFrames);
|
||||||
NS_DISPLAY_DECL_NAME("OptionEventGrabber", TYPE_OPTION_EVENT_GRABBER)
|
NS_DISPLAY_DECL_NAME("OptionEventGrabber", TYPE_OPTION_EVENT_GRABBER)
|
||||||
@@ -128,7 +130,8 @@ void nsDisplayOptionEventGrabber::HitTest(nsDisplayListBuilder* aBuilder,
|
|||||||
|
|
||||||
nsDisplayWrapList* nsDisplayOptionEventGrabber::WrapWithClone(
|
nsDisplayWrapList* nsDisplayOptionEventGrabber::WrapWithClone(
|
||||||
nsDisplayListBuilder* aBuilder, nsDisplayItem* aItem) {
|
nsDisplayListBuilder* aBuilder, nsDisplayItem* aItem) {
|
||||||
return new (aBuilder) nsDisplayOptionEventGrabber(aItem->GetUnderlyingFrame(), aItem);
|
return new (aBuilder)
|
||||||
|
nsDisplayOptionEventGrabber(aBuilder, aItem->GetUnderlyingFrame(), aItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
class nsOptionEventGrabberWrapper : public nsDisplayWrapper
|
class nsOptionEventGrabberWrapper : public nsDisplayWrapper
|
||||||
@@ -139,11 +142,11 @@ public:
|
|||||||
nsIFrame* aFrame, nsDisplayList* aList) {
|
nsIFrame* aFrame, nsDisplayList* aList) {
|
||||||
// We can't specify the underlying frame here. We need this list to be
|
// We can't specify the underlying frame here. We need this list to be
|
||||||
// exploded if sorted.
|
// exploded if sorted.
|
||||||
return new (aBuilder) nsDisplayOptionEventGrabber(nsnull, aList);
|
return new (aBuilder) nsDisplayOptionEventGrabber(aBuilder, nsnull, aList);
|
||||||
}
|
}
|
||||||
virtual nsDisplayItem* WrapItem(nsDisplayListBuilder* aBuilder,
|
virtual nsDisplayItem* WrapItem(nsDisplayListBuilder* aBuilder,
|
||||||
nsDisplayItem* aItem) {
|
nsDisplayItem* aItem) {
|
||||||
return new (aBuilder) nsDisplayOptionEventGrabber(aItem->GetUnderlyingFrame(), aItem);
|
return new (aBuilder) nsDisplayOptionEventGrabber(aBuilder, aItem->GetUnderlyingFrame(), aItem);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -160,7 +163,9 @@ static nsListControlFrame* GetEnclosingListFrame(nsIFrame* aSelectsAreaFrame)
|
|||||||
|
|
||||||
class nsDisplayListFocus : public nsDisplayItem {
|
class nsDisplayListFocus : public nsDisplayItem {
|
||||||
public:
|
public:
|
||||||
nsDisplayListFocus(nsSelectsAreaFrame* aFrame) : nsDisplayItem(aFrame) {
|
nsDisplayListFocus(nsDisplayListBuilder* aBuilder,
|
||||||
|
nsSelectsAreaFrame* aFrame) :
|
||||||
|
nsDisplayItem(aBuilder, aFrame) {
|
||||||
MOZ_COUNT_CTOR(nsDisplayListFocus);
|
MOZ_COUNT_CTOR(nsDisplayListFocus);
|
||||||
}
|
}
|
||||||
#ifdef NS_BUILD_REFCNT_LOGGING
|
#ifdef NS_BUILD_REFCNT_LOGGING
|
||||||
@@ -214,7 +219,7 @@ nsSelectsAreaFrame::BuildDisplayListInternal(nsDisplayListBuilder* aBuilder,
|
|||||||
// because then the list's scrollframe won't clip it (the scrollframe
|
// because then the list's scrollframe won't clip it (the scrollframe
|
||||||
// only clips contained descendants).
|
// only clips contained descendants).
|
||||||
return aLists.Outlines()->AppendNewToTop(new (aBuilder)
|
return aLists.Outlines()->AppendNewToTop(new (aBuilder)
|
||||||
nsDisplayListFocus(this));
|
nsDisplayListFocus(aBuilder, this));
|
||||||
}
|
}
|
||||||
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
|||||||
@@ -185,7 +185,8 @@ nsBulletFrame::DidSetStyleContext(nsStyleContext* aOldStyleContext)
|
|||||||
|
|
||||||
class nsDisplayBullet : public nsDisplayItem {
|
class nsDisplayBullet : public nsDisplayItem {
|
||||||
public:
|
public:
|
||||||
nsDisplayBullet(nsBulletFrame* aFrame) : nsDisplayItem(aFrame) {
|
nsDisplayBullet(nsDisplayListBuilder* aBuilder, nsBulletFrame* aFrame) :
|
||||||
|
nsDisplayItem(aBuilder, aFrame) {
|
||||||
MOZ_COUNT_CTOR(nsDisplayBullet);
|
MOZ_COUNT_CTOR(nsDisplayBullet);
|
||||||
}
|
}
|
||||||
#ifdef NS_BUILD_REFCNT_LOGGING
|
#ifdef NS_BUILD_REFCNT_LOGGING
|
||||||
@@ -220,7 +221,8 @@ nsBulletFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||||||
|
|
||||||
DO_GLOBAL_REFLOW_COUNT_DSP("nsBulletFrame");
|
DO_GLOBAL_REFLOW_COUNT_DSP("nsBulletFrame");
|
||||||
|
|
||||||
return aLists.Content()->AppendNewToTop(new (aBuilder) nsDisplayBullet(this));
|
return aLists.Content()->AppendNewToTop(
|
||||||
|
new (aBuilder) nsDisplayBullet(aBuilder, this));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
@@ -276,8 +276,8 @@ nsDisplayCanvasBackground::Paint(nsDisplayListBuilder* aBuilder,
|
|||||||
*/
|
*/
|
||||||
class nsDisplayCanvasFocus : public nsDisplayItem {
|
class nsDisplayCanvasFocus : public nsDisplayItem {
|
||||||
public:
|
public:
|
||||||
nsDisplayCanvasFocus(nsCanvasFrame *aFrame)
|
nsDisplayCanvasFocus(nsDisplayListBuilder* aBuilder, nsCanvasFrame *aFrame)
|
||||||
: nsDisplayItem(aFrame)
|
: nsDisplayItem(aBuilder, aFrame)
|
||||||
{
|
{
|
||||||
MOZ_COUNT_CTOR(nsDisplayCanvasFocus);
|
MOZ_COUNT_CTOR(nsDisplayCanvasFocus);
|
||||||
}
|
}
|
||||||
@@ -325,7 +325,7 @@ nsCanvasFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||||||
// calling DisplayBorderBackgroundOutline.
|
// calling DisplayBorderBackgroundOutline.
|
||||||
if (IsVisibleForPainting(aBuilder)) {
|
if (IsVisibleForPainting(aBuilder)) {
|
||||||
rv = aLists.BorderBackground()->AppendNewToTop(new (aBuilder)
|
rv = aLists.BorderBackground()->AppendNewToTop(new (aBuilder)
|
||||||
nsDisplayCanvasBackground(this));
|
nsDisplayCanvasBackground(aBuilder, this));
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -362,7 +362,7 @@ nsCanvasFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
|
||||||
return aLists.Outlines()->AppendNewToTop(new (aBuilder)
|
return aLists.Outlines()->AppendNewToTop(new (aBuilder)
|
||||||
nsDisplayCanvasFocus(this));
|
nsDisplayCanvasFocus(aBuilder, this));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
@@ -165,8 +165,8 @@ protected:
|
|||||||
*/
|
*/
|
||||||
class nsDisplayCanvasBackground : public nsDisplayBackground {
|
class nsDisplayCanvasBackground : public nsDisplayBackground {
|
||||||
public:
|
public:
|
||||||
nsDisplayCanvasBackground(nsIFrame *aFrame)
|
nsDisplayCanvasBackground(nsDisplayListBuilder* aBuilder, nsIFrame *aFrame)
|
||||||
: nsDisplayBackground(aFrame)
|
: nsDisplayBackground(aBuilder, aFrame)
|
||||||
{
|
{
|
||||||
mExtraBackgroundColor = NS_RGBA(0,0,0,0);
|
mExtraBackgroundColor = NS_RGBA(0,0,0,0);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1086,7 +1086,7 @@ nsColumnSetFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
|
|
||||||
aLists.BorderBackground()->AppendNewToTop(new (aBuilder)
|
aLists.BorderBackground()->AppendNewToTop(new (aBuilder)
|
||||||
nsDisplayGeneric(this, ::PaintColumnRule, "ColumnRule",
|
nsDisplayGeneric(aBuilder, this, ::PaintColumnRule, "ColumnRule",
|
||||||
nsDisplayItem::TYPE_COLUMN_RULE));
|
nsDisplayItem::TYPE_COLUMN_RULE));
|
||||||
|
|
||||||
nsIFrame* kid = mFrames.FirstChild();
|
nsIFrame* kid = mFrames.FirstChild();
|
||||||
|
|||||||
@@ -825,8 +825,9 @@ nsFrame::DisplaySelection(nsPresContext* aPresContext, PRBool isOkToTurnOn)
|
|||||||
|
|
||||||
class nsDisplaySelectionOverlay : public nsDisplayItem {
|
class nsDisplaySelectionOverlay : public nsDisplayItem {
|
||||||
public:
|
public:
|
||||||
nsDisplaySelectionOverlay(nsFrame* aFrame, PRInt16 aSelectionValue)
|
nsDisplaySelectionOverlay(nsDisplayListBuilder* aBuilder,
|
||||||
: nsDisplayItem(aFrame), mSelectionValue(aSelectionValue) {
|
nsFrame* aFrame, PRInt16 aSelectionValue)
|
||||||
|
: nsDisplayItem(aBuilder, aFrame), mSelectionValue(aSelectionValue) {
|
||||||
MOZ_COUNT_CTOR(nsDisplaySelectionOverlay);
|
MOZ_COUNT_CTOR(nsDisplaySelectionOverlay);
|
||||||
}
|
}
|
||||||
#ifdef NS_BUILD_REFCNT_LOGGING
|
#ifdef NS_BUILD_REFCNT_LOGGING
|
||||||
@@ -929,7 +930,7 @@ nsFrame::DisplaySelectionOverlay(nsDisplayListBuilder* aBuilder,
|
|||||||
}
|
}
|
||||||
|
|
||||||
return aLists.Content()->AppendNewToTop(new (aBuilder)
|
return aLists.Content()->AppendNewToTop(new (aBuilder)
|
||||||
nsDisplaySelectionOverlay(this, selectionValue));
|
nsDisplaySelectionOverlay(aBuilder, this, selectionValue));
|
||||||
}
|
}
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
@@ -939,7 +940,8 @@ nsFrame::DisplayOutlineUnconditional(nsDisplayListBuilder* aBuilder,
|
|||||||
if (GetStyleOutline()->GetOutlineStyle() == NS_STYLE_BORDER_STYLE_NONE)
|
if (GetStyleOutline()->GetOutlineStyle() == NS_STYLE_BORDER_STYLE_NONE)
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
|
||||||
return aLists.Outlines()->AppendNewToTop(new (aBuilder) nsDisplayOutline(this));
|
return aLists.Outlines()->AppendNewToTop(
|
||||||
|
new (aBuilder) nsDisplayOutline(aBuilder, this));
|
||||||
}
|
}
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
@@ -960,7 +962,7 @@ nsIFrame::DisplayCaret(nsDisplayListBuilder* aBuilder,
|
|||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
|
||||||
return aList->AppendNewToTop(
|
return aList->AppendNewToTop(
|
||||||
new (aBuilder) nsDisplayCaret(this, aBuilder->GetCaret()));
|
new (aBuilder) nsDisplayCaret(aBuilder, this, aBuilder->GetCaret()));
|
||||||
}
|
}
|
||||||
|
|
||||||
nscolor
|
nscolor
|
||||||
@@ -990,7 +992,7 @@ nsFrame::DisplayBackgroundUnconditional(nsDisplayListBuilder* aBuilder,
|
|||||||
if (aBuilder->IsForEventDelivery() || aForceBackground ||
|
if (aBuilder->IsForEventDelivery() || aForceBackground ||
|
||||||
!GetStyleBackground()->IsTransparent() || GetStyleDisplay()->mAppearance) {
|
!GetStyleBackground()->IsTransparent() || GetStyleDisplay()->mAppearance) {
|
||||||
return aLists.BorderBackground()->AppendNewToTop(new (aBuilder)
|
return aLists.BorderBackground()->AppendNewToTop(new (aBuilder)
|
||||||
nsDisplayBackground(this));
|
nsDisplayBackground(aBuilder, this));
|
||||||
}
|
}
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
@@ -1009,7 +1011,7 @@ nsFrame::DisplayBorderBackgroundOutline(nsDisplayListBuilder* aBuilder,
|
|||||||
PRBool hasBoxShadow = GetEffectiveBoxShadows() != nsnull;
|
PRBool hasBoxShadow = GetEffectiveBoxShadows() != nsnull;
|
||||||
if (hasBoxShadow) {
|
if (hasBoxShadow) {
|
||||||
nsresult rv = aLists.BorderBackground()->AppendNewToTop(new (aBuilder)
|
nsresult rv = aLists.BorderBackground()->AppendNewToTop(new (aBuilder)
|
||||||
nsDisplayBoxShadowOuter(this));
|
nsDisplayBoxShadowOuter(aBuilder, this));
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1019,13 +1021,13 @@ nsFrame::DisplayBorderBackgroundOutline(nsDisplayListBuilder* aBuilder,
|
|||||||
|
|
||||||
if (hasBoxShadow) {
|
if (hasBoxShadow) {
|
||||||
rv = aLists.BorderBackground()->AppendNewToTop(new (aBuilder)
|
rv = aLists.BorderBackground()->AppendNewToTop(new (aBuilder)
|
||||||
nsDisplayBoxShadowInner(this));
|
nsDisplayBoxShadowInner(aBuilder, this));
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (HasBorder()) {
|
if (HasBorder()) {
|
||||||
rv = aLists.BorderBackground()->AppendNewToTop(new (aBuilder)
|
rv = aLists.BorderBackground()->AppendNewToTop(new (aBuilder)
|
||||||
nsDisplayBorder(this));
|
nsDisplayBorder(aBuilder, this));
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1128,13 +1130,13 @@ public:
|
|||||||
// We are not a stacking context root. There is no valid underlying
|
// We are not a stacking context root. There is no valid underlying
|
||||||
// frame for the whole list. These items are all in-flow descendants so
|
// frame for the whole list. These items are all in-flow descendants so
|
||||||
// we can safely just clip them.
|
// we can safely just clip them.
|
||||||
return new (aBuilder) nsDisplayClip(nsnull, mContainer, aList, mRect);
|
return new (aBuilder) nsDisplayClip(aBuilder, nsnull, mContainer, aList, mRect);
|
||||||
}
|
}
|
||||||
virtual nsDisplayItem* WrapItem(nsDisplayListBuilder* aBuilder,
|
virtual nsDisplayItem* WrapItem(nsDisplayListBuilder* aBuilder,
|
||||||
nsDisplayItem* aItem) {
|
nsDisplayItem* aItem) {
|
||||||
nsIFrame* f = aItem->GetUnderlyingFrame();
|
nsIFrame* f = aItem->GetUnderlyingFrame();
|
||||||
if (mClipAll || nsLayoutUtils::IsProperAncestorFrame(mContainer, f, nsnull))
|
if (mClipAll || nsLayoutUtils::IsProperAncestorFrame(mContainer, f, nsnull))
|
||||||
return new (aBuilder) nsDisplayClip(f, mContainer, aItem, mRect);
|
return new (aBuilder) nsDisplayClip(aBuilder, f, mContainer, aItem, mRect);
|
||||||
return aItem;
|
return aItem;
|
||||||
}
|
}
|
||||||
protected:
|
protected:
|
||||||
@@ -1153,11 +1155,11 @@ public:
|
|||||||
nsIFrame* aFrame, nsDisplayList* aList) {
|
nsIFrame* aFrame, nsDisplayList* aList) {
|
||||||
// We are not a stacking context root. There is no valid underlying
|
// We are not a stacking context root. There is no valid underlying
|
||||||
// frame for the whole list.
|
// frame for the whole list.
|
||||||
return new (aBuilder) nsDisplayClip(nsnull, mContainer, aList, mRect);
|
return new (aBuilder) nsDisplayClip(aBuilder, nsnull, mContainer, aList, mRect);
|
||||||
}
|
}
|
||||||
virtual nsDisplayItem* WrapItem(nsDisplayListBuilder* aBuilder,
|
virtual nsDisplayItem* WrapItem(nsDisplayListBuilder* aBuilder,
|
||||||
nsDisplayItem* aItem) {
|
nsDisplayItem* aItem) {
|
||||||
return new (aBuilder) nsDisplayClip(aItem->GetUnderlyingFrame(),
|
return new (aBuilder) nsDisplayClip(aBuilder, aItem->GetUnderlyingFrame(),
|
||||||
mContainer, aItem, mRect);
|
mContainer, aItem, mRect);
|
||||||
}
|
}
|
||||||
protected:
|
protected:
|
||||||
@@ -1217,14 +1219,14 @@ DisplayDebugBorders(nsDisplayListBuilder* aBuilder, nsIFrame* aFrame,
|
|||||||
// REVIEW: From nsContainerFrame::PaintChild
|
// REVIEW: From nsContainerFrame::PaintChild
|
||||||
if (nsFrame::GetShowFrameBorders() && !aFrame->GetRect().IsEmpty()) {
|
if (nsFrame::GetShowFrameBorders() && !aFrame->GetRect().IsEmpty()) {
|
||||||
aLists.Outlines()->AppendNewToTop(new (aBuilder)
|
aLists.Outlines()->AppendNewToTop(new (aBuilder)
|
||||||
nsDisplayGeneric(aFrame, PaintDebugBorder, "DebugBorder",
|
nsDisplayGeneric(aBuilder, aFrame, PaintDebugBorder, "DebugBorder",
|
||||||
nsDisplayItem::TYPE_DEBUG_BORDER));
|
nsDisplayItem::TYPE_DEBUG_BORDER));
|
||||||
}
|
}
|
||||||
// Draw a border around the current event target
|
// Draw a border around the current event target
|
||||||
if (nsFrame::GetShowEventTargetFrameBorder() &&
|
if (nsFrame::GetShowEventTargetFrameBorder() &&
|
||||||
aFrame->PresContext()->PresShell()->GetDrawEventTargetFrame() == aFrame) {
|
aFrame->PresContext()->PresShell()->GetDrawEventTargetFrame() == aFrame) {
|
||||||
aLists.Outlines()->AppendNewToTop(new (aBuilder)
|
aLists.Outlines()->AppendNewToTop(new (aBuilder)
|
||||||
nsDisplayGeneric(aFrame, PaintEventTargetBorder, "EventTargetBorder",
|
nsDisplayGeneric(aBuilder, aFrame, PaintEventTargetBorder, "EventTargetBorder",
|
||||||
nsDisplayItem::TYPE_EVENT_TARGET_BORDER));
|
nsDisplayItem::TYPE_EVENT_TARGET_BORDER));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1361,22 +1363,20 @@ nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
|
|||||||
#ifdef MOZ_SVG
|
#ifdef MOZ_SVG
|
||||||
/* If there are any SVG effects, wrap up the list in an effects list. */
|
/* If there are any SVG effects, wrap up the list in an effects list. */
|
||||||
if (usingSVGEffects) {
|
if (usingSVGEffects) {
|
||||||
nsDisplaySVGEffects* svgList = new (aBuilder) nsDisplaySVGEffects(this, &resultList);
|
|
||||||
if (!svgList)
|
|
||||||
return NS_ERROR_OUT_OF_MEMORY;
|
|
||||||
|
|
||||||
/* List now emptied, so add the new list to the top. */
|
/* List now emptied, so add the new list to the top. */
|
||||||
resultList.AppendToTop(svgList);
|
rv = resultList.AppendNewToTop(
|
||||||
|
new (aBuilder) nsDisplaySVGEffects(aBuilder, this, &resultList));
|
||||||
|
if (NS_FAILED(rv))
|
||||||
|
return rv;
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* If there is any opacity, wrap it up in an opacity list. */
|
/* If there is any opacity, wrap it up in an opacity list. */
|
||||||
if (disp->mOpacity < 1.0f) {
|
if (disp->mOpacity < 1.0f) {
|
||||||
nsDisplayOpacity* opacityList = new (aBuilder) nsDisplayOpacity(this, &resultList);
|
rv = resultList.AppendNewToTop(
|
||||||
if (!opacityList)
|
new (aBuilder) nsDisplayOpacity(aBuilder, this, &resultList));
|
||||||
return NS_ERROR_OUT_OF_MEMORY;
|
if (NS_FAILED(rv))
|
||||||
|
return rv;
|
||||||
resultList.AppendToTop(opacityList);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If we're going to apply a transformation, wrap everything in an
|
/* If we're going to apply a transformation, wrap everything in an
|
||||||
@@ -1384,11 +1384,10 @@ nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
|
|||||||
*/
|
*/
|
||||||
if ((mState & NS_FRAME_MAY_BE_TRANSFORMED) &&
|
if ((mState & NS_FRAME_MAY_BE_TRANSFORMED) &&
|
||||||
disp->HasTransform()) {
|
disp->HasTransform()) {
|
||||||
nsDisplayTransform* transform = new (aBuilder) nsDisplayTransform(this, &resultList);
|
rv = resultList.AppendNewToTop(
|
||||||
if (!transform)
|
new (aBuilder) nsDisplayTransform(aBuilder, this, &resultList));
|
||||||
return NS_ERROR_OUT_OF_MEMORY;
|
if (NS_FAILED(rv))
|
||||||
|
return rv;
|
||||||
resultList.AppendToTop(transform);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
aList->AppendToTop(&resultList);
|
aList->AppendToTop(&resultList);
|
||||||
@@ -1598,11 +1597,11 @@ nsIFrame::BuildDisplayListForChild(nsDisplayListBuilder* aBuilder,
|
|||||||
// Genuine stacking contexts, and positioned pseudo-stacking-contexts,
|
// Genuine stacking contexts, and positioned pseudo-stacking-contexts,
|
||||||
// go in this level.
|
// go in this level.
|
||||||
rv = aLists.PositionedDescendants()->AppendNewToTop(new (aBuilder)
|
rv = aLists.PositionedDescendants()->AppendNewToTop(new (aBuilder)
|
||||||
nsDisplayWrapList(aChild, &list));
|
nsDisplayWrapList(aBuilder, aChild, &list));
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
} else if (disp->IsFloating()) {
|
} else if (disp->IsFloating()) {
|
||||||
rv = aLists.Floats()->AppendNewToTop(new (aBuilder)
|
rv = aLists.Floats()->AppendNewToTop(new (aBuilder)
|
||||||
nsDisplayWrapList(aChild, &list));
|
nsDisplayWrapList(aBuilder, aChild, &list));
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
} else {
|
} else {
|
||||||
aLists.Content()->AppendToTop(&list);
|
aLists.Content()->AppendToTop(&list);
|
||||||
|
|||||||
@@ -480,7 +480,7 @@ nsSubDocumentFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||||||
if (NS_SUCCEEDED(rv)) {
|
if (NS_SUCCEEDED(rv)) {
|
||||||
if (subdocRootFrame && parentAPD != subdocAPD) {
|
if (subdocRootFrame && parentAPD != subdocAPD) {
|
||||||
nsDisplayZoom* zoomItem =
|
nsDisplayZoom* zoomItem =
|
||||||
new (aBuilder) nsDisplayZoom(subdocRootFrame, &childItems,
|
new (aBuilder) nsDisplayZoom(aBuilder, subdocRootFrame, &childItems,
|
||||||
subdocAPD, parentAPD);
|
subdocAPD, parentAPD);
|
||||||
childItems.AppendToTop(zoomItem);
|
childItems.AppendToTop(zoomItem);
|
||||||
} else if (!nsContentUtils::IsChildOfSameType(presShell->GetDocument())) {
|
} else if (!nsContentUtils::IsChildOfSameType(presShell->GetDocument())) {
|
||||||
@@ -488,13 +488,13 @@ nsSubDocumentFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||||||
// If we need a zoom item then we are good because it creates a layer. If
|
// If we need a zoom item then we are good because it creates a layer. If
|
||||||
// not then create our own layer.
|
// not then create our own layer.
|
||||||
nsDisplayOwnLayer* layerItem = new (aBuilder) nsDisplayOwnLayer(
|
nsDisplayOwnLayer* layerItem = new (aBuilder) nsDisplayOwnLayer(
|
||||||
subdocRootFrame ? subdocRootFrame : this, &childItems);
|
aBuilder, subdocRootFrame ? subdocRootFrame : this, &childItems);
|
||||||
childItems.AppendToTop(layerItem);
|
childItems.AppendToTop(layerItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Clip children to the child root frame's rectangle
|
// Clip children to the child root frame's rectangle
|
||||||
rv = aLists.Content()->AppendNewToTop(
|
rv = aLists.Content()->AppendNewToTop(
|
||||||
new (aBuilder) nsDisplayClip(this, this, &childItems,
|
new (aBuilder) nsDisplayClip(aBuilder, this, this, &childItems,
|
||||||
subdocBoundsInParentUnits));
|
subdocBoundsInParentUnits));
|
||||||
}
|
}
|
||||||
// delete childItems in case of OOM
|
// delete childItems in case of OOM
|
||||||
|
|||||||
@@ -810,11 +810,8 @@ nsHTMLFramesetFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
|
|
||||||
if (mDragger && aBuilder->IsForEventDelivery()) {
|
if (mDragger && aBuilder->IsForEventDelivery()) {
|
||||||
// REVIEW: GetFrameForPoint would always target ourselves if mDragger set
|
rv = aLists.Content()->AppendNewToTop(
|
||||||
nsDisplayItem* item = new (aBuilder) nsDisplayEventReceiver(this);
|
new (aBuilder) nsDisplayEventReceiver(aBuilder, this));
|
||||||
if (!item)
|
|
||||||
return NS_ERROR_OUT_OF_MEMORY;
|
|
||||||
aLists.Content()->AppendToTop(item);
|
|
||||||
}
|
}
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
@@ -1620,8 +1617,9 @@ nsHTMLFramesetBorderFrame::Reflow(nsPresContext* aPresContext,
|
|||||||
|
|
||||||
class nsDisplayFramesetBorder : public nsDisplayItem {
|
class nsDisplayFramesetBorder : public nsDisplayItem {
|
||||||
public:
|
public:
|
||||||
nsDisplayFramesetBorder(nsHTMLFramesetBorderFrame* aFrame)
|
nsDisplayFramesetBorder(nsDisplayListBuilder* aBuilder,
|
||||||
: nsDisplayItem(aFrame) {
|
nsHTMLFramesetBorderFrame* aFrame)
|
||||||
|
: nsDisplayItem(aBuilder, aFrame) {
|
||||||
MOZ_COUNT_CTOR(nsDisplayFramesetBorder);
|
MOZ_COUNT_CTOR(nsDisplayFramesetBorder);
|
||||||
}
|
}
|
||||||
#ifdef NS_BUILD_REFCNT_LOGGING
|
#ifdef NS_BUILD_REFCNT_LOGGING
|
||||||
@@ -1653,11 +1651,8 @@ nsHTMLFramesetBorderFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||||||
const nsRect& aDirtyRect,
|
const nsRect& aDirtyRect,
|
||||||
const nsDisplayListSet& aLists)
|
const nsDisplayListSet& aLists)
|
||||||
{
|
{
|
||||||
nsDisplayItem* item = new (aBuilder) nsDisplayFramesetBorder(this);
|
return aLists.Content()->AppendNewToTop(
|
||||||
if (!item)
|
new (aBuilder) nsDisplayFramesetBorder(aBuilder, this));
|
||||||
return NS_ERROR_OUT_OF_MEMORY;
|
|
||||||
aLists.Content()->AppendToTop(item);
|
|
||||||
return NS_OK;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void nsHTMLFramesetBorderFrame::PaintBorder(nsIRenderingContext& aRenderingContext,
|
void nsHTMLFramesetBorderFrame::PaintBorder(nsIRenderingContext& aRenderingContext,
|
||||||
@@ -1829,7 +1824,9 @@ nsHTMLFramesetBlankFrame::Reflow(nsPresContext* aPresContext,
|
|||||||
|
|
||||||
class nsDisplayFramesetBlank : public nsDisplayItem {
|
class nsDisplayFramesetBlank : public nsDisplayItem {
|
||||||
public:
|
public:
|
||||||
nsDisplayFramesetBlank(nsIFrame* aFrame) : nsDisplayItem(aFrame) {
|
nsDisplayFramesetBlank(nsDisplayListBuilder* aBuilder,
|
||||||
|
nsIFrame* aFrame) :
|
||||||
|
nsDisplayItem(aBuilder, aFrame) {
|
||||||
MOZ_COUNT_CTOR(nsDisplayFramesetBlank);
|
MOZ_COUNT_CTOR(nsDisplayFramesetBlank);
|
||||||
}
|
}
|
||||||
#ifdef NS_BUILD_REFCNT_LOGGING
|
#ifdef NS_BUILD_REFCNT_LOGGING
|
||||||
@@ -1864,9 +1861,6 @@ nsHTMLFramesetBlankFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||||||
const nsRect& aDirtyRect,
|
const nsRect& aDirtyRect,
|
||||||
const nsDisplayListSet& aLists)
|
const nsDisplayListSet& aLists)
|
||||||
{
|
{
|
||||||
nsDisplayItem* item = new (aBuilder) nsDisplayFramesetBlank(this);
|
return aLists.Content()->AppendNewToTop(
|
||||||
if (!item)
|
new (aBuilder) nsDisplayFramesetBlank(aBuilder, this));
|
||||||
return NS_ERROR_OUT_OF_MEMORY;
|
|
||||||
aLists.Content()->AppendToTop(item);
|
|
||||||
return NS_OK;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1712,7 +1712,8 @@ AppendToTop(nsDisplayListBuilder* aBuilder, nsDisplayList* aDest,
|
|||||||
nsDisplayList* aSource, nsIFrame* aSourceFrame, PRBool aOwnLayer)
|
nsDisplayList* aSource, nsIFrame* aSourceFrame, PRBool aOwnLayer)
|
||||||
{
|
{
|
||||||
if (aOwnLayer) {
|
if (aOwnLayer) {
|
||||||
aDest->AppendNewToTop(new (aBuilder) nsDisplayOwnLayer(aSourceFrame, aSource));
|
aDest->AppendNewToTop(
|
||||||
|
new (aBuilder) nsDisplayOwnLayer(aBuilder, aSourceFrame, aSource));
|
||||||
} else {
|
} else {
|
||||||
aDest->AppendToTop(aSource);
|
aDest->AppendToTop(aSource);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -64,8 +64,8 @@ CanvasElementFromContent(nsIContent *content)
|
|||||||
|
|
||||||
class nsDisplayCanvas : public nsDisplayItem {
|
class nsDisplayCanvas : public nsDisplayItem {
|
||||||
public:
|
public:
|
||||||
nsDisplayCanvas(nsIFrame* aFrame)
|
nsDisplayCanvas(nsDisplayListBuilder* aBuilder, nsIFrame* aFrame)
|
||||||
: nsDisplayItem(aFrame)
|
: nsDisplayItem(aBuilder, aFrame)
|
||||||
{
|
{
|
||||||
MOZ_COUNT_CTOR(nsDisplayCanvas);
|
MOZ_COUNT_CTOR(nsDisplayCanvas);
|
||||||
}
|
}
|
||||||
@@ -283,7 +283,8 @@ nsHTMLCanvasFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||||||
nsresult rv = DisplayBorderBackgroundOutline(aBuilder, aLists);
|
nsresult rv = DisplayBorderBackgroundOutline(aBuilder, aLists);
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
|
|
||||||
rv = aLists.Content()->AppendNewToTop(new (aBuilder) nsDisplayCanvas(this));
|
rv = aLists.Content()->AppendNewToTop(
|
||||||
|
new (aBuilder) nsDisplayCanvas(aBuilder, this));
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
|
|
||||||
return DisplaySelectionOverlay(aBuilder, aLists,
|
return DisplaySelectionOverlay(aBuilder, aLists,
|
||||||
|
|||||||
@@ -73,9 +73,10 @@
|
|||||||
|
|
||||||
class nsDisplayTextDecoration : public nsDisplayItem {
|
class nsDisplayTextDecoration : public nsDisplayItem {
|
||||||
public:
|
public:
|
||||||
nsDisplayTextDecoration(nsHTMLContainerFrame* aFrame, PRUint8 aDecoration,
|
nsDisplayTextDecoration(nsDisplayListBuilder* aBuilder,
|
||||||
|
nsHTMLContainerFrame* aFrame, PRUint8 aDecoration,
|
||||||
nscolor aColor, nsLineBox* aLine)
|
nscolor aColor, nsLineBox* aLine)
|
||||||
: nsDisplayItem(aFrame), mLine(aLine), mColor(aColor),
|
: nsDisplayItem(aBuilder, aFrame), mLine(aLine), mColor(aColor),
|
||||||
mDecoration(aDecoration) {
|
mDecoration(aDecoration) {
|
||||||
MOZ_COUNT_CTOR(nsDisplayTextDecoration);
|
MOZ_COUNT_CTOR(nsDisplayTextDecoration);
|
||||||
}
|
}
|
||||||
@@ -96,9 +97,9 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
nsLineBox* mLine;
|
nsLineBox* mLine;
|
||||||
nscolor mColor;
|
nscolor mColor;
|
||||||
PRUint8 mDecoration;
|
PRUint8 mDecoration;
|
||||||
};
|
};
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -157,10 +158,11 @@ nsDisplayTextDecoration::GetBounds(nsDisplayListBuilder* aBuilder)
|
|||||||
|
|
||||||
class nsDisplayTextShadow : public nsDisplayItem {
|
class nsDisplayTextShadow : public nsDisplayItem {
|
||||||
public:
|
public:
|
||||||
nsDisplayTextShadow(nsHTMLContainerFrame* aFrame,
|
nsDisplayTextShadow(nsDisplayListBuilder* aBuilder,
|
||||||
|
nsHTMLContainerFrame* aFrame,
|
||||||
const PRUint8 aDecoration,
|
const PRUint8 aDecoration,
|
||||||
nsLineBox* aLine)
|
nsLineBox* aLine)
|
||||||
: nsDisplayItem(aFrame), mLine(aLine),
|
: nsDisplayItem(aBuilder, aFrame), mLine(aLine),
|
||||||
mDecorationFlags(aDecoration) {
|
mDecorationFlags(aDecoration) {
|
||||||
MOZ_COUNT_CTOR(nsDisplayTextShadow);
|
MOZ_COUNT_CTOR(nsDisplayTextShadow);
|
||||||
}
|
}
|
||||||
@@ -353,25 +355,25 @@ nsHTMLContainerFrame::DisplayTextDecorations(nsDisplayListBuilder* aBuilder,
|
|||||||
// list, underneath the text and all decorations.
|
// list, underneath the text and all decorations.
|
||||||
if (GetStyleText()->mTextShadow) {
|
if (GetStyleText()->mTextShadow) {
|
||||||
nsresult rv = aBelowTextDecorations->AppendNewToTop(new (aBuilder)
|
nsresult rv = aBelowTextDecorations->AppendNewToTop(new (aBuilder)
|
||||||
nsDisplayTextShadow(this, decorations, aLine));
|
nsDisplayTextShadow(aBuilder, this, decorations, aLine));
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (decorations & NS_STYLE_TEXT_DECORATION_UNDERLINE) {
|
if (decorations & NS_STYLE_TEXT_DECORATION_UNDERLINE) {
|
||||||
nsresult rv = aBelowTextDecorations->AppendNewToTop(new (aBuilder)
|
nsresult rv = aBelowTextDecorations->AppendNewToTop(new (aBuilder)
|
||||||
nsDisplayTextDecoration(this, NS_STYLE_TEXT_DECORATION_UNDERLINE,
|
nsDisplayTextDecoration(aBuilder, this, NS_STYLE_TEXT_DECORATION_UNDERLINE,
|
||||||
underColor, aLine));
|
underColor, aLine));
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
}
|
}
|
||||||
if (decorations & NS_STYLE_TEXT_DECORATION_OVERLINE) {
|
if (decorations & NS_STYLE_TEXT_DECORATION_OVERLINE) {
|
||||||
nsresult rv = aBelowTextDecorations->AppendNewToTop(new (aBuilder)
|
nsresult rv = aBelowTextDecorations->AppendNewToTop(new (aBuilder)
|
||||||
nsDisplayTextDecoration(this, NS_STYLE_TEXT_DECORATION_OVERLINE,
|
nsDisplayTextDecoration(aBuilder, this, NS_STYLE_TEXT_DECORATION_OVERLINE,
|
||||||
overColor, aLine));
|
overColor, aLine));
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
}
|
}
|
||||||
if (decorations & NS_STYLE_TEXT_DECORATION_LINE_THROUGH) {
|
if (decorations & NS_STYLE_TEXT_DECORATION_LINE_THROUGH) {
|
||||||
nsresult rv = aAboveTextDecorations->AppendNewToTop(new (aBuilder)
|
nsresult rv = aAboveTextDecorations->AppendNewToTop(new (aBuilder)
|
||||||
nsDisplayTextDecoration(this, NS_STYLE_TEXT_DECORATION_LINE_THROUGH,
|
nsDisplayTextDecoration(aBuilder, this, NS_STYLE_TEXT_DECORATION_LINE_THROUGH,
|
||||||
strikeColor, aLine));
|
strikeColor, aLine));
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1132,8 +1132,9 @@ static void PaintDebugImageMap(nsIFrame* aFrame, nsIRenderingContext* aCtx,
|
|||||||
*/
|
*/
|
||||||
class nsDisplayImage : public nsDisplayItem {
|
class nsDisplayImage : public nsDisplayItem {
|
||||||
public:
|
public:
|
||||||
nsDisplayImage(nsImageFrame* aFrame, imgIContainer* aImage)
|
nsDisplayImage(nsDisplayListBuilder* aBuilder, nsImageFrame* aFrame,
|
||||||
: nsDisplayItem(aFrame), mImage(aImage) {
|
imgIContainer* aImage)
|
||||||
|
: nsDisplayItem(aBuilder, aFrame), mImage(aImage) {
|
||||||
MOZ_COUNT_CTOR(nsDisplayImage);
|
MOZ_COUNT_CTOR(nsDisplayImage);
|
||||||
}
|
}
|
||||||
virtual ~nsDisplayImage() {
|
virtual ~nsDisplayImage() {
|
||||||
@@ -1235,13 +1236,13 @@ nsImageFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||||||
// No image yet, or image load failed. Draw the alt-text and an icon
|
// No image yet, or image load failed. Draw the alt-text and an icon
|
||||||
// indicating the status
|
// indicating the status
|
||||||
rv = aLists.Content()->AppendNewToTop(new (aBuilder)
|
rv = aLists.Content()->AppendNewToTop(new (aBuilder)
|
||||||
nsDisplayGeneric(this, PaintAltFeedback, "AltFeedback",
|
nsDisplayGeneric(aBuilder, this, PaintAltFeedback, "AltFeedback",
|
||||||
nsDisplayItem::TYPE_ALT_FEEDBACK));
|
nsDisplayItem::TYPE_ALT_FEEDBACK));
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
rv = aLists.Content()->AppendNewToTop(new (aBuilder)
|
rv = aLists.Content()->AppendNewToTop(new (aBuilder)
|
||||||
nsDisplayImage(this, imgCon));
|
nsDisplayImage(aBuilder, this, imgCon));
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
|
|
||||||
// If we were previously displaying an icon, we're not anymore
|
// If we were previously displaying an icon, we're not anymore
|
||||||
@@ -1254,7 +1255,7 @@ nsImageFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
if (GetShowFrameBorders() && GetImageMap(PresContext())) {
|
if (GetShowFrameBorders() && GetImageMap(PresContext())) {
|
||||||
rv = aLists.Outlines()->AppendNewToTop(new (aBuilder)
|
rv = aLists.Outlines()->AppendNewToTop(new (aBuilder)
|
||||||
nsDisplayGeneric(this, PaintDebugImageMap, "DebugImageMap",
|
nsDisplayGeneric(aBuilder, this, PaintDebugImageMap, "DebugImageMap",
|
||||||
nsDisplayItem::TYPE_DEBUG_IMAGE_MAP));
|
nsDisplayItem::TYPE_DEBUG_IMAGE_MAP));
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1344,11 +1344,11 @@ nsObjectFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||||||
// determine if we are printing
|
// determine if we are printing
|
||||||
if (type == nsPresContext::eContext_Print)
|
if (type == nsPresContext::eContext_Print)
|
||||||
return aLists.Content()->AppendNewToTop(new (aBuilder)
|
return aLists.Content()->AppendNewToTop(new (aBuilder)
|
||||||
nsDisplayGeneric(this, PaintPrintPlugin, "PrintPlugin",
|
nsDisplayGeneric(aBuilder, this, PaintPrintPlugin, "PrintPlugin",
|
||||||
nsDisplayItem::TYPE_PRINT_PLUGIN));
|
nsDisplayItem::TYPE_PRINT_PLUGIN));
|
||||||
|
|
||||||
return aLists.Content()->AppendNewToTop(new (aBuilder)
|
return aLists.Content()->AppendNewToTop(new (aBuilder)
|
||||||
nsDisplayPlugin(this));
|
nsDisplayPlugin(aBuilder, this));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
@@ -261,8 +261,8 @@ private:
|
|||||||
|
|
||||||
class nsDisplayPlugin : public nsDisplayItem {
|
class nsDisplayPlugin : public nsDisplayItem {
|
||||||
public:
|
public:
|
||||||
nsDisplayPlugin(nsIFrame* aFrame)
|
nsDisplayPlugin(nsDisplayListBuilder* aBuilder, nsIFrame* aFrame)
|
||||||
: nsDisplayItem(aFrame)
|
: nsDisplayItem(aBuilder, aFrame)
|
||||||
{
|
{
|
||||||
MOZ_COUNT_CTOR(nsDisplayPlugin);
|
MOZ_COUNT_CTOR(nsDisplayPlugin);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -424,19 +424,22 @@ nsPageFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||||||
|
|
||||||
if (PresContext()->IsScreen()) {
|
if (PresContext()->IsScreen()) {
|
||||||
rv = set.BorderBackground()->AppendNewToTop(new (aBuilder)
|
rv = set.BorderBackground()->AppendNewToTop(new (aBuilder)
|
||||||
nsDisplayGeneric(this, ::PaintPrintPreviewBackground, "PrintPreviewBackground",
|
nsDisplayGeneric(aBuilder, this, ::PaintPrintPreviewBackground,
|
||||||
|
"PrintPreviewBackground",
|
||||||
nsDisplayItem::TYPE_PRINT_PREVIEW_BACKGROUND));
|
nsDisplayItem::TYPE_PRINT_PREVIEW_BACKGROUND));
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
}
|
}
|
||||||
|
|
||||||
rv = set.BorderBackground()->AppendNewToTop(new (aBuilder)
|
rv = set.BorderBackground()->AppendNewToTop(new (aBuilder)
|
||||||
nsDisplayGeneric(this, ::PaintPageContent, "PageContent",
|
nsDisplayGeneric(aBuilder, this, ::PaintPageContent,
|
||||||
|
"PageContent",
|
||||||
nsDisplayItem::TYPE_PAGE_CONTENT));
|
nsDisplayItem::TYPE_PAGE_CONTENT));
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
|
|
||||||
if (PresContext()->IsRootPaginatedDocument()) {
|
if (PresContext()->IsRootPaginatedDocument()) {
|
||||||
rv = set.Content()->AppendNewToTop(new (aBuilder)
|
rv = set.Content()->AppendNewToTop(new (aBuilder)
|
||||||
nsDisplayGeneric(this, ::PaintHeaderFooter, "HeaderFooter",
|
nsDisplayGeneric(aBuilder, this, ::PaintHeaderFooter,
|
||||||
|
"HeaderFooter",
|
||||||
nsDisplayItem::TYPE_HEADER_FOOTER));
|
nsDisplayItem::TYPE_HEADER_FOOTER));
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -237,7 +237,7 @@ nsPlaceholderFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
|
||||||
return aLists.Outlines()->AppendNewToTop(new (aBuilder)
|
return aLists.Outlines()->AppendNewToTop(new (aBuilder)
|
||||||
nsDisplayGeneric(this, PaintDebugPlaceholder, "DebugPlaceholder",
|
nsDisplayGeneric(aBuilder, this, PaintDebugPlaceholder, "DebugPlaceholder",
|
||||||
nsDisplayItem::TYPE_DEBUG_PLACEHOLDER));
|
nsDisplayItem::TYPE_DEBUG_PLACEHOLDER));
|
||||||
#else // DEBUG
|
#else // DEBUG
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
|||||||
@@ -714,7 +714,7 @@ nsSimplePageSequenceFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
|
|
||||||
rv = aLists.Content()->AppendNewToTop(new (aBuilder)
|
rv = aLists.Content()->AppendNewToTop(new (aBuilder)
|
||||||
nsDisplayGeneric(this, ::PaintPageSequence, "PageSequence",
|
nsDisplayGeneric(aBuilder, this, ::PaintPageSequence, "PageSequence",
|
||||||
nsDisplayItem::TYPE_PAGE_SEQUENCE));
|
nsDisplayItem::TYPE_PAGE_SEQUENCE));
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
|
|
||||||
|
|||||||
@@ -3927,7 +3927,8 @@ nsTextFrame::DidSetStyleContext(nsStyleContext* aOldStyleContext)
|
|||||||
|
|
||||||
class nsDisplayText : public nsDisplayItem {
|
class nsDisplayText : public nsDisplayItem {
|
||||||
public:
|
public:
|
||||||
nsDisplayText(nsTextFrame* aFrame) : nsDisplayItem(aFrame) {
|
nsDisplayText(nsDisplayListBuilder* aBuilder, nsTextFrame* aFrame) :
|
||||||
|
nsDisplayItem(aBuilder, aFrame) {
|
||||||
MOZ_COUNT_CTOR(nsDisplayText);
|
MOZ_COUNT_CTOR(nsDisplayText);
|
||||||
}
|
}
|
||||||
#ifdef NS_BUILD_REFCNT_LOGGING
|
#ifdef NS_BUILD_REFCNT_LOGGING
|
||||||
@@ -3977,7 +3978,8 @@ nsTextFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||||||
PresContext()->IsDynamic() && !aBuilder->IsForEventDelivery())
|
PresContext()->IsDynamic() && !aBuilder->IsForEventDelivery())
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
|
||||||
return aLists.Content()->AppendNewToTop(new (aBuilder) nsDisplayText(this));
|
return aLists.Content()->AppendNewToTop(
|
||||||
|
new (aBuilder) nsDisplayText(aBuilder, this));
|
||||||
}
|
}
|
||||||
|
|
||||||
static nsIFrame*
|
static nsIFrame*
|
||||||
|
|||||||
@@ -356,8 +356,8 @@ nsVideoFrame::Reflow(nsPresContext* aPresContext,
|
|||||||
|
|
||||||
class nsDisplayVideo : public nsDisplayItem {
|
class nsDisplayVideo : public nsDisplayItem {
|
||||||
public:
|
public:
|
||||||
nsDisplayVideo(nsVideoFrame* aFrame)
|
nsDisplayVideo(nsDisplayListBuilder* aBuilder, nsVideoFrame* aFrame)
|
||||||
: nsDisplayItem(aFrame)
|
: nsDisplayItem(aBuilder, aFrame)
|
||||||
{
|
{
|
||||||
MOZ_COUNT_CTOR(nsDisplayVideo);
|
MOZ_COUNT_CTOR(nsDisplayVideo);
|
||||||
}
|
}
|
||||||
@@ -423,7 +423,7 @@ nsVideoFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||||||
|
|
||||||
if (HasVideoElement() && !ShouldDisplayPoster()) {
|
if (HasVideoElement() && !ShouldDisplayPoster()) {
|
||||||
rv = aLists.Content()->AppendNewToTop(
|
rv = aLists.Content()->AppendNewToTop(
|
||||||
new (aBuilder) nsDisplayVideo(this));
|
new (aBuilder) nsDisplayVideo(aBuilder, this));
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1921,8 +1921,9 @@ nsMathMLChar::ComposeChildren(nsPresContext* aPresContext,
|
|||||||
|
|
||||||
class nsDisplayMathMLSelectionRect : public nsDisplayItem {
|
class nsDisplayMathMLSelectionRect : public nsDisplayItem {
|
||||||
public:
|
public:
|
||||||
nsDisplayMathMLSelectionRect(nsIFrame* aFrame, const nsRect& aRect)
|
nsDisplayMathMLSelectionRect(nsDisplayListBuilder* aBuilder,
|
||||||
: nsDisplayItem(aFrame), mRect(aRect) {
|
nsIFrame* aFrame, const nsRect& aRect)
|
||||||
|
: nsDisplayItem(aBuilder, aFrame), mRect(aRect) {
|
||||||
MOZ_COUNT_CTOR(nsDisplayMathMLSelectionRect);
|
MOZ_COUNT_CTOR(nsDisplayMathMLSelectionRect);
|
||||||
}
|
}
|
||||||
#ifdef NS_BUILD_REFCNT_LOGGING
|
#ifdef NS_BUILD_REFCNT_LOGGING
|
||||||
@@ -1951,9 +1952,10 @@ void nsDisplayMathMLSelectionRect::Paint(nsDisplayListBuilder* aBuilder,
|
|||||||
|
|
||||||
class nsDisplayMathMLCharBackground : public nsDisplayItem {
|
class nsDisplayMathMLCharBackground : public nsDisplayItem {
|
||||||
public:
|
public:
|
||||||
nsDisplayMathMLCharBackground(nsIFrame* aFrame, const nsRect& aRect,
|
nsDisplayMathMLCharBackground(nsDisplayListBuilder* aBuilder,
|
||||||
nsStyleContext* aStyleContext)
|
nsIFrame* aFrame, const nsRect& aRect,
|
||||||
: nsDisplayItem(aFrame), mStyleContext(aStyleContext), mRect(aRect) {
|
nsStyleContext* aStyleContext)
|
||||||
|
: nsDisplayItem(aBuilder, aFrame), mStyleContext(aStyleContext), mRect(aRect) {
|
||||||
MOZ_COUNT_CTOR(nsDisplayMathMLCharBackground);
|
MOZ_COUNT_CTOR(nsDisplayMathMLCharBackground);
|
||||||
}
|
}
|
||||||
#ifdef NS_BUILD_REFCNT_LOGGING
|
#ifdef NS_BUILD_REFCNT_LOGGING
|
||||||
@@ -1983,9 +1985,10 @@ void nsDisplayMathMLCharBackground::Paint(nsDisplayListBuilder* aBuilder,
|
|||||||
|
|
||||||
class nsDisplayMathMLCharForeground : public nsDisplayItem {
|
class nsDisplayMathMLCharForeground : public nsDisplayItem {
|
||||||
public:
|
public:
|
||||||
nsDisplayMathMLCharForeground(nsIFrame* aFrame, nsMathMLChar* aChar,
|
nsDisplayMathMLCharForeground(nsDisplayListBuilder* aBuilder,
|
||||||
PRBool aIsSelected)
|
nsIFrame* aFrame, nsMathMLChar* aChar,
|
||||||
: nsDisplayItem(aFrame), mChar(aChar), mIsSelected(aIsSelected) {
|
PRBool aIsSelected)
|
||||||
|
: nsDisplayItem(aBuilder, aFrame), mChar(aChar), mIsSelected(aIsSelected) {
|
||||||
MOZ_COUNT_CTOR(nsDisplayMathMLCharForeground);
|
MOZ_COUNT_CTOR(nsDisplayMathMLCharForeground);
|
||||||
}
|
}
|
||||||
#ifdef NS_BUILD_REFCNT_LOGGING
|
#ifdef NS_BUILD_REFCNT_LOGGING
|
||||||
@@ -2022,8 +2025,9 @@ private:
|
|||||||
#ifdef NS_DEBUG
|
#ifdef NS_DEBUG
|
||||||
class nsDisplayMathMLCharDebug : public nsDisplayItem {
|
class nsDisplayMathMLCharDebug : public nsDisplayItem {
|
||||||
public:
|
public:
|
||||||
nsDisplayMathMLCharDebug(nsIFrame* aFrame, const nsRect& aRect)
|
nsDisplayMathMLCharDebug(nsDisplayListBuilder* aBuilder,
|
||||||
: nsDisplayItem(aFrame), mRect(aRect) {
|
nsIFrame* aFrame, const nsRect& aRect)
|
||||||
|
: nsDisplayItem(aBuilder, aFrame), mRect(aRect) {
|
||||||
MOZ_COUNT_CTOR(nsDisplayMathMLCharDebug);
|
MOZ_COUNT_CTOR(nsDisplayMathMLCharDebug);
|
||||||
}
|
}
|
||||||
#ifdef NS_BUILD_REFCNT_LOGGING
|
#ifdef NS_BUILD_REFCNT_LOGGING
|
||||||
@@ -2035,8 +2039,9 @@ public:
|
|||||||
virtual void Paint(nsDisplayListBuilder* aBuilder,
|
virtual void Paint(nsDisplayListBuilder* aBuilder,
|
||||||
nsIRenderingContext* aCtx);
|
nsIRenderingContext* aCtx);
|
||||||
NS_DISPLAY_DECL_NAME("MathMLCharDebug", TYPE_MATHML_CHAR_DEBUG)
|
NS_DISPLAY_DECL_NAME("MathMLCharDebug", TYPE_MATHML_CHAR_DEBUG)
|
||||||
|
|
||||||
private:
|
private:
|
||||||
nsRect mRect;
|
nsRect mRect;
|
||||||
};
|
};
|
||||||
|
|
||||||
void nsDisplayMathMLCharDebug::Paint(nsDisplayListBuilder* aBuilder,
|
void nsDisplayMathMLCharDebug::Paint(nsDisplayListBuilder* aBuilder,
|
||||||
@@ -2080,7 +2085,7 @@ nsMathMLChar::Display(nsDisplayListBuilder* aBuilder,
|
|||||||
// paint the selection background -- beware MathML frames overlap a lot
|
// paint the selection background -- beware MathML frames overlap a lot
|
||||||
if (aSelectedRect && !aSelectedRect->IsEmpty()) {
|
if (aSelectedRect && !aSelectedRect->IsEmpty()) {
|
||||||
rv = aLists.BorderBackground()->AppendNewToTop(new (aBuilder)
|
rv = aLists.BorderBackground()->AppendNewToTop(new (aBuilder)
|
||||||
nsDisplayMathMLSelectionRect(aForFrame, *aSelectedRect));
|
nsDisplayMathMLSelectionRect(aBuilder, aForFrame, *aSelectedRect));
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
}
|
}
|
||||||
else if (mRect.width && mRect.height) {
|
else if (mRect.width && mRect.height) {
|
||||||
@@ -2088,7 +2093,7 @@ nsMathMLChar::Display(nsDisplayListBuilder* aBuilder,
|
|||||||
if (styleContext != parentContext &&
|
if (styleContext != parentContext &&
|
||||||
NS_GET_A(backg->mBackgroundColor) > 0) {
|
NS_GET_A(backg->mBackgroundColor) > 0) {
|
||||||
rv = aLists.BorderBackground()->AppendNewToTop(new (aBuilder)
|
rv = aLists.BorderBackground()->AppendNewToTop(new (aBuilder)
|
||||||
nsDisplayMathMLCharBackground(aForFrame, mRect, styleContext));
|
nsDisplayMathMLCharBackground(aBuilder, aForFrame, mRect, styleContext));
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
}
|
}
|
||||||
//else
|
//else
|
||||||
@@ -2097,12 +2102,12 @@ nsMathMLChar::Display(nsDisplayListBuilder* aBuilder,
|
|||||||
#if defined(NS_DEBUG) && defined(SHOW_BOUNDING_BOX)
|
#if defined(NS_DEBUG) && defined(SHOW_BOUNDING_BOX)
|
||||||
// for visual debug
|
// for visual debug
|
||||||
rv = aLists.BorderBackground()->AppendToTop(new (aBuilder)
|
rv = aLists.BorderBackground()->AppendToTop(new (aBuilder)
|
||||||
nsDisplayMathMLCharDebug(aForFrame, mRect));
|
nsDisplayMathMLCharDebug(aBuilder, aForFrame, mRect));
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
return aLists.Content()->AppendNewToTop(new (aBuilder)
|
return aLists.Content()->AppendNewToTop(new (aBuilder)
|
||||||
nsDisplayMathMLCharForeground(aForFrame, this,
|
nsDisplayMathMLCharForeground(aBuilder, aForFrame, this,
|
||||||
aSelectedRect && !aSelectedRect->IsEmpty()));
|
aSelectedRect && !aSelectedRect->IsEmpty()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -124,8 +124,8 @@ nsMathMLContainerFrame::ReflowError(nsIRenderingContext& aRenderingContext,
|
|||||||
|
|
||||||
class nsDisplayMathMLError : public nsDisplayItem {
|
class nsDisplayMathMLError : public nsDisplayItem {
|
||||||
public:
|
public:
|
||||||
nsDisplayMathMLError(nsIFrame* aFrame)
|
nsDisplayMathMLError(nsDisplayListBuilder* aBuilder, nsIFrame* aFrame)
|
||||||
: nsDisplayItem(aFrame) {
|
: nsDisplayItem(aBuilder, aFrame) {
|
||||||
MOZ_COUNT_CTOR(nsDisplayMathMLError);
|
MOZ_COUNT_CTOR(nsDisplayMathMLError);
|
||||||
}
|
}
|
||||||
#ifdef NS_BUILD_REFCNT_LOGGING
|
#ifdef NS_BUILD_REFCNT_LOGGING
|
||||||
@@ -672,7 +672,8 @@ nsMathMLContainerFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||||||
if (!IsVisibleForPainting(aBuilder))
|
if (!IsVisibleForPainting(aBuilder))
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
|
||||||
return aLists.Content()->AppendNewToTop(new (aBuilder) nsDisplayMathMLError(this));
|
return aLists.Content()->AppendNewToTop(
|
||||||
|
new (aBuilder) nsDisplayMathMLError(aBuilder, this));
|
||||||
}
|
}
|
||||||
|
|
||||||
nsresult rv = DisplayBorderBackgroundOutline(aBuilder, aLists);
|
nsresult rv = DisplayBorderBackgroundOutline(aBuilder, aLists);
|
||||||
|
|||||||
@@ -454,8 +454,9 @@ nsCSSMapping {
|
|||||||
#if defined(NS_DEBUG) && defined(SHOW_BOUNDING_BOX)
|
#if defined(NS_DEBUG) && defined(SHOW_BOUNDING_BOX)
|
||||||
class nsDisplayMathMLBoundingMetrics : public nsDisplayItem {
|
class nsDisplayMathMLBoundingMetrics : public nsDisplayItem {
|
||||||
public:
|
public:
|
||||||
nsDisplayMathMLBoundingMetrics(nsIFrame* aFrame, const nsRect& aRect)
|
nsDisplayMathMLBoundingMetrics(nsDisplayListBuilder* aBuilder,
|
||||||
: nsDisplayItem(aFrame), mRect(aRect) {
|
nsIFrame* aFrame, const nsRect& aRect)
|
||||||
|
: nsDisplayItem(aBuilder, aFrame), mRect(aRect) {
|
||||||
MOZ_COUNT_CTOR(nsDisplayMathMLBoundingMetrics);
|
MOZ_COUNT_CTOR(nsDisplayMathMLBoundingMetrics);
|
||||||
}
|
}
|
||||||
#ifdef NS_BUILD_REFCNT_LOGGING
|
#ifdef NS_BUILD_REFCNT_LOGGING
|
||||||
@@ -492,14 +493,15 @@ nsMathMLFrame::DisplayBoundingMetrics(nsDisplayListBuilder* aBuilder,
|
|||||||
nscoord h = aMetrics.ascent + aMetrics.descent;
|
nscoord h = aMetrics.ascent + aMetrics.descent;
|
||||||
|
|
||||||
return aLists.Content()->AppendNewToTop(new (aBuilder)
|
return aLists.Content()->AppendNewToTop(new (aBuilder)
|
||||||
nsDisplayMathMLBoundingMetrics(this, nsRect(x,y,w,h)));
|
nsDisplayMathMLBoundingMetrics(aBuilder, this, nsRect(x,y,w,h)));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
class nsDisplayMathMLBar : public nsDisplayItem {
|
class nsDisplayMathMLBar : public nsDisplayItem {
|
||||||
public:
|
public:
|
||||||
nsDisplayMathMLBar(nsIFrame* aFrame, const nsRect& aRect)
|
nsDisplayMathMLBar(nsDisplayListBuilder* aBuilder,
|
||||||
: nsDisplayItem(aFrame), mRect(aRect) {
|
nsIFrame* aFrame, const nsRect& aRect)
|
||||||
|
: nsDisplayItem(aBuilder, aFrame), mRect(aRect) {
|
||||||
MOZ_COUNT_CTOR(nsDisplayMathMLBar);
|
MOZ_COUNT_CTOR(nsDisplayMathMLBar);
|
||||||
}
|
}
|
||||||
#ifdef NS_BUILD_REFCNT_LOGGING
|
#ifdef NS_BUILD_REFCNT_LOGGING
|
||||||
@@ -531,5 +533,5 @@ nsMathMLFrame::DisplayBar(nsDisplayListBuilder* aBuilder,
|
|||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
|
||||||
return aLists.Content()->AppendNewToTop(new (aBuilder)
|
return aLists.Content()->AppendNewToTop(new (aBuilder)
|
||||||
nsDisplayMathMLBar(aFrame, aRect));
|
nsDisplayMathMLBar(aBuilder, aFrame, aRect));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -739,9 +739,10 @@ nsMathMLmencloseFrame::SetAdditionalStyleContext(PRInt32 aIndex,
|
|||||||
class nsDisplayNotation : public nsDisplayItem
|
class nsDisplayNotation : public nsDisplayItem
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
nsDisplayNotation(nsIFrame* aFrame, const nsRect& aRect,
|
nsDisplayNotation(nsDisplayListBuilder* aBuilder,
|
||||||
|
nsIFrame* aFrame, const nsRect& aRect,
|
||||||
nscoord aThickness, nsMencloseNotation aType)
|
nscoord aThickness, nsMencloseNotation aType)
|
||||||
: nsDisplayItem(aFrame), mRect(aRect),
|
: nsDisplayItem(aBuilder, aFrame), mRect(aRect),
|
||||||
mThickness(aThickness), mType(aType) {
|
mThickness(aThickness), mType(aType) {
|
||||||
MOZ_COUNT_CTOR(nsDisplayNotation);
|
MOZ_COUNT_CTOR(nsDisplayNotation);
|
||||||
}
|
}
|
||||||
@@ -823,7 +824,5 @@ nsMathMLmencloseFrame::DisplayNotation(nsDisplayListBuilder* aBuilder,
|
|||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
|
||||||
return aLists.Content()->AppendNewToTop(new (aBuilder)
|
return aLists.Content()->AppendNewToTop(new (aBuilder)
|
||||||
nsDisplayNotation(aFrame, aRect,
|
nsDisplayNotation(aBuilder, aFrame, aRect, aThickness, aType));
|
||||||
aThickness,
|
|
||||||
aType));
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -585,9 +585,10 @@ nsMathMLmfracFrame::UpdatePresentationDataFromChildAt(PRInt32 aFirstInde
|
|||||||
|
|
||||||
class nsDisplayMathMLSlash : public nsDisplayItem {
|
class nsDisplayMathMLSlash : public nsDisplayItem {
|
||||||
public:
|
public:
|
||||||
nsDisplayMathMLSlash(nsIFrame* aFrame, const nsRect& aRect,
|
nsDisplayMathMLSlash(nsDisplayListBuilder* aBuilder,
|
||||||
|
nsIFrame* aFrame, const nsRect& aRect,
|
||||||
nscoord aThickness)
|
nscoord aThickness)
|
||||||
: nsDisplayItem(aFrame), mRect(aRect), mThickness(aThickness) {
|
: nsDisplayItem(aBuilder, aFrame), mRect(aRect), mThickness(aThickness) {
|
||||||
MOZ_COUNT_CTOR(nsDisplayMathMLSlash);
|
MOZ_COUNT_CTOR(nsDisplayMathMLSlash);
|
||||||
}
|
}
|
||||||
#ifdef NS_BUILD_REFCNT_LOGGING
|
#ifdef NS_BUILD_REFCNT_LOGGING
|
||||||
@@ -636,6 +637,5 @@ nsMathMLmfracFrame::DisplaySlash(nsDisplayListBuilder* aBuilder,
|
|||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
|
||||||
return aLists.Content()->AppendNewToTop(new (aBuilder)
|
return aLists.Content()->AppendNewToTop(new (aBuilder)
|
||||||
nsDisplayMathMLSlash(aFrame, aRect,
|
nsDisplayMathMLSlash(aBuilder, aFrame, aRect, aThickness));
|
||||||
aThickness));
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -420,7 +420,9 @@ nsSVGOuterSVGFrame::DidReflow(nsPresContext* aPresContext,
|
|||||||
|
|
||||||
class nsDisplaySVG : public nsDisplayItem {
|
class nsDisplaySVG : public nsDisplayItem {
|
||||||
public:
|
public:
|
||||||
nsDisplaySVG(nsSVGOuterSVGFrame* aFrame) : nsDisplayItem(aFrame) {
|
nsDisplaySVG(nsDisplayListBuilder* aBuilder,
|
||||||
|
nsSVGOuterSVGFrame* aFrame) :
|
||||||
|
nsDisplayItem(aBuilder, aFrame) {
|
||||||
MOZ_COUNT_CTOR(nsDisplaySVG);
|
MOZ_COUNT_CTOR(nsDisplaySVG);
|
||||||
}
|
}
|
||||||
#ifdef NS_BUILD_REFCNT_LOGGING
|
#ifdef NS_BUILD_REFCNT_LOGGING
|
||||||
@@ -534,7 +536,8 @@ nsSVGOuterSVGFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||||||
nsresult rv = DisplayBorderBackgroundOutline(aBuilder, aLists);
|
nsresult rv = DisplayBorderBackgroundOutline(aBuilder, aLists);
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
|
|
||||||
return aLists.Content()->AppendNewToTop(new (aBuilder) nsDisplaySVG(this));
|
return aLists.Content()->AppendNewToTop(
|
||||||
|
new (aBuilder) nsDisplaySVG(aBuilder, this));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
@@ -385,7 +385,9 @@ nsTableCellFrame::PaintCellBackground(nsIRenderingContext& aRenderingContext,
|
|||||||
|
|
||||||
class nsDisplayTableCellBackground : public nsDisplayTableItem {
|
class nsDisplayTableCellBackground : public nsDisplayTableItem {
|
||||||
public:
|
public:
|
||||||
nsDisplayTableCellBackground(nsTableCellFrame* aFrame) : nsDisplayTableItem(aFrame) {
|
nsDisplayTableCellBackground(nsDisplayListBuilder* aBuilder,
|
||||||
|
nsTableCellFrame* aFrame) :
|
||||||
|
nsDisplayTableItem(aBuilder, aFrame) {
|
||||||
MOZ_COUNT_CTOR(nsDisplayTableCellBackground);
|
MOZ_COUNT_CTOR(nsDisplayTableCellBackground);
|
||||||
}
|
}
|
||||||
#ifdef NS_BUILD_REFCNT_LOGGING
|
#ifdef NS_BUILD_REFCNT_LOGGING
|
||||||
@@ -458,8 +460,8 @@ nsTableCellFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||||||
// display outset box-shadows if we need to.
|
// display outset box-shadows if we need to.
|
||||||
PRBool hasBoxShadow = !!(GetStyleBorder()->mBoxShadow);
|
PRBool hasBoxShadow = !!(GetStyleBorder()->mBoxShadow);
|
||||||
if (hasBoxShadow) {
|
if (hasBoxShadow) {
|
||||||
nsDisplayItem* item = new (aBuilder) nsDisplayBoxShadowOuter(this);
|
nsresult rv = aLists.BorderBackground()->AppendNewToTop(
|
||||||
nsresult rv = aLists.BorderBackground()->AppendNewToTop(item);
|
new (aBuilder) nsDisplayBoxShadowOuter(aBuilder, this));
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -470,7 +472,8 @@ nsTableCellFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||||||
// The cell background was not painted by the nsTablePainter,
|
// The cell background was not painted by the nsTablePainter,
|
||||||
// so we need to do it. We have special background processing here
|
// so we need to do it. We have special background processing here
|
||||||
// so we need to duplicate some code from nsFrame::DisplayBorderBackgroundOutline
|
// so we need to duplicate some code from nsFrame::DisplayBorderBackgroundOutline
|
||||||
nsDisplayTableItem* item = new (aBuilder) nsDisplayTableCellBackground(this);
|
nsDisplayTableItem* item =
|
||||||
|
new (aBuilder) nsDisplayTableCellBackground(aBuilder, this);
|
||||||
nsresult rv = aLists.BorderBackground()->AppendNewToTop(item);
|
nsresult rv = aLists.BorderBackground()->AppendNewToTop(item);
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
item->UpdateForFrameBackground(this);
|
item->UpdateForFrameBackground(this);
|
||||||
@@ -478,8 +481,8 @@ nsTableCellFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||||||
|
|
||||||
// display inset box-shadows if we need to.
|
// display inset box-shadows if we need to.
|
||||||
if (hasBoxShadow) {
|
if (hasBoxShadow) {
|
||||||
nsDisplayItem* item = new (aBuilder) nsDisplayBoxShadowInner(this);
|
nsresult rv = aLists.BorderBackground()->AppendNewToTop(
|
||||||
nsresult rv = aLists.BorderBackground()->AppendNewToTop(item);
|
new (aBuilder) nsDisplayBoxShadowInner(aBuilder, this));
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -487,7 +490,7 @@ nsTableCellFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||||||
if (!tableFrame->IsBorderCollapse() && HasBorder() &&
|
if (!tableFrame->IsBorderCollapse() && HasBorder() &&
|
||||||
emptyCellStyle == NS_STYLE_TABLE_EMPTY_CELLS_SHOW) {
|
emptyCellStyle == NS_STYLE_TABLE_EMPTY_CELLS_SHOW) {
|
||||||
nsresult rv = aLists.BorderBackground()->AppendNewToTop(new (aBuilder)
|
nsresult rv = aLists.BorderBackground()->AppendNewToTop(new (aBuilder)
|
||||||
nsDisplayBorder(this));
|
nsDisplayBorder(aBuilder, this));
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -496,7 +499,8 @@ nsTableCellFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||||||
(GetStateBits() & NS_FRAME_SELECTED_CONTENT) == NS_FRAME_SELECTED_CONTENT;
|
(GetStateBits() & NS_FRAME_SELECTED_CONTENT) == NS_FRAME_SELECTED_CONTENT;
|
||||||
if (isSelected) {
|
if (isSelected) {
|
||||||
nsresult rv = aLists.BorderBackground()->AppendNewToTop(new (aBuilder)
|
nsresult rv = aLists.BorderBackground()->AppendNewToTop(new (aBuilder)
|
||||||
nsDisplayGeneric(this, ::PaintTableCellSelection, "TableCellSelection",
|
nsDisplayGeneric(aBuilder, this, ::PaintTableCellSelection,
|
||||||
|
"TableCellSelection",
|
||||||
nsDisplayItem::TYPE_TABLE_CELL_SELECTION));
|
nsDisplayItem::TYPE_TABLE_CELL_SELECTION));
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1121,7 +1121,9 @@ nsDisplayTableItem::UpdateForFrameBackground(nsIFrame* aFrame)
|
|||||||
|
|
||||||
class nsDisplayTableBorderBackground : public nsDisplayTableItem {
|
class nsDisplayTableBorderBackground : public nsDisplayTableItem {
|
||||||
public:
|
public:
|
||||||
nsDisplayTableBorderBackground(nsTableFrame* aFrame) : nsDisplayTableItem(aFrame) {
|
nsDisplayTableBorderBackground(nsDisplayListBuilder* aBuilder,
|
||||||
|
nsTableFrame* aFrame) :
|
||||||
|
nsDisplayTableItem(aBuilder, aFrame) {
|
||||||
MOZ_COUNT_CTOR(nsDisplayTableBorderBackground);
|
MOZ_COUNT_CTOR(nsDisplayTableBorderBackground);
|
||||||
}
|
}
|
||||||
#ifdef NS_BUILD_REFCNT_LOGGING
|
#ifdef NS_BUILD_REFCNT_LOGGING
|
||||||
@@ -1215,8 +1217,8 @@ nsTableFrame::DisplayGenericTablePart(nsDisplayListBuilder* aBuilder,
|
|||||||
// Paint the outset box-shadows for the table frames
|
// Paint the outset box-shadows for the table frames
|
||||||
PRBool hasBoxShadow = aFrame->GetStyleBorder()->mBoxShadow != nsnull;
|
PRBool hasBoxShadow = aFrame->GetStyleBorder()->mBoxShadow != nsnull;
|
||||||
if (hasBoxShadow) {
|
if (hasBoxShadow) {
|
||||||
nsDisplayItem* item = new (aBuilder) nsDisplayBoxShadowOuter(aFrame);
|
nsresult rv = lists->BorderBackground()->AppendNewToTop(
|
||||||
nsresult rv = lists->BorderBackground()->AppendNewToTop(item);
|
new (aBuilder) nsDisplayBoxShadowOuter(aBuilder, aFrame));
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1224,15 +1226,15 @@ nsTableFrame::DisplayGenericTablePart(nsDisplayListBuilder* aBuilder,
|
|||||||
// handling events.
|
// handling events.
|
||||||
// XXX how to handle collapsed borders?
|
// XXX how to handle collapsed borders?
|
||||||
if (aBuilder->IsForEventDelivery()) {
|
if (aBuilder->IsForEventDelivery()) {
|
||||||
nsresult rv = lists->BorderBackground()->AppendNewToTop(new (aBuilder)
|
nsresult rv = lists->BorderBackground()->AppendNewToTop(
|
||||||
nsDisplayBackground(aFrame));
|
new (aBuilder) nsDisplayBackground(aBuilder, aFrame));
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Paint the inset box-shadows for the table frames
|
// Paint the inset box-shadows for the table frames
|
||||||
if (hasBoxShadow) {
|
if (hasBoxShadow) {
|
||||||
nsDisplayItem* item = new (aBuilder) nsDisplayBoxShadowInner(aFrame);
|
nsresult rv = lists->BorderBackground()->AppendNewToTop(
|
||||||
nsresult rv = lists->BorderBackground()->AppendNewToTop(item);
|
new (aBuilder) nsDisplayBoxShadowInner(aBuilder, aFrame));
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1320,7 +1322,7 @@ nsTableFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||||||
if (aBuilder->IsForEventDelivery() ||
|
if (aBuilder->IsForEventDelivery() ||
|
||||||
AnyTablePartHasBorderOrBackground(this, GetNextSibling()) ||
|
AnyTablePartHasBorderOrBackground(this, GetNextSibling()) ||
|
||||||
AnyTablePartHasBorderOrBackground(mColGroups.FirstChild(), nsnull)) {
|
AnyTablePartHasBorderOrBackground(mColGroups.FirstChild(), nsnull)) {
|
||||||
item = new (aBuilder) nsDisplayTableBorderBackground(this);
|
item = new (aBuilder) nsDisplayTableBorderBackground(aBuilder, this);
|
||||||
nsresult rv = aLists.BorderBackground()->AppendNewToTop(item);
|
nsresult rv = aLists.BorderBackground()->AppendNewToTop(item);
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -76,7 +76,8 @@ static inline PRBool IS_TABLE_CELL(nsIAtom* frameType) {
|
|||||||
class nsDisplayTableItem : public nsDisplayItem
|
class nsDisplayTableItem : public nsDisplayItem
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
nsDisplayTableItem(nsIFrame* aFrame) : nsDisplayItem(aFrame),
|
nsDisplayTableItem(nsDisplayListBuilder* aBuilder, nsIFrame* aFrame) :
|
||||||
|
nsDisplayItem(aBuilder, aFrame),
|
||||||
mPartHasFixedBackground(PR_FALSE) {}
|
mPartHasFixedBackground(PR_FALSE) {}
|
||||||
|
|
||||||
virtual PRBool IsVaryingRelativeToMovingFrame(nsDisplayListBuilder* aBuilder,
|
virtual PRBool IsVaryingRelativeToMovingFrame(nsDisplayListBuilder* aBuilder,
|
||||||
|
|||||||
@@ -577,7 +577,9 @@ nsTableRowFrame::CalcHeight(const nsHTMLReflowState& aReflowState)
|
|||||||
*/
|
*/
|
||||||
class nsDisplayTableRowBackground : public nsDisplayTableItem {
|
class nsDisplayTableRowBackground : public nsDisplayTableItem {
|
||||||
public:
|
public:
|
||||||
nsDisplayTableRowBackground(nsTableRowFrame* aFrame) : nsDisplayTableItem(aFrame) {
|
nsDisplayTableRowBackground(nsDisplayListBuilder* aBuilder,
|
||||||
|
nsTableRowFrame* aFrame) :
|
||||||
|
nsDisplayTableItem(aBuilder, aFrame) {
|
||||||
MOZ_COUNT_CTOR(nsDisplayTableRowBackground);
|
MOZ_COUNT_CTOR(nsDisplayTableRowBackground);
|
||||||
}
|
}
|
||||||
#ifdef NS_BUILD_REFCNT_LOGGING
|
#ifdef NS_BUILD_REFCNT_LOGGING
|
||||||
@@ -622,7 +624,7 @@ nsTableRowFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||||||
// We would use nsDisplayGeneric for this rare case except that we
|
// We would use nsDisplayGeneric for this rare case except that we
|
||||||
// need the background to be larger than the row frame in some
|
// need the background to be larger than the row frame in some
|
||||||
// cases.
|
// cases.
|
||||||
item = new (aBuilder) nsDisplayTableRowBackground(this);
|
item = new (aBuilder) nsDisplayTableRowBackground(aBuilder, this);
|
||||||
nsresult rv = aLists.BorderBackground()->AppendNewToTop(item);
|
nsresult rv = aLists.BorderBackground()->AppendNewToTop(item);
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -166,7 +166,9 @@ nsTableRowGroupFrame::InitRepeatedFrame(nsPresContext* aPresContext,
|
|||||||
*/
|
*/
|
||||||
class nsDisplayTableRowGroupBackground : public nsDisplayTableItem {
|
class nsDisplayTableRowGroupBackground : public nsDisplayTableItem {
|
||||||
public:
|
public:
|
||||||
nsDisplayTableRowGroupBackground(nsTableRowGroupFrame* aFrame) : nsDisplayTableItem(aFrame) {
|
nsDisplayTableRowGroupBackground(nsDisplayListBuilder* aBuilder,
|
||||||
|
nsTableRowGroupFrame* aFrame) :
|
||||||
|
nsDisplayTableItem(aBuilder, aFrame) {
|
||||||
MOZ_COUNT_CTOR(nsDisplayTableRowGroupBackground);
|
MOZ_COUNT_CTOR(nsDisplayTableRowGroupBackground);
|
||||||
}
|
}
|
||||||
#ifdef NS_BUILD_REFCNT_LOGGING
|
#ifdef NS_BUILD_REFCNT_LOGGING
|
||||||
@@ -261,7 +263,7 @@ nsTableRowGroupFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||||||
// This background is created regardless of whether this frame is
|
// This background is created regardless of whether this frame is
|
||||||
// visible or not. Visibility decisions are delegated to the
|
// visible or not. Visibility decisions are delegated to the
|
||||||
// table background painter.
|
// table background painter.
|
||||||
item = new (aBuilder) nsDisplayTableRowGroupBackground(this);
|
item = new (aBuilder) nsDisplayTableRowGroupBackground(aBuilder, this);
|
||||||
nsresult rv = aLists.BorderBackground()->AppendNewToTop(item);
|
nsresult rv = aLists.BorderBackground()->AppendNewToTop(item);
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1264,7 +1264,8 @@ nsBoxFrame::GetDebugPref(nsPresContext* aPresContext)
|
|||||||
|
|
||||||
class nsDisplayXULDebug : public nsDisplayItem {
|
class nsDisplayXULDebug : public nsDisplayItem {
|
||||||
public:
|
public:
|
||||||
nsDisplayXULDebug(nsIFrame* aFrame) : nsDisplayItem(aFrame) {
|
nsDisplayXULDebug(nsDisplayListBuilder* aBuilder, nsIFrame* aFrame) :
|
||||||
|
nsDisplayItem(aBuilder, aFrame) {
|
||||||
MOZ_COUNT_CTOR(nsDisplayXULDebug);
|
MOZ_COUNT_CTOR(nsDisplayXULDebug);
|
||||||
}
|
}
|
||||||
#ifdef NS_BUILD_REFCNT_LOGGING
|
#ifdef NS_BUILD_REFCNT_LOGGING
|
||||||
@@ -1313,10 +1314,11 @@ nsBoxFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||||||
// REVIEW: From GetFrameForPoint
|
// REVIEW: From GetFrameForPoint
|
||||||
if (mState & NS_STATE_CURRENTLY_IN_DEBUG) {
|
if (mState & NS_STATE_CURRENTLY_IN_DEBUG) {
|
||||||
rv = aLists.BorderBackground()->AppendNewToTop(new (aBuilder)
|
rv = aLists.BorderBackground()->AppendNewToTop(new (aBuilder)
|
||||||
nsDisplayGeneric(this, PaintXULDebugBackground, "XULDebugBackground"));
|
nsDisplayGeneric(aBuilder, this, PaintXULDebugBackground,
|
||||||
|
"XULDebugBackground"));
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
rv = aLists.Outlines()->AppendNewToTop(new (aBuilder)
|
rv = aLists.Outlines()->AppendNewToTop(new (aBuilder)
|
||||||
nsDisplayXULDebug(this));
|
nsDisplayXULDebug(Builder this));
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -2140,12 +2142,14 @@ nsBoxFrame::RelayoutChildAtOrdinal(nsBoxLayoutState& aState, nsIBox* aChild)
|
|||||||
// reasonable thing to do.
|
// reasonable thing to do.
|
||||||
class nsDisplayXULEventRedirector : public nsDisplayWrapList {
|
class nsDisplayXULEventRedirector : public nsDisplayWrapList {
|
||||||
public:
|
public:
|
||||||
nsDisplayXULEventRedirector(nsIFrame* aFrame, nsDisplayItem* aItem,
|
nsDisplayXULEventRedirector(nsDisplayListBuilder* aBuilder,
|
||||||
|
nsIFrame* aFrame, nsDisplayItem* aItem,
|
||||||
nsIFrame* aTargetFrame)
|
nsIFrame* aTargetFrame)
|
||||||
: nsDisplayWrapList(aFrame, aItem), mTargetFrame(aTargetFrame) {}
|
: nsDisplayWrapList(aBuilder, aFrame, aItem), mTargetFrame(aTargetFrame) {}
|
||||||
nsDisplayXULEventRedirector(nsIFrame* aFrame, nsDisplayList* aList,
|
nsDisplayXULEventRedirector(nsDisplayListBuilder* aBuilder,
|
||||||
|
nsIFrame* aFrame, nsDisplayList* aList,
|
||||||
nsIFrame* aTargetFrame)
|
nsIFrame* aTargetFrame)
|
||||||
: nsDisplayWrapList(aFrame, aList), mTargetFrame(aTargetFrame) {}
|
: nsDisplayWrapList(aBuilder, aFrame, aList), mTargetFrame(aTargetFrame) {}
|
||||||
virtual void HitTest(nsDisplayListBuilder* aBuilder, const nsRect& aRect,
|
virtual void HitTest(nsDisplayListBuilder* aBuilder, const nsRect& aRect,
|
||||||
HitTestState* aState, nsTArray<nsIFrame*> *aOutFrames);
|
HitTestState* aState, nsTArray<nsIFrame*> *aOutFrames);
|
||||||
NS_DISPLAY_DECL_NAME("XULEventRedirector", TYPE_XUL_EVENT_REDIRECTOR)
|
NS_DISPLAY_DECL_NAME("XULEventRedirector", TYPE_XUL_EVENT_REDIRECTOR)
|
||||||
@@ -2197,12 +2201,12 @@ public:
|
|||||||
virtual nsDisplayItem* WrapList(nsDisplayListBuilder* aBuilder,
|
virtual nsDisplayItem* WrapList(nsDisplayListBuilder* aBuilder,
|
||||||
nsIFrame* aFrame, nsDisplayList* aList) {
|
nsIFrame* aFrame, nsDisplayList* aList) {
|
||||||
return new (aBuilder)
|
return new (aBuilder)
|
||||||
nsDisplayXULEventRedirector(aFrame, aList, mTargetFrame);
|
nsDisplayXULEventRedirector(aBuilder, aFrame, aList, mTargetFrame);
|
||||||
}
|
}
|
||||||
virtual nsDisplayItem* WrapItem(nsDisplayListBuilder* aBuilder,
|
virtual nsDisplayItem* WrapItem(nsDisplayListBuilder* aBuilder,
|
||||||
nsDisplayItem* aItem) {
|
nsDisplayItem* aItem) {
|
||||||
return new (aBuilder)
|
return new (aBuilder)
|
||||||
nsDisplayXULEventRedirector(aItem->GetUnderlyingFrame(), aItem,
|
nsDisplayXULEventRedirector(aBuilder, aItem->GetUnderlyingFrame(), aItem,
|
||||||
mTargetFrame);
|
mTargetFrame);
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
|
|||||||
@@ -107,7 +107,9 @@ NS_IMPL_FRAMEARENA_HELPERS(nsGroupBoxFrame)
|
|||||||
|
|
||||||
class nsDisplayXULGroupBackground : public nsDisplayItem {
|
class nsDisplayXULGroupBackground : public nsDisplayItem {
|
||||||
public:
|
public:
|
||||||
nsDisplayXULGroupBackground(nsGroupBoxFrame* aFrame) : nsDisplayItem(aFrame) {
|
nsDisplayXULGroupBackground(nsDisplayListBuilder* aBuilder,
|
||||||
|
nsGroupBoxFrame* aFrame) :
|
||||||
|
nsDisplayItem(aBuilder, aFrame) {
|
||||||
MOZ_COUNT_CTOR(nsDisplayXULGroupBackground);
|
MOZ_COUNT_CTOR(nsDisplayXULGroupBackground);
|
||||||
}
|
}
|
||||||
#ifdef NS_BUILD_REFCNT_LOGGING
|
#ifdef NS_BUILD_REFCNT_LOGGING
|
||||||
@@ -142,7 +144,7 @@ nsGroupBoxFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||||||
// Paint our background and border
|
// Paint our background and border
|
||||||
if (IsVisibleForPainting(aBuilder)) {
|
if (IsVisibleForPainting(aBuilder)) {
|
||||||
nsresult rv = aLists.BorderBackground()->AppendNewToTop(new (aBuilder)
|
nsresult rv = aLists.BorderBackground()->AppendNewToTop(new (aBuilder)
|
||||||
nsDisplayXULGroupBackground(this));
|
nsDisplayXULGroupBackground(aBuilder, this));
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
|
|
||||||
rv = DisplayOutline(aBuilder, aLists);
|
rv = DisplayOutline(aBuilder, aLists);
|
||||||
|
|||||||
@@ -311,7 +311,9 @@ nsImageBoxFrame::UpdateLoadFlags()
|
|||||||
|
|
||||||
class nsDisplayXULImage : public nsDisplayItem {
|
class nsDisplayXULImage : public nsDisplayItem {
|
||||||
public:
|
public:
|
||||||
nsDisplayXULImage(nsImageBoxFrame* aFrame) : nsDisplayItem(aFrame) {
|
nsDisplayXULImage(nsDisplayListBuilder* aBuilder,
|
||||||
|
nsImageBoxFrame* aFrame) :
|
||||||
|
nsDisplayItem(aBuilder, aFrame) {
|
||||||
MOZ_COUNT_CTOR(nsDisplayXULImage);
|
MOZ_COUNT_CTOR(nsDisplayXULImage);
|
||||||
}
|
}
|
||||||
#ifdef NS_BUILD_REFCNT_LOGGING
|
#ifdef NS_BUILD_REFCNT_LOGGING
|
||||||
@@ -355,7 +357,8 @@ nsImageBoxFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||||||
if (!IsVisibleForPainting(aBuilder))
|
if (!IsVisibleForPainting(aBuilder))
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
|
||||||
return aLists.Content()->AppendNewToTop(new (aBuilder) nsDisplayXULImage(this));
|
return aLists.Content()->AppendNewToTop(
|
||||||
|
new (aBuilder) nsDisplayXULImage(aBuilder, this));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
@@ -167,7 +167,7 @@ nsLeafBoxFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
|
||||||
return aLists.Content()->AppendNewToTop(new (aBuilder)
|
return aLists.Content()->AppendNewToTop(new (aBuilder)
|
||||||
nsDisplayEventReceiver(this));
|
nsDisplayEventReceiver(aBuilder, this));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* virtual */ nscoord
|
/* virtual */ nscoord
|
||||||
|
|||||||
@@ -328,7 +328,7 @@ nsSliderFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||||||
// This is EVIL, we shouldn't be messing with event delivery just to get
|
// This is EVIL, we shouldn't be messing with event delivery just to get
|
||||||
// thumb mouse drag events to arrive at the slider!
|
// thumb mouse drag events to arrive at the slider!
|
||||||
return aLists.Outlines()->AppendNewToTop(new (aBuilder)
|
return aLists.Outlines()->AppendNewToTop(new (aBuilder)
|
||||||
nsDisplayEventReceiver(this));
|
nsDisplayEventReceiver(aBuilder, this));
|
||||||
}
|
}
|
||||||
|
|
||||||
return nsBoxFrame::BuildDisplayList(aBuilder, aDirtyRect, aLists);
|
return nsBoxFrame::BuildDisplayList(aBuilder, aDirtyRect, aLists);
|
||||||
|
|||||||
@@ -423,7 +423,7 @@ nsSplitterFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||||||
{
|
{
|
||||||
// XXX It's probably better not to check visibility here, right?
|
// XXX It's probably better not to check visibility here, right?
|
||||||
return aLists.Outlines()->AppendNewToTop(new (aBuilder)
|
return aLists.Outlines()->AppendNewToTop(new (aBuilder)
|
||||||
nsDisplayEventReceiver(this));
|
nsDisplayEventReceiver(aBuilder, this));
|
||||||
}
|
}
|
||||||
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
|||||||
@@ -331,12 +331,14 @@ nsTextBoxFrame::UpdateAttributes(nsIAtom* aAttribute,
|
|||||||
|
|
||||||
class nsDisplayXULTextBox : public nsDisplayItem {
|
class nsDisplayXULTextBox : public nsDisplayItem {
|
||||||
public:
|
public:
|
||||||
nsDisplayXULTextBox(nsTextBoxFrame* aFrame) : nsDisplayItem(aFrame) {
|
nsDisplayXULTextBox(nsDisplayListBuilder* aBuilder,
|
||||||
MOZ_COUNT_CTOR(nsDisplayXULTextBox);
|
nsTextBoxFrame* aFrame) :
|
||||||
|
nsDisplayItem(aBuilder, aFrame) {
|
||||||
|
MOZ_COUNT_CTOR(nsDisplayXULTextBox);
|
||||||
}
|
}
|
||||||
#ifdef NS_BUILD_REFCNT_LOGGING
|
#ifdef NS_BUILD_REFCNT_LOGGING
|
||||||
virtual ~nsDisplayXULTextBox() {
|
virtual ~nsDisplayXULTextBox() {
|
||||||
MOZ_COUNT_DTOR(nsDisplayXULTextBox);
|
MOZ_COUNT_DTOR(nsDisplayXULTextBox);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -371,7 +373,7 @@ nsTextBoxFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
|
|
||||||
return aLists.Content()->AppendNewToTop(new (aBuilder)
|
return aLists.Content()->AppendNewToTop(new (aBuilder)
|
||||||
nsDisplayXULTextBox(this));
|
nsDisplayXULTextBox(aBuilder, this));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
@@ -2807,7 +2807,7 @@ nsTreeBodyFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
|
||||||
return aLists.Content()->AppendNewToTop(new (aBuilder)
|
return aLists.Content()->AppendNewToTop(new (aBuilder)
|
||||||
nsDisplayGeneric(this, ::PaintTreeBody, "XULTreeBody",
|
nsDisplayGeneric(aBuilder, this, ::PaintTreeBody, "XULTreeBody",
|
||||||
nsDisplayItem::TYPE_XUL_TREE_BODY));
|
nsDisplayItem::TYPE_XUL_TREE_BODY));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -90,7 +90,9 @@ nsTreeColFrame::DestroyFrom(nsIFrame* aDestructRoot)
|
|||||||
|
|
||||||
class nsDisplayXULTreeColSplitterTarget : public nsDisplayItem {
|
class nsDisplayXULTreeColSplitterTarget : public nsDisplayItem {
|
||||||
public:
|
public:
|
||||||
nsDisplayXULTreeColSplitterTarget(nsIFrame* aFrame) : nsDisplayItem(aFrame) {
|
nsDisplayXULTreeColSplitterTarget(nsDisplayListBuilder* aBuilder,
|
||||||
|
nsIFrame* aFrame) :
|
||||||
|
nsDisplayItem(aBuilder, aFrame) {
|
||||||
MOZ_COUNT_CTOR(nsDisplayXULTreeColSplitterTarget);
|
MOZ_COUNT_CTOR(nsDisplayXULTreeColSplitterTarget);
|
||||||
}
|
}
|
||||||
#ifdef NS_BUILD_REFCNT_LOGGING
|
#ifdef NS_BUILD_REFCNT_LOGGING
|
||||||
@@ -158,7 +160,7 @@ nsTreeColFrame::BuildDisplayListForChildren(nsDisplayListBuilder* aBuilder,
|
|||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
|
|
||||||
return aLists.Content()->AppendNewToTop(new (aBuilder)
|
return aLists.Content()->AppendNewToTop(new (aBuilder)
|
||||||
nsDisplayXULTreeColSplitterTarget(this));
|
nsDisplayXULTreeColSplitterTarget(aBuilder, this));
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
|
|||||||
Reference in New Issue
Block a user