Bug 1088760 - Remove nsRenderingContext, replacing all of its uses with gfxContext. r=jwatt,jrmuizel

MozReview-Commit-ID: K1WUIOnvazF
This commit is contained in:
Alexis Beingessner 2017-06-09 15:14:53 -04:00 committed by Jeff Muizelaar
parent 63724b1070
commit c75211cb95
182 changed files with 919 additions and 1020 deletions

View File

@ -7,6 +7,7 @@
#include "base/basictypes.h"
#include "gfx2DGlue.h"
#include "gfxContext.h"
#include "gfxPattern.h"
#include "mozilla/gfx/2D.h"
#include "mozilla/RefPtr.h"
@ -19,7 +20,6 @@
#include "nsPresContext.h"
#include "nsCOMPtr.h"
#include "nsColor.h"
#include "gfxContext.h"
#include "nsLayoutUtils.h"
#include "nsContentUtils.h"
#include "nsCSSValue.h"

View File

@ -5,9 +5,9 @@
#ifndef mozilla_dom_DocumentRendererChild
#define mozilla_dom_DocumentRendererChild
#include "gfxContext.h"
#include "mozilla/ipc/PDocumentRendererChild.h"
#include "nsString.h"
#include "gfxContext.h"
class nsIDOMWindow;

View File

@ -5,10 +5,10 @@
#ifndef mozilla_dom_DocumentRendererParent
#define mozilla_dom_DocumentRendererParent
#include "gfxContext.h"
#include "mozilla/ipc/PDocumentRendererParent.h"
#include "nsCOMPtr.h"
#include "nsString.h"
#include "gfxContext.h"
class nsICanvasRenderingContextInternal;

View File

@ -31,7 +31,6 @@
#ifdef MOZ_X11
#include "gfxXlibSurface.h"
#endif
#include "gfxContext.h"
#include "gfxUtils.h"
#include "mozilla/gfx/2D.h"
#include "Layers.h"

View File

@ -60,8 +60,7 @@ public:
RefPtr<gfxContext> context = gfxContext::CreateOrNull(aDT, aDeviceOffset);
context->SetMatrix(ThebesMatrix(transform));
nsRenderingContext ctx(context);
mItem->Paint(mBuilder, &ctx);
mItem->Paint(mBuilder, context);
}
protected:

View File

@ -161,8 +161,7 @@ WebRenderDisplayItemLayer::PushItemAsBlobImage(wr::DisplayListBuilder& aBuilder,
RefPtr<gfxContext> context = gfxContext::CreateOrNull(dt, offset.ToUnknownPoint());
MOZ_ASSERT(context);
nsRenderingContext ctx(context);
mItem->Paint(mBuilder, &ctx);
mItem->Paint(mBuilder, context);
}
wr::ByteBuffer bytes;

View File

@ -33,7 +33,6 @@ EXPORTS += [
'nsRect.h',
'nsRegion.h',
'nsRegionFwd.h',
'nsRenderingContext.h',
'nsSize.h',
'nsThemeConstants.h',
'nsTransform2D.h',

View File

@ -6,6 +6,7 @@
#include "nsFontMetrics.h"
#include <math.h> // for floor, ceil
#include <algorithm> // for max
#include "gfxContext.h" // for gfxContext
#include "gfxFontConstants.h" // for NS_FONT_SYNTHESIS_*
#include "gfxPlatform.h" // for gfxPlatform
#include "gfxPoint.h" // for gfxPoint
@ -16,7 +17,6 @@
#include "nsDeviceContext.h" // for nsDeviceContext
#include "nsIAtom.h" // for nsIAtom
#include "nsMathUtils.h" // for NS_round
#include "nsRenderingContext.h" // for nsRenderingContext
#include "nsString.h" // for nsString
#include "nsStyleConsts.h" // for StyleHyphens::None
#include "mozilla/Assertions.h" // for MOZ_ASSERT
@ -354,7 +354,7 @@ nsFontMetrics::GetWidth(const char16_t* aString, uint32_t aLength,
void
nsFontMetrics::DrawString(const char *aString, uint32_t aLength,
nscoord aX, nscoord aY,
nsRenderingContext *aContext)
gfxContext *aContext)
{
if (aLength == 0)
return;
@ -373,7 +373,7 @@ nsFontMetrics::DrawString(const char *aString, uint32_t aLength,
pt.x += textRun->GetAdvanceWidth(range, &provider);
}
}
gfxTextRun::DrawParams params(aContext->ThebesContext());
gfxTextRun::DrawParams params(aContext);
params.provider = &provider;
textRun->Draw(range, pt, params);
}
@ -381,7 +381,7 @@ nsFontMetrics::DrawString(const char *aString, uint32_t aLength,
void
nsFontMetrics::DrawString(const char16_t* aString, uint32_t aLength,
nscoord aX, nscoord aY,
nsRenderingContext *aContext,
gfxContext *aContext,
DrawTarget* aTextRunConstructionDrawTarget)
{
if (aLength == 0)
@ -401,7 +401,7 @@ nsFontMetrics::DrawString(const char16_t* aString, uint32_t aLength,
pt.x += textRun->GetAdvanceWidth(range, &provider);
}
}
gfxTextRun::DrawParams params(aContext->ThebesContext());
gfxTextRun::DrawParams params(aContext);
params.provider = &provider;
textRun->Draw(range, pt, params);
}

View File

