Bug 1351440 - Part 5. typedef DrawResult in nsDisplayItem to avoid the image:: qualification.
MozReview-Commit-ID: 1l8DUL1z6U2
--- a/layout/painting/nsDisplayList.cpp
+++ b/layout/painting/nsDisplayList.cpp
@@ -3504,17 +3504,17 @@ nsDisplayBackgroundImage::CreateWebRende
{
nsCSSRendering::PaintBGParams params =
nsCSSRendering::PaintBGParams::ForSingleLayer(*StyleFrame()->PresContext(),
mVisibleRect, mBackgroundRect,
StyleFrame(), 0, mLayer,
CompositionOp::OP_OVER);
params.bgClipRect = &mBounds;
- image::DrawResult result =
+ DrawResult result =
nsCSSRendering::BuildWebRenderDisplayItemsForStyleImageLayer(params, aBuilder, aSc, aParentCommands, aLayer);
nsDisplayBackgroundGeometry::UpdateDrawResult(this, result);
}
void
nsDisplayBackgroundImage::HitTest(nsDisplayListBuilder* aBuilder,
const nsRect& aRect,
@@ -3680,18 +3680,17 @@ nsDisplayBackgroundImage::PaintInternal(
}
nsCSSRendering::PaintBGParams params =
nsCSSRendering::PaintBGParams::ForSingleLayer(*StyleFrame()->PresContext(),
aBounds, mBackgroundRect,
StyleFrame(), flags, mLayer,
CompositionOp::OP_OVER);
params.bgClipRect = aClipRect;
- image::DrawResult result =
- nsCSSRendering::PaintStyleImageLayer(params, *aCtx);
+ DrawResult result = nsCSSRendering::PaintStyleImageLayer(params, *aCtx);
if (clip == StyleGeometryBox::Text) {
ctx->PopGroupAndBlend();
}
nsDisplayBackgroundGeometry::UpdateDrawResult(this, result);
}
@@ -3965,18 +3964,17 @@ nsDisplayImageContainer::ConfigureLayer(
int32_t imageHeight;
image->GetWidth(&imageWidth);
image->GetHeight(&imageHeight);
NS_ASSERTION(imageWidth != 0 && imageHeight != 0, "Invalid image size!");
if (imageWidth > 0 && imageHeight > 0) {
// We're actually using the ImageContainer. Let our frame know that it
// should consider itself to have painted successfully.
- nsDisplayBackgroundGeometry::UpdateDrawResult(this,
- image::DrawResult::SUCCESS);
+ nsDisplayBackgroundGeometry::UpdateDrawResult(this, DrawResult::SUCCESS);
}
// XXX(seth): Right now we ignore aParameters.Scale() and
// aParameters.Offset(), because FrameLayerBuilder already applies
// aParameters.Scale() via the layer's post-transform, and
// aParameters.Offset() is always zero.
MOZ_ASSERT(aParameters.Offset() == LayerIntPoint(0,0));
@@ -4973,17 +4971,17 @@ void
nsDisplayBorder::Paint(nsDisplayListBuilder* aBuilder,
nsRenderingContext* aCtx) {
nsPoint offset = ToReferenceFrame();
PaintBorderFlags flags = aBuilder->ShouldSyncDecodeImages()
? PaintBorderFlags::SYNC_DECODE_IMAGES
: PaintBorderFlags();
- image::DrawResult result =
+ DrawResult result =
nsCSSRendering::PaintBorder(mFrame->PresContext(), *aCtx, mFrame,
mVisibleRect,
nsRect(offset, mFrame->GetSize()),
mFrame->StyleContext(),
flags,
mFrame->GetSkipSides());
nsDisplayBorderGeometry::UpdateDrawResult(this, result);
--- a/layout/painting/nsDisplayList.h
+++ b/layout/painting/nsDisplayList.h
@@ -1610,16 +1610,17 @@ public:
typedef mozilla::layers::Layer Layer;
typedef mozilla::layers::LayerManager LayerManager;
typedef mozilla::layers::StackingContextHelper StackingContextHelper;
typedef mozilla::layers::WebRenderCommand WebRenderCommand;
typedef mozilla::layers::WebRenderParentCommand WebRenderParentCommand;
typedef mozilla::layers::WebRenderDisplayItemLayer WebRenderDisplayItemLayer;
typedef mozilla::LayerState LayerState;
typedef mozilla::image::imgDrawingParams imgDrawingParams;
+ typedef mozilla::image::DrawResult DrawResult;
typedef class mozilla::gfx::DrawTarget DrawTarget;
// This is never instantiated directly (it has pure virtual methods), so no
// need to count constructors and destructors.
nsDisplayItem(nsDisplayListBuilder* aBuilder, nsIFrame* aFrame);
nsDisplayItem(nsDisplayListBuilder* aBuilder, nsIFrame* aFrame,
const ActiveScrolledRoot* aActiveScrolledRoot);
/**