@ -18,11 +18,11 @@
#include "nsISupports.h" // for NS_INLINE_DECL_REFCOUNTING
#include "nscore.h" // for char16_t
class gfxContext;
class gfxUserFontSet;
class gfxTextPerfMetrics;
class nsDeviceContext;
class nsIAtom;
class nsRenderingContext;
struct nsBoundingMetrics;
/**
@ -200,10 +200,10 @@ public:
// Draw a string using this font handle on the surface passed in.
void DrawString(const char *aString, uint32_t aLength,
nscoord aX, nscoord aY,
nsRenderingContext *aContext);
gfxContext *aContext);
void DrawString(const char16_t* aString, uint32_t aLength,
nscoord aX, nscoord aY,
nsRenderingContext *aContext,
gfxContext *aContext,
DrawTarget* aTextRunConstructionDrawTarget);
nsBoundingMetrics GetBoundingMetrics(const char16_t *aString,

View File

@ -15,9 +15,9 @@
#include "Units.h"
struct nsRect;
class gfxContext;
class nsAttrValue;
class nsPresContext;
class nsRenderingContext;
class nsDeviceContext;
class nsIFrame;
class nsIAtom;
@ -55,7 +55,7 @@ public:
* @param aRect the rectangle defining the area occupied by the widget
* @param aDirtyRect the rectangle that needs to be drawn
*/
NS_IMETHOD DrawWidgetBackground(nsRenderingContext* aContext,
NS_IMETHOD DrawWidgetBackground(gfxContext* aContext,
nsIFrame* aFrame,
uint8_t aWidgetType,
const nsRect& aRect,

View File

@ -1,41 +0,0 @@
/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef NSRENDERINGCONTEXT__H__
#define NSRENDERINGCONTEXT__H__
#include "gfxContext.h"
#include "mozilla/Attributes.h"
#include "nsCOMPtr.h"
#include "mozilla/RefPtr.h"
namespace mozilla {
namespace gfx {
class DrawTarget;
} // namespace gfx
} // namespace mozilla
class MOZ_STACK_CLASS nsRenderingContext final
{
typedef mozilla::gfx::DrawTarget DrawTarget;
public:
explicit nsRenderingContext(gfxContext* aThebesContext)
: mThebes(aThebesContext)
{}
explicit nsRenderingContext(already_AddRefed<gfxContext>&& aThebesContext)
: mThebes(aThebesContext)
{}
// These accessors will never return null.
gfxContext *ThebesContext() { return mThebes; }
DrawTarget *GetDrawTarget() { return mThebes->GetDrawTarget(); }
private:
RefPtr<gfxContext> mThebes;
};
#endif // NSRENDERINGCONTEXT__H__

View File

@ -11,6 +11,7 @@
#include "mozilla/GeckoRestyleManager.h"
#include <algorithm> // For std::max
#include "gfxContext.h"
#include "mozilla/EffectSet.h"
#include "mozilla/EventStates.h"
#include "mozilla/ViewportFrame.h"
@ -31,7 +32,6 @@
#include "nsAnimationManager.h"
#include "nsTransitionManager.h"
#include "nsViewManager.h"
#include "nsRenderingContext.h"
#include "nsSVGIntegrationUtils.h"
#include "nsCSSAnonBoxes.h"
#include "nsContainerFrame.h"

View File

@ -45,6 +45,7 @@
#include "winuser.h"
#endif
#include "gfxContext.h"
#include "gfxPrefs.h"
#include "gfxUserFontSet.h"
#include "nsPresContext.h"
@ -102,7 +103,6 @@
#include "prenv.h"
#include "nsDisplayList.h"
#include "nsRegion.h"
#include "nsRenderingContext.h"
#include "nsAutoLayoutPhase.h"
#ifdef MOZ_REFLOW_PERF
#include "nsFontMetrics.h"
@ -118,7 +118,6 @@
#include "nsNetUtil.h"
#include "nsThreadUtils.h"
#include "nsStyleSheetService.h"
#include "gfxContext.h"
#include "gfxUtils.h"
#include "nsSMILAnimationController.h"
#include "SVGContentUtils.h"
@ -381,7 +380,7 @@ public:
void Add(const char * aName, nsIFrame * aFrame);
ReflowCounter * LookUp(const char * aName);
void PaintCount(const char *aName, nsRenderingContext* aRenderingContext,
void PaintCount(const char *aName, gfxContext* aRenderingContext,
nsPresContext *aPresContext, nsIFrame *aFrame,
const nsPoint &aOffset, uint32_t aColor);
@ -4685,8 +4684,6 @@ PresShell::RenderDocument(const nsRect& aRect, uint32_t aFlags,
AutoSaveRestoreRenderingState _(this);
nsRenderingContext rc(aThebesContext);
bool wouldFlushRetainedLayers = false;
PaintFrameFlags flags = PaintFrameFlags::PAINT_IGNORE_SUPPRESSION;
if (aThebesContext->CurrentMatrix().HasNonIntegerTranslation()) {
@ -4735,7 +4732,7 @@ PresShell::RenderDocument(const nsRect& aRect, uint32_t aFlags,
flags &= ~PaintFrameFlags::PAINT_WIDGET_LAYERS;
}
nsLayoutUtils::PaintFrame(&rc, rootFrame, nsRegion(aRect),
nsLayoutUtils::PaintFrame(aThebesContext, rootFrame, nsRegion(aRect),
aBackgroundColor,
nsDisplayListBuilderMode::PAINTING,
flags);
@ -5075,8 +5072,6 @@ PresShell::PaintRangePaintInfo(const nsTArray<UniquePtr<RangePaintInfo>>& aItems
ctx->Clip(path);
}
nsRenderingContext rc(ctx);
gfxMatrix initialTM = ctx->CurrentMatrix();
if (resize)
@ -5111,7 +5106,7 @@ PresShell::PaintRangePaintInfo(const nsTArray<UniquePtr<RangePaintInfo>>& aItems
aArea.MoveBy(-rangeInfo->mRootOffset.x, -rangeInfo->mRootOffset.y);
nsRegion visible(aArea);
RefPtr<LayerManager> layerManager =
rangeInfo->mList.PaintRoot(&rangeInfo->mBuilder, &rc,
rangeInfo->mList.PaintRoot(&rangeInfo->mBuilder, ctx,
nsDisplayList::PAINT_DEFAULT);
aArea.MoveBy(rangeInfo->mRootOffset.x, rangeInfo->mRootOffset.y);
}
@ -9243,7 +9238,7 @@ PresShell::DoReflow(nsIFrame* target, bool aInterruptible)
nsIFrame* rootFrame = mFrameConstructor->GetRootFrame();
// CreateReferenceRenderingContext can return nullptr
nsRenderingContext rcx(CreateReferenceRenderingContext());
RefPtr<gfxContext> rcx(CreateReferenceRenderingContext());
#ifdef DEBUG
mCurrentReflowRoot = target;
@ -9266,7 +9261,7 @@ PresShell::DoReflow(nsIFrame* target, bool aInterruptible)
// Don't pass size directly to the reflow state, since a
// constrained height implies page/column breaking.
LogicalSize reflowSize(wm, size.ISize(wm), NS_UNCONSTRAINEDSIZE);
ReflowInput reflowInput(mPresContext, target, &rcx, reflowSize,
ReflowInput reflowInput(mPresContext, target, rcx, reflowSize,
ReflowInput::CALLER_WILL_INIT);
reflowInput.mOrthogonalLimit = size.BSize(wm);
@ -9347,7 +9342,7 @@ PresShell::DoReflow(nsIFrame* target, bool aInterruptible)
target->GetView(),
boundsRelativeToTarget);
nsContainerFrame::SyncWindowProperties(mPresContext, target,
target->GetView(), &rcx,
target->GetView(), rcx,
nsContainerFrame::SET_ASYNC);
target->DidReflow(mPresContext, nullptr, nsDidReflowStatus::FINISHED);
@ -10265,7 +10260,7 @@ PresShell::CountReflows(const char * aName, nsIFrame * aFrame)
//-------------------------------------------------------------
void
PresShell::PaintCount(const char * aName,
nsRenderingContext* aRenderingContext,
gfxContext* aRenderingContext,
nsPresContext* aPresContext,
nsIFrame * aFrame,
const nsPoint& aOffset,
@ -10458,7 +10453,7 @@ void ReflowCountMgr::Add(const char * aName, nsIFrame * aFrame)
//------------------------------------------------------------------
void ReflowCountMgr::PaintCount(const char* aName,
nsRenderingContext* aRenderingContext,
gfxContext* aRenderingContext,
nsPresContext* aPresContext,
nsIFrame* aFrame,
const nsPoint& aOffset,
@ -10475,11 +10470,11 @@ void ReflowCountMgr::PaintCount(const char* aName,
DrawTarget* drawTarget = aRenderingContext->GetDrawTarget();
int32_t appUnitsPerDevPixel = aPresContext->AppUnitsPerDevPixel();
aRenderingContext->ThebesContext()->Save();
aRenderingContext->Save();
gfxPoint devPixelOffset =
nsLayoutUtils::PointToGfxPoint(aOffset, appUnitsPerDevPixel);
aRenderingContext->ThebesContext()->SetMatrix(
aRenderingContext->ThebesContext()->CurrentMatrix().Translate(devPixelOffset));
aRenderingContext->SetMatrix(
aRenderingContext->CurrentMatrix().Translate(devPixelOffset));
// We don't care about the document language or user fonts here;
// just get a default Latin font.
@ -10522,12 +10517,12 @@ void ReflowCountMgr::PaintCount(const char* aName,
ColorPattern black(ToDeviceColor(Color(0.f, 0.f, 0.f, 1.f)));
drawTarget->FillRect(devPxRect, black);
aRenderingContext->ThebesContext()->SetColor(color2);
aRenderingContext->SetColor(color2);
fm->DrawString(buf, len, x+15, y+15, aRenderingContext);
aRenderingContext->ThebesContext()->SetColor(color);
aRenderingContext->SetColor(color);
fm->DrawString(buf, len, x, y, aRenderingContext);
aRenderingContext->ThebesContext()->Restore();
aRenderingContext->Restore();
}
}
}
@ -11192,8 +11187,8 @@ nsIPresShell::SyncWindowProperties(nsView* aView)
nsIFrame* frame = aView->GetFrame();
if (frame && mPresContext) {
// CreateReferenceRenderingContext can return nullptr
nsRenderingContext rcx(CreateReferenceRenderingContext());
nsContainerFrame::SyncWindowProperties(mPresContext, frame, aView, &rcx, 0);
RefPtr<gfxContext> rcx(CreateReferenceRenderingContext());
nsContainerFrame::SyncWindowProperties(mPresContext, frame, aView, rcx, 0);
}
}

View File

@ -318,7 +318,7 @@ public:
virtual void DumpReflows() override;
virtual void CountReflows(const char * aName, nsIFrame * aFrame) override;
virtual void PaintCount(const char * aName,
nsRenderingContext* aRenderingContext,
gfxContext* aRenderingContext,
nsPresContext* aPresContext,
nsIFrame * aFrame,
const nsPoint& aOffset,

View File

@ -821,8 +821,8 @@ RecomputePosition(nsIFrame* aFrame)
// the frame, and then get the offsets and size from it. If the frame's size
// doesn't need to change, we can simply update the frame position. Otherwise
// we fall back to a reflow.
nsRenderingContext rc(
aFrame->PresContext()->PresShell()->CreateReferenceRenderingContext());
RefPtr<gfxContext> rc =
aFrame->PresContext()->PresShell()->CreateReferenceRenderingContext();
// Construct a bogus parent reflow state so that there's a usable
// containing block reflow state.
@ -832,7 +832,7 @@ RecomputePosition(nsIFrame* aFrame)
LogicalSize parentSize = parentFrame->GetLogicalSize();
nsFrameState savedState = parentFrame->GetStateBits();
ReflowInput parentReflowInput(aFrame->PresContext(), parentFrame, &rc,
ReflowInput parentReflowInput(aFrame->PresContext(), parentFrame, rc,
parentSize);
parentFrame->RemoveStateBits(~nsFrameState(0));
parentFrame->AddStateBits(savedState);
@ -846,7 +846,7 @@ RecomputePosition(nsIFrame* aFrame)
if (cbFrame && (aFrame->GetContainingBlock() != parentFrame ||
parentFrame->IsTableFrame())) {
LogicalSize cbSize = cbFrame->GetLogicalSize();
cbReflowInput.emplace(cbFrame->PresContext(), cbFrame, &rc, cbSize);
cbReflowInput.emplace(cbFrame->PresContext(), cbFrame, rc, cbSize);
cbReflowInput->ComputedPhysicalMargin() = cbFrame->GetUsedMargin();
cbReflowInput->ComputedPhysicalPadding() = cbFrame->GetUsedPadding();
cbReflowInput->ComputedPhysicalBorderPadding() =

View File

@ -5,12 +5,12 @@
#include "mozilla/IntegerRange.h"
#include "gfxContext.h"
#include "nsAutoPtr.h"
#include "nsBidiPresUtils.h"
#include "nsFontMetrics.h"
#include "nsGkAtoms.h"
#include "nsPresContext.h"
#include "nsRenderingContext.h"
#include "nsBidiUtils.h"
#include "nsCSSFrameConstructor.h"
#include "nsContainerFrame.h"
@ -2300,7 +2300,7 @@ class MOZ_STACK_CLASS nsIRenderingContextBidiProcessor final
public:
typedef mozilla::gfx::DrawTarget DrawTarget;
nsIRenderingContextBidiProcessor(nsRenderingContext* aCtx,
nsIRenderingContextBidiProcessor(gfxContext* aCtx,
DrawTarget* aTextRunConstructionDrawTarget,
nsFontMetrics* aFontMetrics,
const nsPoint& aPt)
@ -2344,7 +2344,7 @@ public:
}
private:
nsRenderingContext* mCtx;
gfxContext* mCtx;
DrawTarget* mTextRunConstructionDrawTarget;
nsFontMetrics* mFontMetrics;
nsPoint mPt;
@ -2356,7 +2356,7 @@ nsresult nsBidiPresUtils::ProcessTextForRenderingContext(const char16_t* a
int32_t aLength,
nsBidiLevel aBaseLevel,
nsPresContext* aPresContext,
nsRenderingContext& aRenderingContext,
gfxContext& aRenderingContext,
DrawTarget* aTextRunConstructionDrawTarget,
nsFontMetrics& aFontMetrics,
Mode aMode,

View File

@ -7,11 +7,11 @@
#ifndef nsBidiPresUtils_h___
#define nsBidiPresUtils_h___
#include "gfxContext.h"
#include "nsBidi.h"
#include "nsBidiUtils.h"
#include "nsHashKeys.h"
#include "nsCoord.h"
#include "nsRenderingContext.h"
#ifdef DrawText
#undef DrawText
@ -19,11 +19,11 @@
struct BidiParagraphData;
struct BidiLineData;
class gfxContext;
class nsFontMetrics;
class nsIFrame;
class nsBlockFrame;
class nsPresContext;
class nsRenderingContext;
class nsBlockInFlowLineIterator;
class nsStyleContext;
struct nsSize;
@ -213,7 +213,7 @@ public:
int32_t aLength,
nsBidiLevel aBaseLevel,
nsPresContext* aPresContext,
nsRenderingContext& aRenderingContext,
gfxContext& aRenderingContext,
DrawTarget* aTextRunConstructionDrawTarget,
nsFontMetrics& aFontMetrics,
nscoord aX,
@ -231,7 +231,7 @@ public:
int32_t aLength,
nsBidiLevel aBaseLevel,
nsPresContext* aPresContext,
nsRenderingContext& aRenderingContext,
gfxContext& aRenderingContext,
nsFontMetrics& aFontMetrics)
{
nscoord length;
@ -379,7 +379,7 @@ private:
int32_t aLength,
nsBidiLevel aBaseLevel,
nsPresContext* aPresContext,
nsRenderingContext& aRenderingContext,
gfxContext& aRenderingContext,
DrawTarget* aTextRunConstructionDrawTarget,
nsFontMetrics& aFontMetrics,
Mode aMode,

View File

@ -6,6 +6,7 @@
/* container for a document and its presentation */
#include "gfxContext.h"
#include "mozilla/ServoRestyleManager.h"
#include "mozilla/ServoStyleSet.h"
#include "nsAutoPtr.h"
@ -82,7 +83,6 @@
#include "nsIScrollableFrame.h"
#include "nsStyleSheetService.h"
#include "nsRenderingContext.h"
#include "nsILoadContext.h"
#include "nsIPrompt.h"
@ -3527,8 +3527,8 @@ nsDocumentViewer::GetContentSizeInternal(int32_t* aWidth, int32_t* aHeight,
nscoord prefWidth;
{
nsRenderingContext rcx(presShell->CreateReferenceRenderingContext());
prefWidth = root->GetPrefISize(&rcx);
RefPtr<gfxContext> rcx(presShell->CreateReferenceRenderingContext());
prefWidth = root->GetPrefISize(rcx);
}
if (prefWidth > aMaxWidth) {
prefWidth = aMaxWidth;

View File

@ -51,13 +51,13 @@
#include "nsFrameState.h"
#include "Units.h"
class gfxContext;
class nsDocShell;
class nsIDocument;
class nsIFrame;
class nsPresContext;
class nsViewManager;
class nsView;
class nsRenderingContext;
class nsIPageSequenceFrame;
class nsCanvasFrame;
class nsAString;
@ -77,7 +77,6 @@ template<class E> class nsCOMArray;
class AutoWeakFrame;
class WeakFrame;
class nsIScrollableFrame;
class gfxContext;
class nsIDOMEvent;
class nsDisplayList;
class nsDisplayListBuilder;
@ -1021,7 +1020,7 @@ public:
virtual void DumpReflows() = 0;
virtual void CountReflows(const char * aName, nsIFrame * aFrame) = 0;
virtual void PaintCount(const char * aName,
nsRenderingContext* aRenderingContext,
gfxContext* aRenderingContext,
nsPresContext * aPresContext,
nsIFrame * aFrame,
const nsPoint& aOffset,

View File

@ -50,7 +50,7 @@
#include "ImageRegion.h"
#include "gfxRect.h"
#include "gfxContext.h"
#include "nsRenderingContext.h"
#include "gfxContext.h"
#include "nsIInterfaceRequestorUtils.h"
#include "nsCSSRendering.h"
#include "nsTextFragment.h"
@ -3420,7 +3420,7 @@ nsLayoutUtils::ExpireDisplayPortOnAsyncScrollableAncestor(nsIFrame* aFrame)
}
nsresult
nsLayoutUtils::PaintFrame(nsRenderingContext* aRenderingContext, nsIFrame* aFrame,
nsLayoutUtils::PaintFrame(gfxContext* aRenderingContext, nsIFrame* aFrame,
const nsRegion& aDirtyRegion, nscolor aBackstop,
nsDisplayListBuilderMode aBuilderMode,
PaintFrameFlags aFlags)
@ -3518,8 +3518,8 @@ nsLayoutUtils::PaintFrame(nsRenderingContext* aRenderingContext, nsIFrame* aFram
gfxPoint devPixelOffset =
nsLayoutUtils::PointToGfxPoint(pos,
presContext->AppUnitsPerDevPixel());
aRenderingContext->ThebesContext()->SetMatrix(
aRenderingContext->ThebesContext()->CurrentMatrix().Translate(devPixelOffset));
aRenderingContext->SetMatrix(
aRenderingContext->CurrentMatrix().Translate(devPixelOffset));
}
}
builder.SetIgnoreScrollFrame(rootScrollFrame);
@ -4857,7 +4857,7 @@ GetDefiniteSizeTakenByBoxSizing(StyleBoxSizing aBoxSizing,
enum eWidthProperty { PROP_WIDTH, PROP_MAX_WIDTH, PROP_MIN_WIDTH };
static bool
GetIntrinsicCoord(const nsStyleCoord& aStyle,
nsRenderingContext* aRenderingContext,
gfxContext* aRenderingContext,
nsIFrame* aFrame,
eWidthProperty aProperty,
nscoord& aResult)
@ -4965,7 +4965,7 @@ FormControlShrinksForPercentISize(nsIFrame* aFrame)
* @param aContainerWM the container's WM
*/
static nscoord
AddIntrinsicSizeOffset(nsRenderingContext* aRenderingContext,
AddIntrinsicSizeOffset(gfxContext* aRenderingContext,
nsIFrame* aFrame,
const nsIFrame::IntrinsicISizeOffsetData& aOffsets,
nsLayoutUtils::IntrinsicISizeType aType,
@ -5110,7 +5110,7 @@ AddStateBitToAncestors(nsIFrame* aFrame, nsFrameState aBit)
/* static */ nscoord
nsLayoutUtils::IntrinsicForAxis(PhysicalAxis aAxis,
nsRenderingContext* aRenderingContext,
gfxContext* aRenderingContext,
nsIFrame* aFrame,
IntrinsicISizeType aType,
const Maybe<LogicalSize>& aPercentageBasis,
@ -5364,7 +5364,7 @@ nsLayoutUtils::IntrinsicForAxis(PhysicalAxis aAxis,
}
/* static */ nscoord
nsLayoutUtils::IntrinsicForContainer(nsRenderingContext* aRenderingContext,
nsLayoutUtils::IntrinsicForContainer(gfxContext* aRenderingContext,
nsIFrame* aFrame,
IntrinsicISizeType aType,
uint32_t aFlags)
@ -5378,7 +5378,7 @@ nsLayoutUtils::IntrinsicForContainer(nsRenderingContext* aRenderingContext,
/* static */ nscoord
nsLayoutUtils::MinSizeContributionForAxis(PhysicalAxis aAxis,
nsRenderingContext* aRC,
gfxContext* aRC,
nsIFrame* aFrame,
IntrinsicISizeType aType,
uint32_t aFlags)
@ -5674,7 +5674,7 @@ nsLayoutUtils::ComputeAutoSizeWithIntrinsicDimensions(nscoord minWidth, nscoord
/* static */ nscoord
nsLayoutUtils::MinISizeFromInline(nsIFrame* aFrame,
nsRenderingContext* aRenderingContext)
gfxContext* aRenderingContext)
{
NS_ASSERTION(!aFrame->IsContainerForFontSizeInflation(),
"should not be container for font size inflation");
@ -5688,7 +5688,7 @@ nsLayoutUtils::MinISizeFromInline(nsIFrame* aFrame,
/* static */ nscoord
nsLayoutUtils::PrefISizeFromInline(nsIFrame* aFrame,
nsRenderingContext* aRenderingContext)
gfxContext* aRenderingContext)
{
NS_ASSERTION(!aFrame->IsContainerForFontSizeInflation(),
"should not be container for font size inflation");
@ -5821,7 +5821,7 @@ nsLayoutUtils::AppUnitWidthOfStringBidi(const char16_t* aString,
uint32_t aLength,
const nsIFrame* aFrame,
nsFontMetrics& aFontMetrics,
nsRenderingContext& aContext)
gfxContext& aContext)
{
nsPresContext* presContext = aFrame->PresContext();
if (presContext->BidiEnabled()) {
@ -5890,7 +5890,7 @@ nsLayoutUtils::AppUnitBoundsOfString(const char16_t* aString,
void
nsLayoutUtils::DrawString(const nsIFrame* aFrame,
nsFontMetrics& aFontMetrics,
nsRenderingContext* aContext,
gfxContext* aContext,
const char16_t* aString,
int32_t aLength,
nsPoint aPoint,
@ -5934,7 +5934,7 @@ nsLayoutUtils::DrawUniDirString(const char16_t* aString,
uint32_t aLength,
nsPoint aPoint,
nsFontMetrics& aFontMetrics,
nsRenderingContext& aContext)
gfxContext& aContext)
{
nscoord x = aPoint.x;
nscoord y = aPoint.y;
@ -5972,7 +5972,7 @@ nsLayoutUtils::DrawUniDirString(const char16_t* aString,
/* static */ void
nsLayoutUtils::PaintTextShadow(const nsIFrame* aFrame,
nsRenderingContext* aContext,
gfxContext* aContext,
const nsRect& aTextRect,
const nsRect& aDirtyRect,
const nscolor& aForegroundColor,
@ -5985,7 +5985,7 @@ nsLayoutUtils::PaintTextShadow(const nsIFrame* aFrame,
// Text shadow happens with the last value being painted at the back,
// ie. it is painted first.
gfxContext* aDestCtx = aContext->ThebesContext();
gfxContext* aDestCtx = aContext;
for (uint32_t i = textStyle->mTextShadow->Length(); i > 0; --i) {
nsCSSShadowItem* shadowDetails = textStyle->mTextShadow->ShadowAt(i - 1);
nsPoint shadowOffset(shadowDetails->mXOffset,
@ -6009,16 +6009,12 @@ nsLayoutUtils::PaintTextShadow(const nsIFrame* aFrame,
else
shadowColor = aForegroundColor;
// Conjure an nsRenderingContext from a gfxContext for drawing the text
// to blur.
nsRenderingContext renderingContext(shadowContext);
aDestCtx->Save();
aDestCtx->NewPath();
aDestCtx->SetColor(Color::FromABGR(shadowColor));
// The callback will draw whatever we want to blur as a shadow.
aCallback(&renderingContext, shadowOffset, shadowColor, aCallbackData);
aCallback(shadowContext, shadowOffset, shadowColor, aCallbackData);
contextBoxBlur.DoPaint();
aDestCtx->Restore();

View File

@ -35,6 +35,7 @@
#include <limits>
#include <algorithm>
class gfxContext;
class nsPresContext;
class nsIContent;
class nsIAtom;
@ -54,7 +55,6 @@ class nsView;
class nsIFrame;
class nsStyleCoord;
class nsStyleCorners;
class gfxContext;
class nsPIDOMWindowOuter;
class imgIRequest;
class nsIDocument;
@ -1094,7 +1094,7 @@ public:
* necessarily correspond to what's visible in the window; we don't
* want to mess up the widget's layer tree.
*/
static nsresult PaintFrame(nsRenderingContext* aRenderingContext, nsIFrame* aFrame,
static nsresult PaintFrame(gfxContext* aRenderingContext, nsIFrame* aFrame,
const nsRegion& aDirtyRegion, nscolor aBackstop,
nsDisplayListBuilderMode aBuilderMode,
PaintFrameFlags aFlags = PaintFrameFlags(0));
@ -1395,7 +1395,7 @@ public:
};
static nscoord
IntrinsicForAxis(mozilla::PhysicalAxis aAxis,
nsRenderingContext* aRenderingContext,
gfxContext* aRenderingContext,
nsIFrame* aFrame,
IntrinsicISizeType aType,
const mozilla::Maybe<mozilla::LogicalSize>& aPercentageBasis = mozilla::Nothing(),
@ -1404,7 +1404,7 @@ public:
/**
* Calls IntrinsicForAxis with aFrame's parent's inline physical axis.
*/
static nscoord IntrinsicForContainer(nsRenderingContext* aRenderingContext,
static nscoord IntrinsicForContainer(gfxContext* aRenderingContext,
nsIFrame* aFrame,
IntrinsicISizeType aType,
uint32_t aFlags = 0);
@ -1427,7 +1427,7 @@ public:
* should be a grid/flex item.
*/
static nscoord MinSizeContributionForAxis(mozilla::PhysicalAxis aAxis,
nsRenderingContext* aRC,
gfxContext* aRC,
nsIFrame* aFrame,
IntrinsicISizeType aType,
uint32_t aFlags = 0);
@ -1539,11 +1539,11 @@ public:
// Implement nsIFrame::GetPrefISize in terms of nsIFrame::AddInlinePrefISize
static nscoord PrefISizeFromInline(nsIFrame* aFrame,
nsRenderingContext* aRenderingContext);
gfxContext* aRenderingContext);
// Implement nsIFrame::GetMinISize in terms of nsIFrame::AddInlineMinISize
static nscoord MinISizeFromInline(nsIFrame* aFrame,
nsRenderingContext* aRenderingContext);
gfxContext* aRenderingContext);
// Get a suitable foreground color for painting aColor for aFrame.
static nscolor DarkenColorIfNeeded(nsIFrame* aFrame, nscolor aColor);
@ -1584,7 +1584,7 @@ public:
static nscoord AppUnitWidthOfStringBidi(const nsString& aString,
const nsIFrame* aFrame,
nsFontMetrics& aFontMetrics,
nsRenderingContext& aContext) {
gfxContext& aContext) {
return nsLayoutUtils::AppUnitWidthOfStringBidi(aString.get(),
aString.Length(), aFrame,
aFontMetrics, aContext);
@ -1593,7 +1593,7 @@ public:
uint32_t aLength,
const nsIFrame* aFrame,
nsFontMetrics& aFontMetrics,
nsRenderingContext& aContext);
gfxContext& aContext);
static bool StringWidthIsGreaterThan(const nsString& aString,
nsFontMetrics& aFontMetrics,
@ -1607,7 +1607,7 @@ public:
static void DrawString(const nsIFrame* aFrame,
nsFontMetrics& aFontMetrics,
nsRenderingContext* aContext,
gfxContext* aContext,
const char16_t* aString,
int32_t aLength,
nsPoint aPoint,
@ -1625,19 +1625,19 @@ public:
uint32_t aLength,
nsPoint aPoint,
nsFontMetrics& aFontMetrics,
nsRenderingContext& aContext);
gfxContext& aContext);
/**
* Helper function for drawing text-shadow. The callback's job
* is to draw whatever needs to be blurred onto the given context.
*/
typedef void (* TextShadowCallback)(nsRenderingContext* aCtx,
typedef void (* TextShadowCallback)(gfxContext* aCtx,
nsPoint aShadowOffset,
const nscolor& aShadowColor,
void* aData);
static void PaintTextShadow(const nsIFrame* aFrame,
nsRenderingContext* aContext,
gfxContext* aContext,
const nsRect& aTextRect,
const nsRect& aDirtyRect,
const nscolor& aForegroundColor,

View File

@ -88,7 +88,7 @@ public:
#endif
virtual void Paint(nsDisplayListBuilder* aBuilder,
nsRenderingContext* aCtx) override;
gfxContext* aCtx) override;
virtual nsRect GetBounds(nsDisplayListBuilder* aBuilder,
bool* aSnap) override;
NS_DISPLAY_DECL_NAME("ButtonBoxShadowOuter", TYPE_BUTTON_BOX_SHADOW_OUTER)
@ -102,7 +102,7 @@ nsDisplayButtonBoxShadowOuter::GetBounds(nsDisplayListBuilder* aBuilder, bool* a
void
nsDisplayButtonBoxShadowOuter::Paint(nsDisplayListBuilder* aBuilder,
nsRenderingContext* aCtx) {
gfxContext* aCtx) {
nsRect frameRect = nsRect(ToReferenceFrame(), mFrame->GetSize());
nsCSSRendering::PaintBoxShadowOuter(mFrame->PresContext(), *aCtx, mFrame,
@ -127,7 +127,7 @@ public:
aOutFrames->AppendElement(mFrame);
}
virtual void Paint(nsDisplayListBuilder* aBuilder,
nsRenderingContext* aCtx) override;
gfxContext* aCtx) override;
virtual nsRect GetBounds(nsDisplayListBuilder* aBuilder,
bool* aSnap) override;
virtual nsDisplayItemGeometry* AllocateGeometry(nsDisplayListBuilder* aBuilder) override;
@ -243,7 +243,7 @@ nsDisplayButtonBorder::ComputeInvalidationRegion(
void
nsDisplayButtonBorder::Paint(nsDisplayListBuilder* aBuilder,
nsRenderingContext* aCtx)
gfxContext* aCtx)
{
NS_ASSERTION(mFrame, "No frame?");
nsPresContext* pc = mFrame->PresContext();
@ -281,7 +281,7 @@ public:
const nsDisplayItemGeometry* aGeometry,
nsRegion *aInvalidRegion) override;
virtual void Paint(nsDisplayListBuilder* aBuilder,
nsRenderingContext* aCtx) override;
gfxContext* aCtx) override;
virtual LayerState GetLayerState(nsDisplayListBuilder* aBuilder,
LayerManager* aManager,
const ContainerLayerParameters& aParameters) override;
@ -323,7 +323,7 @@ nsDisplayButtonForeground::ComputeInvalidationRegion(
}
void nsDisplayButtonForeground::Paint(nsDisplayListBuilder* aBuilder,
nsRenderingContext* aCtx)
gfxContext* aCtx)
{
nsPresContext *presContext = mFrame->PresContext();
const nsStyleDisplay *disp = mFrame->StyleDisplay();
@ -427,7 +427,7 @@ DrawResult
nsButtonFrameRenderer::PaintInnerFocusBorder(
nsDisplayListBuilder* aBuilder,
nsPresContext* aPresContext,
nsRenderingContext& aRenderingContext,
gfxContext& aRenderingContext,
const nsRect& aDirtyRect,
const nsRect& aRect)
{
@ -457,7 +457,7 @@ Maybe<nsCSSBorderRenderer>
nsButtonFrameRenderer::CreateInnerFocusBorderRenderer(
nsDisplayListBuilder* aBuilder,
nsPresContext* aPresContext,
nsRenderingContext* aRenderingContext,
gfxContext* aRenderingContext,
const nsRect& aDirtyRect,
const nsRect& aRect)
{
@ -481,7 +481,7 @@ DrawResult
nsButtonFrameRenderer::PaintBorder(
nsDisplayListBuilder* aBuilder,
nsPresContext* aPresContext,
nsRenderingContext& aRenderingContext,
gfxContext& aRenderingContext,
const nsRect& aDirtyRect,
const nsRect& aRect)
{

View File

@ -10,12 +10,12 @@
#include "nsMargin.h"
#include "nsCSSRenderingBorders.h"
class gfxContext;
class nsIFrame;
class nsFrame;
class nsDisplayList;
class nsDisplayListBuilder;
class nsPresContext;
class nsRenderingContext;
struct nsRect;
class nsStyleContext;
@ -40,19 +40,19 @@ public:
DrawResult PaintInnerFocusBorder(nsDisplayListBuilder* aBuilder,
nsPresContext* aPresContext,
nsRenderingContext& aRenderingContext,
gfxContext& aRenderingContext,
const nsRect& aDirtyRect,
const nsRect& aRect);
mozilla::Maybe<nsCSSBorderRenderer> CreateInnerFocusBorderRenderer(nsDisplayListBuilder* aBuilder,
nsPresContext* aPresContext,
nsRenderingContext* aRenderingContext,
gfxContext* aRenderingContext,
const nsRect& aDirtyRect,
const nsRect& aRect);
DrawResult PaintBorder(nsDisplayListBuilder* aBuilder,
nsPresContext* aPresContext,
nsRenderingContext& aRenderingContext,
gfxContext& aRenderingContext,
const nsRect& aDirtyRect,
const nsRect& aRect);

View File

@ -5,6 +5,7 @@
#include "nsComboboxControlFrame.h"
#include "gfxContext.h"
#include "gfxUtils.h"
#include "mozilla/gfx/2D.h"
#include "mozilla/gfx/PathHelpers.h"
@ -38,7 +39,6 @@
#include "nsDisplayList.h"
#include "nsITheme.h"
#include "nsThemeConstants.h"
#include "nsRenderingContext.h"
#include "mozilla/Likely.h"
#include <algorithm>
#include "nsTextNode.h"
@ -735,7 +735,7 @@ static void printSize(char * aDesc, nscoord aSize)
//-------------------------------------------------------------------
nscoord
nsComboboxControlFrame::GetIntrinsicISize(nsRenderingContext* aRenderingContext,
nsComboboxControlFrame::GetIntrinsicISize(gfxContext* aRenderingContext,
nsLayoutUtils::IntrinsicISizeType aType)
{
// get the scrollbar width, we'll use this later
@ -791,7 +791,7 @@ nsComboboxControlFrame::GetIntrinsicISize(nsRenderingContext* aRenderingContext,
}
nscoord
nsComboboxControlFrame::GetMinISize(nsRenderingContext *aRenderingContext)
nsComboboxControlFrame::GetMinISize(gfxContext *aRenderingContext)
{
nscoord minISize;
DISPLAY_MIN_WIDTH(this, minISize);
@ -800,7 +800,7 @@ nsComboboxControlFrame::GetMinISize(nsRenderingContext *aRenderingContext)
}
nscoord
nsComboboxControlFrame::GetPrefISize(nsRenderingContext *aRenderingContext)
nsComboboxControlFrame::GetPrefISize(gfxContext *aRenderingContext)
{
nscoord prefISize;
DISPLAY_PREF_WIDTH(this, prefISize);
@ -1539,12 +1539,12 @@ public:
#endif
virtual void Paint(nsDisplayListBuilder* aBuilder,
nsRenderingContext* aCtx) override;
gfxContext* aCtx) override;
NS_DISPLAY_DECL_NAME("ComboboxFocus", TYPE_COMBOBOX_FOCUS)
};
void nsDisplayComboboxFocus::Paint(nsDisplayListBuilder* aBuilder,
nsRenderingContext* aCtx)
gfxContext* aCtx)
{
static_cast<nsComboboxControlFrame*>(mFrame)
->PaintFocus(*aCtx->GetDrawTarget(), ToReferenceFrame());

View File

@ -77,9 +77,9 @@ public:
virtual mozilla::a11y::AccType AccessibleType() override;
#endif
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) override;
virtual nscoord GetMinISize(gfxContext *aRenderingContext) override;
virtual nscoord GetPrefISize(nsRenderingContext *aRenderingContext) override;
virtual nscoord GetPrefISize(gfxContext *aRenderingContext) override;
virtual void Reflow(nsPresContext* aCX,
ReflowOutput& aDesiredSize,
@ -249,7 +249,7 @@ protected:
DropDownPositionState AbsolutelyPositionDropDown();
// Helper for GetMinISize/GetPrefISize
nscoord GetIntrinsicISize(nsRenderingContext* aRenderingContext,
nscoord GetIntrinsicISize(gfxContext* aRenderingContext,
nsLayoutUtils::IntrinsicISizeType aType);
class RedisplayTextEvent : public mozilla::Runnable {

View File

@ -126,7 +126,7 @@ nsDateTimeControlFrame::HandleBlurEvent()
}
nscoord
nsDateTimeControlFrame::GetMinISize(nsRenderingContext* aRenderingContext)
nsDateTimeControlFrame::GetMinISize(gfxContext* aRenderingContext)
{
nscoord result;
DISPLAY_MIN_WIDTH(this, result);
@ -144,7 +144,7 @@ nsDateTimeControlFrame::GetMinISize(nsRenderingContext* aRenderingContext)
}
nscoord
nsDateTimeControlFrame::GetPrefISize(nsRenderingContext* aRenderingContext)
nsDateTimeControlFrame::GetPrefISize(gfxContext* aRenderingContext)
{
nscoord result;
DISPLAY_PREF_WIDTH(this, result);

View File

@ -56,9 +56,9 @@ public:
}
// Reflow
nscoord GetMinISize(nsRenderingContext* aRenderingContext) override;
nscoord GetMinISize(gfxContext* aRenderingContext) override;
nscoord GetPrefISize(nsRenderingContext* aRenderingContext) override;
nscoord GetPrefISize(gfxContext* aRenderingContext) override;
void Reflow(nsPresContext* aPresContext,
ReflowOutput& aDesiredSize,

View File

@ -6,6 +6,7 @@
#include "nsFieldSetFrame.h"
#include <algorithm>
#include "gfxContext.h"
#include "mozilla/gfx/2D.h"
#include "mozilla/Likely.h"
#include "mozilla/Maybe.h"
@ -16,7 +17,6 @@
#include "nsIFrameInlines.h"
#include "nsLayoutUtils.h"
#include "nsLegendFrame.h"
#include "nsRenderingContext.h"
#include "nsStyleConsts.h"
using namespace mozilla;
@ -91,7 +91,7 @@ public:
}
#endif
virtual void Paint(nsDisplayListBuilder* aBuilder,
nsRenderingContext* aCtx) override;
gfxContext* aCtx) override;
virtual nsDisplayItemGeometry* AllocateGeometry(nsDisplayListBuilder* aBuilder) override;
virtual void ComputeInvalidationRegion(nsDisplayListBuilder* aBuilder,
const nsDisplayItemGeometry* aGeometry,
@ -102,7 +102,7 @@ public:
void
nsDisplayFieldSetBorder::Paint(nsDisplayListBuilder* aBuilder,
nsRenderingContext* aCtx)
gfxContext* aCtx)
{
image::DrawResult result = static_cast<nsFieldSetFrame*>(mFrame)->
PaintBorder(aBuilder, *aCtx, ToReferenceFrame(), mVisibleRect);
@ -204,7 +204,7 @@ nsFieldSetFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
image::DrawResult
nsFieldSetFrame::PaintBorder(
nsDisplayListBuilder* aBuilder,
nsRenderingContext& aRenderingContext,
gfxContext& aRenderingContext,
nsPoint aPt,
const nsRect& aDirtyRect)
{
@ -255,14 +255,12 @@ nsFieldSetFrame::PaintBorder(
false);
RefPtr<Path> clipPath = pathBuilder->Finish();
gfxContext* gfx = aRenderingContext.ThebesContext();
gfx->Save();
gfx->Clip(clipPath);
aRenderingContext.Save();
aRenderingContext.Clip(clipPath);
result &=
nsCSSRendering::PaintBorder(presContext, aRenderingContext, this,
aDirtyRect, rect, mStyleContext, borderFlags);
gfx->Restore();
aRenderingContext.Restore();
} else {
result &=
nsCSSRendering::PaintBorder(presContext, aRenderingContext, this,
@ -274,7 +272,7 @@ nsFieldSetFrame::PaintBorder(
}
nscoord
nsFieldSetFrame::GetIntrinsicISize(nsRenderingContext* aRenderingContext,
nsFieldSetFrame::GetIntrinsicISize(gfxContext* aRenderingContext,
nsLayoutUtils::IntrinsicISizeType aType)
{
nscoord legendWidth = 0;
@ -298,7 +296,7 @@ nsFieldSetFrame::GetIntrinsicISize(nsRenderingContext* aRenderingContext,
nscoord
nsFieldSetFrame::GetMinISize(nsRenderingContext* aRenderingContext)
nsFieldSetFrame::GetMinISize(gfxContext* aRenderingContext)
{
nscoord result = 0;
DISPLAY_MIN_WIDTH(this, result);
@ -308,7 +306,7 @@ nsFieldSetFrame::GetMinISize(nsRenderingContext* aRenderingContext)
}
nscoord
nsFieldSetFrame::GetPrefISize(nsRenderingContext* aRenderingContext)
nsFieldSetFrame::GetPrefISize(gfxContext* aRenderingContext)
{
nscoord result = 0;
DISPLAY_PREF_WIDTH(this, result);

View File

@ -20,10 +20,10 @@ public:
explicit nsFieldSetFrame(nsStyleContext* aContext);
nscoord
GetIntrinsicISize(nsRenderingContext* aRenderingContext,
GetIntrinsicISize(gfxContext* aRenderingContext,
nsLayoutUtils::IntrinsicISizeType);
virtual nscoord GetMinISize(nsRenderingContext* aRenderingContext) override;
virtual nscoord GetPrefISize(nsRenderingContext* aRenderingContext) override;
virtual nscoord GetMinISize(gfxContext* aRenderingContext) override;
virtual nscoord GetPrefISize(gfxContext* aRenderingContext) override;
/**
* The area to paint box-shadows around. It's the border rect except
@ -48,7 +48,7 @@ public:
const nsDisplayListSet& aLists) override;
DrawResult PaintBorder(nsDisplayListBuilder* aBuilder,
nsRenderingContext& aRenderingContext,
gfxContext& aRenderingContext,
nsPoint aPt, const nsRect& aDirtyRect);
#ifdef DEBUG

View File

@ -422,7 +422,7 @@ nsFileControlFrame::DnDListener::CanDropTheseFiles(nsIDOMDataTransfer* aDOMDataT
}
nscoord
nsFileControlFrame::GetMinISize(nsRenderingContext *aRenderingContext)
nsFileControlFrame::GetMinISize(gfxContext *aRenderingContext)
{
nscoord result;
DISPLAY_MIN_WIDTH(this, result);

View File

@ -43,7 +43,7 @@ public:
virtual nsresult SetFormProperty(nsIAtom* aName, const nsAString& aValue) override;
virtual void SetFocus(bool aOn, bool aRepaint) override;
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) override;
virtual nscoord GetMinISize(gfxContext *aRenderingContext) override;
virtual void DestroyFrom(nsIFrame* aDestructRoot) override;

View File

@ -40,7 +40,7 @@ NS_QUERYFRAME_HEAD(nsFormControlFrame)
NS_QUERYFRAME_TAIL_INHERITING(nsAtomicContainerFrame)
/* virtual */ nscoord
nsFormControlFrame::GetMinISize(nsRenderingContext *aRenderingContext)
nsFormControlFrame::GetMinISize(gfxContext *aRenderingContext)
{
nscoord result;
DISPLAY_MIN_WIDTH(this, result);
@ -53,7 +53,7 @@ nsFormControlFrame::GetMinISize(nsRenderingContext *aRenderingContext)
}
/* virtual */ nscoord
nsFormControlFrame::GetPrefISize(nsRenderingContext *aRenderingContext)
nsFormControlFrame::GetPrefISize(gfxContext *aRenderingContext)
{
nscoord result;
DISPLAY_PREF_WIDTH(this, result);
@ -67,7 +67,7 @@ nsFormControlFrame::GetPrefISize(nsRenderingContext *aRenderingContext)
/* virtual */
LogicalSize
nsFormControlFrame::ComputeAutoSize(nsRenderingContext* aRC,
nsFormControlFrame::ComputeAutoSize(gfxContext* aRC,
WritingMode aWM,
const LogicalSize& aCBSize,
nscoord aAvailableISize,

View File

@ -48,14 +48,14 @@ public:
* Both GetMinISize and GetPrefISize will return whatever GetIntrinsicISize
* returns.
*/
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) override;
virtual nscoord GetPrefISize(nsRenderingContext *aRenderingContext) override;
virtual nscoord GetMinISize(gfxContext *aRenderingContext) override;
virtual nscoord GetPrefISize(gfxContext *aRenderingContext) override;
/**
* Our auto size is just intrinsic width and intrinsic height.
*/
virtual mozilla::LogicalSize
ComputeAutoSize(nsRenderingContext* aRenderingContext,
ComputeAutoSize(gfxContext* aRenderingContext,
mozilla::WritingMode aWM,
const mozilla::LogicalSize& aCBSize,
nscoord aAvailableISize,

View File

@ -5,12 +5,12 @@
#include "nsGfxCheckboxControlFrame.h"
#include "gfxContext.h"
#include "gfxUtils.h"
#include "mozilla/gfx/2D.h"
#include "nsIContent.h"
#include "nsCOMPtr.h"
#include "nsLayoutUtils.h"
#include "nsRenderingContext.h"
#include "nsIDOMHTMLInputElement.h"
#include "nsDisplayList.h"
#include <algorithm>

View File

@ -6,11 +6,11 @@
#include "nsGfxRadioControlFrame.h"
#include "gfx2DGlue.h"
#include "gfxContext.h"
#include "gfxUtils.h"
#include "mozilla/gfx/2D.h"
#include "mozilla/gfx/PathHelpers.h"
#include "nsLayoutUtils.h"
#include "nsRenderingContext.h"
#include "nsDisplayList.h"
using namespace mozilla;

View File

@ -142,7 +142,7 @@ nsHTMLButtonControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
}
nscoord
nsHTMLButtonControlFrame::GetMinISize(nsRenderingContext* aRenderingContext)
nsHTMLButtonControlFrame::GetMinISize(gfxContext* aRenderingContext)
{
nscoord result;
DISPLAY_MIN_WIDTH(this, result);
@ -156,7 +156,7 @@ nsHTMLButtonControlFrame::GetMinISize(nsRenderingContext* aRenderingContext)
}
nscoord
nsHTMLButtonControlFrame::GetPrefISize(nsRenderingContext* aRenderingContext)
nsHTMLButtonControlFrame::GetPrefISize(gfxContext* aRenderingContext)
{
nscoord result;
DISPLAY_PREF_WIDTH(this, result);

View File

@ -11,7 +11,7 @@
#include "nsIFormControlFrame.h"
#include "nsButtonFrameRenderer.h"
class nsRenderingContext;
class gfxContext;
class nsPresContext;
class nsHTMLButtonControlFrame : public nsContainerFrame,
@ -33,9 +33,9 @@ public:
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) override;
virtual nscoord GetMinISize(gfxContext *aRenderingContext) override;
virtual nscoord GetPrefISize(nsRenderingContext *aRenderingContext) override;
virtual nscoord GetPrefISize(gfxContext *aRenderingContext) override;
virtual void Reflow(nsPresContext* aPresContext,
ReflowOutput& aDesiredSize,

View File

@ -323,7 +323,7 @@ nsListControlFrame::CalcBSizeOfARow()
}
nscoord
nsListControlFrame::GetPrefISize(nsRenderingContext *aRenderingContext)
nsListControlFrame::GetPrefISize(gfxContext *aRenderingContext)
{
nscoord result;
DISPLAY_PREF_WIDTH(this, result);
@ -341,7 +341,7 @@ nsListControlFrame::GetPrefISize(nsRenderingContext *aRenderingContext)
}
nscoord
nsListControlFrame::GetMinISize(nsRenderingContext *aRenderingContext)
nsListControlFrame::GetMinISize(gfxContext *aRenderingContext)
{
nscoord result;
DISPLAY_MIN_WIDTH(this, result);

View File

@ -65,8 +65,8 @@ public:
virtual void SetInitialChildList(ChildListID aListID,
nsFrameList& aChildList) override;
virtual nscoord GetPrefISize(nsRenderingContext *aRenderingContext) override;
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) override;
virtual nscoord GetPrefISize(gfxContext *aRenderingContext) override;
virtual nscoord GetMinISize(gfxContext *aRenderingContext) override;
virtual void Reflow(nsPresContext* aCX,
ReflowOutput& aDesiredSize,

View File

@ -210,7 +210,7 @@ nsMeterFrame::AttributeChanged(int32_t aNameSpaceID,
}
LogicalSize
nsMeterFrame::ComputeAutoSize(nsRenderingContext* aRenderingContext,
nsMeterFrame::ComputeAutoSize(gfxContext* aRenderingContext,
WritingMode aWM,
const LogicalSize& aCBSize,
nscoord aAvailableISize,
@ -236,7 +236,7 @@ nsMeterFrame::ComputeAutoSize(nsRenderingContext* aRenderingContext,
}
nscoord
nsMeterFrame::GetMinISize(nsRenderingContext *aRenderingContext)
nsMeterFrame::GetMinISize(gfxContext *aRenderingContext)
{
RefPtr<nsFontMetrics> fontMet =
nsLayoutUtils::GetFontMetricsForFrame(this, 1.0f);
@ -252,7 +252,7 @@ nsMeterFrame::GetMinISize(nsRenderingContext *aRenderingContext)
}
nscoord
nsMeterFrame::GetPrefISize(nsRenderingContext *aRenderingContext)
nsMeterFrame::GetPrefISize(gfxContext *aRenderingContext)
{
return GetMinISize(aRenderingContext);
}

View File

@ -48,7 +48,7 @@ public:
int32_t aModType) override;
virtual mozilla::LogicalSize
ComputeAutoSize(nsRenderingContext* aRenderingContext,
ComputeAutoSize(gfxContext* aRenderingContext,
mozilla::WritingMode aWM,
const mozilla::LogicalSize& aCBSize,
nscoord aAvailableISize,
@ -57,8 +57,8 @@ public:
const mozilla::LogicalSize& aPadding,
ComputeSizeFlags aFlags) override;
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) override;
virtual nscoord GetPrefISize(nsRenderingContext *aRenderingContext) override;
virtual nscoord GetMinISize(gfxContext *aRenderingContext) override;
virtual nscoord GetPrefISize(gfxContext *aRenderingContext) override;
virtual bool IsFrameOfType(uint32_t aFlags) const override
{

View File

@ -67,7 +67,7 @@ nsNumberControlFrame::DestroyFrom(nsIFrame* aDestructRoot)
}
nscoord
nsNumberControlFrame::GetMinISize(nsRenderingContext* aRenderingContext)
nsNumberControlFrame::GetMinISize(gfxContext* aRenderingContext)
{
nscoord result;
DISPLAY_MIN_WIDTH(this, result);
@ -85,7 +85,7 @@ nsNumberControlFrame::GetMinISize(nsRenderingContext* aRenderingContext)
}
nscoord
nsNumberControlFrame::GetPrefISize(nsRenderingContext* aRenderingContext)
nsNumberControlFrame::GetPrefISize(gfxContext* aRenderingContext)
{
nscoord result;
DISPLAY_PREF_WIDTH(this, result);

View File

@ -53,9 +53,9 @@ public:
virtual mozilla::a11y::AccType AccessibleType() override;
#endif
virtual nscoord GetMinISize(nsRenderingContext* aRenderingContext) override;
virtual nscoord GetMinISize(gfxContext* aRenderingContext) override;
virtual nscoord GetPrefISize(nsRenderingContext* aRenderingContext) override;
virtual nscoord GetPrefISize(gfxContext* aRenderingContext) override;
virtual void Reflow(nsPresContext* aPresContext,
ReflowOutput& aDesiredSize,

View File

@ -224,7 +224,7 @@ nsProgressFrame::AttributeChanged(int32_t aNameSpaceID,
}
LogicalSize
nsProgressFrame::ComputeAutoSize(nsRenderingContext* aRenderingContext,
nsProgressFrame::ComputeAutoSize(gfxContext* aRenderingContext,
WritingMode aWM,
const LogicalSize& aCBSize,
nscoord aAvailableISize,
@ -249,7 +249,7 @@ nsProgressFrame::ComputeAutoSize(nsRenderingContext* aRenderingContext,
}
nscoord
nsProgressFrame::GetMinISize(nsRenderingContext *aRenderingContext)
nsProgressFrame::GetMinISize(gfxContext *aRenderingContext)
{
RefPtr<nsFontMetrics> fontMet =
nsLayoutUtils::GetFontMetricsForFrame(this, 1.0f);
@ -265,7 +265,7 @@ nsProgressFrame::GetMinISize(nsRenderingContext *aRenderingContext)
}
nscoord
nsProgressFrame::GetPrefISize(nsRenderingContext *aRenderingContext)
nsProgressFrame::GetPrefISize(gfxContext *aRenderingContext)
{
return GetMinISize(aRenderingContext);
}

View File

@ -56,7 +56,7 @@ public:
int32_t aModType) override;
virtual mozilla::LogicalSize
ComputeAutoSize(nsRenderingContext* aRenderingContext,
ComputeAutoSize(gfxContext* aRenderingContext,
mozilla::WritingMode aWM,
const mozilla::LogicalSize& aCBSize,
nscoord aAvailableISize,
@ -65,8 +65,8 @@ public:
const mozilla::LogicalSize& aPadding,
ComputeSizeFlags aFlags) override;
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) override;
virtual nscoord GetPrefISize(nsRenderingContext *aRenderingContext) override;
virtual nscoord GetMinISize(gfxContext *aRenderingContext) override;
virtual nscoord GetPrefISize(gfxContext *aRenderingContext) override;
virtual bool IsFrameOfType(uint32_t aFlags) const override
{

View File

@ -8,6 +8,7 @@
#include "mozilla/EventStates.h"
#include "mozilla/TouchEvents.h"
#include "gfxContext.h"
#include "nsContentCreatorFunctions.h"
#include "nsContentList.h"
#include "nsContentUtils.h"
@ -22,7 +23,6 @@
#include "mozilla/dom/HTMLInputElement.h"
#include "nsPresContext.h"
#include "nsNodeInfoManager.h"
#include "nsRenderingContext.h"
#include "mozilla/dom/Element.h"
#include "mozilla/StyleSetHandle.h"
#include "mozilla/StyleSetHandleInlines.h"
@ -188,7 +188,7 @@ public:
const nsDisplayItemGeometry* aGeometry,
nsRegion *aInvalidRegion) override;
virtual nsRect GetBounds(nsDisplayListBuilder* aBuilder, bool* aSnap) override;
virtual void Paint(nsDisplayListBuilder* aBuilder, nsRenderingContext* aCtx) override;
virtual void Paint(nsDisplayListBuilder* aBuilder, gfxContext* aCtx) override;
NS_DISPLAY_DECL_NAME("RangeFocusRing", TYPE_RANGE_FOCUS_RING)
};
@ -234,7 +234,7 @@ nsDisplayRangeFocusRing::GetBounds(nsDisplayListBuilder* aBuilder, bool* aSnap)
void
nsDisplayRangeFocusRing::Paint(nsDisplayListBuilder* aBuilder,
nsRenderingContext* aCtx)
gfxContext* aCtx)
{
bool unused;
nsStyleContext* styleContext =
@ -768,7 +768,7 @@ nsRangeFrame::AttributeChanged(int32_t aNameSpaceID,
}
LogicalSize
nsRangeFrame::ComputeAutoSize(nsRenderingContext* aRenderingContext,
nsRangeFrame::ComputeAutoSize(gfxContext* aRenderingContext,
WritingMode aWM,
const LogicalSize& aCBSize,
nscoord aAvailableISize,
@ -803,7 +803,7 @@ nsRangeFrame::ComputeAutoSize(nsRenderingContext* aRenderingContext,
}
nscoord
nsRangeFrame::GetMinISize(nsRenderingContext *aRenderingContext)
nsRangeFrame::GetMinISize(gfxContext *aRenderingContext)
{
// nsFrame::ComputeSize calls GetMinimumWidgetSize to prevent us from being
// given too small a size when we're natively themed. If we aren't native
@ -812,7 +812,7 @@ nsRangeFrame::GetMinISize(nsRenderingContext *aRenderingContext)
}
nscoord
nsRangeFrame::GetPrefISize(nsRenderingContext *aRenderingContext)
nsRangeFrame::GetPrefISize(gfxContext *aRenderingContext)
{
bool isInline = IsInlineOriented();

View File

@ -70,7 +70,7 @@ public:
int32_t aModType) override;
virtual mozilla::LogicalSize
ComputeAutoSize(nsRenderingContext* aRenderingContext,
ComputeAutoSize(gfxContext* aRenderingContext,
mozilla::WritingMode aWM,
const mozilla::LogicalSize& aCBSize,
nscoord aAvailableISize,
@ -79,8 +79,8 @@ public:
const mozilla::LogicalSize& aPadding,
ComputeSizeFlags aFlags) override;
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) override;
virtual nscoord GetPrefISize(nsRenderingContext *aRenderingContext) override;
virtual nscoord GetMinISize(gfxContext *aRenderingContext) override;
virtual nscoord GetPrefISize(gfxContext *aRenderingContext) override;
virtual bool IsFrameOfType(uint32_t aFlags) const override
{

View File

@ -115,7 +115,7 @@ public:
listFrame->GetOffsetToCrossDoc(ReferenceFrame());
}
virtual void Paint(nsDisplayListBuilder* aBuilder,
nsRenderingContext* aCtx) override {
gfxContext* aCtx) override {
nsListControlFrame* listFrame = GetEnclosingListFrame(Frame());
// listFrame must be non-null or we wouldn't get called.
listFrame->PaintFocus(aCtx->GetDrawTarget(),

View File

@ -5,6 +5,7 @@
#include "mozilla/DebugOnly.h"
#include "gfxContext.h"
#include "nsCOMPtr.h"
#include "nsFontMetrics.h"
#include "nsTextControlFrame.h"
@ -20,7 +21,6 @@
#include "nsIContent.h"
#include "nsPresContext.h"
#include "nsRenderingContext.h"
#include "nsGkAtoms.h"
#include "nsLayoutUtils.h"
#include "nsIDOMElement.h"
@ -138,7 +138,7 @@ nsTextControlFrame::DestroyFrom(nsIFrame* aDestructRoot)
}
LogicalSize
nsTextControlFrame::CalcIntrinsicSize(nsRenderingContext* aRenderingContext,
nsTextControlFrame::CalcIntrinsicSize(gfxContext* aRenderingContext,
WritingMode aWM,
float aFontSizeInflation) const
{
@ -431,7 +431,7 @@ nsTextControlFrame::AppendAnonymousContentTo(nsTArray<nsIContent*>& aElements,
}
nscoord
nsTextControlFrame::GetPrefISize(nsRenderingContext* aRenderingContext)
nsTextControlFrame::GetPrefISize(gfxContext* aRenderingContext)
{
nscoord result = 0;
DISPLAY_PREF_WIDTH(this, result);
@ -442,7 +442,7 @@ nsTextControlFrame::GetPrefISize(nsRenderingContext* aRenderingContext)
}
nscoord
nsTextControlFrame::GetMinISize(nsRenderingContext* aRenderingContext)
nsTextControlFrame::GetMinISize(gfxContext* aRenderingContext)
{
// Our min width is just our preferred width if we have auto width.
nscoord result;
@ -452,7 +452,7 @@ nsTextControlFrame::GetMinISize(nsRenderingContext* aRenderingContext)
}
LogicalSize
nsTextControlFrame::ComputeAutoSize(nsRenderingContext* aRenderingContext,
nsTextControlFrame::ComputeAutoSize(gfxContext* aRenderingContext,
WritingMode aWM,
const LogicalSize& aCBSize,
nscoord aAvailableISize,

View File

@ -44,11 +44,11 @@ public:
return do_QueryFrame(PrincipalChildList().FirstChild());
}
virtual nscoord GetMinISize(nsRenderingContext* aRenderingContext) override;
virtual nscoord GetPrefISize(nsRenderingContext* aRenderingContext) override;
virtual nscoord GetMinISize(gfxContext* aRenderingContext) override;
virtual nscoord GetPrefISize(gfxContext* aRenderingContext) override;
virtual mozilla::LogicalSize
ComputeAutoSize(nsRenderingContext* aRenderingContext,
ComputeAutoSize(gfxContext* aRenderingContext,
mozilla::WritingMode aWM,
const mozilla::LogicalSize& aCBSize,
nscoord aAvailableISize,
@ -300,7 +300,7 @@ protected:
// Compute our intrinsic size. This does not include any borders, paddings,
// etc. Just the size of our actual area for the text (and the scrollbars,
// for <textarea>).
mozilla::LogicalSize CalcIntrinsicSize(nsRenderingContext* aRenderingContext,
mozilla::LogicalSize CalcIntrinsicSize(gfxContext* aRenderingContext,
mozilla::WritingMode aWM,
float aFontSizeInflation) const;

View File

@ -5,6 +5,7 @@
/* rendering object for HTML <br> elements */
#include "gfxContext.h"
#include "nsCOMPtr.h"
#include "nsContainerFrame.h"
#include "nsFontMetrics.h"
@ -13,7 +14,6 @@
#include "nsLineLayout.h"
#include "nsStyleConsts.h"
#include "nsGkAtoms.h"
#include "nsRenderingContext.h"
#include "nsLayoutUtils.h"
//FOR SELECTION
@ -44,12 +44,12 @@ public:
ReflowOutput& aDesiredSize,
const ReflowInput& aReflowInput,
nsReflowStatus& aStatus) override;
virtual void AddInlineMinISize(nsRenderingContext *aRenderingContext,
virtual void AddInlineMinISize(gfxContext *aRenderingContext,
InlineMinISizeData *aData) override;
virtual void AddInlinePrefISize(nsRenderingContext *aRenderingContext,
virtual void AddInlinePrefISize(gfxContext *aRenderingContext,
InlinePrefISizeData *aData) override;
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) override;
virtual nscoord GetPrefISize(nsRenderingContext *aRenderingContext) override;
virtual nscoord GetMinISize(gfxContext *aRenderingContext) override;
virtual nscoord GetPrefISize(gfxContext *aRenderingContext) override;
virtual nscoord GetLogicalBaseline(mozilla::WritingMode aWritingMode) const override;
virtual bool IsFrameOfType(uint32_t aFlags) const override
@ -175,7 +175,7 @@ BRFrame::Reflow(nsPresContext* aPresContext,
}
/* virtual */ void
BRFrame::AddInlineMinISize(nsRenderingContext *aRenderingContext,
BRFrame::AddInlineMinISize(gfxContext *aRenderingContext,
nsIFrame::InlineMinISizeData *aData)
{
if (!GetParent()->StyleContext()->ShouldSuppressLineBreak()) {
@ -184,7 +184,7 @@ BRFrame::AddInlineMinISize(nsRenderingContext *aRenderingContext,
}
/* virtual */ void
BRFrame::AddInlinePrefISize(nsRenderingContext *aRenderingContext,
BRFrame::AddInlinePrefISize(gfxContext *aRenderingContext,
nsIFrame::InlinePrefISizeData *aData)
{
if (!GetParent()->StyleContext()->ShouldSuppressLineBreak()) {
@ -195,7 +195,7 @@ BRFrame::AddInlinePrefISize(nsRenderingContext *aRenderingContext,
}
/* virtual */ nscoord
BRFrame::GetMinISize(nsRenderingContext *aRenderingContext)
BRFrame::GetMinISize(gfxContext *aRenderingContext)
{
nscoord result = 0;
DISPLAY_MIN_WIDTH(this, result);
@ -203,7 +203,7 @@ BRFrame::GetMinISize(nsRenderingContext *aRenderingContext)
}
/* virtual */ nscoord
BRFrame::GetPrefISize(nsRenderingContext *aRenderingContext)
BRFrame::GetPrefISize(gfxContext *aRenderingContext)
{
nscoord result = 0;
DISPLAY_PREF_WIDTH(this, result);

View File

@ -201,7 +201,7 @@ BlockReflowInput::ComputeReplacedBlockOffsetsForFloats(
static nscoord
GetBEndMarginClone(nsIFrame* aFrame,
nsRenderingContext* aRenderingContext,
gfxContext* aRenderingContext,
const LogicalRect& aContentArea,
WritingMode aWritingMode)
{

View File

@ -55,7 +55,7 @@ static eNormalLineHeightControl sNormalLineHeightControl = eUninitialized;
// use for measuring things.
ReflowInput::ReflowInput(nsPresContext* aPresContext,
nsIFrame* aFrame,
nsRenderingContext* aRenderingContext,
gfxContext* aRenderingContext,
const LogicalSize& aAvailableSpace,
uint32_t aFlags)
: SizeComputationInput(aFrame, aRenderingContext)
@ -160,7 +160,7 @@ FontSizeInflationListMarginAdjustment(const nsIFrame* aFrame)
// block-direction percent margins and padding against the
// containing-block block-size, rather than its inline-size.
SizeComputationInput::SizeComputationInput(nsIFrame *aFrame,
nsRenderingContext *aRenderingContext,
gfxContext *aRenderingContext,
WritingMode aContainingBlockWritingMode,
nscoord aContainingBlockISize)
: mFrame(aFrame)

View File

@ -14,13 +14,13 @@
#include "mozilla/Assertions.h"
#include <algorithm>
class gfxContext;
class nsFloatManager;
struct nsHypotheticalPosition;
class nsIPercentBSizeObserver;
class nsLineLayout;
class nsPlaceholderFrame;
class nsPresContext;
class nsRenderingContext;
/**
* @return aValue clamped to [aMinValue, aMaxValue].
@ -108,7 +108,7 @@ public:
nsIFrame* mFrame;
// Rendering context to use for measurement.
nsRenderingContext* mRenderingContext;
gfxContext* mRenderingContext;
const nsMargin& ComputedPhysicalMargin() const { return mComputedMargin; }
const nsMargin& ComputedPhysicalBorderPadding() const { return mComputedBorderPadding; }
@ -165,14 +165,14 @@ protected:
public:
// Callers using this constructor must call InitOffsets on their own.
SizeComputationInput(nsIFrame *aFrame, nsRenderingContext *aRenderingContext)
SizeComputationInput(nsIFrame *aFrame, gfxContext *aRenderingContext)
: mFrame(aFrame)
, mRenderingContext(aRenderingContext)
, mWritingMode(aFrame->GetWritingMode())
{
}
SizeComputationInput(nsIFrame *aFrame, nsRenderingContext *aRenderingContext,
SizeComputationInput(nsIFrame *aFrame, gfxContext *aRenderingContext,
mozilla::WritingMode aContainingBlockWritingMode,
nscoord aContainingBlockISize);
@ -685,7 +685,7 @@ public:
*/
ReflowInput(nsPresContext* aPresContext,
nsIFrame* aFrame,
nsRenderingContext* aRenderingContext,
gfxContext* aRenderingContext,
const mozilla::LogicalSize& aAvailableSpace,
uint32_t aFlags = 0);

View File

@ -8,6 +8,7 @@
#include <algorithm>
// Please maintain alphabetical order below
#include "gfxContext.h"
#include "nsBlockFrame.h"
#include "nsCaret.h"
#include "nsContentUtils.h"
@ -18,7 +19,6 @@
#include "nsLayoutUtils.h"
#include "nsPresContext.h"
#include "nsRect.h"
#include "nsRenderingContext.h"
#include "nsTextFrame.h"
#include "nsIFrameInlines.h"
#include "mozilla/ArrayUtils.h"
@ -199,12 +199,12 @@ public:
}
virtual void Paint(nsDisplayListBuilder* aBuilder,
nsRenderingContext* aCtx) override;
gfxContext* aCtx) override;
virtual uint32_t GetPerFrameKey() override {
return (mIndex << nsDisplayItem::TYPE_BITS) | nsDisplayItem::GetPerFrameKey();
}
void PaintTextToContext(nsRenderingContext* aCtx,
void PaintTextToContext(gfxContext* aCtx,
nsPoint aOffsetFromRect);
NS_DISPLAY_DECL_NAME("TextOverflow", TYPE_TEXT_OVERFLOW)
private:
@ -215,7 +215,7 @@ private:
};
static void
PaintTextShadowCallback(nsRenderingContext* aCtx,
PaintTextShadowCallback(gfxContext* aCtx,
nsPoint aShadowOffset,
const nscolor& aShadowColor,
void* aData)
@ -226,7 +226,7 @@ PaintTextShadowCallback(nsRenderingContext* aCtx,
void
nsDisplayTextOverflowMarker::Paint(nsDisplayListBuilder* aBuilder,
nsRenderingContext* aCtx)
gfxContext* aCtx)
{
nscolor foregroundColor = nsLayoutUtils::
GetColor(mFrame, &nsStyleText::mWebkitTextFillColor);
@ -235,12 +235,12 @@ nsDisplayTextOverflowMarker::Paint(nsDisplayListBuilder* aBuilder,
nsLayoutUtils::PaintTextShadow(mFrame, aCtx, mRect, mVisibleRect,
foregroundColor, PaintTextShadowCallback,
(void*)this);
aCtx->ThebesContext()->SetColor(gfx::Color::FromABGR(foregroundColor));
aCtx->SetColor(gfx::Color::FromABGR(foregroundColor));
PaintTextToContext(aCtx, nsPoint(0, 0));
}
void
nsDisplayTextOverflowMarker::PaintTextToContext(nsRenderingContext* aCtx,
nsDisplayTextOverflowMarker::PaintTextToContext(gfxContext* aCtx,
nsPoint aOffsetFromRect)
{
WritingMode wm = mFrame->GetWritingMode();
@ -248,14 +248,14 @@ nsDisplayTextOverflowMarker::PaintTextToContext(nsRenderingContext* aCtx,
if (wm.IsVertical()) {
if (wm.IsVerticalLR()) {
pt.x = NSToCoordFloor(nsLayoutUtils::GetSnappedBaselineX(
mFrame, aCtx->ThebesContext(), pt.x, mAscent));
mFrame, aCtx, pt.x, mAscent));
} else {
pt.x = NSToCoordFloor(nsLayoutUtils::GetSnappedBaselineX(
mFrame, aCtx->ThebesContext(), pt.x + mRect.width, -mAscent));
mFrame, aCtx, pt.x + mRect.width, -mAscent));
}
} else {
pt.y = NSToCoordFloor(nsLayoutUtils::GetSnappedBaselineY(
mFrame, aCtx->ThebesContext(), pt.y, mAscent));
mFrame, aCtx, pt.y, mAscent));
}
pt += aOffsetFromRect;
@ -266,7 +266,7 @@ nsDisplayTextOverflowMarker::PaintTextToContext(nsRenderingContext* aCtx,
"Ellipsis textruns should always be LTR!");
gfxPoint gfxPt(pt.x, pt.y);
textRun->Draw(gfxTextRun::Range(textRun), gfxPt,
gfxTextRun::DrawParams(aCtx->ThebesContext()));
gfxTextRun::DrawParams(aCtx));
}
} else {
RefPtr<nsFontMetrics> fm =
@ -852,12 +852,12 @@ TextOverflow::Marker::SetupString(nsIFrame* aFrame)
mISize = 0;
}
} else {
nsRenderingContext rc(
aFrame->PresContext()->PresShell()->CreateReferenceRenderingContext());
RefPtr<gfxContext> rc =
aFrame->PresContext()->PresShell()->CreateReferenceRenderingContext();
RefPtr<nsFontMetrics> fm =
nsLayoutUtils::GetInflatedFontMetricsForFrame(aFrame);
mISize = nsLayoutUtils::AppUnitWidthOfStringBidi(mStyle->mString, aFrame,
*fm, rc);
*fm, *rc);
}
mIntrinsicISize = mISize;
mInitialized = true;

View File

@ -211,7 +211,7 @@ ViewportFrame::RemoveFrame(ChildListID aListID,
#endif
/* virtual */ nscoord
ViewportFrame::GetMinISize(nsRenderingContext *aRenderingContext)
ViewportFrame::GetMinISize(gfxContext *aRenderingContext)
{
nscoord result;
DISPLAY_MIN_WIDTH(this, result);
@ -224,7 +224,7 @@ ViewportFrame::GetMinISize(nsRenderingContext *aRenderingContext)
}
/* virtual */ nscoord
ViewportFrame::GetPrefISize(nsRenderingContext *aRenderingContext)
ViewportFrame::GetPrefISize(gfxContext *aRenderingContext)
{
nscoord result;
DISPLAY_PREF_WIDTH(this, result);

View File

@ -55,8 +55,8 @@ public:
void BuildDisplayListForTopLayer(nsDisplayListBuilder* aBuilder,
nsDisplayList* aList);
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) override;
virtual nscoord GetPrefISize(nsRenderingContext *aRenderingContext) override;
virtual nscoord GetMinISize(gfxContext *aRenderingContext) override;
virtual nscoord GetPrefISize(gfxContext *aRenderingContext) override;
virtual void Reflow(nsPresContext* aPresContext,
ReflowOutput& aDesiredSize,
const ReflowInput& aReflowInput,

View File

@ -50,7 +50,7 @@ nsBackdropFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
}
/* virtual */ LogicalSize
nsBackdropFrame::ComputeAutoSize(nsRenderingContext* aRenderingContext,
nsBackdropFrame::ComputeAutoSize(gfxContext* aRenderingContext,
WritingMode aWM,
const LogicalSize& aCBSize,
nscoord aAvailableISize,

View File

@ -29,7 +29,7 @@ public:
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
virtual mozilla::LogicalSize
ComputeAutoSize(nsRenderingContext* aRenderingContext,
ComputeAutoSize(gfxContext* aRenderingContext,
mozilla::WritingMode aWM,
const mozilla::LogicalSize& aCBSize,
nscoord aAvailableISize,

View File

@ -11,6 +11,8 @@
#include "nsBlockFrame.h"
#include "gfxContext.h"
#include "mozilla/DebugOnly.h"
#include "mozilla/Maybe.h"
#include "mozilla/UniquePtr.h"
@ -47,7 +49,6 @@
#include "nsDisplayList.h"
#include "nsCSSAnonBoxes.h"
#include "nsCSSFrameConstructor.h"
#include "nsRenderingContext.h"
#include "TextOverflow.h"
#include "nsIFrameInlines.h"
#include "CounterStyleManager.h"
@ -695,7 +696,7 @@ nsBlockFrame::CheckIntrinsicCacheAgainstShrinkWrapState()
}
/* virtual */ nscoord
nsBlockFrame::GetMinISize(nsRenderingContext *aRenderingContext)
nsBlockFrame::GetMinISize(gfxContext *aRenderingContext)
{
nsIFrame* firstInFlow = FirstContinuation();
if (firstInFlow != this)
@ -783,7 +784,7 @@ nsBlockFrame::GetMinISize(nsRenderingContext *aRenderingContext)
}
/* virtual */ nscoord
nsBlockFrame::GetPrefISize(nsRenderingContext *aRenderingContext)
nsBlockFrame::GetPrefISize(gfxContext *aRenderingContext)
{
nsIFrame* firstInFlow = FirstContinuation();
if (firstInFlow != this)
@ -893,7 +894,7 @@ nsBlockFrame::ComputeTightBounds(DrawTarget* aDrawTarget) const
}
/* virtual */ nsresult
nsBlockFrame::GetPrefWidthTightBounds(nsRenderingContext* aRenderingContext,
nsBlockFrame::GetPrefWidthTightBounds(gfxContext* aRenderingContext,
nscoord* aX,
nscoord* aXMost)
{

View File

@ -274,12 +274,12 @@ public:
private:
void CheckIntrinsicCacheAgainstShrinkWrapState();
public:
nscoord GetMinISize(nsRenderingContext *aRenderingContext) override;
nscoord GetPrefISize(nsRenderingContext *aRenderingContext) override;
nscoord GetMinISize(gfxContext *aRenderingContext) override;
nscoord GetPrefISize(gfxContext *aRenderingContext) override;
nsRect ComputeTightBounds(DrawTarget* aDrawTarget) const override;
nsresult GetPrefWidthTightBounds(nsRenderingContext* aContext,
nsresult GetPrefWidthTightBounds(gfxContext* aContext,
nscoord* aX,
nscoord* aXMost) override;

View File

@ -8,6 +8,7 @@
#include "nsBulletFrame.h"
#include "gfx2DGlue.h"
#include "gfxContext.h"
#include "gfxPrefs.h"
#include "gfxUtils.h"
#include "mozilla/gfx/2D.h"
@ -26,7 +27,6 @@
#include "nsPresContext.h"
#include "nsIPresShell.h"
#include "nsIDocument.h"
#include "nsRenderingContext.h"
#include "nsDisplayList.h"
#include "nsCounterManager.h"
#include "nsBidiUtils.h"
@ -230,7 +230,7 @@ public:
layers::WebRenderDisplayItemLayer* aLayer);
DrawResult
Paint(nsRenderingContext& aRenderingContext, nsPoint aPt,
Paint(gfxContext& aRenderingContext, nsPoint aPt,
const nsRect& aDirtyRect, uint32_t aFlags,
bool aDisableSubpixelAA, nsIFrame* aFrame);
@ -333,13 +333,13 @@ BulletRenderer::CreateWebRenderCommands(nsDisplayItem* aItem,
}
DrawResult
BulletRenderer::Paint(nsRenderingContext& aRenderingContext, nsPoint aPt,
BulletRenderer::Paint(gfxContext& aRenderingContext, nsPoint aPt,
const nsRect& aDirtyRect, uint32_t aFlags,
bool aDisableSubpixelAA, nsIFrame* aFrame)
{
if (IsImageType()) {
SamplingFilter filter = nsLayoutUtils::GetSamplingFilterForFrame(aFrame);
return nsLayoutUtils::DrawSingleImage(*aRenderingContext.ThebesContext(),
return nsLayoutUtils::DrawSingleImage(aRenderingContext,
aFrame->PresContext(), mImage, filter,
mDest, aDirtyRect,
/* no SVGImageContext */ Nothing(),
@ -370,8 +370,7 @@ BulletRenderer::Paint(nsRenderingContext& aRenderingContext, nsPoint aPt,
DrawTargetAutoDisableSubpixelAntialiasing
disable(drawTarget, aDisableSubpixelAA);
aRenderingContext.ThebesContext()->SetColor(
Color::FromABGR(mColor));
aRenderingContext.SetColor(Color::FromABGR(mColor));
nsPresContext* presContext = aFrame->PresContext();
if (!presContext->BidiEnabled() && HasRTLChars(mText)) {
@ -392,13 +391,12 @@ BulletRenderer::BuildGlyphForText(nsDisplayItem* aItem, bool disableSubpixelAA)
RefPtr<DrawTargetCapture> capture =
gfxPlatform::GetPlatform()->ScreenReferenceDrawTarget()->CreateCaptureDT(IntSize());
RefPtr<gfxContext> captureCtx = gfxContext::CreateOrNull(capture);
nsRenderingContext ctx(captureCtx);
{
DrawTargetAutoDisableSubpixelAntialiasing
disable(capture, disableSubpixelAA);
ctx.ThebesContext()->SetColor(
captureCtx->SetColor(
Color::FromABGR(mColor));
nsPresContext* presContext = aItem->Frame()->PresContext();
@ -406,7 +404,7 @@ BulletRenderer::BuildGlyphForText(nsDisplayItem* aItem, bool disableSubpixelAA)
presContext->SetBidiEnabled();
}
nsLayoutUtils::DrawString(aItem->Frame(), *mFontMetrics, &ctx,
nsLayoutUtils::DrawString(aItem->Frame(), *mFontMetrics, captureCtx,
mText.get(), mText.Length(), mPoint);
}
@ -553,7 +551,7 @@ public:
aOutFrames->AppendElement(mFrame);
}
virtual void Paint(nsDisplayListBuilder* aBuilder,
nsRenderingContext* aCtx) override;
gfxContext* aCtx) override;
NS_DISPLAY_DECL_NAME("Bullet", TYPE_BULLET)
virtual nsRect GetComponentAlphaBounds(nsDisplayListBuilder* aBuilder) override
@ -610,10 +608,9 @@ nsDisplayBullet::GetLayerState(nsDisplayListBuilder* aBuilder,
RefPtr<gfxContext> screenRefCtx =
gfxContext::CreateOrNull(gfxPlatform::GetPlatform()->ScreenReferenceDrawTarget());
nsRenderingContext ctx(screenRefCtx);
Maybe<BulletRenderer> br = static_cast<nsBulletFrame*>(mFrame)->
CreateBulletRenderer(ctx, ToReferenceFrame());
CreateBulletRenderer(*screenRefCtx, ToReferenceFrame());
if (!br) {
return LAYER_NONE;
@ -664,7 +661,7 @@ nsDisplayBullet::CreateWebRenderCommands(wr::DisplayListBuilder& aBuilder,
}
void nsDisplayBullet::Paint(nsDisplayListBuilder* aBuilder,
nsRenderingContext* aCtx)
gfxContext* aCtx)
{
uint32_t flags = imgIContainer::FLAG_NONE;
if (aBuilder->ShouldSyncDecodeImages()) {
@ -693,7 +690,7 @@ nsBulletFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
}
Maybe<BulletRenderer>
nsBulletFrame::CreateBulletRenderer(nsRenderingContext& aRenderingContext, nsPoint aPt)
nsBulletFrame::CreateBulletRenderer(gfxContext& aRenderingContext, nsPoint aPt)
{
const nsStyleList* myList = StyleList();
CounterStyle* listStyleType = myList->mCounterStyle;
@ -829,19 +826,18 @@ nsBulletFrame::CreateBulletRenderer(nsRenderingContext& aRenderingContext, nsPoi
nscoord ascent = wm.IsLineInverted()
? fm->MaxDescent() : fm->MaxAscent();
aPt.MoveBy(padding.left, padding.top);
gfxContext *ctx = aRenderingContext.ThebesContext();
if (wm.IsVertical()) {
if (wm.IsVerticalLR()) {
aPt.x = NSToCoordRound(nsLayoutUtils::GetSnappedBaselineX(
this, ctx, aPt.x, ascent));
this, &aRenderingContext, aPt.x, ascent));
} else {
aPt.x = NSToCoordRound(nsLayoutUtils::GetSnappedBaselineX(
this, ctx, aPt.x + mRect.width,
this, &aRenderingContext, aPt.x + mRect.width,
-ascent));
}
} else {
aPt.y = NSToCoordRound(nsLayoutUtils::GetSnappedBaselineY(
this, ctx, aPt.y, ascent));
this, &aRenderingContext, aPt.y, ascent));
}
BulletRenderer br(text, fm, color, aPt, listStyleType->GetStyle());
@ -854,7 +850,7 @@ nsBulletFrame::CreateBulletRenderer(nsRenderingContext& aRenderingContext, nsPoi
}
DrawResult
nsBulletFrame::PaintBullet(nsRenderingContext& aRenderingContext, nsPoint aPt,
nsBulletFrame::PaintBullet(gfxContext& aRenderingContext, nsPoint aPt,
const nsRect& aDirtyRect, uint32_t aFlags,
bool aDisableSubpixelAA)
{
@ -944,7 +940,7 @@ nsBulletFrame::AppendSpacingToPadding(nsFontMetrics* aFontMetrics,
void
nsBulletFrame::GetDesiredSize(nsPresContext* aCX,
nsRenderingContext *aRenderingContext,
gfxContext *aRenderingContext,
ReflowOutput& aMetrics,
float aFontSizeInflation,
LogicalMargin* aPadding)
@ -1080,7 +1076,7 @@ nsBulletFrame::Reflow(nsPresContext* aPresContext,
}
/* virtual */ nscoord
nsBulletFrame::GetMinISize(nsRenderingContext *aRenderingContext)
nsBulletFrame::GetMinISize(gfxContext *aRenderingContext)
{
WritingMode wm = GetWritingMode();
ReflowOutput reflowOutput(wm);
@ -1092,7 +1088,7 @@ nsBulletFrame::GetMinISize(nsRenderingContext *aRenderingContext)
}
/* virtual */ nscoord
nsBulletFrame::GetPrefISize(nsRenderingContext *aRenderingContext)
nsBulletFrame::GetPrefISize(gfxContext *aRenderingContext)
{
WritingMode wm = GetWritingMode();
ReflowOutput metrics(wm);
@ -1118,7 +1114,7 @@ IsIgnoreable(const nsIFrame* aFrame, nscoord aISize)
}
/* virtual */ void
nsBulletFrame::AddInlineMinISize(nsRenderingContext* aRenderingContext,
nsBulletFrame::AddInlineMinISize(gfxContext* aRenderingContext,
nsIFrame::InlineMinISizeData* aData)
{
nscoord isize = nsLayoutUtils::IntrinsicForContainer(aRenderingContext,
@ -1129,7 +1125,7 @@ nsBulletFrame::AddInlineMinISize(nsRenderingContext* aRenderingContext,
}
/* virtual */ void
nsBulletFrame::AddInlinePrefISize(nsRenderingContext* aRenderingContext,
nsBulletFrame::AddInlinePrefISize(gfxContext* aRenderingContext,
nsIFrame::InlinePrefISizeData* aData)
{
nscoord isize = nsLayoutUtils::IntrinsicForContainer(aRenderingContext,

View File

@ -81,11 +81,11 @@ public:
ReflowOutput& aMetrics,
const ReflowInput& aReflowInput,
nsReflowStatus& aStatus) override;
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) override;
virtual nscoord GetPrefISize(nsRenderingContext *aRenderingContext) override;
void AddInlineMinISize(nsRenderingContext* aRenderingContext,
virtual nscoord GetMinISize(gfxContext *aRenderingContext) override;
virtual nscoord GetPrefISize(gfxContext *aRenderingContext) override;
void AddInlineMinISize(gfxContext* aRenderingContext,
nsIFrame::InlineMinISizeData* aData) override;
void AddInlinePrefISize(nsRenderingContext* aRenderingContext,
void AddInlinePrefISize(gfxContext* aRenderingContext,
nsIFrame::InlinePrefISizeData* aData) override;
// nsBulletFrame
@ -98,8 +98,8 @@ public:
void GetSpokenText(nsAString& aText);
Maybe<BulletRenderer>
CreateBulletRenderer(nsRenderingContext& aRenderingContext, nsPoint aPt);
DrawResult PaintBullet(nsRenderingContext& aRenderingContext, nsPoint aPt,
CreateBulletRenderer(gfxContext& aRenderingContext, nsPoint aPt);
DrawResult PaintBullet(gfxContext& aRenderingContext, nsPoint aPt,
const nsRect& aDirtyRect, uint32_t aFlags,
bool aDisableSubpixelAA);
@ -123,7 +123,7 @@ protected:
void AppendSpacingToPadding(nsFontMetrics* aFontMetrics,
mozilla::LogicalMargin* aPadding);
void GetDesiredSize(nsPresContext* aPresContext,
nsRenderingContext *aRenderingContext,
gfxContext *aRenderingContext,
ReflowOutput& aMetrics,
float aFontSizeInflation,
mozilla::LogicalMargin* aPadding);

View File

@ -8,12 +8,12 @@
#include "nsCanvasFrame.h"
#include "AccessibleCaretEventHub.h"
#include "gfxContext.h"
#include "gfxUtils.h"
#include "nsContainerFrame.h"
#include "nsCSSRendering.h"
#include "nsPresContext.h"
#include "nsStyleContext.h"
#include "nsRenderingContext.h"
#include "nsGkAtoms.h"
#include "nsIFrameInlines.h"
#include "nsIPresShell.h"
@ -253,7 +253,7 @@ nsRect nsCanvasFrame::CanvasArea() const
void
nsDisplayCanvasBackgroundColor::Paint(nsDisplayListBuilder* aBuilder,
nsRenderingContext* aCtx)
gfxContext* aCtx)
{
nsCanvasFrame* frame = static_cast<nsCanvasFrame*>(mFrame);
nsPoint offset = ToReferenceFrame();
@ -347,14 +347,14 @@ static void BlitSurface(DrawTarget* aDest, const gfxRect& aRect, DrawTarget* aSo
void
nsDisplayCanvasBackgroundImage::Paint(nsDisplayListBuilder* aBuilder,
nsRenderingContext* aCtx)
gfxContext* aCtx)
{
nsCanvasFrame* frame = static_cast<nsCanvasFrame*>(mFrame);
nsPoint offset = ToReferenceFrame();
nsRect bgClipRect = frame->CanvasArea() + offset;
#ifndef MOZ_GFX_OPTIMIZE_MOBILE
RefPtr<gfxContext> dest = aCtx->ThebesContext();
RefPtr<gfxContext> dest = aCtx;
gfxRect destRect;
if (IsSingleFixedPositionImage(aBuilder, bgClipRect, &destRect) &&
aBuilder->IsPaintingToWindow() && !aBuilder->IsCompositingCheap() &&
@ -378,8 +378,7 @@ nsDisplayCanvasBackgroundImage::Paint(nsDisplayListBuilder* aBuilder,
RefPtr<gfxContext> ctx = gfxContext::CreateOrNull(dt);
MOZ_ASSERT(ctx); // already checked draw target above
ctx->SetMatrix(ctx->CurrentMatrix().Translate(-destRect.x, -destRect.y));
nsRenderingContext context(ctx);
PaintInternal(aBuilder, &context, bgClipRect, &bgClipRect);
PaintInternal(aBuilder, ctx, bgClipRect, &bgClipRect);
BlitSurface(dest->GetDrawTarget(), destRect, dt);
frame->SetProperty(nsIFrame::CachedBackgroundImageDT(),
dt.forget().take());
@ -428,7 +427,7 @@ nsDisplayCanvasBackgroundImage::IsSingleFixedPositionImage(nsDisplayListBuilder*
void
nsDisplayCanvasThemedBackground::Paint(nsDisplayListBuilder* aBuilder,
nsRenderingContext* aCtx)
gfxContext* aCtx)
{
nsCanvasFrame* frame = static_cast<nsCanvasFrame*>(mFrame);
nsPoint offset = ToReferenceFrame();
@ -463,7 +462,7 @@ public:
}
virtual void Paint(nsDisplayListBuilder* aBuilder,
nsRenderingContext* aCtx) override
gfxContext* aCtx) override
{
nsCanvasFrame* frame = static_cast<nsCanvasFrame*>(mFrame);
frame->PaintFocus(aCtx->GetDrawTarget(), ToReferenceFrame());
@ -645,7 +644,7 @@ nsCanvasFrame::PaintFocus(DrawTarget* aDrawTarget, nsPoint aPt)
}
/* virtual */ nscoord
nsCanvasFrame::GetMinISize(nsRenderingContext *aRenderingContext)
nsCanvasFrame::GetMinISize(gfxContext *aRenderingContext)
{
nscoord result;
DISPLAY_MIN_WIDTH(this, result);
@ -657,7 +656,7 @@ nsCanvasFrame::GetMinISize(nsRenderingContext *aRenderingContext)
}
/* virtual */ nscoord
nsCanvasFrame::GetPrefISize(nsRenderingContext *aRenderingContext)
nsCanvasFrame::GetPrefISize(gfxContext *aRenderingContext)
{
nscoord result;
DISPLAY_PREF_WIDTH(this, result);

View File

@ -17,7 +17,7 @@
#include "gfxPrefs.h"
class nsPresContext;
class nsRenderingContext;
class gfxContext;
/**
* Root frame class.
@ -57,8 +57,8 @@ public:
nsIFrame* aOldFrame) override;
#endif
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) override;
virtual nscoord GetPrefISize(nsRenderingContext *aRenderingContext) override;
virtual nscoord GetMinISize(gfxContext *aRenderingContext) override;
virtual nscoord GetPrefISize(gfxContext *aRenderingContext) override;
virtual void Reflow(nsPresContext* aPresContext,
ReflowOutput& aDesiredSize,
const ReflowInput& aReflowInput,
@ -174,7 +174,7 @@ public:
return mozilla::LAYER_NONE;
}
virtual void Paint(nsDisplayListBuilder* aBuilder,
nsRenderingContext* aCtx) override;
gfxContext* aCtx) override;
void SetExtraBackgroundColor(nscolor aColor)
{
@ -194,7 +194,7 @@ public:
{
}
virtual void Paint(nsDisplayListBuilder* aBuilder, nsRenderingContext* aCtx) override;
virtual void Paint(nsDisplayListBuilder* aBuilder, gfxContext* aCtx) override;
virtual void NotifyRenderingChanged() override
{
@ -220,7 +220,7 @@ public:
aFrame->GetRectRelativeToSelf() + aBuilder->ToReferenceFrame(aFrame))
{}
virtual void Paint(nsDisplayListBuilder* aBuilder, nsRenderingContext* aCtx) override;
virtual void Paint(nsDisplayListBuilder* aBuilder, gfxContext* aCtx) override;
NS_DISPLAY_DECL_NAME("CanvasThemedBackground", TYPE_CANVAS_THEMED_BACKGROUND)
};

View File

@ -48,7 +48,7 @@ public:
nsTArray<WebRenderParentCommand>& aParentCommands,
mozilla::layers::WebRenderDisplayItemLayer* aLayer) override;
virtual void Paint(nsDisplayListBuilder* aBuilder,
nsRenderingContext* aCtx) override;
gfxContext* aCtx) override;
NS_DISPLAY_DECL_NAME("ColumnRule", nsDisplayItem::TYPE_COLUMN_RULE);
@ -58,7 +58,7 @@ private:
void
nsDisplayColumnRule::Paint(nsDisplayListBuilder* aBuilder,
nsRenderingContext* aCtx)
gfxContext* aCtx)
{
static_cast<nsColumnSetFrame*>(mFrame)->
CreateBorderRenderers(mBorderRenderers, aCtx, mVisibleRect, ToReferenceFrame());
@ -78,10 +78,9 @@ nsDisplayColumnRule::GetLayerState(nsDisplayListBuilder* aBuilder,
RefPtr<gfxContext> screenRefCtx =
gfxContext::CreateOrNull(gfxPlatform::GetPlatform()->ScreenReferenceDrawTarget());
nsRenderingContext ctx(screenRefCtx);
static_cast<nsColumnSetFrame*>(mFrame)->
CreateBorderRenderers(mBorderRenderers, &ctx, mVisibleRect, ToReferenceFrame());
CreateBorderRenderers(mBorderRenderers, screenRefCtx, mVisibleRect, ToReferenceFrame());
if (mBorderRenderers.IsEmpty()) {
return LAYER_NONE;
@ -211,7 +210,7 @@ nsColumnSetFrame::CalculateBounds(const nsPoint& aOffset)
void
nsColumnSetFrame::CreateBorderRenderers(nsTArray<nsCSSBorderRenderer>& aBorderRenderers,
nsRenderingContext* aCtx,
gfxContext* aCtx,
const nsRect& aDirtyRect,
const nsPoint& aPt)
{
@ -504,7 +503,7 @@ static void MoveChildTo(nsIFrame* aChild, LogicalPoint aOrigin,
}
nscoord
nsColumnSetFrame::GetMinISize(nsRenderingContext *aRenderingContext)
nsColumnSetFrame::GetMinISize(gfxContext *aRenderingContext)
{
nscoord iSize = 0;
DISPLAY_MIN_WIDTH(this, iSize);
@ -539,7 +538,7 @@ nsColumnSetFrame::GetMinISize(nsRenderingContext *aRenderingContext)
}
nscoord
nsColumnSetFrame::GetPrefISize(nsRenderingContext *aRenderingContext)
nsColumnSetFrame::GetPrefISize(gfxContext *aRenderingContext)
{
// Our preferred width is our desired column width, if specified, otherwise
// the child's preferred width, times the number of columns, plus the width

View File

@ -41,8 +41,8 @@ public:
nsIFrame* aOldFrame) override;
#endif
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) override;
virtual nscoord GetPrefISize(nsRenderingContext *aRenderingContext) override;
virtual nscoord GetMinISize(gfxContext *aRenderingContext) override;
virtual nscoord GetPrefISize(gfxContext *aRenderingContext) override;
/**
* Retrieve the available height for content of this frame. The available content
@ -92,7 +92,7 @@ public:
nsRect CalculateBounds(const nsPoint& aOffset);
void CreateBorderRenderers(nsTArray<nsCSSBorderRenderer>& aBorderRenderers,
nsRenderingContext* aCtx,
gfxContext* aCtx,
const nsRect& aDirtyRect,
const nsPoint& aPt);

View File

@ -588,7 +588,7 @@ void
nsContainerFrame::SyncWindowProperties(nsPresContext* aPresContext,
nsIFrame* aFrame,
nsView* aView,
nsRenderingContext* aRC,
gfxContext* aRC,
uint32_t aFlags)
{
#ifdef MOZ_XUL
@ -727,7 +727,7 @@ static nscoord GetCoord(const nsStyleCoord& aCoord, nscoord aIfNotCoord)
}
void
nsContainerFrame::DoInlineIntrinsicISize(nsRenderingContext *aRenderingContext,
nsContainerFrame::DoInlineIntrinsicISize(gfxContext *aRenderingContext,
InlineIntrinsicISizeData *aData,
nsLayoutUtils::IntrinsicISizeType aType)
{
@ -824,7 +824,7 @@ nsContainerFrame::DoInlineIntrinsicISize(nsRenderingContext *aRenderingContext,
/* virtual */
LogicalSize
nsContainerFrame::ComputeAutoSize(nsRenderingContext* aRenderingContext,
nsContainerFrame::ComputeAutoSize(gfxContext* aRenderingContext,
WritingMode aWM,
const LogicalSize& aCBSize,
nscoord aAvailableISize,

View File

@ -184,7 +184,7 @@ public:
static void SyncWindowProperties(nsPresContext* aPresContext,
nsIFrame* aFrame,
nsView* aView,
nsRenderingContext* aRC,
gfxContext* aRC,
uint32_t aFlags);
/**
@ -202,7 +202,7 @@ public:
const nsSize& aMaxSize);
// Used by both nsInlineFrame and nsFirstLetterFrame.
void DoInlineIntrinsicISize(nsRenderingContext *aRenderingContext,
void DoInlineIntrinsicISize(gfxContext *aRenderingContext,
InlineIntrinsicISizeData *aData,
nsLayoutUtils::IntrinsicISizeType aType);
@ -211,7 +211,7 @@ public:
* classes derived from nsContainerFrame want.
*/
virtual mozilla::LogicalSize
ComputeAutoSize(nsRenderingContext* aRenderingContext,
ComputeAutoSize(gfxContext* aRenderingContext,
mozilla::WritingMode aWM,
const mozilla::LogicalSize& aCBSize,
nscoord aAvailableISize,

View File

@ -105,7 +105,7 @@ nsFirstLetterFrame::GetChildFrameContainingOffset(int32_t inContentOffset,
// Needed for non-floating first-letter frames and for the continuations
// following the first-letter that we also use nsFirstLetterFrame for.
/* virtual */ void
nsFirstLetterFrame::AddInlineMinISize(nsRenderingContext *aRenderingContext,
nsFirstLetterFrame::AddInlineMinISize(gfxContext *aRenderingContext,
nsIFrame::InlineMinISizeData *aData)
{
DoInlineIntrinsicISize(aRenderingContext, aData, nsLayoutUtils::MIN_ISIZE);
@ -114,7 +114,7 @@ nsFirstLetterFrame::AddInlineMinISize(nsRenderingContext *aRenderingContext,
// Needed for non-floating first-letter frames and for the continuations
// following the first-letter that we also use nsFirstLetterFrame for.
/* virtual */ void
nsFirstLetterFrame::AddInlinePrefISize(nsRenderingContext *aRenderingContext,
nsFirstLetterFrame::AddInlinePrefISize(gfxContext *aRenderingContext,
nsIFrame::InlinePrefISizeData *aData)
{
DoInlineIntrinsicISize(aRenderingContext, aData, nsLayoutUtils::PREF_ISIZE);
@ -123,21 +123,21 @@ nsFirstLetterFrame::AddInlinePrefISize(nsRenderingContext *aRenderingContext,
// Needed for floating first-letter frames.
/* virtual */ nscoord
nsFirstLetterFrame::GetMinISize(nsRenderingContext *aRenderingContext)
nsFirstLetterFrame::GetMinISize(gfxContext *aRenderingContext)
{
return nsLayoutUtils::MinISizeFromInline(this, aRenderingContext);
}
// Needed for floating first-letter frames.
/* virtual */ nscoord
nsFirstLetterFrame::GetPrefISize(nsRenderingContext *aRenderingContext)
nsFirstLetterFrame::GetPrefISize(gfxContext *aRenderingContext)
{
return nsLayoutUtils::PrefISizeFromInline(this, aRenderingContext);
}
/* virtual */
LogicalSize
nsFirstLetterFrame::ComputeSize(nsRenderingContext *aRenderingContext,
nsFirstLetterFrame::ComputeSize(gfxContext *aRenderingContext,
WritingMode aWM,
const LogicalSize& aCBSize,
nscoord aAvailableISize,

View File

@ -43,15 +43,15 @@ public:
~(nsIFrame::eBidiInlineContainer));
}
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) override;
virtual nscoord GetPrefISize(nsRenderingContext *aRenderingContext) override;
virtual void AddInlineMinISize(nsRenderingContext *aRenderingContext,
virtual nscoord GetMinISize(gfxContext *aRenderingContext) override;
virtual nscoord GetPrefISize(gfxContext *aRenderingContext) override;
virtual void AddInlineMinISize(gfxContext *aRenderingContext,
InlineMinISizeData *aData) override;
virtual void AddInlinePrefISize(nsRenderingContext *aRenderingContext,
virtual void AddInlinePrefISize(gfxContext *aRenderingContext,
InlinePrefISizeData *aData) override;
virtual mozilla::LogicalSize
ComputeSize(nsRenderingContext *aRenderingContext,
ComputeSize(gfxContext *aRenderingContext,
mozilla::WritingMode aWritingMode,
const mozilla::LogicalSize& aCBSize,
nscoord aAvailableISize,

View File

@ -15,11 +15,11 @@
#include "nsLayoutUtils.h"
#include "nsPlaceholderFrame.h"
#include "nsPresContext.h"
#include "nsRenderingContext.h"
#include "nsStyleContext.h"
#include "mozilla/CSSOrderAwareFrameIterator.h"
#include "mozilla/Logging.h"
#include <algorithm>
#include "gfxContext.h"
#include "mozilla/LinkedList.h"
#include "mozilla/FloatingPoint.h"
#include "mozilla/UniquePtr.h"
@ -4631,7 +4631,7 @@ nsFlexContainerFrame::ReflowPlaceholders(nsPresContext* aPresContext,
}
/* virtual */ nscoord
nsFlexContainerFrame::GetMinISize(nsRenderingContext* aRenderingContext)
nsFlexContainerFrame::GetMinISize(gfxContext* aRenderingContext)
{
nscoord minISize = 0;
DISPLAY_MIN_WIDTH(this, minISize);
@ -4661,7 +4661,7 @@ nsFlexContainerFrame::GetMinISize(nsRenderingContext* aRenderingContext)
}
/* virtual */ nscoord
nsFlexContainerFrame::GetPrefISize(nsRenderingContext* aRenderingContext)
nsFlexContainerFrame::GetPrefISize(gfxContext* aRenderingContext)
{
nscoord prefISize = 0;
DISPLAY_PREF_WIDTH(this, prefISize);

View File

@ -74,8 +74,8 @@ public:
const ReflowInput& aReflowInput,
nsReflowStatus& aStatus) override;
nscoord GetMinISize(nsRenderingContext* aRenderingContext) override;
nscoord GetPrefISize(nsRenderingContext* aRenderingContext) override;
nscoord GetMinISize(gfxContext* aRenderingContext) override;
nscoord GetPrefISize(gfxContext* aRenderingContext) override;
#ifdef DEBUG_FRAME_DUMP
nsresult GetFrameName(nsAString& aResult) const override;

View File

@ -82,7 +82,6 @@
#include "SVGTextFrame.h"
#include "gfxContext.h"
#include "nsRenderingContext.h"
#include "nsAbsoluteContainingBlock.h"
#include "StickyScrollContainer.h"
#include "nsFontInflationData.h"
@ -1957,14 +1956,14 @@ public:
#endif
virtual void Paint(nsDisplayListBuilder* aBuilder,
nsRenderingContext* aCtx) override;
gfxContext* aCtx) override;
NS_DISPLAY_DECL_NAME("SelectionOverlay", TYPE_SELECTION_OVERLAY)
private:
int16_t mSelectionValue;
};
void nsDisplaySelectionOverlay::Paint(nsDisplayListBuilder* aBuilder,
nsRenderingContext* aCtx)
gfxContext* aCtx)
{
DrawTarget& aDrawTarget = *aCtx->GetDrawTarget();
@ -4721,7 +4720,7 @@ nsFrame::MarkIntrinsicISizesDirty()
}
/* virtual */ nscoord
nsFrame::GetMinISize(nsRenderingContext *aRenderingContext)
nsFrame::GetMinISize(gfxContext *aRenderingContext)
{
nscoord result = 0;
DISPLAY_MIN_WIDTH(this, result);
@ -4729,7 +4728,7 @@ nsFrame::GetMinISize(nsRenderingContext *aRenderingContext)
}
/* virtual */ nscoord
nsFrame::GetPrefISize(nsRenderingContext *aRenderingContext)
nsFrame::GetPrefISize(gfxContext *aRenderingContext)
{
nscoord result = 0;
DISPLAY_PREF_WIDTH(this, result);
@ -4737,7 +4736,7 @@ nsFrame::GetPrefISize(nsRenderingContext *aRenderingContext)
}
/* virtual */ void
nsFrame::AddInlineMinISize(nsRenderingContext* aRenderingContext,
nsFrame::AddInlineMinISize(gfxContext* aRenderingContext,
nsIFrame::InlineMinISizeData* aData)
{
nscoord isize = nsLayoutUtils::IntrinsicForContainer(aRenderingContext,
@ -4746,7 +4745,7 @@ nsFrame::AddInlineMinISize(nsRenderingContext* aRenderingContext,
}
/* virtual */ void
nsFrame::AddInlinePrefISize(nsRenderingContext* aRenderingContext,
nsFrame::AddInlinePrefISize(gfxContext* aRenderingContext,
nsIFrame::InlinePrefISizeData* aData)
{
nscoord isize = nsLayoutUtils::IntrinsicForContainer(aRenderingContext,
@ -5045,7 +5044,7 @@ nsFrame::GetIntrinsicRatio()
/* virtual */
LogicalSize
nsFrame::ComputeSize(nsRenderingContext* aRenderingContext,
nsFrame::ComputeSize(gfxContext* aRenderingContext,
WritingMode aWM,
const LogicalSize& aCBSize,
nscoord aAvailableISize,
@ -5306,7 +5305,7 @@ nsFrame::ComputeSize(nsRenderingContext* aRenderingContext,
}
LogicalSize
nsFrame::ComputeSizeWithIntrinsicDimensions(nsRenderingContext* aRenderingContext,
nsFrame::ComputeSizeWithIntrinsicDimensions(gfxContext* aRenderingContext,
WritingMode aWM,
const IntrinsicSize& aIntrinsicSize,
nsSize aIntrinsicRatio,
@ -5756,7 +5755,7 @@ nsFrame::ComputeSimpleTightBounds(DrawTarget* aDrawTarget) const
}
/* virtual */ nsresult
nsIFrame::GetPrefWidthTightBounds(nsRenderingContext* aContext,
nsIFrame::GetPrefWidthTightBounds(gfxContext* aContext,
nscoord* aX,
nscoord* aXMost)
{
@ -5765,7 +5764,7 @@ nsIFrame::GetPrefWidthTightBounds(nsRenderingContext* aContext,
/* virtual */
LogicalSize
nsFrame::ComputeAutoSize(nsRenderingContext* aRenderingContext,
nsFrame::ComputeAutoSize(gfxContext* aRenderingContext,
WritingMode aWM,
const mozilla::LogicalSize& aCBSize,
nscoord aAvailableISize,
@ -5787,7 +5786,7 @@ nsFrame::ComputeAutoSize(nsRenderingContext* aRenderingContext,
}
nscoord
nsFrame::ShrinkWidthToFit(nsRenderingContext* aRenderingContext,
nsFrame::ShrinkWidthToFit(gfxContext* aRenderingContext,
nscoord aISizeInCB,
ComputeSizeFlags aFlags)
{
@ -5812,7 +5811,7 @@ nsFrame::ShrinkWidthToFit(nsRenderingContext* aRenderingContext,
}
nscoord
nsIFrame::ComputeISizeValue(nsRenderingContext* aRenderingContext,
nsIFrame::ComputeISizeValue(gfxContext* aRenderingContext,
nscoord aContainingBlockISize,
nscoord aContentEdgeToBoxSizing,
nscoord aBoxSizingToMarginEdge,
@ -9644,7 +9643,7 @@ nsFrame::RefreshSizeCache(nsBoxLayoutState& aState)
// line height. This can be done with the line iterator.
// if we do have a rendering context
nsRenderingContext* rendContext = aState.GetRenderingContext();
gfxContext* rendContext = aState.GetRenderingContext();
if (rendContext) {
nsPresContext* presContext = aState.PresContext();
@ -9859,7 +9858,7 @@ nsFrame::DoXULLayout(nsBoxLayoutState& aState)
{
nsRect ourRect(mRect);
nsRenderingContext* rendContext = aState.GetRenderingContext();
gfxContext* rendContext = aState.GetRenderingContext();
nsPresContext* presContext = aState.PresContext();
WritingMode ourWM = GetWritingMode();
const WritingMode outerWM = aState.OuterReflowInput() ?
@ -9940,7 +9939,7 @@ void
nsFrame::BoxReflow(nsBoxLayoutState& aState,
nsPresContext* aPresContext,
ReflowOutput& aDesiredSize,
nsRenderingContext* aRenderingContext,
gfxContext* aRenderingContext,
nscoord aX,
nscoord aY,
nscoord aWidth,

View File

@ -265,18 +265,18 @@ public:
bool IsSelfEmpty() override;
void MarkIntrinsicISizesDirty() override;
nscoord GetMinISize(nsRenderingContext *aRenderingContext) override;
nscoord GetPrefISize(nsRenderingContext *aRenderingContext) override;
void AddInlineMinISize(nsRenderingContext *aRenderingContext,
nscoord GetMinISize(gfxContext *aRenderingContext) override;
nscoord GetPrefISize(gfxContext *aRenderingContext) override;
void AddInlineMinISize(gfxContext *aRenderingContext,
InlineMinISizeData *aData) override;
void AddInlinePrefISize(nsRenderingContext *aRenderingContext,
void AddInlinePrefISize(gfxContext *aRenderingContext,
InlinePrefISizeData *aData) override;
IntrinsicISizeOffsetData IntrinsicISizeOffsets() override;
mozilla::IntrinsicSize GetIntrinsicSize() override;
nsSize GetIntrinsicRatio() override;
mozilla::LogicalSize
ComputeSize(nsRenderingContext* aRenderingContext,
ComputeSize(gfxContext* aRenderingContext,
mozilla::WritingMode aWM,
const mozilla::LogicalSize& aCBSize,
nscoord aAvailableISize,
@ -291,7 +291,7 @@ public:
*/
mozilla::LogicalSize
ComputeSizeWithIntrinsicDimensions(
nsRenderingContext* aRenderingContext,
gfxContext* aRenderingContext,
mozilla::WritingMode aWM,
const mozilla::IntrinsicSize& aIntrinsicSize,
nsSize aIntrinsicRatio,
@ -321,7 +321,7 @@ public:
* to be unused.
*/
virtual mozilla::LogicalSize
ComputeAutoSize(nsRenderingContext* aRenderingContext,
ComputeAutoSize(gfxContext* aRenderingContext,
mozilla::WritingMode aWM,
const mozilla::LogicalSize& aCBSize,
nscoord aAvailableISize,
@ -334,7 +334,7 @@ public:
* Utility function for ComputeAutoSize implementations. Return
* max(GetMinISize(), min(aISizeInCB, GetPrefISize()))
*/
nscoord ShrinkWidthToFit(nsRenderingContext* aRenderingContext,
nscoord ShrinkWidthToFit(gfxContext* aRenderingContext,
nscoord aISizeInCB,
ComputeSizeFlags aFlags);
@ -712,7 +712,7 @@ private:
void BoxReflow(nsBoxLayoutState& aState,
nsPresContext* aPresContext,
ReflowOutput& aDesiredSize,
nsRenderingContext* aRenderingContext,
gfxContext* aRenderingContext,
nscoord aX,
nscoord aY,
nscoord aWidth,

View File

@ -25,7 +25,6 @@
#include "nsStyleConsts.h"
#include "nsStyleContext.h"
#include "nsHTMLParts.h"
#include "nsRenderingContext.h"
#include "nsIDOMMutationEvent.h"
#include "nsNameSpaceManager.h"
#include "nsCSSAnonBoxes.h"
@ -1408,12 +1407,12 @@ public:
aOutFrames->AppendElement(mFrame);
}
virtual void Paint(nsDisplayListBuilder* aBuilder,
nsRenderingContext* aCtx) override;
gfxContext* aCtx) override;
NS_DISPLAY_DECL_NAME("FramesetBorder", TYPE_FRAMESET_BORDER)
};
void nsDisplayFramesetBorder::Paint(nsDisplayListBuilder* aBuilder,
nsRenderingContext* aCtx)
gfxContext* aCtx)
{
static_cast<nsHTMLFramesetBorderFrame*>(mFrame)->
PaintBorder(aCtx->GetDrawTarget(), ToReferenceFrame());
@ -1616,12 +1615,12 @@ public:
#endif
virtual void Paint(nsDisplayListBuilder* aBuilder,
nsRenderingContext* aCtx) override;
gfxContext* aCtx) override;
NS_DISPLAY_DECL_NAME("FramesetBlank", TYPE_FRAMESET_BLANK)
};
void nsDisplayFramesetBlank::Paint(nsDisplayListBuilder* aBuilder,
nsRenderingContext* aCtx)
gfxContext* aCtx)
{
DrawTarget* drawTarget = aCtx->GetDrawTarget();
int32_t appUnitsPerDevPixel = mFrame->PresContext()->AppUnitsPerDevPixel();

View File

@ -778,7 +778,7 @@ nsHTMLScrollFrame::PlaceScrollArea(ScrollReflowInput& aState,
}
nscoord
nsHTMLScrollFrame::GetIntrinsicVScrollbarWidth(nsRenderingContext *aRenderingContext)
nsHTMLScrollFrame::GetIntrinsicVScrollbarWidth(gfxContext *aRenderingContext)
{
ScrollbarStyles ss = GetScrollbarStyles();
if (ss.mVertical != NS_STYLE_OVERFLOW_SCROLL || !mHelper.mVScrollbarBox)
@ -794,7 +794,7 @@ nsHTMLScrollFrame::GetIntrinsicVScrollbarWidth(nsRenderingContext *aRenderingCon
}
/* virtual */ nscoord
nsHTMLScrollFrame::GetMinISize(nsRenderingContext *aRenderingContext)
nsHTMLScrollFrame::GetMinISize(gfxContext *aRenderingContext)
{
nscoord result = mHelper.mScrolledFrame->GetMinISize(aRenderingContext);
DISPLAY_MIN_WIDTH(this, result);
@ -802,7 +802,7 @@ nsHTMLScrollFrame::GetMinISize(nsRenderingContext *aRenderingContext)
}
/* virtual */ nscoord
nsHTMLScrollFrame::GetPrefISize(nsRenderingContext *aRenderingContext)
nsHTMLScrollFrame::GetPrefISize(gfxContext *aRenderingContext)
{
nscoord result = mHelper.mScrolledFrame->GetPrefISize(aRenderingContext);
DISPLAY_PREF_WIDTH(this, result);

View File

@ -704,15 +704,15 @@ public:
const ReflowOutput& aDesiredSize);
void PlaceScrollArea(ScrollReflowInput& aState,
const nsPoint& aScrollPosition);
nscoord GetIntrinsicVScrollbarWidth(nsRenderingContext *aRenderingContext);
nscoord GetIntrinsicVScrollbarWidth(gfxContext *aRenderingContext);
virtual bool GetBorderRadii(const nsSize& aFrameSize, const nsSize& aBorderArea,
Sides aSkipSides, nscoord aRadii[8]) const override {
return mHelper.GetBorderRadii(aFrameSize, aBorderArea, aSkipSides, aRadii);
}
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) override;
virtual nscoord GetPrefISize(nsRenderingContext *aRenderingContext) override;
virtual nscoord GetMinISize(gfxContext *aRenderingContext) override;
virtual nscoord GetPrefISize(gfxContext *aRenderingContext) override;
virtual nsresult GetXULPadding(nsMargin& aPadding) override;
virtual bool IsXULCollapsed() override;
@ -789,12 +789,12 @@ public:
return mHelper.GetDesiredScrollbarSizes(aState);
}
virtual nsMargin GetDesiredScrollbarSizes(nsPresContext* aPresContext,
nsRenderingContext* aRC) override {
gfxContext* aRC) override {
nsBoxLayoutState bls(aPresContext, aRC, 0);
return GetDesiredScrollbarSizes(&bls);
}
virtual nscoord GetNondisappearingScrollbarWidth(nsPresContext* aPresContext,
nsRenderingContext* aRC, mozilla::WritingMode aWM) override {
gfxContext* aRC, mozilla::WritingMode aWM) override {
nsBoxLayoutState bls(aPresContext, aRC, 0);
return mHelper.GetNondisappearingScrollbarWidth(&bls, aWM);
}
@ -1126,7 +1126,7 @@ public:
// XXXldb Is this actually used?
#if 0
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) override;
virtual nscoord GetMinISize(gfxContext *aRenderingContext) override;
#endif
virtual bool ComputeCustomOverflow(nsOverflowAreas& aOverflowAreas) override {
@ -1230,12 +1230,12 @@ public:
return mHelper.GetDesiredScrollbarSizes(aState);
}
virtual nsMargin GetDesiredScrollbarSizes(nsPresContext* aPresContext,
nsRenderingContext* aRC) override {
gfxContext* aRC) override {
nsBoxLayoutState bls(aPresContext, aRC, 0);
return GetDesiredScrollbarSizes(&bls);
}
virtual nscoord GetNondisappearingScrollbarWidth(nsPresContext* aPresContext,
nsRenderingContext* aRC, mozilla::WritingMode aWM) override {
gfxContext* aRC, mozilla::WritingMode aWM) override {
nsBoxLayoutState bls(aPresContext, aRC, 0);
return mHelper.GetNondisappearingScrollbarWidth(&bls, aWM);
}

View File

@ -11,6 +11,7 @@
#include <algorithm> // for std::stable_sort
#include <functional>
#include <limits>
#include "gfxContext.h"
#include "mozilla/CSSAlignUtils.h"
#include "mozilla/CSSOrderAwareFrameIterator.h"
#include "mozilla/dom/GridBinding.h"
@ -27,7 +28,6 @@
#include "nsIFrameInlines.h"
#include "nsPresContext.h"
#include "nsReadableUtils.h"
#include "nsRenderingContext.h"
#include "nsRuleNode.h"
#include "nsStyleContext.h"
#include "nsTableWrapperFrame.h"
@ -1729,7 +1729,7 @@ struct MOZ_STACK_CLASS nsGridContainerFrame::GridReflowInput
aRI.GetWritingMode())
{}
GridReflowInput(nsGridContainerFrame* aFrame,
nsRenderingContext& aRC)
gfxContext& aRC)
: GridReflowInput(aFrame, aRC, nullptr, aFrame->StylePosition(),
aFrame->GetWritingMode())
{}
@ -1896,7 +1896,7 @@ struct MOZ_STACK_CLASS nsGridContainerFrame::GridReflowInput
* min/max-content contributions when sizing tracks.
*/
const ReflowInput* const mReflowInput;
nsRenderingContext& mRenderingContext;
gfxContext& mRenderingContext;
nsGridContainerFrame* const mFrame;
SharedGridData* mSharedGridData; // [weak] owned by mFrame's first-in-flow.
/** Computed border+padding with mSkipSides applied. */
@ -1922,7 +1922,7 @@ struct MOZ_STACK_CLASS nsGridContainerFrame::GridReflowInput
private:
GridReflowInput(nsGridContainerFrame* aFrame,
nsRenderingContext& aRenderingContext,
gfxContext& aRenderingContext,
const ReflowInput* aReflowInput,
const nsStylePosition* aGridStyle,
const WritingMode& aWM)
@ -3446,7 +3446,7 @@ nsGridContainerFrame::Tracks::Initialize(
static nscoord
MeasuringReflow(nsIFrame* aChild,
const ReflowInput* aReflowInput,
nsRenderingContext* aRC,
gfxContext* aRC,
const LogicalSize& aAvailableSize,
const LogicalSize& aCBSize,
nscoord aIMinSizeClamp = NS_MAXSIZE,
@ -3515,7 +3515,7 @@ MeasuringReflow(nsIFrame* aChild,
static nscoord
ContentContribution(const GridItemInfo& aGridItem,
const GridReflowInput& aState,
nsRenderingContext* aRC,
gfxContext* aRC,
WritingMode aCBWM,
LogicalAxis aAxis,
const Maybe<LogicalSize>& aPercentageBasis,
@ -3612,7 +3612,7 @@ struct CachedIntrinsicSizes
static nscoord
MinContentContribution(const GridItemInfo& aGridItem,
const GridReflowInput& aState,
nsRenderingContext* aRC,
gfxContext* aRC,
WritingMode aCBWM,
LogicalAxis aAxis,
CachedIntrinsicSizes* aCache)
@ -3634,7 +3634,7 @@ MinContentContribution(const GridItemInfo& aGridItem,
static nscoord
MaxContentContribution(const GridItemInfo& aGridItem,
const GridReflowInput& aState,
nsRenderingContext* aRC,
gfxContext* aRC,
WritingMode aCBWM,
LogicalAxis aAxis,
CachedIntrinsicSizes* aCache)
@ -3658,7 +3658,7 @@ MaxContentContribution(const GridItemInfo& aGridItem,
static nscoord
MinSize(const GridItemInfo& aGridItem,
const GridReflowInput& aState,
nsRenderingContext* aRC,
gfxContext* aRC,
WritingMode aCBWM,
LogicalAxis aAxis,
CachedIntrinsicSizes* aCache)
@ -3788,7 +3788,7 @@ nsGridContainerFrame::Tracks::ResolveIntrinsicSizeStep1(
aGridItem.mState[mAxis] |= ItemState::eClampMarginBoxMinSize;
}
// min sizing
nsRenderingContext* rc = &aState.mRenderingContext;
gfxContext* rc = &aState.mRenderingContext;
if (sz.mState & TrackSize::eAutoMinSizing) {
nscoord s;
if (aConstraint == SizingConstraint::eMinContent) {
@ -4167,7 +4167,7 @@ nsGridContainerFrame::Tracks::ResolveIntrinsicSize(
AutoTArray<TrackSize::StateBits, 16> stateBitsPerSpan;
nsTArray<Step2ItemData> step2Items;
CSSOrderAwareFrameIterator& iter = aState.mIter;
nsRenderingContext* rc = &aState.mRenderingContext;
gfxContext* rc = &aState.mRenderingContext;
WritingMode wm = aState.mWM;
uint32_t maxSpan = 0; // max span of the step2Items items
// Setup track selector for step 2.2:
@ -4509,7 +4509,7 @@ nsGridContainerFrame::Tracks::FindUsedFlexFraction(
fr = std::max(fr, possiblyDividedBaseSize);
}
WritingMode wm = aState.mWM;
nsRenderingContext* rc = &aState.mRenderingContext;
gfxContext* rc = &aState.mRenderingContext;
CSSOrderAwareFrameIterator& iter = aState.mIter;
iter.Reset();
// ... the result of 'finding the size of an fr' for each item that spans
@ -6304,7 +6304,7 @@ nsGridContainerFrame::Reflow(nsPresContext* aPresContext,
}
nscoord
nsGridContainerFrame::IntrinsicISize(nsRenderingContext* aRenderingContext,
nsGridContainerFrame::IntrinsicISize(gfxContext* aRenderingContext,
IntrinsicISizeType aType)
{
RenumberList();
@ -6373,7 +6373,7 @@ nsGridContainerFrame::IntrinsicISize(nsRenderingContext* aRenderingContext,
}
nscoord
nsGridContainerFrame::GetMinISize(nsRenderingContext* aRC)
nsGridContainerFrame::GetMinISize(gfxContext* aRC)
{
DISPLAY_MIN_WIDTH(this, mCachedMinISize);
if (mCachedMinISize == NS_INTRINSIC_WIDTH_UNKNOWN) {
@ -6383,7 +6383,7 @@ nsGridContainerFrame::GetMinISize(nsRenderingContext* aRC)
}
nscoord
nsGridContainerFrame::GetPrefISize(nsRenderingContext* aRC)
nsGridContainerFrame::GetPrefISize(gfxContext* aRC)
{
DISPLAY_PREF_WIDTH(this, mCachedPrefISize);
if (mCachedPrefISize == NS_INTRINSIC_WIDTH_UNKNOWN) {

View File

@ -94,8 +94,8 @@ public:
ReflowOutput& aDesiredSize,
const ReflowInput& aReflowInput,
nsReflowStatus& aStatus) override;
nscoord GetMinISize(nsRenderingContext* aRenderingContext) override;
nscoord GetPrefISize(nsRenderingContext* aRenderingContext) override;
nscoord GetMinISize(gfxContext* aRenderingContext) override;
nscoord GetPrefISize(gfxContext* aRenderingContext) override;
void MarkIntrinsicISizesDirty() override;
bool IsFrameOfType(uint32_t aFlags) const override
{
@ -289,7 +289,7 @@ protected:
/**
* Helper for GetMinISize / GetPrefISize.
*/
nscoord IntrinsicISize(nsRenderingContext* aRenderingContext,
nscoord IntrinsicISize(gfxContext* aRenderingContext,
IntrinsicISizeType aConstraint);
// Helper for AppendFrames / InsertFrames.

View File

@ -182,7 +182,7 @@ nsHTMLCanvasFrame::GetCanvasSize()
}
/* virtual */ nscoord
nsHTMLCanvasFrame::GetMinISize(nsRenderingContext *aRenderingContext)
nsHTMLCanvasFrame::GetMinISize(gfxContext *aRenderingContext)
{
// XXX The caller doesn't account for constraints of the height,
// min-height, and max-height properties.
@ -194,7 +194,7 @@ nsHTMLCanvasFrame::GetMinISize(nsRenderingContext *aRenderingContext)
}
/* virtual */ nscoord
nsHTMLCanvasFrame::GetPrefISize(nsRenderingContext *aRenderingContext)
nsHTMLCanvasFrame::GetPrefISize(gfxContext *aRenderingContext)
{
// XXX The caller doesn't account for constraints of the height,
// min-height, and max-height properties.
@ -219,7 +219,7 @@ nsHTMLCanvasFrame::GetIntrinsicRatio()
/* virtual */
LogicalSize
nsHTMLCanvasFrame::ComputeSize(nsRenderingContext *aRenderingContext,
nsHTMLCanvasFrame::ComputeSize(gfxContext *aRenderingContext,
WritingMode aWM,
const LogicalSize& aCBSize,
nscoord aAvailableISize,

View File

@ -56,13 +56,13 @@ public:
/* get the size of the canvas's image */
nsIntSize GetCanvasSize();
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) override;
virtual nscoord GetPrefISize(nsRenderingContext *aRenderingContext) override;
virtual nscoord GetMinISize(gfxContext *aRenderingContext) override;
virtual nscoord GetPrefISize(gfxContext *aRenderingContext) override;
virtual mozilla::IntrinsicSize GetIntrinsicSize() override;
virtual nsSize GetIntrinsicRatio() override;
virtual mozilla::LogicalSize
ComputeSize(nsRenderingContext *aRenderingContext,
ComputeSize(gfxContext *aRenderingContext,
mozilla::WritingMode aWritingMode,
const mozilla::LogicalSize& aCBSize,
nscoord aAvailableISize,

View File

@ -66,7 +66,6 @@
class nsIAtom;
class nsPresContext;
class nsIPresShell;
class nsRenderingContext;
class nsView;
class nsIWidget;
class nsISelectionController;
@ -2104,7 +2103,7 @@ public:
*
* This method must not return a negative value.
*/
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) = 0;
virtual nscoord GetMinISize(gfxContext *aRenderingContext) = 0;
/**
* Get the max-content intrinsic inline size of the frame. This must be
@ -2112,7 +2111,7 @@ public:
*
* Otherwise, all the comments for |GetMinISize| above apply.
*/
virtual nscoord GetPrefISize(nsRenderingContext *aRenderingContext) = 0;
virtual nscoord GetPrefISize(gfxContext *aRenderingContext) = 0;
/**
* |InlineIntrinsicISize| represents the intrinsic width information
@ -2271,7 +2270,7 @@ public:
* which calls |GetMinISize|.
*/
virtual void
AddInlineMinISize(nsRenderingContext *aRenderingContext,
AddInlineMinISize(gfxContext *aRenderingContext,
InlineMinISizeData *aData) = 0;
/**
@ -2285,7 +2284,7 @@ public:
* based on using all *mandatory* breakpoints within the frame.
*/
virtual void
AddInlinePrefISize(nsRenderingContext *aRenderingContext,
AddInlinePrefISize(gfxContext *aRenderingContext,
InlinePrefISizeData *aData) = 0;
/**
@ -2397,7 +2396,7 @@ public:
* @param aFlags Flags to further customize behavior (definitions above).
*/
virtual mozilla::LogicalSize
ComputeSize(nsRenderingContext *aRenderingContext,
ComputeSize(gfxContext *aRenderingContext,
mozilla::WritingMode aWritingMode,
const mozilla::LogicalSize& aCBSize,
nscoord aAvailableISize,
@ -2437,7 +2436,7 @@ public:
* @param aXMost computed intrinsic width of the tight bounding rectangle
*
*/
virtual nsresult GetPrefWidthTightBounds(nsRenderingContext* aContext,
virtual nsresult GetPrefWidthTightBounds(gfxContext* aContext,
nscoord* aX,
nscoord* aXMost);
@ -3897,7 +3896,7 @@ public:
/**
* Helper function - computes the content-box inline size for aCoord.
*/
nscoord ComputeISizeValue(nsRenderingContext* aRenderingContext,
nscoord ComputeISizeValue(gfxContext* aRenderingContext,
nscoord aContainingBlockISize,
nscoord aContentEdgeToBoxSizing,
nscoord aBoxSizingToMarginEdge,

View File

@ -22,12 +22,12 @@
#define NS_DEFAULT_VERTICAL_SCROLL_DISTANCE 3
#define NS_DEFAULT_HORIZONTAL_SCROLL_DISTANCE 5
class gfxContext;
class nsBoxLayoutState;
class nsIScrollPositionListener;
class nsIFrame;
class nsPresContext;
class nsIContent;
class nsRenderingContext;
class nsIAtom;
class nsDisplayListBuilder;
@ -97,13 +97,13 @@ public:
* of the scrolled contents.
*/
virtual nsMargin GetDesiredScrollbarSizes(nsPresContext* aPresContext,
nsRenderingContext* aRC) = 0;
gfxContext* aRC) = 0;
/**
* Return the width for non-disappearing scrollbars.
*/
virtual nscoord
GetNondisappearingScrollbarWidth(nsPresContext* aPresContext,
nsRenderingContext* aRC,
gfxContext* aRC,
mozilla::WritingMode aWM) = 0;
/**
* GetScrolledRect is designed to encapsulate deciding which

View File

@ -8,6 +8,7 @@
#include "nsImageFrame.h"
#include "gfx2DGlue.h"
#include "gfxContext.h"
#include "gfxUtils.h"
#include "mozilla/DebugOnly.h"
#include "mozilla/EventStates.h"
@ -23,7 +24,6 @@
#include "nsString.h"
#include "nsPrintfCString.h"
#include "nsPresContext.h"
#include "nsRenderingContext.h"
#include "nsIPresShell.h"
#include "nsGkAtoms.h"
#include "nsIDocument.h"
@ -837,7 +837,7 @@ nsImageFrame::EnsureIntrinsicSizeAndRatio()
/* virtual */
LogicalSize
nsImageFrame::ComputeSize(nsRenderingContext *aRenderingContext,
nsImageFrame::ComputeSize(gfxContext *aRenderingContext,
WritingMode aWM,
const LogicalSize& aCBSize,
nscoord aAvailableISize,
@ -922,7 +922,7 @@ nsImageFrame::GetContinuationOffset() const
}
/* virtual */ nscoord
nsImageFrame::GetMinISize(nsRenderingContext *aRenderingContext)
nsImageFrame::GetMinISize(gfxContext *aRenderingContext)
{
// XXX The caller doesn't account for constraints of the height,
// min-height, and max-height properties.
@ -934,7 +934,7 @@ nsImageFrame::GetMinISize(nsRenderingContext *aRenderingContext)
}
/* virtual */ nscoord
nsImageFrame::GetPrefISize(nsRenderingContext *aRenderingContext)
nsImageFrame::GetPrefISize(gfxContext *aRenderingContext)
{
// XXX The caller doesn't account for constraints of the height,
// min-height, and max-height properties.
@ -1104,7 +1104,7 @@ nsImageFrame::MeasureString(const char16_t* aString,
int32_t aLength,
nscoord aMaxWidth,
uint32_t& aMaxFit,
nsRenderingContext& aContext,
gfxContext& aContext,
nsFontMetrics& aFontMetrics)
{
nscoord totalWidth = 0;
@ -1165,13 +1165,12 @@ nsImageFrame::MeasureString(const char16_t* aString,
// between words if a word would extend past the edge of the rectangle
void
nsImageFrame::DisplayAltText(nsPresContext* aPresContext,
nsRenderingContext& aRenderingContext,
gfxContext& aRenderingContext,
const nsString& aAltText,
const nsRect& aRect)
{
// Set font and color
aRenderingContext.ThebesContext()->
SetColor(Color::FromABGR(StyleColor()->mColor));
aRenderingContext.SetColor(Color::FromABGR(StyleColor()->mColor));
RefPtr<nsFontMetrics> fm =
nsLayoutUtils::GetInflatedFontMetricsForFrame(this);
@ -1322,7 +1321,7 @@ public:
}
virtual void Paint(nsDisplayListBuilder* aBuilder,
nsRenderingContext* aCtx) override
gfxContext* aCtx) override
{
// Always sync decode, because these icons are UI, and since they're not
// discardable we'll pay the price of sync decoding at most once.
@ -1342,7 +1341,7 @@ public:
};
DrawResult
nsImageFrame::DisplayAltFeedback(nsRenderingContext& aRenderingContext,
nsImageFrame::DisplayAltFeedback(gfxContext& aRenderingContext,
const nsRect& aDirtyRect,
nsPoint aPt,
uint32_t aFlags)
@ -1395,12 +1394,11 @@ nsImageFrame::DisplayAltFeedback(nsRenderingContext& aRenderingContext,
}
DrawTarget* drawTarget = aRenderingContext.GetDrawTarget();
gfxContext* gfx = aRenderingContext.ThebesContext();
// Clip so we don't render outside the inner rect
gfx->Save();
gfx->Clip(NSRectToSnappedRect(inner, PresContext()->AppUnitsPerDevPixel(),
*drawTarget));
aRenderingContext.Save();
aRenderingContext.Clip(
NSRectToSnappedRect(inner, PresContext()->AppUnitsPerDevPixel(), *drawTarget));
DrawResult result = DrawResult::NOT_READY;
@ -1437,7 +1435,7 @@ nsImageFrame::DisplayAltFeedback(nsRenderingContext& aRenderingContext,
MOZ_ASSERT(imgCon, "Load complete, but no image container?");
nsRect dest(flushRight ? inner.XMost() - size : inner.x,
inner.y, size, size);
result = nsLayoutUtils::DrawSingleImage(*gfx, PresContext(), imgCon,
result = nsLayoutUtils::DrawSingleImage(aRenderingContext, PresContext(), imgCon,
nsLayoutUtils::GetSamplingFilterForFrame(this), dest, aDirtyRect,
/* no SVGImageContext */ Nothing(), aFlags);
}
@ -1493,7 +1491,7 @@ nsImageFrame::DisplayAltFeedback(nsRenderingContext& aRenderingContext,
}
}
aRenderingContext.ThebesContext()->Restore();
aRenderingContext.Restore();
return result;
}
@ -1517,7 +1515,7 @@ static void PaintDebugImageMap(nsIFrame* aFrame, DrawTarget* aDrawTarget,
void
nsDisplayImage::Paint(nsDisplayListBuilder* aBuilder,
nsRenderingContext* aCtx)
gfxContext* aCtx)
{
uint32_t flags = imgIContainer::FLAG_NONE;
if (aBuilder->ShouldSyncDecodeImages()) {
@ -1690,7 +1688,7 @@ nsDisplayImage::BuildLayer(nsDisplayListBuilder* aBuilder,
}
DrawResult
nsImageFrame::PaintImage(nsRenderingContext& aRenderingContext, nsPoint aPt,
nsImageFrame::PaintImage(gfxContext& aRenderingContext, nsPoint aPt,
const nsRect& aDirtyRect, imgIContainer* aImage,
uint32_t aFlags)
{
@ -1723,7 +1721,7 @@ nsImageFrame::PaintImage(nsRenderingContext& aRenderingContext, nsPoint aPt,
SVGImageContext::MaybeStoreContextPaint(svgContext, this, aImage);
DrawResult result =
nsLayoutUtils::DrawSingleImage(*aRenderingContext.ThebesContext(),
nsLayoutUtils::DrawSingleImage(aRenderingContext,
PresContext(), aImage,
nsLayoutUtils::GetSamplingFilterForFrame(this), dest, aDirtyRect,
svgContext, flags, &anchorPoint);
@ -2462,7 +2460,7 @@ IsInAutoWidthTableCellForQuirk(nsIFrame *aFrame)
}
/* virtual */ void
nsImageFrame::AddInlineMinISize(nsRenderingContext* aRenderingContext,
nsImageFrame::AddInlineMinISize(gfxContext* aRenderingContext,
nsIFrame::InlineMinISizeData* aData)
{
nscoord isize = nsLayoutUtils::IntrinsicForContainer(aRenderingContext,

View File

@ -81,8 +81,8 @@ public:
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) override;
virtual nscoord GetPrefISize(nsRenderingContext *aRenderingContext) override;
virtual nscoord GetMinISize(gfxContext *aRenderingContext) override;
virtual nscoord GetPrefISize(gfxContext *aRenderingContext) override;
virtual mozilla::IntrinsicSize GetIntrinsicSize() override;
virtual nsSize GetIntrinsicRatio() override;
virtual void Reflow(nsPresContext* aPresContext,
@ -147,7 +147,7 @@ public:
static bool ShouldCreateImageFrameFor(mozilla::dom::Element* aElement,
nsStyleContext* aStyleContext);
DrawResult DisplayAltFeedback(nsRenderingContext& aRenderingContext,
DrawResult DisplayAltFeedback(gfxContext& aRenderingContext,
const nsRect& aDirtyRect,
nsPoint aPt,
uint32_t aFlags);
@ -167,7 +167,7 @@ public:
nsImageMap* GetImageMap();
nsImageMap* GetExistingImageMap() const { return mImageMap; }
virtual void AddInlineMinISize(nsRenderingContext *aRenderingContext,
virtual void AddInlineMinISize(gfxContext *aRenderingContext,
InlineMinISizeData *aData) override;
void DisconnectMap();
@ -188,7 +188,7 @@ protected:
void EnsureIntrinsicSizeAndRatio();
virtual mozilla::LogicalSize
ComputeSize(nsRenderingContext *aRenderingContext,
ComputeSize(gfxContext *aRenderingContext,
mozilla::WritingMode aWritingMode,
const mozilla::LogicalSize& aCBSize,
nscoord aAvailableISize,
@ -217,15 +217,15 @@ protected:
int32_t aLength,
nscoord aMaxWidth,
uint32_t& aMaxFit,
nsRenderingContext& aContext,
gfxContext& aContext,
nsFontMetrics& aFontMetrics);
void DisplayAltText(nsPresContext* aPresContext,
nsRenderingContext& aRenderingContext,
gfxContext& aRenderingContext,
const nsString& aAltText,
const nsRect& aRect);
DrawResult PaintImage(nsRenderingContext& aRenderingContext, nsPoint aPt,
DrawResult PaintImage(gfxContext& aRenderingContext, nsPoint aPt,
const nsRect& aDirtyRect, imgIContainer* aImage,
uint32_t aFlags);
@ -427,7 +427,7 @@ public:
const nsDisplayItemGeometry* aGeometry,
nsRegion* aInvalidRegion) override;
virtual void Paint(nsDisplayListBuilder* aBuilder,
nsRenderingContext* aCtx) override;
gfxContext* aCtx) override;
virtual already_AddRefed<imgIContainer> GetImage() override;

View File

@ -5,6 +5,7 @@
/* rendering object for CSS display:inline objects */
#include "gfxContext.h"
#include "nsInlineFrame.h"
#include "nsLineLayout.h"
#include "nsBlockFrame.h"
@ -12,7 +13,6 @@
#include "nsGkAtoms.h"
#include "nsStyleContext.h"
#include "nsPresContext.h"
#include "nsRenderingContext.h"
#include "nsCSSAnonBoxes.h"
#include "mozilla/RestyleManager.h"
#include "mozilla/RestyleManagerInlines.h"
@ -256,14 +256,14 @@ nsInlineFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
// Reflow methods
/* virtual */ void
nsInlineFrame::AddInlineMinISize(nsRenderingContext *aRenderingContext,
nsInlineFrame::AddInlineMinISize(gfxContext *aRenderingContext,
nsIFrame::InlineMinISizeData *aData)
{
DoInlineIntrinsicISize(aRenderingContext, aData, nsLayoutUtils::MIN_ISIZE);
}
/* virtual */ void
nsInlineFrame::AddInlinePrefISize(nsRenderingContext *aRenderingContext,
nsInlineFrame::AddInlinePrefISize(gfxContext *aRenderingContext,
nsIFrame::InlinePrefISizeData *aData)
{
DoInlineIntrinsicISize(aRenderingContext, aData, nsLayoutUtils::PREF_ISIZE);
@ -272,7 +272,7 @@ nsInlineFrame::AddInlinePrefISize(nsRenderingContext *aRenderingContext,
/* virtual */
LogicalSize
nsInlineFrame::ComputeSize(nsRenderingContext *aRenderingContext,
nsInlineFrame::ComputeSize(gfxContext *aRenderingContext,
WritingMode aWM,
const LogicalSize& aCBSize,
nscoord aAvailableISize,

View File

@ -63,12 +63,12 @@ public:
virtual nsresult StealFrame(nsIFrame* aChild) override;
// nsIHTMLReflow overrides
virtual void AddInlineMinISize(nsRenderingContext *aRenderingContext,
virtual void AddInlineMinISize(gfxContext *aRenderingContext,
InlineMinISizeData *aData) override;
virtual void AddInlinePrefISize(nsRenderingContext *aRenderingContext,
virtual void AddInlinePrefISize(gfxContext *aRenderingContext,
InlinePrefISizeData *aData) override;
virtual mozilla::LogicalSize
ComputeSize(nsRenderingContext *aRenderingContext,
ComputeSize(gfxContext *aRenderingContext,
mozilla::WritingMode aWritingMode,
const mozilla::LogicalSize& aCBSize,
nscoord aAvailableISize,

View File

@ -15,7 +15,7 @@ nsLeafFrame::~nsLeafFrame()
}
/* virtual */ nscoord
nsLeafFrame::GetMinISize(nsRenderingContext *aRenderingContext)
nsLeafFrame::GetMinISize(gfxContext *aRenderingContext)
{
nscoord result;
DISPLAY_MIN_WIDTH(this, result);
@ -24,7 +24,7 @@ nsLeafFrame::GetMinISize(nsRenderingContext *aRenderingContext)
}
/* virtual */ nscoord
nsLeafFrame::GetPrefISize(nsRenderingContext *aRenderingContext)
nsLeafFrame::GetPrefISize(gfxContext *aRenderingContext)
{
nscoord result;
DISPLAY_PREF_WIDTH(this, result);
@ -34,7 +34,7 @@ nsLeafFrame::GetPrefISize(nsRenderingContext *aRenderingContext)
/* virtual */
LogicalSize
nsLeafFrame::ComputeAutoSize(nsRenderingContext* aRenderingContext,
nsLeafFrame::ComputeAutoSize(gfxContext* aRenderingContext,
WritingMode aWM,
const LogicalSize& aCBSize,
nscoord aAvailableISize,

View File

@ -34,14 +34,14 @@ public:
* Both GetMinISize and GetPrefISize will return whatever GetIntrinsicISize
* returns.
*/
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) override;
virtual nscoord GetPrefISize(nsRenderingContext *aRenderingContext) override;
virtual nscoord GetMinISize(gfxContext *aRenderingContext) override;
virtual nscoord GetPrefISize(gfxContext *aRenderingContext) override;
/**
* Our auto size is just intrinsic width and intrinsic height.
*/
virtual mozilla::LogicalSize
ComputeAutoSize(nsRenderingContext* aRenderingContext,
ComputeAutoSize(gfxContext* aRenderingContext,
mozilla::WritingMode aWM,
const mozilla::LogicalSize& aCBSize,
nscoord aAvailableISize,

View File

@ -6,11 +6,11 @@
#include "nsPageFrame.h"
#include "mozilla/gfx/2D.h"
#include "gfxContext.h"
#include "nsDeviceContext.h"
#include "nsFontMetrics.h"
#include "nsLayoutUtils.h"
#include "nsPresContext.h"
#include "nsRenderingContext.h"
#include "nsGkAtoms.h"
#include "nsIPresShell.h"
#include "nsPageContentFrame.h"
@ -231,7 +231,7 @@ nsPageFrame::ProcessSpecialCodes(const nsString& aStr, nsString& aNewStr)
//------------------------------------------------------------------------------
nscoord nsPageFrame::GetXPosition(nsRenderingContext& aRenderingContext,
nscoord nsPageFrame::GetXPosition(gfxContext& aRenderingContext,
nsFontMetrics& aFontMetrics,
const nsRect& aRect,
int32_t aJust,
@ -268,7 +268,7 @@ nscoord nsPageFrame::GetXPosition(nsRenderingContext& aRenderingContext,
// @param aAscent - the ascent of the font
// @param aHeight - the height of the font
void
nsPageFrame::DrawHeaderFooter(nsRenderingContext& aRenderingContext,
nsPageFrame::DrawHeaderFooter(gfxContext& aRenderingContext,
nsFontMetrics& aFontMetrics,
nsHeaderFooterEnum aHeaderFooter,
const nsString& aStrLeft,
@ -313,7 +313,7 @@ nsPageFrame::DrawHeaderFooter(nsRenderingContext& aRenderingContext,
// @param aAscent - the ascent of the font
// @param aWidth - available width for the string
void
nsPageFrame::DrawHeaderFooter(nsRenderingContext& aRenderingContext,
nsPageFrame::DrawHeaderFooter(gfxContext& aRenderingContext,
nsFontMetrics& aFontMetrics,
nsHeaderFooterEnum aHeaderFooter,
int32_t aJust,
@ -326,7 +326,6 @@ nsPageFrame::DrawHeaderFooter(nsRenderingContext& aRenderingContext,
nscoord contentWidth = aWidth - (mPD->mEdgePaperMargin.left + mPD->mEdgePaperMargin.right);
gfxContext* gfx = aRenderingContext.ThebesContext();
DrawTarget* drawTarget = aRenderingContext.GetDrawTarget();
if ((aHeaderFooter == eHeader && aHeight < mPageContentMargin.top) ||
@ -381,16 +380,16 @@ nsPageFrame::DrawHeaderFooter(nsRenderingContext& aRenderingContext,
}
// set up new clip and draw the text
gfx->Save();
gfx->Clip(NSRectToSnappedRect(aRect, PresContext()->AppUnitsPerDevPixel(),
*drawTarget));
gfx->SetColor(Color(0.f, 0.f, 0.f));
aRenderingContext.Save();
aRenderingContext.Clip(
NSRectToSnappedRect(aRect, PresContext()->AppUnitsPerDevPixel(), *drawTarget));
aRenderingContext.SetColor(Color(0.f, 0.f, 0.f));
nsLayoutUtils::DrawString(this, aFontMetrics, &aRenderingContext,
str.get(), str.Length(),
nsPoint(x, y + aAscent),
nullptr,
DrawStringFlags::eForceHorizontal);
gfx->Restore();
aRenderingContext.Restore();
}
}
@ -488,7 +487,7 @@ public:
#endif
virtual void Paint(nsDisplayListBuilder* aBuilder,
nsRenderingContext* aCtx) override {
gfxContext* aCtx) override {
#ifdef DEBUG
nsPageFrame* pageFrame = do_QueryFrame(mFrame);
MOZ_ASSERT(pageFrame, "We should have an nsPageFrame");
@ -607,7 +606,7 @@ nsPageFrame::SetPageNumInfo(int32_t aPageNumber, int32_t aTotalPages)
void
nsPageFrame::PaintHeaderFooter(nsRenderingContext& aRenderingContext,
nsPageFrame::PaintHeaderFooter(gfxContext& aRenderingContext,
nsPoint aPt, bool aDisableSubpixelAA)
{
nsPresContext* pc = PresContext();
@ -620,7 +619,7 @@ nsPageFrame::PaintHeaderFooter(nsRenderingContext& aRenderingContext,
}
nsRect rect(aPt, mRect.Size());
aRenderingContext.ThebesContext()->SetColor(Color(0.f, 0.f, 0.f));
aRenderingContext.SetColor(Color(0.f, 0.f, 0.f));
DrawTargetAutoDisableSubpixelAntialiasing
disable(aRenderingContext.GetDrawTarget(), aDisableSubpixelAA);

View File

@ -48,7 +48,7 @@ public:
// user's settings
virtual bool HonorPrintBackgroundSettings() override { return false; }
void PaintHeaderFooter(nsRenderingContext& aRenderingContext,
void PaintHeaderFooter(gfxContext& aRenderingContext,
nsPoint aPt, bool aSubpixelAA);
protected:
@ -60,13 +60,13 @@ protected:
eFooter
} nsHeaderFooterEnum;
nscoord GetXPosition(nsRenderingContext& aRenderingContext,
nscoord GetXPosition(gfxContext& aRenderingContext,
nsFontMetrics& aFontMetrics,
const nsRect& aRect,
int32_t aJust,
const nsString& aStr);
void DrawHeaderFooter(nsRenderingContext& aRenderingContext,
void DrawHeaderFooter(gfxContext& aRenderingContext,
nsFontMetrics& aFontMetrics,
nsHeaderFooterEnum aHeaderFooter,
int32_t aJust,
@ -76,7 +76,7 @@ protected:
nscoord aAscent,
nscoord aWidth);
void DrawHeaderFooter(nsRenderingContext& aRenderingContext,
void DrawHeaderFooter(gfxContext& aRenderingContext,
nsFontMetrics& aFontMetrics,
nsHeaderFooterEnum aHeaderFooter,
const nsString& aStrLeft,

View File

@ -10,13 +10,13 @@
#include "nsPlaceholderFrame.h"
#include "gfxContext.h"
#include "gfxUtils.h"
#include "mozilla/gfx/2D.h"
#include "nsDisplayList.h"
#include "nsFrameManager.h"
#include "nsLayoutUtils.h"
#include "nsPresContext.h"
#include "nsRenderingContext.h"
#include "nsIFrameInlines.h"
#include "nsIContentInlines.h"
@ -63,7 +63,7 @@ nsPlaceholderFrame::GetXULMaxSize(nsBoxLayoutState& aBoxLayoutState)
}
/* virtual */ void
nsPlaceholderFrame::AddInlineMinISize(nsRenderingContext* aRenderingContext,
nsPlaceholderFrame::AddInlineMinISize(gfxContext* aRenderingContext,
nsIFrame::InlineMinISizeData* aData)
{
// Override AddInlineMinWith so that *nothing* happens. In
@ -84,7 +84,7 @@ nsPlaceholderFrame::AddInlineMinISize(nsRenderingContext* aRenderingContext,
}
/* virtual */ void
nsPlaceholderFrame::AddInlinePrefISize(nsRenderingContext* aRenderingContext,
nsPlaceholderFrame::AddInlinePrefISize(gfxContext* aRenderingContext,
nsIFrame::InlinePrefISizeData* aData)
{
// Override AddInlinePrefWith so that *nothing* happens. In

View File

@ -90,9 +90,9 @@ public:
// nsIFrame overrides
// We need to override GetXULMinSize and GetXULPrefSize because XUL uses
// placeholders not within lines.
virtual void AddInlineMinISize(nsRenderingContext* aRenderingContext,
virtual void AddInlineMinISize(gfxContext* aRenderingContext,
InlineMinISizeData* aData) override;
virtual void AddInlinePrefISize(nsRenderingContext* aRenderingContext,
virtual void AddInlinePrefISize(gfxContext* aRenderingContext,
InlinePrefISizeData* aData) override;
virtual nsSize GetXULMinSize(nsBoxLayoutState& aBoxLayoutState) override;
virtual nsSize GetXULPrefSize(nsBoxLayoutState& aBoxLayoutState) override;

View File

@ -9,6 +9,7 @@
#include "nsPluginFrame.h"
#include "gfx2DGlue.h"
#include "gfxContext.h"
#include "gfxMatrix.h"
#include "mozilla/gfx/2D.h"
#include "mozilla/BasicEvents.h"
@ -30,7 +31,6 @@
#include "nsIPluginInstanceOwner.h"
#include "nsNPAPIPluginInstance.h"
#include "nsIDOMElement.h"
#include "nsRenderingContext.h"
#include "npapi.h"
#include "nsIObjectLoadingContent.h"
#include "nsContentUtils.h"
@ -374,7 +374,7 @@ nsPluginFrame::PrepForDrawing(nsIWidget *aWidget)
#define EMBED_DEF_HEIGHT 200
/* virtual */ nscoord
nsPluginFrame::GetMinISize(nsRenderingContext *aRenderingContext)
nsPluginFrame::GetMinISize(gfxContext *aRenderingContext)
{
nscoord result = 0;
@ -392,7 +392,7 @@ nsPluginFrame::GetMinISize(nsRenderingContext *aRenderingContext)
}
/* virtual */ nscoord
nsPluginFrame::GetPrefISize(nsRenderingContext *aRenderingContext)
nsPluginFrame::GetPrefISize(gfxContext *aRenderingContext)
{
return nsPluginFrame::GetMinISize(aRenderingContext);
}
@ -871,18 +871,16 @@ nsPluginFrame::DidReflow(nsPresContext* aPresContext,
}
/* static */ void
nsPluginFrame::PaintPrintPlugin(nsIFrame* aFrame, nsRenderingContext* aCtx,
nsPluginFrame::PaintPrintPlugin(nsIFrame* aFrame, gfxContext* aCtx,
const nsRect& aDirtyRect, nsPoint aPt)
{
gfxContext* ctx = aCtx->ThebesContext();
// Translate the context:
nsPoint pt = aPt + aFrame->GetContentRectRelativeToSelf().TopLeft();
gfxPoint devPixelPt =
nsLayoutUtils::PointToGfxPoint(pt, aFrame->PresContext()->AppUnitsPerDevPixel());
gfxContextMatrixAutoSaveRestore autoSR(ctx);
ctx->SetMatrix(ctx->CurrentMatrix().Translate(devPixelPt));
gfxContextMatrixAutoSaveRestore autoSR(aCtx);
aCtx->SetMatrix(aCtx->CurrentMatrix().Translate(devPixelPt));
// FIXME - Bug 385435: Doesn't aDirtyRect need translating too?
@ -1000,7 +998,7 @@ nsDisplayPlugin::GetBounds(nsDisplayListBuilder* aBuilder, bool* aSnap)
void
nsDisplayPlugin::Paint(nsDisplayListBuilder* aBuilder,
nsRenderingContext* aCtx)
gfxContext* aCtx)
{
nsPluginFrame* f = static_cast<nsPluginFrame*>(mFrame);
bool snap;
@ -1272,7 +1270,7 @@ nsPluginFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
}
void
nsPluginFrame::PrintPlugin(nsRenderingContext& aRenderingContext,
nsPluginFrame::PrintPlugin(gfxContext& aRenderingContext,
const nsRect& aDirtyRect)
{
nsCOMPtr<nsIObjectLoadingContent> obj(do_QueryInterface(mContent));
@ -1343,17 +1341,15 @@ nsPluginFrame::PrintPlugin(nsRenderingContext& aRenderingContext,
window.width = presContext->AppUnitsToDevPixels(contentSize.width);
window.height = presContext->AppUnitsToDevPixels(contentSize.height);
gfxContext *ctx = aRenderingContext.ThebesContext();
ctx->Save();
aRenderingContext.Save();
/* Make sure plugins don't do any damage outside of where they're supposed to */
ctx->NewPath();
aRenderingContext.NewPath();
gfxRect r(window.x, window.y, window.width, window.height);
ctx->Rectangle(r);
ctx->Clip();
aRenderingContext.Rectangle(r);
aRenderingContext.Clip();
gfxWindowsNativeDrawing nativeDraw(ctx, r);
gfxWindowsNativeDrawing nativeDraw(&aRenderingContext, r);
do {
HDC dc = nativeDraw.BeginNativeDrawing();
if (!dc)
@ -1369,7 +1365,7 @@ nsPluginFrame::PrintPlugin(nsRenderingContext& aRenderingContext,
} while (nativeDraw.ShouldRenderAgain());
nativeDraw.PaintToContext();
ctx->Restore();
aRenderingContext.Restore();
#endif
// XXX Nav 4.x always sent a SetWindow call after print. Should we do the same?
@ -1603,7 +1599,7 @@ nsPluginFrame::BuildLayer(nsDisplayListBuilder* aBuilder,
void
nsPluginFrame::PaintPlugin(nsDisplayListBuilder* aBuilder,
nsRenderingContext& aRenderingContext,
gfxContext& aRenderingContext,
const nsRect& aDirtyRect, const nsRect& aPluginRect)
{
#if defined(MOZ_WIDGET_ANDROID)
@ -1613,9 +1609,7 @@ nsPluginFrame::PaintPlugin(nsDisplayListBuilder* aBuilder,
gfxRect dirtyGfxRect =
PresContext()->AppUnitsToGfxUnits(aDirtyRect);
gfxContext* ctx = aRenderingContext.ThebesContext();
mInstanceOwner->Paint(ctx, frameGfxRect, dirtyGfxRect);
mInstanceOwner->Paint(aRenderingContext, frameGfxRect, dirtyGfxRect);
return;
}
#else

View File

@ -70,8 +70,8 @@ public:
virtual void Init(nsIContent* aContent,
nsContainerFrame* aParent,
nsIFrame* aPrevInFlow) override;
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) override;
virtual nscoord GetPrefISize(nsRenderingContext *aRenderingContext) override;
virtual nscoord GetMinISize(gfxContext *aRenderingContext) override;
virtual nscoord GetPrefISize(gfxContext *aRenderingContext) override;
virtual void Reflow(nsPresContext* aPresContext,
ReflowOutput& aDesiredSize,
const ReflowInput& aReflowInput,
@ -252,12 +252,12 @@ protected:
LayoutDeviceIntPoint GetRemoteTabChromeOffset();
static void PaintPrintPlugin(nsIFrame* aFrame,
nsRenderingContext* aRenderingContext,
gfxContext* aRenderingContext,
const nsRect& aDirtyRect, nsPoint aPt);
void PrintPlugin(nsRenderingContext& aRenderingContext,
void PrintPlugin(gfxContext& aRenderingContext,
const nsRect& aDirtyRect);
void PaintPlugin(nsDisplayListBuilder* aBuilder,
nsRenderingContext& aRenderingContext,
gfxContext& aRenderingContext,
const nsRect& aDirtyRect, const nsRect& aPluginRect);
void NotifyPluginReflowObservers();
@ -352,7 +352,7 @@ public:
virtual nsRegion GetOpaqueRegion(nsDisplayListBuilder* aBuilder,
bool* aSnap) override;
virtual void Paint(nsDisplayListBuilder* aBuilder,
nsRenderingContext* aCtx) override;
gfxContext* aCtx) override;
virtual bool ComputeVisibility(nsDisplayListBuilder* aBuilder,
nsRegion* aVisibleRegion) override;

View File

@ -131,7 +131,7 @@ GetIsLineBreakAllowed(nsIFrame* aFrame, bool aIsLineBreakable,
* happens across the boundary of those frames.
*/
static nscoord
CalculateColumnPrefISize(nsRenderingContext* aRenderingContext,
CalculateColumnPrefISize(gfxContext* aRenderingContext,
const RubyColumnEnumerator& aEnumerator,
nsIFrame::InlineIntrinsicISizeData* aBaseISizeData)
{
@ -167,7 +167,7 @@ CalculateColumnPrefISize(nsRenderingContext* aRenderingContext,
// See bug 1134945.
/* virtual */ void
nsRubyBaseContainerFrame::AddInlineMinISize(
nsRenderingContext *aRenderingContext, nsIFrame::InlineMinISizeData *aData)
gfxContext *aRenderingContext, nsIFrame::InlineMinISizeData *aData)
{
AutoRubyTextContainerArray textContainers(this);
@ -222,7 +222,7 @@ nsRubyBaseContainerFrame::AddInlineMinISize(
/* virtual */ void
nsRubyBaseContainerFrame::AddInlinePrefISize(
nsRenderingContext *aRenderingContext, nsIFrame::InlinePrefISizeData *aData)
gfxContext *aRenderingContext, nsIFrame::InlinePrefISizeData *aData)
{
AutoRubyTextContainerArray textContainers(this);
@ -263,7 +263,7 @@ nsRubyBaseContainerFrame::CanContinueTextRun() const
}
/* virtual */ LogicalSize
nsRubyBaseContainerFrame::ComputeSize(nsRenderingContext *aRenderingContext,
nsRubyBaseContainerFrame::ComputeSize(gfxContext *aRenderingContext,
WritingMode aWM,
const LogicalSize& aCBSize,
nscoord aAvailableISize,

View File

@ -28,12 +28,12 @@ public:
// nsIFrame overrides
virtual bool IsFrameOfType(uint32_t aFlags) const override;
virtual bool CanContinueTextRun() const override;
virtual void AddInlineMinISize(nsRenderingContext *aRenderingContext,
virtual void AddInlineMinISize(gfxContext *aRenderingContext,
InlineMinISizeData *aData) override;
virtual void AddInlinePrefISize(nsRenderingContext *aRenderingContext,
virtual void AddInlinePrefISize(gfxContext *aRenderingContext,
InlinePrefISizeData *aData) override;
virtual mozilla::LogicalSize
ComputeSize(nsRenderingContext *aRenderingContext,
ComputeSize(gfxContext *aRenderingContext,
mozilla::WritingMode aWritingMode,
const mozilla::LogicalSize& aCBSize,
nscoord aAvailableISize,

View File

@ -60,7 +60,7 @@ nsRubyFrame::GetFrameName(nsAString& aResult) const
#endif
/* virtual */ void
nsRubyFrame::AddInlineMinISize(nsRenderingContext *aRenderingContext,
nsRubyFrame::AddInlineMinISize(gfxContext *aRenderingContext,
nsIFrame::InlineMinISizeData *aData)
{
for (nsIFrame* frame = this; frame; frame = frame->GetNextInFlow()) {
@ -72,7 +72,7 @@ nsRubyFrame::AddInlineMinISize(nsRenderingContext *aRenderingContext,
}
/* virtual */ void
nsRubyFrame::AddInlinePrefISize(nsRenderingContext *aRenderingContext,
nsRubyFrame::AddInlinePrefISize(gfxContext *aRenderingContext,
nsIFrame::InlinePrefISizeData *aData)
{
for (nsIFrame* frame = this; frame; frame = frame->GetNextInFlow()) {

View File

@ -27,9 +27,9 @@ public:
// nsIFrame overrides
virtual bool IsFrameOfType(uint32_t aFlags) const override;
virtual void AddInlineMinISize(nsRenderingContext *aRenderingContext,
virtual void AddInlineMinISize(gfxContext *aRenderingContext,
InlineMinISizeData *aData) override;
virtual void AddInlinePrefISize(nsRenderingContext *aRenderingContext,
virtual void AddInlinePrefISize(gfxContext *aRenderingContext,
InlinePrefISizeData *aData) override;
virtual void Reflow(nsPresContext* aPresContext,
ReflowOutput& aDesiredSize,

Some files were not shown because too many files have changed in this diff Show More