зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 3d1ce85e6348 (bug 1088760) for bustage, at least on Android at layout/generic/nsPluginFrame.cpp:1612. r=backout
This commit is contained in:
Родитель
64116b92d4
Коммит
f3bf820bfd
|
@ -7,7 +7,6 @@
|
|||
#include "base/basictypes.h"
|
||||
|
||||
#include "gfx2DGlue.h"
|
||||
#include "gfxContext.h"
|
||||
#include "gfxPattern.h"
|
||||
#include "mozilla/gfx/2D.h"
|
||||
#include "mozilla/RefPtr.h"
|
||||
|
@ -20,6 +19,7 @@
|
|||
#include "nsPresContext.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsColor.h"
|
||||
#include "gfxContext.h"
|
||||
#include "nsLayoutUtils.h"
|
||||
#include "nsContentUtils.h"
|
||||
#include "nsCSSValue.h"
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
#ifdef MOZ_X11
|
||||
#include "gfxXlibSurface.h"
|
||||
#endif
|
||||
#include "gfxContext.h"
|
||||
#include "gfxUtils.h"
|
||||
#include "mozilla/gfx/2D.h"
|
||||
#include "Layers.h"
|
||||
|
|
|
@ -60,7 +60,8 @@ public:
|
|||
RefPtr<gfxContext> context = gfxContext::CreateOrNull(aDT, aDeviceOffset);
|
||||
context->SetMatrix(ThebesMatrix(transform));
|
||||
|
||||
mItem->Paint(mBuilder, context);
|
||||
nsRenderingContext ctx(context);
|
||||
mItem->Paint(mBuilder, &ctx);
|
||||
}
|
||||
|
||||
protected:
|
||||
|
|
|
@ -161,7 +161,8 @@ WebRenderDisplayItemLayer::PushItemAsBlobImage(wr::DisplayListBuilder& aBuilder,
|
|||
RefPtr<gfxContext> context = gfxContext::CreateOrNull(dt, offset.ToUnknownPoint());
|
||||
MOZ_ASSERT(context);
|
||||
|
||||
mItem->Paint(mBuilder, context);
|
||||
nsRenderingContext ctx(context);
|
||||
mItem->Paint(mBuilder, &ctx);
|
||||
}
|
||||
|
||||
wr::ByteBuffer bytes;
|
||||
|
|
|
@ -33,6 +33,7 @@ EXPORTS += [
|
|||
'nsRect.h',
|
||||
'nsRegion.h',
|
||||
'nsRegionFwd.h',
|
||||
'nsRenderingContext.h',
|
||||
'nsSize.h',
|
||||
'nsThemeConstants.h',
|
||||
'nsTransform2D.h',
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
#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
|
||||
|
@ -17,6 +16,7 @@
|
|||
#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,
|
||||
gfxContext *aContext)
|
||||
nsRenderingContext *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);
|
||||
gfxTextRun::DrawParams params(aContext->ThebesContext());
|
||||
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,
|
||||
gfxContext *aContext,
|
||||
nsRenderingContext *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);
|
||||
gfxTextRun::DrawParams params(aContext->ThebesContext());
|
||||
params.provider = &provider;
|
||||
textRun->Draw(range, pt, params);
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
gfxContext *aContext);
|
||||
nsRenderingContext *aContext);
|
||||
void DrawString(const char16_t* aString, uint32_t aLength,
|
||||
nscoord aX, nscoord aY,
|
||||
gfxContext *aContext,
|
||||
nsRenderingContext *aContext,
|
||||
DrawTarget* aTextRunConstructionDrawTarget);
|
||||
|
||||
nsBoundingMetrics GetBoundingMetrics(const char16_t *aString,
|
||||
|
|
|
@ -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(gfxContext* aContext,
|
||||
NS_IMETHOD DrawWidgetBackground(nsRenderingContext* aContext,
|
||||
nsIFrame* aFrame,
|
||||
uint8_t aWidgetType,
|
||||
const nsRect& aRect,
|
||||
|
|
|
@ -0,0 +1,41 @@
|
|||
/* -*- 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__
|
|
@ -11,7 +11,6 @@
|
|||
#include "mozilla/GeckoRestyleManager.h"
|
||||
|
||||
#include <algorithm> // For std::max
|
||||
#include "gfxContext.h"
|
||||
#include "mozilla/EffectSet.h"
|
||||
#include "mozilla/EventStates.h"
|
||||
#include "mozilla/ViewportFrame.h"
|
||||
|
@ -32,6 +31,7 @@
|
|||
#include "nsAnimationManager.h"
|
||||
#include "nsTransitionManager.h"
|
||||
#include "nsViewManager.h"
|
||||
#include "nsRenderingContext.h"
|
||||
#include "nsSVGIntegrationUtils.h"
|
||||
#include "nsCSSAnonBoxes.h"
|
||||
#include "nsContainerFrame.h"
|
||||
|
|
|
@ -45,7 +45,6 @@
|
|||
#include "winuser.h"
|
||||
#endif
|
||||
|
||||
#include "gfxContext.h"
|
||||
#include "gfxPrefs.h"
|
||||
#include "gfxUserFontSet.h"
|
||||
#include "nsPresContext.h"
|
||||
|
@ -103,6 +102,7 @@
|
|||
#include "prenv.h"
|
||||
#include "nsDisplayList.h"
|
||||
#include "nsRegion.h"
|
||||
#include "nsRenderingContext.h"
|
||||
#include "nsAutoLayoutPhase.h"
|
||||
#ifdef MOZ_REFLOW_PERF
|
||||
#include "nsFontMetrics.h"
|
||||
|
@ -118,6 +118,7 @@
|
|||
#include "nsNetUtil.h"
|
||||
#include "nsThreadUtils.h"
|
||||
#include "nsStyleSheetService.h"
|
||||
#include "gfxContext.h"
|
||||
#include "gfxUtils.h"
|
||||
#include "nsSMILAnimationController.h"
|
||||
#include "SVGContentUtils.h"
|
||||
|
@ -380,7 +381,7 @@ public:
|
|||
void Add(const char * aName, nsIFrame * aFrame);
|
||||
ReflowCounter * LookUp(const char * aName);
|
||||
|
||||
void PaintCount(const char *aName, gfxContext* aRenderingContext,
|
||||
void PaintCount(const char *aName, nsRenderingContext* aRenderingContext,
|
||||
nsPresContext *aPresContext, nsIFrame *aFrame,
|
||||
const nsPoint &aOffset, uint32_t aColor);
|
||||
|
||||
|
@ -4684,6 +4685,8 @@ 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()) {
|
||||
|
@ -4732,7 +4735,7 @@ PresShell::RenderDocument(const nsRect& aRect, uint32_t aFlags,
|
|||
flags &= ~PaintFrameFlags::PAINT_WIDGET_LAYERS;
|
||||
}
|
||||
|
||||
nsLayoutUtils::PaintFrame(aThebesContext, rootFrame, nsRegion(aRect),
|
||||
nsLayoutUtils::PaintFrame(&rc, rootFrame, nsRegion(aRect),
|
||||
aBackgroundColor,
|
||||
nsDisplayListBuilderMode::PAINTING,
|
||||
flags);
|
||||
|
@ -5072,6 +5075,8 @@ PresShell::PaintRangePaintInfo(const nsTArray<UniquePtr<RangePaintInfo>>& aItems
|
|||
ctx->Clip(path);
|
||||
}
|
||||
|
||||
nsRenderingContext rc(ctx);
|
||||
|
||||
gfxMatrix initialTM = ctx->CurrentMatrix();
|
||||
|
||||
if (resize)
|
||||
|
@ -5106,7 +5111,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, ctx,
|
||||
rangeInfo->mList.PaintRoot(&rangeInfo->mBuilder, &rc,
|
||||
nsDisplayList::PAINT_DEFAULT);
|
||||
aArea.MoveBy(rangeInfo->mRootOffset.x, rangeInfo->mRootOffset.y);
|
||||
}
|
||||
|
@ -9238,7 +9243,7 @@ PresShell::DoReflow(nsIFrame* target, bool aInterruptible)
|
|||
nsIFrame* rootFrame = mFrameConstructor->GetRootFrame();
|
||||
|
||||
// CreateReferenceRenderingContext can return nullptr
|
||||
RefPtr<gfxContext> rcx(CreateReferenceRenderingContext());
|
||||
nsRenderingContext rcx(CreateReferenceRenderingContext());
|
||||
|
||||
#ifdef DEBUG
|
||||
mCurrentReflowRoot = target;
|
||||
|
@ -9261,7 +9266,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);
|
||||
|
||||
|
@ -9342,7 +9347,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);
|
||||
|
@ -10260,7 +10265,7 @@ PresShell::CountReflows(const char * aName, nsIFrame * aFrame)
|
|||
//-------------------------------------------------------------
|
||||
void
|
||||
PresShell::PaintCount(const char * aName,
|
||||
gfxContext* aRenderingContext,
|
||||
nsRenderingContext* aRenderingContext,
|
||||
nsPresContext* aPresContext,
|
||||
nsIFrame * aFrame,
|
||||
const nsPoint& aOffset,
|
||||
|
@ -10453,7 +10458,7 @@ void ReflowCountMgr::Add(const char * aName, nsIFrame * aFrame)
|
|||
|
||||
//------------------------------------------------------------------
|
||||
void ReflowCountMgr::PaintCount(const char* aName,
|
||||
gfxContext* aRenderingContext,
|
||||
nsRenderingContext* aRenderingContext,
|
||||
nsPresContext* aPresContext,
|
||||
nsIFrame* aFrame,
|
||||
const nsPoint& aOffset,
|
||||
|
@ -10470,11 +10475,11 @@ void ReflowCountMgr::PaintCount(const char* aName,
|
|||
DrawTarget* drawTarget = aRenderingContext->GetDrawTarget();
|
||||
int32_t appUnitsPerDevPixel = aPresContext->AppUnitsPerDevPixel();
|
||||
|
||||
aRenderingContext->Save();
|
||||
aRenderingContext->ThebesContext()->Save();
|
||||
gfxPoint devPixelOffset =
|
||||
nsLayoutUtils::PointToGfxPoint(aOffset, appUnitsPerDevPixel);
|
||||
aRenderingContext->SetMatrix(
|
||||
aRenderingContext->CurrentMatrix().Translate(devPixelOffset));
|
||||
aRenderingContext->ThebesContext()->SetMatrix(
|
||||
aRenderingContext->ThebesContext()->CurrentMatrix().Translate(devPixelOffset));
|
||||
|
||||
// We don't care about the document language or user fonts here;
|
||||
// just get a default Latin font.
|
||||
|
@ -10517,12 +10522,12 @@ void ReflowCountMgr::PaintCount(const char* aName,
|
|||
ColorPattern black(ToDeviceColor(Color(0.f, 0.f, 0.f, 1.f)));
|
||||
drawTarget->FillRect(devPxRect, black);
|
||||
|
||||
aRenderingContext->SetColor(color2);
|
||||
aRenderingContext->ThebesContext()->SetColor(color2);
|
||||
fm->DrawString(buf, len, x+15, y+15, aRenderingContext);
|
||||
aRenderingContext->SetColor(color);
|
||||
aRenderingContext->ThebesContext()->SetColor(color);
|
||||
fm->DrawString(buf, len, x, y, aRenderingContext);
|
||||
|
||||
aRenderingContext->Restore();
|
||||
aRenderingContext->ThebesContext()->Restore();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -11187,8 +11192,8 @@ nsIPresShell::SyncWindowProperties(nsView* aView)
|
|||
nsIFrame* frame = aView->GetFrame();
|
||||
if (frame && mPresContext) {
|
||||
// CreateReferenceRenderingContext can return nullptr
|
||||
RefPtr<gfxContext> rcx(CreateReferenceRenderingContext());
|
||||
nsContainerFrame::SyncWindowProperties(mPresContext, frame, aView, rcx, 0);
|
||||
nsRenderingContext rcx(CreateReferenceRenderingContext());
|
||||
nsContainerFrame::SyncWindowProperties(mPresContext, frame, aView, &rcx, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -318,7 +318,7 @@ public:
|
|||
virtual void DumpReflows() override;
|
||||
virtual void CountReflows(const char * aName, nsIFrame * aFrame) override;
|
||||
virtual void PaintCount(const char * aName,
|
||||
gfxContext* aRenderingContext,
|
||||
nsRenderingContext* aRenderingContext,
|
||||
nsPresContext* aPresContext,
|
||||
nsIFrame * aFrame,
|
||||
const nsPoint& aOffset,
|
||||
|
|
|
@ -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.
|
||||
RefPtr<gfxContext> rc =
|
||||
aFrame->PresContext()->PresShell()->CreateReferenceRenderingContext();
|
||||
nsRenderingContext 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() =
|
||||
|
|
|
@ -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(gfxContext* aCtx,
|
||||
nsIRenderingContextBidiProcessor(nsRenderingContext* aCtx,
|
||||
DrawTarget* aTextRunConstructionDrawTarget,
|
||||
nsFontMetrics* aFontMetrics,
|
||||
const nsPoint& aPt)
|
||||
|
@ -2344,7 +2344,7 @@ public:
|
|||
}
|
||||
|
||||
private:
|
||||
gfxContext* mCtx;
|
||||
nsRenderingContext* 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,
|
||||
gfxContext& aRenderingContext,
|
||||
nsRenderingContext& aRenderingContext,
|
||||
DrawTarget* aTextRunConstructionDrawTarget,
|
||||
nsFontMetrics& aFontMetrics,
|
||||
Mode aMode,
|
||||
|
|
|
@ -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,
|
||||
gfxContext& aRenderingContext,
|
||||
nsRenderingContext& aRenderingContext,
|
||||
DrawTarget* aTextRunConstructionDrawTarget,
|
||||
nsFontMetrics& aFontMetrics,
|
||||
nscoord aX,
|
||||
|
@ -231,7 +231,7 @@ public:
|
|||
int32_t aLength,
|
||||
nsBidiLevel aBaseLevel,
|
||||
nsPresContext* aPresContext,
|
||||
gfxContext& aRenderingContext,
|
||||
nsRenderingContext& aRenderingContext,
|
||||
nsFontMetrics& aFontMetrics)
|
||||
{
|
||||
nscoord length;
|
||||
|
@ -379,7 +379,7 @@ private:
|
|||
int32_t aLength,
|
||||
nsBidiLevel aBaseLevel,
|
||||
nsPresContext* aPresContext,
|
||||
gfxContext& aRenderingContext,
|
||||
nsRenderingContext& aRenderingContext,
|
||||
DrawTarget* aTextRunConstructionDrawTarget,
|
||||
nsFontMetrics& aFontMetrics,
|
||||
Mode aMode,
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
|
||||
/* container for a document and its presentation */
|
||||
|
||||
#include "gfxContext.h"
|
||||
#include "mozilla/ServoRestyleManager.h"
|
||||
#include "mozilla/ServoStyleSet.h"
|
||||
#include "nsAutoPtr.h"
|
||||
|
@ -83,6 +82,7 @@
|
|||
|
||||
#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;
|
||||
{
|
||||
RefPtr<gfxContext> rcx(presShell->CreateReferenceRenderingContext());
|
||||
prefWidth = root->GetPrefISize(rcx);
|
||||
nsRenderingContext rcx(presShell->CreateReferenceRenderingContext());
|
||||
prefWidth = root->GetPrefISize(&rcx);
|
||||
}
|
||||
if (prefWidth > aMaxWidth) {
|
||||
prefWidth = aMaxWidth;
|
||||
|
|
|
@ -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,6 +77,7 @@ template<class E> class nsCOMArray;
|
|||
class AutoWeakFrame;
|
||||
class WeakFrame;
|
||||
class nsIScrollableFrame;
|
||||
class gfxContext;
|
||||
class nsIDOMEvent;
|
||||
class nsDisplayList;
|
||||
class nsDisplayListBuilder;
|
||||
|
@ -1020,7 +1021,7 @@ public:
|
|||
virtual void DumpReflows() = 0;
|
||||
virtual void CountReflows(const char * aName, nsIFrame * aFrame) = 0;
|
||||
virtual void PaintCount(const char * aName,
|
||||
gfxContext* aRenderingContext,
|
||||
nsRenderingContext* aRenderingContext,
|
||||
nsPresContext * aPresContext,
|
||||
nsIFrame * aFrame,
|
||||
const nsPoint& aOffset,
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
#include "ImageRegion.h"
|
||||
#include "gfxRect.h"
|
||||
#include "gfxContext.h"
|
||||
#include "gfxContext.h"
|
||||
#include "nsRenderingContext.h"
|
||||
#include "nsIInterfaceRequestorUtils.h"
|
||||
#include "nsCSSRendering.h"
|
||||
#include "nsTextFragment.h"
|
||||
|
@ -3420,7 +3420,7 @@ nsLayoutUtils::ExpireDisplayPortOnAsyncScrollableAncestor(nsIFrame* aFrame)
|
|||
}
|
||||
|
||||
nsresult
|
||||
nsLayoutUtils::PaintFrame(gfxContext* aRenderingContext, nsIFrame* aFrame,
|
||||
nsLayoutUtils::PaintFrame(nsRenderingContext* aRenderingContext, nsIFrame* aFrame,
|
||||
const nsRegion& aDirtyRegion, nscolor aBackstop,
|
||||
nsDisplayListBuilderMode aBuilderMode,
|
||||
PaintFrameFlags aFlags)
|
||||
|
@ -3518,8 +3518,8 @@ nsLayoutUtils::PaintFrame(gfxContext* aRenderingContext, nsIFrame* aFrame,
|
|||
gfxPoint devPixelOffset =
|
||||
nsLayoutUtils::PointToGfxPoint(pos,
|
||||
presContext->AppUnitsPerDevPixel());
|
||||
aRenderingContext->SetMatrix(
|
||||
aRenderingContext->CurrentMatrix().Translate(devPixelOffset));
|
||||
aRenderingContext->ThebesContext()->SetMatrix(
|
||||
aRenderingContext->ThebesContext()->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,
|
||||
gfxContext* aRenderingContext,
|
||||
nsRenderingContext* aRenderingContext,
|
||||
nsIFrame* aFrame,
|
||||
eWidthProperty aProperty,
|
||||
nscoord& aResult)
|
||||
|
@ -4965,7 +4965,7 @@ FormControlShrinksForPercentISize(nsIFrame* aFrame)
|
|||
* @param aContainerWM the container's WM
|
||||
*/
|
||||
static nscoord
|
||||
AddIntrinsicSizeOffset(gfxContext* aRenderingContext,
|
||||
AddIntrinsicSizeOffset(nsRenderingContext* 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,
|
||||
gfxContext* aRenderingContext,
|
||||
nsRenderingContext* aRenderingContext,
|
||||
nsIFrame* aFrame,
|
||||
IntrinsicISizeType aType,
|
||||
const Maybe<LogicalSize>& aPercentageBasis,
|
||||
|
@ -5364,7 +5364,7 @@ nsLayoutUtils::IntrinsicForAxis(PhysicalAxis aAxis,
|
|||
}
|
||||
|
||||
/* static */ nscoord
|
||||
nsLayoutUtils::IntrinsicForContainer(gfxContext* aRenderingContext,
|
||||
nsLayoutUtils::IntrinsicForContainer(nsRenderingContext* aRenderingContext,
|
||||
nsIFrame* aFrame,
|
||||
IntrinsicISizeType aType,
|
||||
uint32_t aFlags)
|
||||
|
@ -5378,7 +5378,7 @@ nsLayoutUtils::IntrinsicForContainer(gfxContext* aRenderingContext,
|
|||
|
||||
/* static */ nscoord
|
||||
nsLayoutUtils::MinSizeContributionForAxis(PhysicalAxis aAxis,
|
||||
gfxContext* aRC,
|
||||
nsRenderingContext* aRC,
|
||||
nsIFrame* aFrame,
|
||||
IntrinsicISizeType aType,
|
||||
uint32_t aFlags)
|
||||
|
@ -5674,7 +5674,7 @@ nsLayoutUtils::ComputeAutoSizeWithIntrinsicDimensions(nscoord minWidth, nscoord
|
|||
|
||||
/* static */ nscoord
|
||||
nsLayoutUtils::MinISizeFromInline(nsIFrame* aFrame,
|
||||
gfxContext* aRenderingContext)
|
||||
nsRenderingContext* 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,
|
||||
gfxContext* aRenderingContext)
|
||||
nsRenderingContext* 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,
|
||||
gfxContext& aContext)
|
||||
nsRenderingContext& 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,
|
||||
gfxContext* aContext,
|
||||
nsRenderingContext* 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,
|
||||
gfxContext& aContext)
|
||||
nsRenderingContext& 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,
|
||||
gfxContext* aContext,
|
||||
nsRenderingContext* 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;
|
||||
gfxContext* aDestCtx = aContext->ThebesContext();
|
||||
for (uint32_t i = textStyle->mTextShadow->Length(); i > 0; --i) {
|
||||
nsCSSShadowItem* shadowDetails = textStyle->mTextShadow->ShadowAt(i - 1);
|
||||
nsPoint shadowOffset(shadowDetails->mXOffset,
|
||||
|
@ -6009,12 +6009,16 @@ 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(shadowContext, shadowOffset, shadowColor, aCallbackData);
|
||||
aCallback(&renderingContext, shadowOffset, shadowColor, aCallbackData);
|
||||
|
||||
contextBoxBlur.DoPaint();
|
||||
aDestCtx->Restore();
|
||||
|
|
|
@ -35,7 +35,6 @@
|
|||
#include <limits>
|
||||
#include <algorithm>
|
||||
|
||||
class gfxContext;
|
||||
class nsPresContext;
|
||||
class nsIContent;
|
||||
class nsIAtom;
|
||||
|
@ -55,6 +54,7 @@ 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(gfxContext* aRenderingContext, nsIFrame* aFrame,
|
||||
static nsresult PaintFrame(nsRenderingContext* 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,
|
||||
gfxContext* aRenderingContext,
|
||||
nsRenderingContext* 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(gfxContext* aRenderingContext,
|
||||
static nscoord IntrinsicForContainer(nsRenderingContext* 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,
|
||||
gfxContext* aRC,
|
||||
nsRenderingContext* 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,
|
||||
gfxContext* aRenderingContext);
|
||||
nsRenderingContext* aRenderingContext);
|
||||
|
||||
// Implement nsIFrame::GetMinISize in terms of nsIFrame::AddInlineMinISize
|
||||
static nscoord MinISizeFromInline(nsIFrame* aFrame,
|
||||
gfxContext* aRenderingContext);
|
||||
nsRenderingContext* 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,
|
||||
gfxContext& aContext) {
|
||||
nsRenderingContext& aContext) {
|
||||
return nsLayoutUtils::AppUnitWidthOfStringBidi(aString.get(),
|
||||
aString.Length(), aFrame,
|
||||
aFontMetrics, aContext);
|
||||
|
@ -1593,7 +1593,7 @@ public:
|
|||
uint32_t aLength,
|
||||
const nsIFrame* aFrame,
|
||||
nsFontMetrics& aFontMetrics,
|
||||
gfxContext& aContext);
|
||||
nsRenderingContext& aContext);
|
||||
|
||||
static bool StringWidthIsGreaterThan(const nsString& aString,
|
||||
nsFontMetrics& aFontMetrics,
|
||||
|
@ -1607,7 +1607,7 @@ public:
|
|||
|
||||
static void DrawString(const nsIFrame* aFrame,
|
||||
nsFontMetrics& aFontMetrics,
|
||||
gfxContext* aContext,
|
||||
nsRenderingContext* aContext,
|
||||
const char16_t* aString,
|
||||
int32_t aLength,
|
||||
nsPoint aPoint,
|
||||
|
@ -1625,19 +1625,19 @@ public:
|
|||
uint32_t aLength,
|
||||
nsPoint aPoint,
|
||||
nsFontMetrics& aFontMetrics,
|
||||
gfxContext& aContext);
|
||||
nsRenderingContext& 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)(gfxContext* aCtx,
|
||||
typedef void (* TextShadowCallback)(nsRenderingContext* aCtx,
|
||||
nsPoint aShadowOffset,
|
||||
const nscolor& aShadowColor,
|
||||
void* aData);
|
||||
|
||||
static void PaintTextShadow(const nsIFrame* aFrame,
|
||||
gfxContext* aContext,
|
||||
nsRenderingContext* aContext,
|
||||
const nsRect& aTextRect,
|
||||
const nsRect& aDirtyRect,
|
||||
const nscolor& aForegroundColor,
|
||||
|
|
|
@ -88,7 +88,7 @@ public:
|
|||
#endif
|
||||
|
||||
virtual void Paint(nsDisplayListBuilder* aBuilder,
|
||||
gfxContext* aCtx) override;
|
||||
nsRenderingContext* 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,
|
||||
gfxContext* aCtx) {
|
||||
nsRenderingContext* 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,
|
||||
gfxContext* aCtx) override;
|
||||
nsRenderingContext* 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,
|
||||
gfxContext* aCtx)
|
||||
nsRenderingContext* 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,
|
||||
gfxContext* aCtx) override;
|
||||
nsRenderingContext* aCtx) override;
|
||||
virtual LayerState GetLayerState(nsDisplayListBuilder* aBuilder,
|
||||
LayerManager* aManager,
|
||||
const ContainerLayerParameters& aParameters) override;
|
||||
|
@ -323,7 +323,7 @@ nsDisplayButtonForeground::ComputeInvalidationRegion(
|
|||
}
|
||||
|
||||
void nsDisplayButtonForeground::Paint(nsDisplayListBuilder* aBuilder,
|
||||
gfxContext* aCtx)
|
||||
nsRenderingContext* aCtx)
|
||||
{
|
||||
nsPresContext *presContext = mFrame->PresContext();
|
||||
const nsStyleDisplay *disp = mFrame->StyleDisplay();
|
||||
|
@ -427,7 +427,7 @@ DrawResult
|
|||
nsButtonFrameRenderer::PaintInnerFocusBorder(
|
||||
nsDisplayListBuilder* aBuilder,
|
||||
nsPresContext* aPresContext,
|
||||
gfxContext& aRenderingContext,
|
||||
nsRenderingContext& aRenderingContext,
|
||||
const nsRect& aDirtyRect,
|
||||
const nsRect& aRect)
|
||||
{
|
||||
|
@ -457,7 +457,7 @@ Maybe<nsCSSBorderRenderer>
|
|||
nsButtonFrameRenderer::CreateInnerFocusBorderRenderer(
|
||||
nsDisplayListBuilder* aBuilder,
|
||||
nsPresContext* aPresContext,
|
||||
gfxContext* aRenderingContext,
|
||||
nsRenderingContext* aRenderingContext,
|
||||
const nsRect& aDirtyRect,
|
||||
const nsRect& aRect)
|
||||
{
|
||||
|
@ -481,7 +481,7 @@ DrawResult
|
|||
nsButtonFrameRenderer::PaintBorder(
|
||||
nsDisplayListBuilder* aBuilder,
|
||||
nsPresContext* aPresContext,
|
||||
gfxContext& aRenderingContext,
|
||||
nsRenderingContext& aRenderingContext,
|
||||
const nsRect& aDirtyRect,
|
||||
const nsRect& aRect)
|
||||
{
|
||||
|
|
|
@ -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,
|
||||
gfxContext& aRenderingContext,
|
||||
nsRenderingContext& aRenderingContext,
|
||||
const nsRect& aDirtyRect,
|
||||
const nsRect& aRect);
|
||||
|
||||
mozilla::Maybe<nsCSSBorderRenderer> CreateInnerFocusBorderRenderer(nsDisplayListBuilder* aBuilder,
|
||||
nsPresContext* aPresContext,
|
||||
gfxContext* aRenderingContext,
|
||||
nsRenderingContext* aRenderingContext,
|
||||
const nsRect& aDirtyRect,
|
||||
const nsRect& aRect);
|
||||
|
||||
DrawResult PaintBorder(nsDisplayListBuilder* aBuilder,
|
||||
nsPresContext* aPresContext,
|
||||
gfxContext& aRenderingContext,
|
||||
nsRenderingContext& aRenderingContext,
|
||||
const nsRect& aDirtyRect,
|
||||
const nsRect& aRect);
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
|
||||
#include "nsComboboxControlFrame.h"
|
||||
|
||||
#include "gfxContext.h"
|
||||
#include "gfxUtils.h"
|
||||
#include "mozilla/gfx/2D.h"
|
||||
#include "mozilla/gfx/PathHelpers.h"
|
||||
|
@ -39,6 +38,7 @@
|
|||
#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(gfxContext* aRenderingContext,
|
||||
nsComboboxControlFrame::GetIntrinsicISize(nsRenderingContext* aRenderingContext,
|
||||
nsLayoutUtils::IntrinsicISizeType aType)
|
||||
{
|
||||
// get the scrollbar width, we'll use this later
|
||||
|
@ -791,7 +791,7 @@ nsComboboxControlFrame::GetIntrinsicISize(gfxContext* aRenderingContext,
|
|||
}
|
||||
|
||||
nscoord
|
||||
nsComboboxControlFrame::GetMinISize(gfxContext *aRenderingContext)
|
||||
nsComboboxControlFrame::GetMinISize(nsRenderingContext *aRenderingContext)
|
||||
{
|
||||
nscoord minISize;
|
||||
DISPLAY_MIN_WIDTH(this, minISize);
|
||||
|
@ -800,7 +800,7 @@ nsComboboxControlFrame::GetMinISize(gfxContext *aRenderingContext)
|
|||
}
|
||||
|
||||
nscoord
|
||||
nsComboboxControlFrame::GetPrefISize(gfxContext *aRenderingContext)
|
||||
nsComboboxControlFrame::GetPrefISize(nsRenderingContext *aRenderingContext)
|
||||
{
|
||||
nscoord prefISize;
|
||||
DISPLAY_PREF_WIDTH(this, prefISize);
|
||||
|
@ -1539,12 +1539,12 @@ public:
|
|||
#endif
|
||||
|
||||
virtual void Paint(nsDisplayListBuilder* aBuilder,
|
||||
gfxContext* aCtx) override;
|
||||
nsRenderingContext* aCtx) override;
|
||||
NS_DISPLAY_DECL_NAME("ComboboxFocus", TYPE_COMBOBOX_FOCUS)
|
||||
};
|
||||
|
||||
void nsDisplayComboboxFocus::Paint(nsDisplayListBuilder* aBuilder,
|
||||
gfxContext* aCtx)
|
||||
nsRenderingContext* aCtx)
|
||||
{
|
||||
static_cast<nsComboboxControlFrame*>(mFrame)
|
||||
->PaintFocus(*aCtx->GetDrawTarget(), ToReferenceFrame());
|
||||
|
|
|
@ -77,9 +77,9 @@ public:
|
|||
virtual mozilla::a11y::AccType AccessibleType() override;
|
||||
#endif
|
||||
|
||||
virtual nscoord GetMinISize(gfxContext *aRenderingContext) override;
|
||||
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) override;
|
||||
|
||||
virtual nscoord GetPrefISize(gfxContext *aRenderingContext) override;
|
||||
virtual nscoord GetPrefISize(nsRenderingContext *aRenderingContext) override;
|
||||
|
||||
virtual void Reflow(nsPresContext* aCX,
|
||||
ReflowOutput& aDesiredSize,
|
||||
|
@ -249,7 +249,7 @@ protected:
|
|||
DropDownPositionState AbsolutelyPositionDropDown();
|
||||
|
||||
// Helper for GetMinISize/GetPrefISize
|
||||
nscoord GetIntrinsicISize(gfxContext* aRenderingContext,
|
||||
nscoord GetIntrinsicISize(nsRenderingContext* aRenderingContext,
|
||||
nsLayoutUtils::IntrinsicISizeType aType);
|
||||
|
||||
class RedisplayTextEvent : public mozilla::Runnable {
|
||||
|
|
|
@ -126,7 +126,7 @@ nsDateTimeControlFrame::HandleBlurEvent()
|
|||
}
|
||||
|
||||
nscoord
|
||||
nsDateTimeControlFrame::GetMinISize(gfxContext* aRenderingContext)
|
||||
nsDateTimeControlFrame::GetMinISize(nsRenderingContext* aRenderingContext)
|
||||
{
|
||||
nscoord result;
|
||||
DISPLAY_MIN_WIDTH(this, result);
|
||||
|
@ -144,7 +144,7 @@ nsDateTimeControlFrame::GetMinISize(gfxContext* aRenderingContext)
|
|||
}
|
||||
|
||||
nscoord
|
||||
nsDateTimeControlFrame::GetPrefISize(gfxContext* aRenderingContext)
|
||||
nsDateTimeControlFrame::GetPrefISize(nsRenderingContext* aRenderingContext)
|
||||
{
|
||||
nscoord result;
|
||||
DISPLAY_PREF_WIDTH(this, result);
|
||||
|
|
|
@ -56,9 +56,9 @@ public:
|
|||
}
|
||||
|
||||
// Reflow
|
||||
nscoord GetMinISize(gfxContext* aRenderingContext) override;
|
||||
nscoord GetMinISize(nsRenderingContext* aRenderingContext) override;
|
||||
|
||||
nscoord GetPrefISize(gfxContext* aRenderingContext) override;
|
||||
nscoord GetPrefISize(nsRenderingContext* aRenderingContext) override;
|
||||
|
||||
void Reflow(nsPresContext* aPresContext,
|
||||
ReflowOutput& aDesiredSize,
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
#include "nsFieldSetFrame.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include "gfxContext.h"
|
||||
#include "mozilla/gfx/2D.h"
|
||||
#include "mozilla/Likely.h"
|
||||
#include "mozilla/Maybe.h"
|
||||
|
@ -17,6 +16,7 @@
|
|||
#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,
|
||||
gfxContext* aCtx) override;
|
||||
nsRenderingContext* 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,
|
||||
gfxContext* aCtx)
|
||||
nsRenderingContext* 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,
|
||||
gfxContext& aRenderingContext,
|
||||
nsRenderingContext& aRenderingContext,
|
||||
nsPoint aPt,
|
||||
const nsRect& aDirtyRect)
|
||||
{
|
||||
|
@ -255,12 +255,14 @@ nsFieldSetFrame::PaintBorder(
|
|||
false);
|
||||
RefPtr<Path> clipPath = pathBuilder->Finish();
|
||||
|
||||
aRenderingContext.Save();
|
||||
aRenderingContext.Clip(clipPath);
|
||||
gfxContext* gfx = aRenderingContext.ThebesContext();
|
||||
|
||||
gfx->Save();
|
||||
gfx->Clip(clipPath);
|
||||
result &=
|
||||
nsCSSRendering::PaintBorder(presContext, aRenderingContext, this,
|
||||
aDirtyRect, rect, mStyleContext, borderFlags);
|
||||
aRenderingContext.Restore();
|
||||
gfx->Restore();
|
||||
} else {
|
||||
result &=
|
||||
nsCSSRendering::PaintBorder(presContext, aRenderingContext, this,
|
||||
|
@ -272,7 +274,7 @@ nsFieldSetFrame::PaintBorder(
|
|||
}
|
||||
|
||||
nscoord
|
||||
nsFieldSetFrame::GetIntrinsicISize(gfxContext* aRenderingContext,
|
||||
nsFieldSetFrame::GetIntrinsicISize(nsRenderingContext* aRenderingContext,
|
||||
nsLayoutUtils::IntrinsicISizeType aType)
|
||||
{
|
||||
nscoord legendWidth = 0;
|
||||
|
@ -296,7 +298,7 @@ nsFieldSetFrame::GetIntrinsicISize(gfxContext* aRenderingContext,
|
|||
|
||||
|
||||
nscoord
|
||||
nsFieldSetFrame::GetMinISize(gfxContext* aRenderingContext)
|
||||
nsFieldSetFrame::GetMinISize(nsRenderingContext* aRenderingContext)
|
||||
{
|
||||
nscoord result = 0;
|
||||
DISPLAY_MIN_WIDTH(this, result);
|
||||
|
@ -306,7 +308,7 @@ nsFieldSetFrame::GetMinISize(gfxContext* aRenderingContext)
|
|||
}
|
||||
|
||||
nscoord
|
||||
nsFieldSetFrame::GetPrefISize(gfxContext* aRenderingContext)
|
||||
nsFieldSetFrame::GetPrefISize(nsRenderingContext* aRenderingContext)
|
||||
{
|
||||
nscoord result = 0;
|
||||
DISPLAY_PREF_WIDTH(this, result);
|
||||
|
|
|
@ -20,10 +20,10 @@ public:
|
|||
explicit nsFieldSetFrame(nsStyleContext* aContext);
|
||||
|
||||
nscoord
|
||||
GetIntrinsicISize(gfxContext* aRenderingContext,
|
||||
GetIntrinsicISize(nsRenderingContext* aRenderingContext,
|
||||
nsLayoutUtils::IntrinsicISizeType);
|
||||
virtual nscoord GetMinISize(gfxContext* aRenderingContext) override;
|
||||
virtual nscoord GetPrefISize(gfxContext* aRenderingContext) override;
|
||||
virtual nscoord GetMinISize(nsRenderingContext* aRenderingContext) override;
|
||||
virtual nscoord GetPrefISize(nsRenderingContext* 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,
|
||||
gfxContext& aRenderingContext,
|
||||
nsRenderingContext& aRenderingContext,
|
||||
nsPoint aPt, const nsRect& aDirtyRect);
|
||||
|
||||
#ifdef DEBUG
|
||||
|
|
|
@ -422,7 +422,7 @@ nsFileControlFrame::DnDListener::CanDropTheseFiles(nsIDOMDataTransfer* aDOMDataT
|
|||
}
|
||||
|
||||
nscoord
|
||||
nsFileControlFrame::GetMinISize(gfxContext *aRenderingContext)
|
||||
nsFileControlFrame::GetMinISize(nsRenderingContext *aRenderingContext)
|
||||
{
|
||||
nscoord result;
|
||||
DISPLAY_MIN_WIDTH(this, result);
|
||||
|
|
|
@ -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(gfxContext *aRenderingContext) override;
|
||||
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) override;
|
||||
|
||||
virtual void DestroyFrom(nsIFrame* aDestructRoot) override;
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ NS_QUERYFRAME_HEAD(nsFormControlFrame)
|
|||
NS_QUERYFRAME_TAIL_INHERITING(nsAtomicContainerFrame)
|
||||
|
||||
/* virtual */ nscoord
|
||||
nsFormControlFrame::GetMinISize(gfxContext *aRenderingContext)
|
||||
nsFormControlFrame::GetMinISize(nsRenderingContext *aRenderingContext)
|
||||
{
|
||||
nscoord result;
|
||||
DISPLAY_MIN_WIDTH(this, result);
|
||||
|
@ -53,7 +53,7 @@ nsFormControlFrame::GetMinISize(gfxContext *aRenderingContext)
|
|||
}
|
||||
|
||||
/* virtual */ nscoord
|
||||
nsFormControlFrame::GetPrefISize(gfxContext *aRenderingContext)
|
||||
nsFormControlFrame::GetPrefISize(nsRenderingContext *aRenderingContext)
|
||||
{
|
||||
nscoord result;
|
||||
DISPLAY_PREF_WIDTH(this, result);
|
||||
|
@ -67,7 +67,7 @@ nsFormControlFrame::GetPrefISize(gfxContext *aRenderingContext)
|
|||
|
||||
/* virtual */
|
||||
LogicalSize
|
||||
nsFormControlFrame::ComputeAutoSize(gfxContext* aRC,
|
||||
nsFormControlFrame::ComputeAutoSize(nsRenderingContext* aRC,
|
||||
WritingMode aWM,
|
||||
const LogicalSize& aCBSize,
|
||||
nscoord aAvailableISize,
|
||||
|
|
|
@ -48,14 +48,14 @@ public:
|
|||
* Both GetMinISize and GetPrefISize will return whatever GetIntrinsicISize
|
||||
* returns.
|
||||
*/
|
||||
virtual nscoord GetMinISize(gfxContext *aRenderingContext) override;
|
||||
virtual nscoord GetPrefISize(gfxContext *aRenderingContext) override;
|
||||
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) override;
|
||||
virtual nscoord GetPrefISize(nsRenderingContext *aRenderingContext) override;
|
||||
|
||||
/**
|
||||
* Our auto size is just intrinsic width and intrinsic height.
|
||||
*/
|
||||
virtual mozilla::LogicalSize
|
||||
ComputeAutoSize(gfxContext* aRenderingContext,
|
||||
ComputeAutoSize(nsRenderingContext* aRenderingContext,
|
||||
mozilla::WritingMode aWM,
|
||||
const mozilla::LogicalSize& aCBSize,
|
||||
nscoord aAvailableISize,
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -142,7 +142,7 @@ nsHTMLButtonControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
}
|
||||
|
||||
nscoord
|
||||
nsHTMLButtonControlFrame::GetMinISize(gfxContext* aRenderingContext)
|
||||
nsHTMLButtonControlFrame::GetMinISize(nsRenderingContext* aRenderingContext)
|
||||
{
|
||||
nscoord result;
|
||||
DISPLAY_MIN_WIDTH(this, result);
|
||||
|
@ -156,7 +156,7 @@ nsHTMLButtonControlFrame::GetMinISize(gfxContext* aRenderingContext)
|
|||
}
|
||||
|
||||
nscoord
|
||||
nsHTMLButtonControlFrame::GetPrefISize(gfxContext* aRenderingContext)
|
||||
nsHTMLButtonControlFrame::GetPrefISize(nsRenderingContext* aRenderingContext)
|
||||
{
|
||||
nscoord result;
|
||||
DISPLAY_PREF_WIDTH(this, result);
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#include "nsIFormControlFrame.h"
|
||||
#include "nsButtonFrameRenderer.h"
|
||||
|
||||
class gfxContext;
|
||||
class nsRenderingContext;
|
||||
class nsPresContext;
|
||||
|
||||
class nsHTMLButtonControlFrame : public nsContainerFrame,
|
||||
|
@ -33,9 +33,9 @@ public:
|
|||
const nsRect& aDirtyRect,
|
||||
const nsDisplayListSet& aLists) override;
|
||||
|
||||
virtual nscoord GetMinISize(gfxContext *aRenderingContext) override;
|
||||
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) override;
|
||||
|
||||
virtual nscoord GetPrefISize(gfxContext *aRenderingContext) override;
|
||||
virtual nscoord GetPrefISize(nsRenderingContext *aRenderingContext) override;
|
||||
|
||||
virtual void Reflow(nsPresContext* aPresContext,
|
||||
ReflowOutput& aDesiredSize,
|
||||
|
|
|
@ -323,7 +323,7 @@ nsListControlFrame::CalcBSizeOfARow()
|
|||
}
|
||||
|
||||
nscoord
|
||||
nsListControlFrame::GetPrefISize(gfxContext *aRenderingContext)
|
||||
nsListControlFrame::GetPrefISize(nsRenderingContext *aRenderingContext)
|
||||
{
|
||||
nscoord result;
|
||||
DISPLAY_PREF_WIDTH(this, result);
|
||||
|
@ -341,7 +341,7 @@ nsListControlFrame::GetPrefISize(gfxContext *aRenderingContext)
|
|||
}
|
||||
|
||||
nscoord
|
||||
nsListControlFrame::GetMinISize(gfxContext *aRenderingContext)
|
||||
nsListControlFrame::GetMinISize(nsRenderingContext *aRenderingContext)
|
||||
{
|
||||
nscoord result;
|
||||
DISPLAY_MIN_WIDTH(this, result);
|
||||
|
|
|
@ -65,8 +65,8 @@ public:
|
|||
virtual void SetInitialChildList(ChildListID aListID,
|
||||
nsFrameList& aChildList) override;
|
||||
|
||||
virtual nscoord GetPrefISize(gfxContext *aRenderingContext) override;
|
||||
virtual nscoord GetMinISize(gfxContext *aRenderingContext) override;
|
||||
virtual nscoord GetPrefISize(nsRenderingContext *aRenderingContext) override;
|
||||
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) override;
|
||||
|
||||
virtual void Reflow(nsPresContext* aCX,
|
||||
ReflowOutput& aDesiredSize,
|
||||
|
|
|
@ -210,7 +210,7 @@ nsMeterFrame::AttributeChanged(int32_t aNameSpaceID,
|
|||
}
|
||||
|
||||
LogicalSize
|
||||
nsMeterFrame::ComputeAutoSize(gfxContext* aRenderingContext,
|
||||
nsMeterFrame::ComputeAutoSize(nsRenderingContext* aRenderingContext,
|
||||
WritingMode aWM,
|
||||
const LogicalSize& aCBSize,
|
||||
nscoord aAvailableISize,
|
||||
|
@ -236,7 +236,7 @@ nsMeterFrame::ComputeAutoSize(gfxContext* aRenderingContext,
|
|||
}
|
||||
|
||||
nscoord
|
||||
nsMeterFrame::GetMinISize(gfxContext *aRenderingContext)
|
||||
nsMeterFrame::GetMinISize(nsRenderingContext *aRenderingContext)
|
||||
{
|
||||
RefPtr<nsFontMetrics> fontMet =
|
||||
nsLayoutUtils::GetFontMetricsForFrame(this, 1.0f);
|
||||
|
@ -252,7 +252,7 @@ nsMeterFrame::GetMinISize(gfxContext *aRenderingContext)
|
|||
}
|
||||
|
||||
nscoord
|
||||
nsMeterFrame::GetPrefISize(gfxContext *aRenderingContext)
|
||||
nsMeterFrame::GetPrefISize(nsRenderingContext *aRenderingContext)
|
||||
{
|
||||
return GetMinISize(aRenderingContext);
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ public:
|
|||
int32_t aModType) override;
|
||||
|
||||
virtual mozilla::LogicalSize
|
||||
ComputeAutoSize(gfxContext* aRenderingContext,
|
||||
ComputeAutoSize(nsRenderingContext* 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(gfxContext *aRenderingContext) override;
|
||||
virtual nscoord GetPrefISize(gfxContext *aRenderingContext) override;
|
||||
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) override;
|
||||
virtual nscoord GetPrefISize(nsRenderingContext *aRenderingContext) override;
|
||||
|
||||
virtual bool IsFrameOfType(uint32_t aFlags) const override
|
||||
{
|
||||
|
|
|
@ -67,7 +67,7 @@ nsNumberControlFrame::DestroyFrom(nsIFrame* aDestructRoot)
|
|||
}
|
||||
|
||||
nscoord
|
||||
nsNumberControlFrame::GetMinISize(gfxContext* aRenderingContext)
|
||||
nsNumberControlFrame::GetMinISize(nsRenderingContext* aRenderingContext)
|
||||
{
|
||||
nscoord result;
|
||||
DISPLAY_MIN_WIDTH(this, result);
|
||||
|
@ -85,7 +85,7 @@ nsNumberControlFrame::GetMinISize(gfxContext* aRenderingContext)
|
|||
}
|
||||
|
||||
nscoord
|
||||
nsNumberControlFrame::GetPrefISize(gfxContext* aRenderingContext)
|
||||
nsNumberControlFrame::GetPrefISize(nsRenderingContext* aRenderingContext)
|
||||
{
|
||||
nscoord result;
|
||||
DISPLAY_PREF_WIDTH(this, result);
|
||||
|
|
|
@ -53,9 +53,9 @@ public:
|
|||
virtual mozilla::a11y::AccType AccessibleType() override;
|
||||
#endif
|
||||
|
||||
virtual nscoord GetMinISize(gfxContext* aRenderingContext) override;
|
||||
virtual nscoord GetMinISize(nsRenderingContext* aRenderingContext) override;
|
||||
|
||||
virtual nscoord GetPrefISize(gfxContext* aRenderingContext) override;
|
||||
virtual nscoord GetPrefISize(nsRenderingContext* aRenderingContext) override;
|
||||
|
||||
virtual void Reflow(nsPresContext* aPresContext,
|
||||
ReflowOutput& aDesiredSize,
|
||||
|
|
|
@ -224,7 +224,7 @@ nsProgressFrame::AttributeChanged(int32_t aNameSpaceID,
|
|||
}
|
||||
|
||||
LogicalSize
|
||||
nsProgressFrame::ComputeAutoSize(gfxContext* aRenderingContext,
|
||||
nsProgressFrame::ComputeAutoSize(nsRenderingContext* aRenderingContext,
|
||||
WritingMode aWM,
|
||||
const LogicalSize& aCBSize,
|
||||
nscoord aAvailableISize,
|
||||
|
@ -249,7 +249,7 @@ nsProgressFrame::ComputeAutoSize(gfxContext* aRenderingContext,
|
|||
}
|
||||
|
||||
nscoord
|
||||
nsProgressFrame::GetMinISize(gfxContext *aRenderingContext)
|
||||
nsProgressFrame::GetMinISize(nsRenderingContext *aRenderingContext)
|
||||
{
|
||||
RefPtr<nsFontMetrics> fontMet =
|
||||
nsLayoutUtils::GetFontMetricsForFrame(this, 1.0f);
|
||||
|
@ -265,7 +265,7 @@ nsProgressFrame::GetMinISize(gfxContext *aRenderingContext)
|
|||
}
|
||||
|
||||
nscoord
|
||||
nsProgressFrame::GetPrefISize(gfxContext *aRenderingContext)
|
||||
nsProgressFrame::GetPrefISize(nsRenderingContext *aRenderingContext)
|
||||
{
|
||||
return GetMinISize(aRenderingContext);
|
||||
}
|
||||
|
|
|
@ -56,7 +56,7 @@ public:
|
|||
int32_t aModType) override;
|
||||
|
||||
virtual mozilla::LogicalSize
|
||||
ComputeAutoSize(gfxContext* aRenderingContext,
|
||||
ComputeAutoSize(nsRenderingContext* 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(gfxContext *aRenderingContext) override;
|
||||
virtual nscoord GetPrefISize(gfxContext *aRenderingContext) override;
|
||||
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) override;
|
||||
virtual nscoord GetPrefISize(nsRenderingContext *aRenderingContext) override;
|
||||
|
||||
virtual bool IsFrameOfType(uint32_t aFlags) const override
|
||||
{
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
#include "mozilla/EventStates.h"
|
||||
#include "mozilla/TouchEvents.h"
|
||||
|
||||
#include "gfxContext.h"
|
||||
#include "nsContentCreatorFunctions.h"
|
||||
#include "nsContentList.h"
|
||||
#include "nsContentUtils.h"
|
||||
|
@ -23,6 +22,7 @@
|
|||
#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, gfxContext* aCtx) override;
|
||||
virtual void Paint(nsDisplayListBuilder* aBuilder, nsRenderingContext* 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,
|
||||
gfxContext* aCtx)
|
||||
nsRenderingContext* aCtx)
|
||||
{
|
||||
bool unused;
|
||||
nsStyleContext* styleContext =
|
||||
|
@ -768,7 +768,7 @@ nsRangeFrame::AttributeChanged(int32_t aNameSpaceID,
|
|||
}
|
||||
|
||||
LogicalSize
|
||||
nsRangeFrame::ComputeAutoSize(gfxContext* aRenderingContext,
|
||||
nsRangeFrame::ComputeAutoSize(nsRenderingContext* aRenderingContext,
|
||||
WritingMode aWM,
|
||||
const LogicalSize& aCBSize,
|
||||
nscoord aAvailableISize,
|
||||
|
@ -803,7 +803,7 @@ nsRangeFrame::ComputeAutoSize(gfxContext* aRenderingContext,
|
|||
}
|
||||
|
||||
nscoord
|
||||
nsRangeFrame::GetMinISize(gfxContext *aRenderingContext)
|
||||
nsRangeFrame::GetMinISize(nsRenderingContext *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(gfxContext *aRenderingContext)
|
|||
}
|
||||
|
||||
nscoord
|
||||
nsRangeFrame::GetPrefISize(gfxContext *aRenderingContext)
|
||||
nsRangeFrame::GetPrefISize(nsRenderingContext *aRenderingContext)
|
||||
{
|
||||
bool isInline = IsInlineOriented();
|
||||
|
||||
|
|
|
@ -70,7 +70,7 @@ public:
|
|||
int32_t aModType) override;
|
||||
|
||||
virtual mozilla::LogicalSize
|
||||
ComputeAutoSize(gfxContext* aRenderingContext,
|
||||
ComputeAutoSize(nsRenderingContext* 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(gfxContext *aRenderingContext) override;
|
||||
virtual nscoord GetPrefISize(gfxContext *aRenderingContext) override;
|
||||
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) override;
|
||||
virtual nscoord GetPrefISize(nsRenderingContext *aRenderingContext) override;
|
||||
|
||||
virtual bool IsFrameOfType(uint32_t aFlags) const override
|
||||
{
|
||||
|
|
|
@ -115,7 +115,7 @@ public:
|
|||
listFrame->GetOffsetToCrossDoc(ReferenceFrame());
|
||||
}
|
||||
virtual void Paint(nsDisplayListBuilder* aBuilder,
|
||||
gfxContext* aCtx) override {
|
||||
nsRenderingContext* aCtx) override {
|
||||
nsListControlFrame* listFrame = GetEnclosingListFrame(Frame());
|
||||
// listFrame must be non-null or we wouldn't get called.
|
||||
listFrame->PaintFocus(aCtx->GetDrawTarget(),
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
|
||||
#include "mozilla/DebugOnly.h"
|
||||
|
||||
#include "gfxContext.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsFontMetrics.h"
|
||||
#include "nsTextControlFrame.h"
|
||||
|
@ -21,6 +20,7 @@
|
|||
|
||||
#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(gfxContext* aRenderingContext,
|
||||
nsTextControlFrame::CalcIntrinsicSize(nsRenderingContext* aRenderingContext,
|
||||
WritingMode aWM,
|
||||
float aFontSizeInflation) const
|
||||
{
|
||||
|
@ -431,7 +431,7 @@ nsTextControlFrame::AppendAnonymousContentTo(nsTArray<nsIContent*>& aElements,
|
|||
}
|
||||
|
||||
nscoord
|
||||
nsTextControlFrame::GetPrefISize(gfxContext* aRenderingContext)
|
||||
nsTextControlFrame::GetPrefISize(nsRenderingContext* aRenderingContext)
|
||||
{
|
||||
nscoord result = 0;
|
||||
DISPLAY_PREF_WIDTH(this, result);
|
||||
|
@ -442,7 +442,7 @@ nsTextControlFrame::GetPrefISize(gfxContext* aRenderingContext)
|
|||
}
|
||||
|
||||
nscoord
|
||||
nsTextControlFrame::GetMinISize(gfxContext* aRenderingContext)
|
||||
nsTextControlFrame::GetMinISize(nsRenderingContext* aRenderingContext)
|
||||
{
|
||||
// Our min width is just our preferred width if we have auto width.
|
||||
nscoord result;
|
||||
|
@ -452,7 +452,7 @@ nsTextControlFrame::GetMinISize(gfxContext* aRenderingContext)
|
|||
}
|
||||
|
||||
LogicalSize
|
||||
nsTextControlFrame::ComputeAutoSize(gfxContext* aRenderingContext,
|
||||
nsTextControlFrame::ComputeAutoSize(nsRenderingContext* aRenderingContext,
|
||||
WritingMode aWM,
|
||||
const LogicalSize& aCBSize,
|
||||
nscoord aAvailableISize,
|
||||
|
|
|
@ -44,11 +44,11 @@ public:
|
|||
return do_QueryFrame(PrincipalChildList().FirstChild());
|
||||
}
|
||||
|
||||
virtual nscoord GetMinISize(gfxContext* aRenderingContext) override;
|
||||
virtual nscoord GetPrefISize(gfxContext* aRenderingContext) override;
|
||||
virtual nscoord GetMinISize(nsRenderingContext* aRenderingContext) override;
|
||||
virtual nscoord GetPrefISize(nsRenderingContext* aRenderingContext) override;
|
||||
|
||||
virtual mozilla::LogicalSize
|
||||
ComputeAutoSize(gfxContext* aRenderingContext,
|
||||
ComputeAutoSize(nsRenderingContext* 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(gfxContext* aRenderingContext,
|
||||
mozilla::LogicalSize CalcIntrinsicSize(nsRenderingContext* aRenderingContext,
|
||||
mozilla::WritingMode aWM,
|
||||
float aFontSizeInflation) const;
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
|
||||
/* rendering object for HTML <br> elements */
|
||||
|
||||
#include "gfxContext.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsContainerFrame.h"
|
||||
#include "nsFontMetrics.h"
|
||||
|
@ -14,6 +13,7 @@
|
|||
#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(gfxContext *aRenderingContext,
|
||||
virtual void AddInlineMinISize(nsRenderingContext *aRenderingContext,
|
||||
InlineMinISizeData *aData) override;
|
||||
virtual void AddInlinePrefISize(gfxContext *aRenderingContext,
|
||||
virtual void AddInlinePrefISize(nsRenderingContext *aRenderingContext,
|
||||
InlinePrefISizeData *aData) override;
|
||||
virtual nscoord GetMinISize(gfxContext *aRenderingContext) override;
|
||||
virtual nscoord GetPrefISize(gfxContext *aRenderingContext) override;
|
||||
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) override;
|
||||
virtual nscoord GetPrefISize(nsRenderingContext *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(gfxContext *aRenderingContext,
|
||||
BRFrame::AddInlineMinISize(nsRenderingContext *aRenderingContext,
|
||||
nsIFrame::InlineMinISizeData *aData)
|
||||
{
|
||||
if (!GetParent()->StyleContext()->ShouldSuppressLineBreak()) {
|
||||
|
@ -184,7 +184,7 @@ BRFrame::AddInlineMinISize(gfxContext *aRenderingContext,
|
|||
}
|
||||
|
||||
/* virtual */ void
|
||||
BRFrame::AddInlinePrefISize(gfxContext *aRenderingContext,
|
||||
BRFrame::AddInlinePrefISize(nsRenderingContext *aRenderingContext,
|
||||
nsIFrame::InlinePrefISizeData *aData)
|
||||
{
|
||||
if (!GetParent()->StyleContext()->ShouldSuppressLineBreak()) {
|
||||
|
@ -195,7 +195,7 @@ BRFrame::AddInlinePrefISize(gfxContext *aRenderingContext,
|
|||
}
|
||||
|
||||
/* virtual */ nscoord
|
||||
BRFrame::GetMinISize(gfxContext *aRenderingContext)
|
||||
BRFrame::GetMinISize(nsRenderingContext *aRenderingContext)
|
||||
{
|
||||
nscoord result = 0;
|
||||
DISPLAY_MIN_WIDTH(this, result);
|
||||
|
@ -203,7 +203,7 @@ BRFrame::GetMinISize(gfxContext *aRenderingContext)
|
|||
}
|
||||
|
||||
/* virtual */ nscoord
|
||||
BRFrame::GetPrefISize(gfxContext *aRenderingContext)
|
||||
BRFrame::GetPrefISize(nsRenderingContext *aRenderingContext)
|
||||
{
|
||||
nscoord result = 0;
|
||||
DISPLAY_PREF_WIDTH(this, result);
|
||||
|
|
|
@ -201,7 +201,7 @@ BlockReflowInput::ComputeReplacedBlockOffsetsForFloats(
|
|||
|
||||
static nscoord
|
||||
GetBEndMarginClone(nsIFrame* aFrame,
|
||||
gfxContext* aRenderingContext,
|
||||
nsRenderingContext* aRenderingContext,
|
||||
const LogicalRect& aContentArea,
|
||||
WritingMode aWritingMode)
|
||||
{
|
||||
|
|
|
@ -55,7 +55,7 @@ static eNormalLineHeightControl sNormalLineHeightControl = eUninitialized;
|
|||
// use for measuring things.
|
||||
ReflowInput::ReflowInput(nsPresContext* aPresContext,
|
||||
nsIFrame* aFrame,
|
||||
gfxContext* aRenderingContext,
|
||||
nsRenderingContext* 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,
|
||||
gfxContext *aRenderingContext,
|
||||
nsRenderingContext *aRenderingContext,
|
||||
WritingMode aContainingBlockWritingMode,
|
||||
nscoord aContainingBlockISize)
|
||||
: mFrame(aFrame)
|
||||
|
|
|
@ -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.
|
||||
gfxContext* mRenderingContext;
|
||||
nsRenderingContext* 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, gfxContext *aRenderingContext)
|
||||
SizeComputationInput(nsIFrame *aFrame, nsRenderingContext *aRenderingContext)
|
||||
: mFrame(aFrame)
|
||||
, mRenderingContext(aRenderingContext)
|
||||
, mWritingMode(aFrame->GetWritingMode())
|
||||
{
|
||||
}
|
||||
|
||||
SizeComputationInput(nsIFrame *aFrame, gfxContext *aRenderingContext,
|
||||
SizeComputationInput(nsIFrame *aFrame, nsRenderingContext *aRenderingContext,
|
||||
mozilla::WritingMode aContainingBlockWritingMode,
|
||||
nscoord aContainingBlockISize);
|
||||
|
||||
|
@ -685,7 +685,7 @@ public:
|
|||
*/
|
||||
ReflowInput(nsPresContext* aPresContext,
|
||||
nsIFrame* aFrame,
|
||||
gfxContext* aRenderingContext,
|
||||
nsRenderingContext* aRenderingContext,
|
||||
const mozilla::LogicalSize& aAvailableSpace,
|
||||
uint32_t aFlags = 0);
|
||||
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
#include <algorithm>
|
||||
|
||||
// Please maintain alphabetical order below
|
||||
#include "gfxContext.h"
|
||||
#include "nsBlockFrame.h"
|
||||
#include "nsCaret.h"
|
||||
#include "nsContentUtils.h"
|
||||
|
@ -19,6 +18,7 @@
|
|||
#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,
|
||||
gfxContext* aCtx) override;
|
||||
nsRenderingContext* aCtx) override;
|
||||
|
||||
virtual uint32_t GetPerFrameKey() override {
|
||||
return (mIndex << nsDisplayItem::TYPE_BITS) | nsDisplayItem::GetPerFrameKey();
|
||||
}
|
||||
void PaintTextToContext(gfxContext* aCtx,
|
||||
void PaintTextToContext(nsRenderingContext* aCtx,
|
||||
nsPoint aOffsetFromRect);
|
||||
NS_DISPLAY_DECL_NAME("TextOverflow", TYPE_TEXT_OVERFLOW)
|
||||
private:
|
||||
|
@ -215,7 +215,7 @@ private:
|
|||
};
|
||||
|
||||
static void
|
||||
PaintTextShadowCallback(gfxContext* aCtx,
|
||||
PaintTextShadowCallback(nsRenderingContext* aCtx,
|
||||
nsPoint aShadowOffset,
|
||||
const nscolor& aShadowColor,
|
||||
void* aData)
|
||||
|
@ -226,7 +226,7 @@ PaintTextShadowCallback(gfxContext* aCtx,
|
|||
|
||||
void
|
||||
nsDisplayTextOverflowMarker::Paint(nsDisplayListBuilder* aBuilder,
|
||||
gfxContext* aCtx)
|
||||
nsRenderingContext* 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->SetColor(gfx::Color::FromABGR(foregroundColor));
|
||||
aCtx->ThebesContext()->SetColor(gfx::Color::FromABGR(foregroundColor));
|
||||
PaintTextToContext(aCtx, nsPoint(0, 0));
|
||||
}
|
||||
|
||||
void
|
||||
nsDisplayTextOverflowMarker::PaintTextToContext(gfxContext* aCtx,
|
||||
nsDisplayTextOverflowMarker::PaintTextToContext(nsRenderingContext* aCtx,
|
||||
nsPoint aOffsetFromRect)
|
||||
{
|
||||
WritingMode wm = mFrame->GetWritingMode();
|
||||
|
@ -248,14 +248,14 @@ nsDisplayTextOverflowMarker::PaintTextToContext(gfxContext* aCtx,
|
|||
if (wm.IsVertical()) {
|
||||
if (wm.IsVerticalLR()) {
|
||||
pt.x = NSToCoordFloor(nsLayoutUtils::GetSnappedBaselineX(
|
||||
mFrame, aCtx, pt.x, mAscent));
|
||||
mFrame, aCtx->ThebesContext(), pt.x, mAscent));
|
||||
} else {
|
||||
pt.x = NSToCoordFloor(nsLayoutUtils::GetSnappedBaselineX(
|
||||
mFrame, aCtx, pt.x + mRect.width, -mAscent));
|
||||
mFrame, aCtx->ThebesContext(), pt.x + mRect.width, -mAscent));
|
||||
}
|
||||
} else {
|
||||
pt.y = NSToCoordFloor(nsLayoutUtils::GetSnappedBaselineY(
|
||||
mFrame, aCtx, pt.y, mAscent));
|
||||
mFrame, aCtx->ThebesContext(), pt.y, mAscent));
|
||||
}
|
||||
pt += aOffsetFromRect;
|
||||
|
||||
|
@ -266,7 +266,7 @@ nsDisplayTextOverflowMarker::PaintTextToContext(gfxContext* aCtx,
|
|||
"Ellipsis textruns should always be LTR!");
|
||||
gfxPoint gfxPt(pt.x, pt.y);
|
||||
textRun->Draw(gfxTextRun::Range(textRun), gfxPt,
|
||||
gfxTextRun::DrawParams(aCtx));
|
||||
gfxTextRun::DrawParams(aCtx->ThebesContext()));
|
||||
}
|
||||
} else {
|
||||
RefPtr<nsFontMetrics> fm =
|
||||
|
@ -852,12 +852,12 @@ TextOverflow::Marker::SetupString(nsIFrame* aFrame)
|
|||
mISize = 0;
|
||||
}
|
||||
} else {
|
||||
RefPtr<gfxContext> rc =
|
||||
aFrame->PresContext()->PresShell()->CreateReferenceRenderingContext();
|
||||
nsRenderingContext 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;
|
||||
|
|
|
@ -211,7 +211,7 @@ ViewportFrame::RemoveFrame(ChildListID aListID,
|
|||
#endif
|
||||
|
||||
/* virtual */ nscoord
|
||||
ViewportFrame::GetMinISize(gfxContext *aRenderingContext)
|
||||
ViewportFrame::GetMinISize(nsRenderingContext *aRenderingContext)
|
||||
{
|
||||
nscoord result;
|
||||
DISPLAY_MIN_WIDTH(this, result);
|
||||
|
@ -224,7 +224,7 @@ ViewportFrame::GetMinISize(gfxContext *aRenderingContext)
|
|||
}
|
||||
|
||||
/* virtual */ nscoord
|
||||
ViewportFrame::GetPrefISize(gfxContext *aRenderingContext)
|
||||
ViewportFrame::GetPrefISize(nsRenderingContext *aRenderingContext)
|
||||
{
|
||||
nscoord result;
|
||||
DISPLAY_PREF_WIDTH(this, result);
|
||||
|
|
|
@ -55,8 +55,8 @@ public:
|
|||
void BuildDisplayListForTopLayer(nsDisplayListBuilder* aBuilder,
|
||||
nsDisplayList* aList);
|
||||
|
||||
virtual nscoord GetMinISize(gfxContext *aRenderingContext) override;
|
||||
virtual nscoord GetPrefISize(gfxContext *aRenderingContext) override;
|
||||
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) override;
|
||||
virtual nscoord GetPrefISize(nsRenderingContext *aRenderingContext) override;
|
||||
virtual void Reflow(nsPresContext* aPresContext,
|
||||
ReflowOutput& aDesiredSize,
|
||||
const ReflowInput& aReflowInput,
|
||||
|
|
|
@ -50,7 +50,7 @@ nsBackdropFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
}
|
||||
|
||||
/* virtual */ LogicalSize
|
||||
nsBackdropFrame::ComputeAutoSize(gfxContext* aRenderingContext,
|
||||
nsBackdropFrame::ComputeAutoSize(nsRenderingContext* aRenderingContext,
|
||||
WritingMode aWM,
|
||||
const LogicalSize& aCBSize,
|
||||
nscoord aAvailableISize,
|
||||
|
|
|
@ -29,7 +29,7 @@ public:
|
|||
const nsRect& aDirtyRect,
|
||||
const nsDisplayListSet& aLists) override;
|
||||
virtual mozilla::LogicalSize
|
||||
ComputeAutoSize(gfxContext* aRenderingContext,
|
||||
ComputeAutoSize(nsRenderingContext* aRenderingContext,
|
||||
mozilla::WritingMode aWM,
|
||||
const mozilla::LogicalSize& aCBSize,
|
||||
nscoord aAvailableISize,
|
||||
|
|
|
@ -11,8 +11,6 @@
|
|||
|
||||
#include "nsBlockFrame.h"
|
||||
|
||||
#include "gfxContext.h"
|
||||
|
||||
#include "mozilla/DebugOnly.h"
|
||||
#include "mozilla/Maybe.h"
|
||||
#include "mozilla/UniquePtr.h"
|
||||
|
@ -49,6 +47,7 @@
|
|||
#include "nsDisplayList.h"
|
||||
#include "nsCSSAnonBoxes.h"
|
||||
#include "nsCSSFrameConstructor.h"
|
||||
#include "nsRenderingContext.h"
|
||||
#include "TextOverflow.h"
|
||||
#include "nsIFrameInlines.h"
|
||||
#include "CounterStyleManager.h"
|
||||
|
@ -696,7 +695,7 @@ nsBlockFrame::CheckIntrinsicCacheAgainstShrinkWrapState()
|
|||
}
|
||||
|
||||
/* virtual */ nscoord
|
||||
nsBlockFrame::GetMinISize(gfxContext *aRenderingContext)
|
||||
nsBlockFrame::GetMinISize(nsRenderingContext *aRenderingContext)
|
||||
{
|
||||
nsIFrame* firstInFlow = FirstContinuation();
|
||||
if (firstInFlow != this)
|
||||
|
@ -784,7 +783,7 @@ nsBlockFrame::GetMinISize(gfxContext *aRenderingContext)
|
|||
}
|
||||
|
||||
/* virtual */ nscoord
|
||||
nsBlockFrame::GetPrefISize(gfxContext *aRenderingContext)
|
||||
nsBlockFrame::GetPrefISize(nsRenderingContext *aRenderingContext)
|
||||
{
|
||||
nsIFrame* firstInFlow = FirstContinuation();
|
||||
if (firstInFlow != this)
|
||||
|
@ -894,7 +893,7 @@ nsBlockFrame::ComputeTightBounds(DrawTarget* aDrawTarget) const
|
|||
}
|
||||
|
||||
/* virtual */ nsresult
|
||||
nsBlockFrame::GetPrefWidthTightBounds(gfxContext* aRenderingContext,
|
||||
nsBlockFrame::GetPrefWidthTightBounds(nsRenderingContext* aRenderingContext,
|
||||
nscoord* aX,
|
||||
nscoord* aXMost)
|
||||
{
|
||||
|
|
|
@ -274,12 +274,12 @@ public:
|
|||
private:
|
||||
void CheckIntrinsicCacheAgainstShrinkWrapState();
|
||||
public:
|
||||
nscoord GetMinISize(gfxContext *aRenderingContext) override;
|
||||
nscoord GetPrefISize(gfxContext *aRenderingContext) override;
|
||||
nscoord GetMinISize(nsRenderingContext *aRenderingContext) override;
|
||||
nscoord GetPrefISize(nsRenderingContext *aRenderingContext) override;
|
||||
|
||||
nsRect ComputeTightBounds(DrawTarget* aDrawTarget) const override;
|
||||
|
||||
nsresult GetPrefWidthTightBounds(gfxContext* aContext,
|
||||
nsresult GetPrefWidthTightBounds(nsRenderingContext* aContext,
|
||||
nscoord* aX,
|
||||
nscoord* aXMost) override;
|
||||
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
#include "nsBulletFrame.h"
|
||||
|
||||
#include "gfx2DGlue.h"
|
||||
#include "gfxContext.h"
|
||||
#include "gfxPrefs.h"
|
||||
#include "gfxUtils.h"
|
||||
#include "mozilla/gfx/2D.h"
|
||||
|
@ -27,6 +26,7 @@
|
|||
#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(gfxContext& aRenderingContext, nsPoint aPt,
|
||||
Paint(nsRenderingContext& aRenderingContext, nsPoint aPt,
|
||||
const nsRect& aDirtyRect, uint32_t aFlags,
|
||||
bool aDisableSubpixelAA, nsIFrame* aFrame);
|
||||
|
||||
|
@ -333,13 +333,13 @@ BulletRenderer::CreateWebRenderCommands(nsDisplayItem* aItem,
|
|||
}
|
||||
|
||||
DrawResult
|
||||
BulletRenderer::Paint(gfxContext& aRenderingContext, nsPoint aPt,
|
||||
BulletRenderer::Paint(nsRenderingContext& aRenderingContext, nsPoint aPt,
|
||||
const nsRect& aDirtyRect, uint32_t aFlags,
|
||||
bool aDisableSubpixelAA, nsIFrame* aFrame)
|
||||
{
|
||||
if (IsImageType()) {
|
||||
SamplingFilter filter = nsLayoutUtils::GetSamplingFilterForFrame(aFrame);
|
||||
return nsLayoutUtils::DrawSingleImage(aRenderingContext,
|
||||
return nsLayoutUtils::DrawSingleImage(*aRenderingContext.ThebesContext(),
|
||||
aFrame->PresContext(), mImage, filter,
|
||||
mDest, aDirtyRect,
|
||||
/* no SVGImageContext */ Nothing(),
|
||||
|
@ -370,7 +370,8 @@ BulletRenderer::Paint(gfxContext& aRenderingContext, nsPoint aPt,
|
|||
DrawTargetAutoDisableSubpixelAntialiasing
|
||||
disable(drawTarget, aDisableSubpixelAA);
|
||||
|
||||
aRenderingContext.SetColor(Color::FromABGR(mColor));
|
||||
aRenderingContext.ThebesContext()->SetColor(
|
||||
Color::FromABGR(mColor));
|
||||
|
||||
nsPresContext* presContext = aFrame->PresContext();
|
||||
if (!presContext->BidiEnabled() && HasRTLChars(mText)) {
|
||||
|
@ -391,12 +392,13 @@ 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);
|
||||
|
||||
captureCtx->SetColor(
|
||||
ctx.ThebesContext()->SetColor(
|
||||
Color::FromABGR(mColor));
|
||||
|
||||
nsPresContext* presContext = aItem->Frame()->PresContext();
|
||||
|
@ -404,7 +406,7 @@ BulletRenderer::BuildGlyphForText(nsDisplayItem* aItem, bool disableSubpixelAA)
|
|||
presContext->SetBidiEnabled();
|
||||
}
|
||||
|
||||
nsLayoutUtils::DrawString(aItem->Frame(), *mFontMetrics, captureCtx,
|
||||
nsLayoutUtils::DrawString(aItem->Frame(), *mFontMetrics, &ctx,
|
||||
mText.get(), mText.Length(), mPoint);
|
||||
}
|
||||
|
||||
|
@ -551,7 +553,7 @@ public:
|
|||
aOutFrames->AppendElement(mFrame);
|
||||
}
|
||||
virtual void Paint(nsDisplayListBuilder* aBuilder,
|
||||
gfxContext* aCtx) override;
|
||||
nsRenderingContext* aCtx) override;
|
||||
NS_DISPLAY_DECL_NAME("Bullet", TYPE_BULLET)
|
||||
|
||||
virtual nsRect GetComponentAlphaBounds(nsDisplayListBuilder* aBuilder) override
|
||||
|
@ -608,9 +610,10 @@ nsDisplayBullet::GetLayerState(nsDisplayListBuilder* aBuilder,
|
|||
|
||||
RefPtr<gfxContext> screenRefCtx =
|
||||
gfxContext::CreateOrNull(gfxPlatform::GetPlatform()->ScreenReferenceDrawTarget());
|
||||
nsRenderingContext ctx(screenRefCtx);
|
||||
|
||||
Maybe<BulletRenderer> br = static_cast<nsBulletFrame*>(mFrame)->
|
||||
CreateBulletRenderer(*screenRefCtx, ToReferenceFrame());
|
||||
CreateBulletRenderer(ctx, ToReferenceFrame());
|
||||
|
||||
if (!br) {
|
||||
return LAYER_NONE;
|
||||
|
@ -661,7 +664,7 @@ nsDisplayBullet::CreateWebRenderCommands(wr::DisplayListBuilder& aBuilder,
|
|||
}
|
||||
|
||||
void nsDisplayBullet::Paint(nsDisplayListBuilder* aBuilder,
|
||||
gfxContext* aCtx)
|
||||
nsRenderingContext* aCtx)
|
||||
{
|
||||
uint32_t flags = imgIContainer::FLAG_NONE;
|
||||
if (aBuilder->ShouldSyncDecodeImages()) {
|
||||
|
@ -690,7 +693,7 @@ nsBulletFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
}
|
||||
|
||||
Maybe<BulletRenderer>
|
||||
nsBulletFrame::CreateBulletRenderer(gfxContext& aRenderingContext, nsPoint aPt)
|
||||
nsBulletFrame::CreateBulletRenderer(nsRenderingContext& aRenderingContext, nsPoint aPt)
|
||||
{
|
||||
const nsStyleList* myList = StyleList();
|
||||
CounterStyle* listStyleType = myList->mCounterStyle;
|
||||
|
@ -826,18 +829,19 @@ nsBulletFrame::CreateBulletRenderer(gfxContext& aRenderingContext, nsPoint aPt)
|
|||
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, &aRenderingContext, aPt.x, ascent));
|
||||
this, ctx, aPt.x, ascent));
|
||||
} else {
|
||||
aPt.x = NSToCoordRound(nsLayoutUtils::GetSnappedBaselineX(
|
||||
this, &aRenderingContext, aPt.x + mRect.width,
|
||||
this, ctx, aPt.x + mRect.width,
|
||||
-ascent));
|
||||
}
|
||||
} else {
|
||||
aPt.y = NSToCoordRound(nsLayoutUtils::GetSnappedBaselineY(
|
||||
this, &aRenderingContext, aPt.y, ascent));
|
||||
this, ctx, aPt.y, ascent));
|
||||
}
|
||||
|
||||
BulletRenderer br(text, fm, color, aPt, listStyleType->GetStyle());
|
||||
|
@ -850,7 +854,7 @@ nsBulletFrame::CreateBulletRenderer(gfxContext& aRenderingContext, nsPoint aPt)
|
|||
}
|
||||
|
||||
DrawResult
|
||||
nsBulletFrame::PaintBullet(gfxContext& aRenderingContext, nsPoint aPt,
|
||||
nsBulletFrame::PaintBullet(nsRenderingContext& aRenderingContext, nsPoint aPt,
|
||||
const nsRect& aDirtyRect, uint32_t aFlags,
|
||||
bool aDisableSubpixelAA)
|
||||
{
|
||||
|
@ -940,7 +944,7 @@ nsBulletFrame::AppendSpacingToPadding(nsFontMetrics* aFontMetrics,
|
|||
|
||||
void
|
||||
nsBulletFrame::GetDesiredSize(nsPresContext* aCX,
|
||||
gfxContext *aRenderingContext,
|
||||
nsRenderingContext *aRenderingContext,
|
||||
ReflowOutput& aMetrics,
|
||||
float aFontSizeInflation,
|
||||
LogicalMargin* aPadding)
|
||||
|
@ -1076,7 +1080,7 @@ nsBulletFrame::Reflow(nsPresContext* aPresContext,
|
|||
}
|
||||
|
||||
/* virtual */ nscoord
|
||||
nsBulletFrame::GetMinISize(gfxContext *aRenderingContext)
|
||||
nsBulletFrame::GetMinISize(nsRenderingContext *aRenderingContext)
|
||||
{
|
||||
WritingMode wm = GetWritingMode();
|
||||
ReflowOutput reflowOutput(wm);
|
||||
|
@ -1088,7 +1092,7 @@ nsBulletFrame::GetMinISize(gfxContext *aRenderingContext)
|
|||
}
|
||||
|
||||
/* virtual */ nscoord
|
||||
nsBulletFrame::GetPrefISize(gfxContext *aRenderingContext)
|
||||
nsBulletFrame::GetPrefISize(nsRenderingContext *aRenderingContext)
|
||||
{
|
||||
WritingMode wm = GetWritingMode();
|
||||
ReflowOutput metrics(wm);
|
||||
|
@ -1114,7 +1118,7 @@ IsIgnoreable(const nsIFrame* aFrame, nscoord aISize)
|
|||
}
|
||||
|
||||
/* virtual */ void
|
||||
nsBulletFrame::AddInlineMinISize(gfxContext* aRenderingContext,
|
||||
nsBulletFrame::AddInlineMinISize(nsRenderingContext* aRenderingContext,
|
||||
nsIFrame::InlineMinISizeData* aData)
|
||||
{
|
||||
nscoord isize = nsLayoutUtils::IntrinsicForContainer(aRenderingContext,
|
||||
|
@ -1125,7 +1129,7 @@ nsBulletFrame::AddInlineMinISize(gfxContext* aRenderingContext,
|
|||
}
|
||||
|
||||
/* virtual */ void
|
||||
nsBulletFrame::AddInlinePrefISize(gfxContext* aRenderingContext,
|
||||
nsBulletFrame::AddInlinePrefISize(nsRenderingContext* aRenderingContext,
|
||||
nsIFrame::InlinePrefISizeData* aData)
|
||||
{
|
||||
nscoord isize = nsLayoutUtils::IntrinsicForContainer(aRenderingContext,
|
||||
|
|
|
@ -81,11 +81,11 @@ public:
|
|||
ReflowOutput& aMetrics,
|
||||
const ReflowInput& aReflowInput,
|
||||
nsReflowStatus& aStatus) override;
|
||||
virtual nscoord GetMinISize(gfxContext *aRenderingContext) override;
|
||||
virtual nscoord GetPrefISize(gfxContext *aRenderingContext) override;
|
||||
void AddInlineMinISize(gfxContext* aRenderingContext,
|
||||
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) override;
|
||||
virtual nscoord GetPrefISize(nsRenderingContext *aRenderingContext) override;
|
||||
void AddInlineMinISize(nsRenderingContext* aRenderingContext,
|
||||
nsIFrame::InlineMinISizeData* aData) override;
|
||||
void AddInlinePrefISize(gfxContext* aRenderingContext,
|
||||
void AddInlinePrefISize(nsRenderingContext* aRenderingContext,
|
||||
nsIFrame::InlinePrefISizeData* aData) override;
|
||||
|
||||
// nsBulletFrame
|
||||
|
@ -98,8 +98,8 @@ public:
|
|||
void GetSpokenText(nsAString& aText);
|
||||
|
||||
Maybe<BulletRenderer>
|
||||
CreateBulletRenderer(gfxContext& aRenderingContext, nsPoint aPt);
|
||||
DrawResult PaintBullet(gfxContext& aRenderingContext, nsPoint aPt,
|
||||
CreateBulletRenderer(nsRenderingContext& aRenderingContext, nsPoint aPt);
|
||||
DrawResult PaintBullet(nsRenderingContext& 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,
|
||||
gfxContext *aRenderingContext,
|
||||
nsRenderingContext *aRenderingContext,
|
||||
ReflowOutput& aMetrics,
|
||||
float aFontSizeInflation,
|
||||
mozilla::LogicalMargin* aPadding);
|
||||
|
|
|
@ -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,
|
||||
gfxContext* aCtx)
|
||||
nsRenderingContext* 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,
|
||||
gfxContext* aCtx)
|
||||
nsRenderingContext* aCtx)
|
||||
{
|
||||
nsCanvasFrame* frame = static_cast<nsCanvasFrame*>(mFrame);
|
||||
nsPoint offset = ToReferenceFrame();
|
||||
nsRect bgClipRect = frame->CanvasArea() + offset;
|
||||
|
||||
#ifndef MOZ_GFX_OPTIMIZE_MOBILE
|
||||
RefPtr<gfxContext> dest = aCtx;
|
||||
RefPtr<gfxContext> dest = aCtx->ThebesContext();
|
||||
gfxRect destRect;
|
||||
if (IsSingleFixedPositionImage(aBuilder, bgClipRect, &destRect) &&
|
||||
aBuilder->IsPaintingToWindow() && !aBuilder->IsCompositingCheap() &&
|
||||
|
@ -378,7 +378,8 @@ 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));
|
||||
PaintInternal(aBuilder, ctx, bgClipRect, &bgClipRect);
|
||||
nsRenderingContext context(ctx);
|
||||
PaintInternal(aBuilder, &context, bgClipRect, &bgClipRect);
|
||||
BlitSurface(dest->GetDrawTarget(), destRect, dt);
|
||||
frame->SetProperty(nsIFrame::CachedBackgroundImageDT(),
|
||||
dt.forget().take());
|
||||
|
@ -427,7 +428,7 @@ nsDisplayCanvasBackgroundImage::IsSingleFixedPositionImage(nsDisplayListBuilder*
|
|||
|
||||
void
|
||||
nsDisplayCanvasThemedBackground::Paint(nsDisplayListBuilder* aBuilder,
|
||||
gfxContext* aCtx)
|
||||
nsRenderingContext* aCtx)
|
||||
{
|
||||
nsCanvasFrame* frame = static_cast<nsCanvasFrame*>(mFrame);
|
||||
nsPoint offset = ToReferenceFrame();
|
||||
|
@ -462,7 +463,7 @@ public:
|
|||
}
|
||||
|
||||
virtual void Paint(nsDisplayListBuilder* aBuilder,
|
||||
gfxContext* aCtx) override
|
||||
nsRenderingContext* aCtx) override
|
||||
{
|
||||
nsCanvasFrame* frame = static_cast<nsCanvasFrame*>(mFrame);
|
||||
frame->PaintFocus(aCtx->GetDrawTarget(), ToReferenceFrame());
|
||||
|
@ -644,7 +645,7 @@ nsCanvasFrame::PaintFocus(DrawTarget* aDrawTarget, nsPoint aPt)
|
|||
}
|
||||
|
||||
/* virtual */ nscoord
|
||||
nsCanvasFrame::GetMinISize(gfxContext *aRenderingContext)
|
||||
nsCanvasFrame::GetMinISize(nsRenderingContext *aRenderingContext)
|
||||
{
|
||||
nscoord result;
|
||||
DISPLAY_MIN_WIDTH(this, result);
|
||||
|
@ -656,7 +657,7 @@ nsCanvasFrame::GetMinISize(gfxContext *aRenderingContext)
|
|||
}
|
||||
|
||||
/* virtual */ nscoord
|
||||
nsCanvasFrame::GetPrefISize(gfxContext *aRenderingContext)
|
||||
nsCanvasFrame::GetPrefISize(nsRenderingContext *aRenderingContext)
|
||||
{
|
||||
nscoord result;
|
||||
DISPLAY_PREF_WIDTH(this, result);
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#include "gfxPrefs.h"
|
||||
|
||||
class nsPresContext;
|
||||
class gfxContext;
|
||||
class nsRenderingContext;
|
||||
|
||||
/**
|
||||
* Root frame class.
|
||||
|
@ -57,8 +57,8 @@ public:
|
|||
nsIFrame* aOldFrame) override;
|
||||
#endif
|
||||
|
||||
virtual nscoord GetMinISize(gfxContext *aRenderingContext) override;
|
||||
virtual nscoord GetPrefISize(gfxContext *aRenderingContext) override;
|
||||
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) override;
|
||||
virtual nscoord GetPrefISize(nsRenderingContext *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,
|
||||
gfxContext* aCtx) override;
|
||||
nsRenderingContext* aCtx) override;
|
||||
|
||||
void SetExtraBackgroundColor(nscolor aColor)
|
||||
{
|
||||
|
@ -194,7 +194,7 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
virtual void Paint(nsDisplayListBuilder* aBuilder, gfxContext* aCtx) override;
|
||||
virtual void Paint(nsDisplayListBuilder* aBuilder, nsRenderingContext* aCtx) override;
|
||||
|
||||
virtual void NotifyRenderingChanged() override
|
||||
{
|
||||
|
@ -220,7 +220,7 @@ public:
|
|||
aFrame->GetRectRelativeToSelf() + aBuilder->ToReferenceFrame(aFrame))
|
||||
{}
|
||||
|
||||
virtual void Paint(nsDisplayListBuilder* aBuilder, gfxContext* aCtx) override;
|
||||
virtual void Paint(nsDisplayListBuilder* aBuilder, nsRenderingContext* aCtx) override;
|
||||
|
||||
NS_DISPLAY_DECL_NAME("CanvasThemedBackground", TYPE_CANVAS_THEMED_BACKGROUND)
|
||||
};
|
||||
|
|
|
@ -48,7 +48,7 @@ public:
|
|||
nsTArray<WebRenderParentCommand>& aParentCommands,
|
||||
mozilla::layers::WebRenderDisplayItemLayer* aLayer) override;
|
||||
virtual void Paint(nsDisplayListBuilder* aBuilder,
|
||||
gfxContext* aCtx) override;
|
||||
nsRenderingContext* aCtx) override;
|
||||
|
||||
NS_DISPLAY_DECL_NAME("ColumnRule", nsDisplayItem::TYPE_COLUMN_RULE);
|
||||
|
||||
|
@ -58,7 +58,7 @@ private:
|
|||
|
||||
void
|
||||
nsDisplayColumnRule::Paint(nsDisplayListBuilder* aBuilder,
|
||||
gfxContext* aCtx)
|
||||
nsRenderingContext* aCtx)
|
||||
{
|
||||
static_cast<nsColumnSetFrame*>(mFrame)->
|
||||
CreateBorderRenderers(mBorderRenderers, aCtx, mVisibleRect, ToReferenceFrame());
|
||||
|
@ -78,9 +78,10 @@ nsDisplayColumnRule::GetLayerState(nsDisplayListBuilder* aBuilder,
|
|||
|
||||
RefPtr<gfxContext> screenRefCtx =
|
||||
gfxContext::CreateOrNull(gfxPlatform::GetPlatform()->ScreenReferenceDrawTarget());
|
||||
nsRenderingContext ctx(screenRefCtx);
|
||||
|
||||
static_cast<nsColumnSetFrame*>(mFrame)->
|
||||
CreateBorderRenderers(mBorderRenderers, screenRefCtx, mVisibleRect, ToReferenceFrame());
|
||||
CreateBorderRenderers(mBorderRenderers, &ctx, mVisibleRect, ToReferenceFrame());
|
||||
|
||||
if (mBorderRenderers.IsEmpty()) {
|
||||
return LAYER_NONE;
|
||||
|
@ -210,7 +211,7 @@ nsColumnSetFrame::CalculateBounds(const nsPoint& aOffset)
|
|||
|
||||
void
|
||||
nsColumnSetFrame::CreateBorderRenderers(nsTArray<nsCSSBorderRenderer>& aBorderRenderers,
|
||||
gfxContext* aCtx,
|
||||
nsRenderingContext* aCtx,
|
||||
const nsRect& aDirtyRect,
|
||||
const nsPoint& aPt)
|
||||
{
|
||||
|
@ -503,7 +504,7 @@ static void MoveChildTo(nsIFrame* aChild, LogicalPoint aOrigin,
|
|||
}
|
||||
|
||||
nscoord
|
||||
nsColumnSetFrame::GetMinISize(gfxContext *aRenderingContext)
|
||||
nsColumnSetFrame::GetMinISize(nsRenderingContext *aRenderingContext)
|
||||
{
|
||||
nscoord iSize = 0;
|
||||
DISPLAY_MIN_WIDTH(this, iSize);
|
||||
|
@ -538,7 +539,7 @@ nsColumnSetFrame::GetMinISize(gfxContext *aRenderingContext)
|
|||
}
|
||||
|
||||
nscoord
|
||||
nsColumnSetFrame::GetPrefISize(gfxContext *aRenderingContext)
|
||||
nsColumnSetFrame::GetPrefISize(nsRenderingContext *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
|
||||
|
|
|
@ -41,8 +41,8 @@ public:
|
|||
nsIFrame* aOldFrame) override;
|
||||
#endif
|
||||
|
||||
virtual nscoord GetMinISize(gfxContext *aRenderingContext) override;
|
||||
virtual nscoord GetPrefISize(gfxContext *aRenderingContext) override;
|
||||
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) override;
|
||||
virtual nscoord GetPrefISize(nsRenderingContext *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,
|
||||
gfxContext* aCtx,
|
||||
nsRenderingContext* aCtx,
|
||||
const nsRect& aDirtyRect,
|
||||
const nsPoint& aPt);
|
||||
|
||||
|
|
|
@ -588,7 +588,7 @@ void
|
|||
nsContainerFrame::SyncWindowProperties(nsPresContext* aPresContext,
|
||||
nsIFrame* aFrame,
|
||||
nsView* aView,
|
||||
gfxContext* aRC,
|
||||
nsRenderingContext* aRC,
|
||||
uint32_t aFlags)
|
||||
{
|
||||
#ifdef MOZ_XUL
|
||||
|
@ -727,7 +727,7 @@ static nscoord GetCoord(const nsStyleCoord& aCoord, nscoord aIfNotCoord)
|
|||
}
|
||||
|
||||
void
|
||||
nsContainerFrame::DoInlineIntrinsicISize(gfxContext *aRenderingContext,
|
||||
nsContainerFrame::DoInlineIntrinsicISize(nsRenderingContext *aRenderingContext,
|
||||
InlineIntrinsicISizeData *aData,
|
||||
nsLayoutUtils::IntrinsicISizeType aType)
|
||||
{
|
||||
|
@ -824,7 +824,7 @@ nsContainerFrame::DoInlineIntrinsicISize(gfxContext *aRenderingContext,
|
|||
|
||||
/* virtual */
|
||||
LogicalSize
|
||||
nsContainerFrame::ComputeAutoSize(gfxContext* aRenderingContext,
|
||||
nsContainerFrame::ComputeAutoSize(nsRenderingContext* aRenderingContext,
|
||||
WritingMode aWM,
|
||||
const LogicalSize& aCBSize,
|
||||
nscoord aAvailableISize,
|
||||
|
|
|
@ -184,7 +184,7 @@ public:
|
|||
static void SyncWindowProperties(nsPresContext* aPresContext,
|
||||
nsIFrame* aFrame,
|
||||
nsView* aView,
|
||||
gfxContext* aRC,
|
||||
nsRenderingContext* aRC,
|
||||
uint32_t aFlags);
|
||||
|
||||
/**
|
||||
|
@ -202,7 +202,7 @@ public:
|
|||
const nsSize& aMaxSize);
|
||||
|
||||
// Used by both nsInlineFrame and nsFirstLetterFrame.
|
||||
void DoInlineIntrinsicISize(gfxContext *aRenderingContext,
|
||||
void DoInlineIntrinsicISize(nsRenderingContext *aRenderingContext,
|
||||
InlineIntrinsicISizeData *aData,
|
||||
nsLayoutUtils::IntrinsicISizeType aType);
|
||||
|
||||
|
@ -211,7 +211,7 @@ public:
|
|||
* classes derived from nsContainerFrame want.
|
||||
*/
|
||||
virtual mozilla::LogicalSize
|
||||
ComputeAutoSize(gfxContext* aRenderingContext,
|
||||
ComputeAutoSize(nsRenderingContext* aRenderingContext,
|
||||
mozilla::WritingMode aWM,
|
||||
const mozilla::LogicalSize& aCBSize,
|
||||
nscoord aAvailableISize,
|
||||
|
|
|
@ -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(gfxContext *aRenderingContext,
|
||||
nsFirstLetterFrame::AddInlineMinISize(nsRenderingContext *aRenderingContext,
|
||||
nsIFrame::InlineMinISizeData *aData)
|
||||
{
|
||||
DoInlineIntrinsicISize(aRenderingContext, aData, nsLayoutUtils::MIN_ISIZE);
|
||||
|
@ -114,7 +114,7 @@ nsFirstLetterFrame::AddInlineMinISize(gfxContext *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(gfxContext *aRenderingContext,
|
||||
nsFirstLetterFrame::AddInlinePrefISize(nsRenderingContext *aRenderingContext,
|
||||
nsIFrame::InlinePrefISizeData *aData)
|
||||
{
|
||||
DoInlineIntrinsicISize(aRenderingContext, aData, nsLayoutUtils::PREF_ISIZE);
|
||||
|
@ -123,21 +123,21 @@ nsFirstLetterFrame::AddInlinePrefISize(gfxContext *aRenderingContext,
|
|||
|
||||
// Needed for floating first-letter frames.
|
||||
/* virtual */ nscoord
|
||||
nsFirstLetterFrame::GetMinISize(gfxContext *aRenderingContext)
|
||||
nsFirstLetterFrame::GetMinISize(nsRenderingContext *aRenderingContext)
|
||||
{
|
||||
return nsLayoutUtils::MinISizeFromInline(this, aRenderingContext);
|
||||
}
|
||||
|
||||
// Needed for floating first-letter frames.
|
||||
/* virtual */ nscoord
|
||||
nsFirstLetterFrame::GetPrefISize(gfxContext *aRenderingContext)
|
||||
nsFirstLetterFrame::GetPrefISize(nsRenderingContext *aRenderingContext)
|
||||
{
|
||||
return nsLayoutUtils::PrefISizeFromInline(this, aRenderingContext);
|
||||
}
|
||||
|
||||
/* virtual */
|
||||
LogicalSize
|
||||
nsFirstLetterFrame::ComputeSize(gfxContext *aRenderingContext,
|
||||
nsFirstLetterFrame::ComputeSize(nsRenderingContext *aRenderingContext,
|
||||
WritingMode aWM,
|
||||
const LogicalSize& aCBSize,
|
||||
nscoord aAvailableISize,
|
||||
|
|
|
@ -43,15 +43,15 @@ public:
|
|||
~(nsIFrame::eBidiInlineContainer));
|
||||
}
|
||||
|
||||
virtual nscoord GetMinISize(gfxContext *aRenderingContext) override;
|
||||
virtual nscoord GetPrefISize(gfxContext *aRenderingContext) override;
|
||||
virtual void AddInlineMinISize(gfxContext *aRenderingContext,
|
||||
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) override;
|
||||
virtual nscoord GetPrefISize(nsRenderingContext *aRenderingContext) override;
|
||||
virtual void AddInlineMinISize(nsRenderingContext *aRenderingContext,
|
||||
InlineMinISizeData *aData) override;
|
||||
virtual void AddInlinePrefISize(gfxContext *aRenderingContext,
|
||||
virtual void AddInlinePrefISize(nsRenderingContext *aRenderingContext,
|
||||
InlinePrefISizeData *aData) override;
|
||||
|
||||
virtual mozilla::LogicalSize
|
||||
ComputeSize(gfxContext *aRenderingContext,
|
||||
ComputeSize(nsRenderingContext *aRenderingContext,
|
||||
mozilla::WritingMode aWritingMode,
|
||||
const mozilla::LogicalSize& aCBSize,
|
||||
nscoord aAvailableISize,
|
||||
|
|
|
@ -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(gfxContext* aRenderingContext)
|
||||
nsFlexContainerFrame::GetMinISize(nsRenderingContext* aRenderingContext)
|
||||
{
|
||||
nscoord minISize = 0;
|
||||
DISPLAY_MIN_WIDTH(this, minISize);
|
||||
|
@ -4661,7 +4661,7 @@ nsFlexContainerFrame::GetMinISize(gfxContext* aRenderingContext)
|
|||
}
|
||||
|
||||
/* virtual */ nscoord
|
||||
nsFlexContainerFrame::GetPrefISize(gfxContext* aRenderingContext)
|
||||
nsFlexContainerFrame::GetPrefISize(nsRenderingContext* aRenderingContext)
|
||||
{
|
||||
nscoord prefISize = 0;
|
||||
DISPLAY_PREF_WIDTH(this, prefISize);
|
||||
|
|
|
@ -74,8 +74,8 @@ public:
|
|||
const ReflowInput& aReflowInput,
|
||||
nsReflowStatus& aStatus) override;
|
||||
|
||||
nscoord GetMinISize(gfxContext* aRenderingContext) override;
|
||||
nscoord GetPrefISize(gfxContext* aRenderingContext) override;
|
||||
nscoord GetMinISize(nsRenderingContext* aRenderingContext) override;
|
||||
nscoord GetPrefISize(nsRenderingContext* aRenderingContext) override;
|
||||
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
nsresult GetFrameName(nsAString& aResult) const override;
|
||||
|
|
|
@ -82,6 +82,7 @@
|
|||
#include "SVGTextFrame.h"
|
||||
|
||||
#include "gfxContext.h"
|
||||
#include "nsRenderingContext.h"
|
||||
#include "nsAbsoluteContainingBlock.h"
|
||||
#include "StickyScrollContainer.h"
|
||||
#include "nsFontInflationData.h"
|
||||
|
@ -1956,14 +1957,14 @@ public:
|
|||
#endif
|
||||
|
||||
virtual void Paint(nsDisplayListBuilder* aBuilder,
|
||||
gfxContext* aCtx) override;
|
||||
nsRenderingContext* aCtx) override;
|
||||
NS_DISPLAY_DECL_NAME("SelectionOverlay", TYPE_SELECTION_OVERLAY)
|
||||
private:
|
||||
int16_t mSelectionValue;
|
||||
};
|
||||
|
||||
void nsDisplaySelectionOverlay::Paint(nsDisplayListBuilder* aBuilder,
|
||||
gfxContext* aCtx)
|
||||
nsRenderingContext* aCtx)
|
||||
{
|
||||
DrawTarget& aDrawTarget = *aCtx->GetDrawTarget();
|
||||
|
||||
|
@ -4720,7 +4721,7 @@ nsFrame::MarkIntrinsicISizesDirty()
|
|||
}
|
||||
|
||||
/* virtual */ nscoord
|
||||
nsFrame::GetMinISize(gfxContext *aRenderingContext)
|
||||
nsFrame::GetMinISize(nsRenderingContext *aRenderingContext)
|
||||
{
|
||||
nscoord result = 0;
|
||||
DISPLAY_MIN_WIDTH(this, result);
|
||||
|
@ -4728,7 +4729,7 @@ nsFrame::GetMinISize(gfxContext *aRenderingContext)
|
|||
}
|
||||
|
||||
/* virtual */ nscoord
|
||||
nsFrame::GetPrefISize(gfxContext *aRenderingContext)
|
||||
nsFrame::GetPrefISize(nsRenderingContext *aRenderingContext)
|
||||
{
|
||||
nscoord result = 0;
|
||||
DISPLAY_PREF_WIDTH(this, result);
|
||||
|
@ -4736,7 +4737,7 @@ nsFrame::GetPrefISize(gfxContext *aRenderingContext)
|
|||
}
|
||||
|
||||
/* virtual */ void
|
||||
nsFrame::AddInlineMinISize(gfxContext* aRenderingContext,
|
||||
nsFrame::AddInlineMinISize(nsRenderingContext* aRenderingContext,
|
||||
nsIFrame::InlineMinISizeData* aData)
|
||||
{
|
||||
nscoord isize = nsLayoutUtils::IntrinsicForContainer(aRenderingContext,
|
||||
|
@ -4745,7 +4746,7 @@ nsFrame::AddInlineMinISize(gfxContext* aRenderingContext,
|
|||
}
|
||||
|
||||
/* virtual */ void
|
||||
nsFrame::AddInlinePrefISize(gfxContext* aRenderingContext,
|
||||
nsFrame::AddInlinePrefISize(nsRenderingContext* aRenderingContext,
|
||||
nsIFrame::InlinePrefISizeData* aData)
|
||||
{
|
||||
nscoord isize = nsLayoutUtils::IntrinsicForContainer(aRenderingContext,
|
||||
|
@ -5044,7 +5045,7 @@ nsFrame::GetIntrinsicRatio()
|
|||
|
||||
/* virtual */
|
||||
LogicalSize
|
||||
nsFrame::ComputeSize(gfxContext* aRenderingContext,
|
||||
nsFrame::ComputeSize(nsRenderingContext* aRenderingContext,
|
||||
WritingMode aWM,
|
||||
const LogicalSize& aCBSize,
|
||||
nscoord aAvailableISize,
|
||||
|
@ -5305,7 +5306,7 @@ nsFrame::ComputeSize(gfxContext* aRenderingContext,
|
|||
}
|
||||
|
||||
LogicalSize
|
||||
nsFrame::ComputeSizeWithIntrinsicDimensions(gfxContext* aRenderingContext,
|
||||
nsFrame::ComputeSizeWithIntrinsicDimensions(nsRenderingContext* aRenderingContext,
|
||||
WritingMode aWM,
|
||||
const IntrinsicSize& aIntrinsicSize,
|
||||
nsSize aIntrinsicRatio,
|
||||
|
@ -5755,7 +5756,7 @@ nsFrame::ComputeSimpleTightBounds(DrawTarget* aDrawTarget) const
|
|||
}
|
||||
|
||||
/* virtual */ nsresult
|
||||
nsIFrame::GetPrefWidthTightBounds(gfxContext* aContext,
|
||||
nsIFrame::GetPrefWidthTightBounds(nsRenderingContext* aContext,
|
||||
nscoord* aX,
|
||||
nscoord* aXMost)
|
||||
{
|
||||
|
@ -5764,7 +5765,7 @@ nsIFrame::GetPrefWidthTightBounds(gfxContext* aContext,
|
|||
|
||||
/* virtual */
|
||||
LogicalSize
|
||||
nsFrame::ComputeAutoSize(gfxContext* aRenderingContext,
|
||||
nsFrame::ComputeAutoSize(nsRenderingContext* aRenderingContext,
|
||||
WritingMode aWM,
|
||||
const mozilla::LogicalSize& aCBSize,
|
||||
nscoord aAvailableISize,
|
||||
|
@ -5786,7 +5787,7 @@ nsFrame::ComputeAutoSize(gfxContext* aRenderingContext,
|
|||
}
|
||||
|
||||
nscoord
|
||||
nsFrame::ShrinkWidthToFit(gfxContext* aRenderingContext,
|
||||
nsFrame::ShrinkWidthToFit(nsRenderingContext* aRenderingContext,
|
||||
nscoord aISizeInCB,
|
||||
ComputeSizeFlags aFlags)
|
||||
{
|
||||
|
@ -5811,7 +5812,7 @@ nsFrame::ShrinkWidthToFit(gfxContext* aRenderingContext,
|
|||
}
|
||||
|
||||
nscoord
|
||||
nsIFrame::ComputeISizeValue(gfxContext* aRenderingContext,
|
||||
nsIFrame::ComputeISizeValue(nsRenderingContext* aRenderingContext,
|
||||
nscoord aContainingBlockISize,
|
||||
nscoord aContentEdgeToBoxSizing,
|
||||
nscoord aBoxSizingToMarginEdge,
|
||||
|
@ -9643,7 +9644,7 @@ nsFrame::RefreshSizeCache(nsBoxLayoutState& aState)
|
|||
// line height. This can be done with the line iterator.
|
||||
|
||||
// if we do have a rendering context
|
||||
gfxContext* rendContext = aState.GetRenderingContext();
|
||||
nsRenderingContext* rendContext = aState.GetRenderingContext();
|
||||
if (rendContext) {
|
||||
nsPresContext* presContext = aState.PresContext();
|
||||
|
||||
|
@ -9858,7 +9859,7 @@ nsFrame::DoXULLayout(nsBoxLayoutState& aState)
|
|||
{
|
||||
nsRect ourRect(mRect);
|
||||
|
||||
gfxContext* rendContext = aState.GetRenderingContext();
|
||||
nsRenderingContext* rendContext = aState.GetRenderingContext();
|
||||
nsPresContext* presContext = aState.PresContext();
|
||||
WritingMode ourWM = GetWritingMode();
|
||||
const WritingMode outerWM = aState.OuterReflowInput() ?
|
||||
|
@ -9939,7 +9940,7 @@ void
|
|||
nsFrame::BoxReflow(nsBoxLayoutState& aState,
|
||||
nsPresContext* aPresContext,
|
||||
ReflowOutput& aDesiredSize,
|
||||
gfxContext* aRenderingContext,
|
||||
nsRenderingContext* aRenderingContext,
|
||||
nscoord aX,
|
||||
nscoord aY,
|
||||
nscoord aWidth,
|
||||
|
|
|
@ -265,18 +265,18 @@ public:
|
|||
bool IsSelfEmpty() override;
|
||||
|
||||
void MarkIntrinsicISizesDirty() override;
|
||||
nscoord GetMinISize(gfxContext *aRenderingContext) override;
|
||||
nscoord GetPrefISize(gfxContext *aRenderingContext) override;
|
||||
void AddInlineMinISize(gfxContext *aRenderingContext,
|
||||
nscoord GetMinISize(nsRenderingContext *aRenderingContext) override;
|
||||
nscoord GetPrefISize(nsRenderingContext *aRenderingContext) override;
|
||||
void AddInlineMinISize(nsRenderingContext *aRenderingContext,
|
||||
InlineMinISizeData *aData) override;
|
||||
void AddInlinePrefISize(gfxContext *aRenderingContext,
|
||||
void AddInlinePrefISize(nsRenderingContext *aRenderingContext,
|
||||
InlinePrefISizeData *aData) override;
|
||||
IntrinsicISizeOffsetData IntrinsicISizeOffsets() override;
|
||||
mozilla::IntrinsicSize GetIntrinsicSize() override;
|
||||
nsSize GetIntrinsicRatio() override;
|
||||
|
||||
mozilla::LogicalSize
|
||||
ComputeSize(gfxContext* aRenderingContext,
|
||||
ComputeSize(nsRenderingContext* aRenderingContext,
|
||||
mozilla::WritingMode aWM,
|
||||
const mozilla::LogicalSize& aCBSize,
|
||||
nscoord aAvailableISize,
|
||||
|
@ -291,7 +291,7 @@ public:
|
|||
*/
|
||||
mozilla::LogicalSize
|
||||
ComputeSizeWithIntrinsicDimensions(
|
||||
gfxContext* aRenderingContext,
|
||||
nsRenderingContext* aRenderingContext,
|
||||
mozilla::WritingMode aWM,
|
||||
const mozilla::IntrinsicSize& aIntrinsicSize,
|
||||
nsSize aIntrinsicRatio,
|
||||
|
@ -321,7 +321,7 @@ public:
|
|||
* to be unused.
|
||||
*/
|
||||
virtual mozilla::LogicalSize
|
||||
ComputeAutoSize(gfxContext* aRenderingContext,
|
||||
ComputeAutoSize(nsRenderingContext* 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(gfxContext* aRenderingContext,
|
||||
nscoord ShrinkWidthToFit(nsRenderingContext* aRenderingContext,
|
||||
nscoord aISizeInCB,
|
||||
ComputeSizeFlags aFlags);
|
||||
|
||||
|
@ -712,7 +712,7 @@ private:
|
|||
void BoxReflow(nsBoxLayoutState& aState,
|
||||
nsPresContext* aPresContext,
|
||||
ReflowOutput& aDesiredSize,
|
||||
gfxContext* aRenderingContext,
|
||||
nsRenderingContext* aRenderingContext,
|
||||
nscoord aX,
|
||||
nscoord aY,
|
||||
nscoord aWidth,
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include "nsStyleConsts.h"
|
||||
#include "nsStyleContext.h"
|
||||
#include "nsHTMLParts.h"
|
||||
#include "nsRenderingContext.h"
|
||||
#include "nsIDOMMutationEvent.h"
|
||||
#include "nsNameSpaceManager.h"
|
||||
#include "nsCSSAnonBoxes.h"
|
||||
|
@ -1407,12 +1408,12 @@ public:
|
|||
aOutFrames->AppendElement(mFrame);
|
||||
}
|
||||
virtual void Paint(nsDisplayListBuilder* aBuilder,
|
||||
gfxContext* aCtx) override;
|
||||
nsRenderingContext* aCtx) override;
|
||||
NS_DISPLAY_DECL_NAME("FramesetBorder", TYPE_FRAMESET_BORDER)
|
||||
};
|
||||
|
||||
void nsDisplayFramesetBorder::Paint(nsDisplayListBuilder* aBuilder,
|
||||
gfxContext* aCtx)
|
||||
nsRenderingContext* aCtx)
|
||||
{
|
||||
static_cast<nsHTMLFramesetBorderFrame*>(mFrame)->
|
||||
PaintBorder(aCtx->GetDrawTarget(), ToReferenceFrame());
|
||||
|
@ -1615,12 +1616,12 @@ public:
|
|||
#endif
|
||||
|
||||
virtual void Paint(nsDisplayListBuilder* aBuilder,
|
||||
gfxContext* aCtx) override;
|
||||
nsRenderingContext* aCtx) override;
|
||||
NS_DISPLAY_DECL_NAME("FramesetBlank", TYPE_FRAMESET_BLANK)
|
||||
};
|
||||
|
||||
void nsDisplayFramesetBlank::Paint(nsDisplayListBuilder* aBuilder,
|
||||
gfxContext* aCtx)
|
||||
nsRenderingContext* aCtx)
|
||||
{
|
||||
DrawTarget* drawTarget = aCtx->GetDrawTarget();
|
||||
int32_t appUnitsPerDevPixel = mFrame->PresContext()->AppUnitsPerDevPixel();
|
||||
|
|
|
@ -778,7 +778,7 @@ nsHTMLScrollFrame::PlaceScrollArea(ScrollReflowInput& aState,
|
|||
}
|
||||
|
||||
nscoord
|
||||
nsHTMLScrollFrame::GetIntrinsicVScrollbarWidth(gfxContext *aRenderingContext)
|
||||
nsHTMLScrollFrame::GetIntrinsicVScrollbarWidth(nsRenderingContext *aRenderingContext)
|
||||
{
|
||||
ScrollbarStyles ss = GetScrollbarStyles();
|
||||
if (ss.mVertical != NS_STYLE_OVERFLOW_SCROLL || !mHelper.mVScrollbarBox)
|
||||
|
@ -794,7 +794,7 @@ nsHTMLScrollFrame::GetIntrinsicVScrollbarWidth(gfxContext *aRenderingContext)
|
|||
}
|
||||
|
||||
/* virtual */ nscoord
|
||||
nsHTMLScrollFrame::GetMinISize(gfxContext *aRenderingContext)
|
||||
nsHTMLScrollFrame::GetMinISize(nsRenderingContext *aRenderingContext)
|
||||
{
|
||||
nscoord result = mHelper.mScrolledFrame->GetMinISize(aRenderingContext);
|
||||
DISPLAY_MIN_WIDTH(this, result);
|
||||
|
@ -802,7 +802,7 @@ nsHTMLScrollFrame::GetMinISize(gfxContext *aRenderingContext)
|
|||
}
|
||||
|
||||
/* virtual */ nscoord
|
||||
nsHTMLScrollFrame::GetPrefISize(gfxContext *aRenderingContext)
|
||||
nsHTMLScrollFrame::GetPrefISize(nsRenderingContext *aRenderingContext)
|
||||
{
|
||||
nscoord result = mHelper.mScrolledFrame->GetPrefISize(aRenderingContext);
|
||||
DISPLAY_PREF_WIDTH(this, result);
|
||||
|
|
|
@ -704,15 +704,15 @@ public:
|
|||
const ReflowOutput& aDesiredSize);
|
||||
void PlaceScrollArea(ScrollReflowInput& aState,
|
||||
const nsPoint& aScrollPosition);
|
||||
nscoord GetIntrinsicVScrollbarWidth(gfxContext *aRenderingContext);
|
||||
nscoord GetIntrinsicVScrollbarWidth(nsRenderingContext *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(gfxContext *aRenderingContext) override;
|
||||
virtual nscoord GetPrefISize(gfxContext *aRenderingContext) override;
|
||||
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) override;
|
||||
virtual nscoord GetPrefISize(nsRenderingContext *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,
|
||||
gfxContext* aRC) override {
|
||||
nsRenderingContext* aRC) override {
|
||||
nsBoxLayoutState bls(aPresContext, aRC, 0);
|
||||
return GetDesiredScrollbarSizes(&bls);
|
||||
}
|
||||
virtual nscoord GetNondisappearingScrollbarWidth(nsPresContext* aPresContext,
|
||||
gfxContext* aRC, mozilla::WritingMode aWM) override {
|
||||
nsRenderingContext* 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(gfxContext *aRenderingContext) override;
|
||||
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) override;
|
||||
#endif
|
||||
|
||||
virtual bool ComputeCustomOverflow(nsOverflowAreas& aOverflowAreas) override {
|
||||
|
@ -1230,12 +1230,12 @@ public:
|
|||
return mHelper.GetDesiredScrollbarSizes(aState);
|
||||
}
|
||||
virtual nsMargin GetDesiredScrollbarSizes(nsPresContext* aPresContext,
|
||||
gfxContext* aRC) override {
|
||||
nsRenderingContext* aRC) override {
|
||||
nsBoxLayoutState bls(aPresContext, aRC, 0);
|
||||
return GetDesiredScrollbarSizes(&bls);
|
||||
}
|
||||
virtual nscoord GetNondisappearingScrollbarWidth(nsPresContext* aPresContext,
|
||||
gfxContext* aRC, mozilla::WritingMode aWM) override {
|
||||
nsRenderingContext* aRC, mozilla::WritingMode aWM) override {
|
||||
nsBoxLayoutState bls(aPresContext, aRC, 0);
|
||||
return mHelper.GetNondisappearingScrollbarWidth(&bls, aWM);
|
||||
}
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
#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"
|
||||
|
@ -28,6 +27,7 @@
|
|||
#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,
|
||||
gfxContext& aRC)
|
||||
nsRenderingContext& 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;
|
||||
gfxContext& mRenderingContext;
|
||||
nsRenderingContext& 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,
|
||||
gfxContext& aRenderingContext,
|
||||
nsRenderingContext& 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,
|
||||
gfxContext* aRC,
|
||||
nsRenderingContext* 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,
|
||||
gfxContext* aRC,
|
||||
nsRenderingContext* aRC,
|
||||
WritingMode aCBWM,
|
||||
LogicalAxis aAxis,
|
||||
const Maybe<LogicalSize>& aPercentageBasis,
|
||||
|
@ -3612,7 +3612,7 @@ struct CachedIntrinsicSizes
|
|||
static nscoord
|
||||
MinContentContribution(const GridItemInfo& aGridItem,
|
||||
const GridReflowInput& aState,
|
||||
gfxContext* aRC,
|
||||
nsRenderingContext* aRC,
|
||||
WritingMode aCBWM,
|
||||
LogicalAxis aAxis,
|
||||
CachedIntrinsicSizes* aCache)
|
||||
|
@ -3634,7 +3634,7 @@ MinContentContribution(const GridItemInfo& aGridItem,
|
|||
static nscoord
|
||||
MaxContentContribution(const GridItemInfo& aGridItem,
|
||||
const GridReflowInput& aState,
|
||||
gfxContext* aRC,
|
||||
nsRenderingContext* aRC,
|
||||
WritingMode aCBWM,
|
||||
LogicalAxis aAxis,
|
||||
CachedIntrinsicSizes* aCache)
|
||||
|
@ -3658,7 +3658,7 @@ MaxContentContribution(const GridItemInfo& aGridItem,
|
|||
static nscoord
|
||||
MinSize(const GridItemInfo& aGridItem,
|
||||
const GridReflowInput& aState,
|
||||
gfxContext* aRC,
|
||||
nsRenderingContext* aRC,
|
||||
WritingMode aCBWM,
|
||||
LogicalAxis aAxis,
|
||||
CachedIntrinsicSizes* aCache)
|
||||
|
@ -3788,7 +3788,7 @@ nsGridContainerFrame::Tracks::ResolveIntrinsicSizeStep1(
|
|||
aGridItem.mState[mAxis] |= ItemState::eClampMarginBoxMinSize;
|
||||
}
|
||||
// min sizing
|
||||
gfxContext* rc = &aState.mRenderingContext;
|
||||
nsRenderingContext* 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;
|
||||
gfxContext* rc = &aState.mRenderingContext;
|
||||
nsRenderingContext* 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;
|
||||
gfxContext* rc = &aState.mRenderingContext;
|
||||
nsRenderingContext* 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(gfxContext* aRenderingContext,
|
||||
nsGridContainerFrame::IntrinsicISize(nsRenderingContext* aRenderingContext,
|
||||
IntrinsicISizeType aType)
|
||||
{
|
||||
RenumberList();
|
||||
|
@ -6373,7 +6373,7 @@ nsGridContainerFrame::IntrinsicISize(gfxContext* aRenderingContext,
|
|||
}
|
||||
|
||||
nscoord
|
||||
nsGridContainerFrame::GetMinISize(gfxContext* aRC)
|
||||
nsGridContainerFrame::GetMinISize(nsRenderingContext* aRC)
|
||||
{
|
||||
DISPLAY_MIN_WIDTH(this, mCachedMinISize);
|
||||
if (mCachedMinISize == NS_INTRINSIC_WIDTH_UNKNOWN) {
|
||||
|
@ -6383,7 +6383,7 @@ nsGridContainerFrame::GetMinISize(gfxContext* aRC)
|
|||
}
|
||||
|
||||
nscoord
|
||||
nsGridContainerFrame::GetPrefISize(gfxContext* aRC)
|
||||
nsGridContainerFrame::GetPrefISize(nsRenderingContext* aRC)
|
||||
{
|
||||
DISPLAY_PREF_WIDTH(this, mCachedPrefISize);
|
||||
if (mCachedPrefISize == NS_INTRINSIC_WIDTH_UNKNOWN) {
|
||||
|
|
|
@ -94,8 +94,8 @@ public:
|
|||
ReflowOutput& aDesiredSize,
|
||||
const ReflowInput& aReflowInput,
|
||||
nsReflowStatus& aStatus) override;
|
||||
nscoord GetMinISize(gfxContext* aRenderingContext) override;
|
||||
nscoord GetPrefISize(gfxContext* aRenderingContext) override;
|
||||
nscoord GetMinISize(nsRenderingContext* aRenderingContext) override;
|
||||
nscoord GetPrefISize(nsRenderingContext* aRenderingContext) override;
|
||||
void MarkIntrinsicISizesDirty() override;
|
||||
bool IsFrameOfType(uint32_t aFlags) const override
|
||||
{
|
||||
|
@ -289,7 +289,7 @@ protected:
|
|||
/**
|
||||
* Helper for GetMinISize / GetPrefISize.
|
||||
*/
|
||||
nscoord IntrinsicISize(gfxContext* aRenderingContext,
|
||||
nscoord IntrinsicISize(nsRenderingContext* aRenderingContext,
|
||||
IntrinsicISizeType aConstraint);
|
||||
|
||||
// Helper for AppendFrames / InsertFrames.
|
||||
|
|
|
@ -182,7 +182,7 @@ nsHTMLCanvasFrame::GetCanvasSize()
|
|||
}
|
||||
|
||||
/* virtual */ nscoord
|
||||
nsHTMLCanvasFrame::GetMinISize(gfxContext *aRenderingContext)
|
||||
nsHTMLCanvasFrame::GetMinISize(nsRenderingContext *aRenderingContext)
|
||||
{
|
||||
// XXX The caller doesn't account for constraints of the height,
|
||||
// min-height, and max-height properties.
|
||||
|
@ -194,7 +194,7 @@ nsHTMLCanvasFrame::GetMinISize(gfxContext *aRenderingContext)
|
|||
}
|
||||
|
||||
/* virtual */ nscoord
|
||||
nsHTMLCanvasFrame::GetPrefISize(gfxContext *aRenderingContext)
|
||||
nsHTMLCanvasFrame::GetPrefISize(nsRenderingContext *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(gfxContext *aRenderingContext,
|
||||
nsHTMLCanvasFrame::ComputeSize(nsRenderingContext *aRenderingContext,
|
||||
WritingMode aWM,
|
||||
const LogicalSize& aCBSize,
|
||||
nscoord aAvailableISize,
|
||||
|
|
|
@ -56,13 +56,13 @@ public:
|
|||
/* get the size of the canvas's image */
|
||||
nsIntSize GetCanvasSize();
|
||||
|
||||
virtual nscoord GetMinISize(gfxContext *aRenderingContext) override;
|
||||
virtual nscoord GetPrefISize(gfxContext *aRenderingContext) override;
|
||||
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) override;
|
||||
virtual nscoord GetPrefISize(nsRenderingContext *aRenderingContext) override;
|
||||
virtual mozilla::IntrinsicSize GetIntrinsicSize() override;
|
||||
virtual nsSize GetIntrinsicRatio() override;
|
||||
|
||||
virtual mozilla::LogicalSize
|
||||
ComputeSize(gfxContext *aRenderingContext,
|
||||
ComputeSize(nsRenderingContext *aRenderingContext,
|
||||
mozilla::WritingMode aWritingMode,
|
||||
const mozilla::LogicalSize& aCBSize,
|
||||
nscoord aAvailableISize,
|
||||
|
|
|
@ -66,6 +66,7 @@
|
|||
class nsIAtom;
|
||||
class nsPresContext;
|
||||
class nsIPresShell;
|
||||
class nsRenderingContext;
|
||||
class nsView;
|
||||
class nsIWidget;
|
||||
class nsISelectionController;
|
||||
|
@ -2103,7 +2104,7 @@ public:
|
|||
*
|
||||
* This method must not return a negative value.
|
||||
*/
|
||||
virtual nscoord GetMinISize(gfxContext *aRenderingContext) = 0;
|
||||
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) = 0;
|
||||
|
||||
/**
|
||||
* Get the max-content intrinsic inline size of the frame. This must be
|
||||
|
@ -2111,7 +2112,7 @@ public:
|
|||
*
|
||||
* Otherwise, all the comments for |GetMinISize| above apply.
|
||||
*/
|
||||
virtual nscoord GetPrefISize(gfxContext *aRenderingContext) = 0;
|
||||
virtual nscoord GetPrefISize(nsRenderingContext *aRenderingContext) = 0;
|
||||
|
||||
/**
|
||||
* |InlineIntrinsicISize| represents the intrinsic width information
|
||||
|
@ -2270,7 +2271,7 @@ public:
|
|||
* which calls |GetMinISize|.
|
||||
*/
|
||||
virtual void
|
||||
AddInlineMinISize(gfxContext *aRenderingContext,
|
||||
AddInlineMinISize(nsRenderingContext *aRenderingContext,
|
||||
InlineMinISizeData *aData) = 0;
|
||||
|
||||
/**
|
||||
|
@ -2284,7 +2285,7 @@ public:
|
|||
* based on using all *mandatory* breakpoints within the frame.
|
||||
*/
|
||||
virtual void
|
||||
AddInlinePrefISize(gfxContext *aRenderingContext,
|
||||
AddInlinePrefISize(nsRenderingContext *aRenderingContext,
|
||||
InlinePrefISizeData *aData) = 0;
|
||||
|
||||
/**
|
||||
|
@ -2396,7 +2397,7 @@ public:
|
|||
* @param aFlags Flags to further customize behavior (definitions above).
|
||||
*/
|
||||
virtual mozilla::LogicalSize
|
||||
ComputeSize(gfxContext *aRenderingContext,
|
||||
ComputeSize(nsRenderingContext *aRenderingContext,
|
||||
mozilla::WritingMode aWritingMode,
|
||||
const mozilla::LogicalSize& aCBSize,
|
||||
nscoord aAvailableISize,
|
||||
|
@ -2436,7 +2437,7 @@ public:
|
|||
* @param aXMost computed intrinsic width of the tight bounding rectangle
|
||||
*
|
||||
*/
|
||||
virtual nsresult GetPrefWidthTightBounds(gfxContext* aContext,
|
||||
virtual nsresult GetPrefWidthTightBounds(nsRenderingContext* aContext,
|
||||
nscoord* aX,
|
||||
nscoord* aXMost);
|
||||
|
||||
|
@ -3896,7 +3897,7 @@ public:
|
|||
/**
|
||||
* Helper function - computes the content-box inline size for aCoord.
|
||||
*/
|
||||
nscoord ComputeISizeValue(gfxContext* aRenderingContext,
|
||||
nscoord ComputeISizeValue(nsRenderingContext* aRenderingContext,
|
||||
nscoord aContainingBlockISize,
|
||||
nscoord aContentEdgeToBoxSizing,
|
||||
nscoord aBoxSizingToMarginEdge,
|
||||
|
|
|
@ -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,
|
||||
gfxContext* aRC) = 0;
|
||||
nsRenderingContext* aRC) = 0;
|
||||
/**
|
||||
* Return the width for non-disappearing scrollbars.
|
||||
*/
|
||||
virtual nscoord
|
||||
GetNondisappearingScrollbarWidth(nsPresContext* aPresContext,
|
||||
gfxContext* aRC,
|
||||
nsRenderingContext* aRC,
|
||||
mozilla::WritingMode aWM) = 0;
|
||||
/**
|
||||
* GetScrolledRect is designed to encapsulate deciding which
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
#include "nsImageFrame.h"
|
||||
|
||||
#include "gfx2DGlue.h"
|
||||
#include "gfxContext.h"
|
||||
#include "gfxUtils.h"
|
||||
#include "mozilla/DebugOnly.h"
|
||||
#include "mozilla/EventStates.h"
|
||||
|
@ -24,6 +23,7 @@
|
|||
#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(gfxContext *aRenderingContext,
|
||||
nsImageFrame::ComputeSize(nsRenderingContext *aRenderingContext,
|
||||
WritingMode aWM,
|
||||
const LogicalSize& aCBSize,
|
||||
nscoord aAvailableISize,
|
||||
|
@ -922,7 +922,7 @@ nsImageFrame::GetContinuationOffset() const
|
|||
}
|
||||
|
||||
/* virtual */ nscoord
|
||||
nsImageFrame::GetMinISize(gfxContext *aRenderingContext)
|
||||
nsImageFrame::GetMinISize(nsRenderingContext *aRenderingContext)
|
||||
{
|
||||
// XXX The caller doesn't account for constraints of the height,
|
||||
// min-height, and max-height properties.
|
||||
|
@ -934,7 +934,7 @@ nsImageFrame::GetMinISize(gfxContext *aRenderingContext)
|
|||
}
|
||||
|
||||
/* virtual */ nscoord
|
||||
nsImageFrame::GetPrefISize(gfxContext *aRenderingContext)
|
||||
nsImageFrame::GetPrefISize(nsRenderingContext *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,
|
||||
gfxContext& aContext,
|
||||
nsRenderingContext& aContext,
|
||||
nsFontMetrics& aFontMetrics)
|
||||
{
|
||||
nscoord totalWidth = 0;
|
||||
|
@ -1165,12 +1165,13 @@ nsImageFrame::MeasureString(const char16_t* aString,
|
|||
// between words if a word would extend past the edge of the rectangle
|
||||
void
|
||||
nsImageFrame::DisplayAltText(nsPresContext* aPresContext,
|
||||
gfxContext& aRenderingContext,
|
||||
nsRenderingContext& aRenderingContext,
|
||||
const nsString& aAltText,
|
||||
const nsRect& aRect)
|
||||
{
|
||||
// Set font and color
|
||||
aRenderingContext.SetColor(Color::FromABGR(StyleColor()->mColor));
|
||||
aRenderingContext.ThebesContext()->
|
||||
SetColor(Color::FromABGR(StyleColor()->mColor));
|
||||
RefPtr<nsFontMetrics> fm =
|
||||
nsLayoutUtils::GetInflatedFontMetricsForFrame(this);
|
||||
|
||||
|
@ -1321,7 +1322,7 @@ public:
|
|||
}
|
||||
|
||||
virtual void Paint(nsDisplayListBuilder* aBuilder,
|
||||
gfxContext* aCtx) override
|
||||
nsRenderingContext* 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.
|
||||
|
@ -1341,7 +1342,7 @@ public:
|
|||
};
|
||||
|
||||
DrawResult
|
||||
nsImageFrame::DisplayAltFeedback(gfxContext& aRenderingContext,
|
||||
nsImageFrame::DisplayAltFeedback(nsRenderingContext& aRenderingContext,
|
||||
const nsRect& aDirtyRect,
|
||||
nsPoint aPt,
|
||||
uint32_t aFlags)
|
||||
|
@ -1394,11 +1395,12 @@ nsImageFrame::DisplayAltFeedback(gfxContext& aRenderingContext,
|
|||
}
|
||||
|
||||
DrawTarget* drawTarget = aRenderingContext.GetDrawTarget();
|
||||
gfxContext* gfx = aRenderingContext.ThebesContext();
|
||||
|
||||
// Clip so we don't render outside the inner rect
|
||||
aRenderingContext.Save();
|
||||
aRenderingContext.Clip(
|
||||
NSRectToSnappedRect(inner, PresContext()->AppUnitsPerDevPixel(), *drawTarget));
|
||||
gfx->Save();
|
||||
gfx->Clip(NSRectToSnappedRect(inner, PresContext()->AppUnitsPerDevPixel(),
|
||||
*drawTarget));
|
||||
|
||||
DrawResult result = DrawResult::NOT_READY;
|
||||
|
||||
|
@ -1435,7 +1437,7 @@ nsImageFrame::DisplayAltFeedback(gfxContext& 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(aRenderingContext, PresContext(), imgCon,
|
||||
result = nsLayoutUtils::DrawSingleImage(*gfx, PresContext(), imgCon,
|
||||
nsLayoutUtils::GetSamplingFilterForFrame(this), dest, aDirtyRect,
|
||||
/* no SVGImageContext */ Nothing(), aFlags);
|
||||
}
|
||||
|
@ -1491,7 +1493,7 @@ nsImageFrame::DisplayAltFeedback(gfxContext& aRenderingContext,
|
|||
}
|
||||
}
|
||||
|
||||
aRenderingContext.Restore();
|
||||
aRenderingContext.ThebesContext()->Restore();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
@ -1515,7 +1517,7 @@ static void PaintDebugImageMap(nsIFrame* aFrame, DrawTarget* aDrawTarget,
|
|||
|
||||
void
|
||||
nsDisplayImage::Paint(nsDisplayListBuilder* aBuilder,
|
||||
gfxContext* aCtx)
|
||||
nsRenderingContext* aCtx)
|
||||
{
|
||||
uint32_t flags = imgIContainer::FLAG_NONE;
|
||||
if (aBuilder->ShouldSyncDecodeImages()) {
|
||||
|
@ -1688,7 +1690,7 @@ nsDisplayImage::BuildLayer(nsDisplayListBuilder* aBuilder,
|
|||
}
|
||||
|
||||
DrawResult
|
||||
nsImageFrame::PaintImage(gfxContext& aRenderingContext, nsPoint aPt,
|
||||
nsImageFrame::PaintImage(nsRenderingContext& aRenderingContext, nsPoint aPt,
|
||||
const nsRect& aDirtyRect, imgIContainer* aImage,
|
||||
uint32_t aFlags)
|
||||
{
|
||||
|
@ -1721,7 +1723,7 @@ nsImageFrame::PaintImage(gfxContext& aRenderingContext, nsPoint aPt,
|
|||
SVGImageContext::MaybeStoreContextPaint(svgContext, this, aImage);
|
||||
|
||||
DrawResult result =
|
||||
nsLayoutUtils::DrawSingleImage(aRenderingContext,
|
||||
nsLayoutUtils::DrawSingleImage(*aRenderingContext.ThebesContext(),
|
||||
PresContext(), aImage,
|
||||
nsLayoutUtils::GetSamplingFilterForFrame(this), dest, aDirtyRect,
|
||||
svgContext, flags, &anchorPoint);
|
||||
|
@ -2460,7 +2462,7 @@ IsInAutoWidthTableCellForQuirk(nsIFrame *aFrame)
|
|||
}
|
||||
|
||||
/* virtual */ void
|
||||
nsImageFrame::AddInlineMinISize(gfxContext* aRenderingContext,
|
||||
nsImageFrame::AddInlineMinISize(nsRenderingContext* aRenderingContext,
|
||||
nsIFrame::InlineMinISizeData* aData)
|
||||
{
|
||||
nscoord isize = nsLayoutUtils::IntrinsicForContainer(aRenderingContext,
|
||||
|
|
|
@ -81,8 +81,8 @@ public:
|
|||
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
const nsRect& aDirtyRect,
|
||||
const nsDisplayListSet& aLists) override;
|
||||
virtual nscoord GetMinISize(gfxContext *aRenderingContext) override;
|
||||
virtual nscoord GetPrefISize(gfxContext *aRenderingContext) override;
|
||||
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) override;
|
||||
virtual nscoord GetPrefISize(nsRenderingContext *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(gfxContext& aRenderingContext,
|
||||
DrawResult DisplayAltFeedback(nsRenderingContext& aRenderingContext,
|
||||
const nsRect& aDirtyRect,
|
||||
nsPoint aPt,
|
||||
uint32_t aFlags);
|
||||
|
@ -167,7 +167,7 @@ public:
|
|||
nsImageMap* GetImageMap();
|
||||
nsImageMap* GetExistingImageMap() const { return mImageMap; }
|
||||
|
||||
virtual void AddInlineMinISize(gfxContext *aRenderingContext,
|
||||
virtual void AddInlineMinISize(nsRenderingContext *aRenderingContext,
|
||||
InlineMinISizeData *aData) override;
|
||||
|
||||
void DisconnectMap();
|
||||
|
@ -188,7 +188,7 @@ protected:
|
|||
void EnsureIntrinsicSizeAndRatio();
|
||||
|
||||
virtual mozilla::LogicalSize
|
||||
ComputeSize(gfxContext *aRenderingContext,
|
||||
ComputeSize(nsRenderingContext *aRenderingContext,
|
||||
mozilla::WritingMode aWritingMode,
|
||||
const mozilla::LogicalSize& aCBSize,
|
||||
nscoord aAvailableISize,
|
||||
|
@ -217,15 +217,15 @@ protected:
|
|||
int32_t aLength,
|
||||
nscoord aMaxWidth,
|
||||
uint32_t& aMaxFit,
|
||||
gfxContext& aContext,
|
||||
nsRenderingContext& aContext,
|
||||
nsFontMetrics& aFontMetrics);
|
||||
|
||||
void DisplayAltText(nsPresContext* aPresContext,
|
||||
gfxContext& aRenderingContext,
|
||||
nsRenderingContext& aRenderingContext,
|
||||
const nsString& aAltText,
|
||||
const nsRect& aRect);
|
||||
|
||||
DrawResult PaintImage(gfxContext& aRenderingContext, nsPoint aPt,
|
||||
DrawResult PaintImage(nsRenderingContext& 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,
|
||||
gfxContext* aCtx) override;
|
||||
nsRenderingContext* aCtx) override;
|
||||
|
||||
virtual already_AddRefed<imgIContainer> GetImage() override;
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
|
||||
/* rendering object for CSS display:inline objects */
|
||||
|
||||
#include "gfxContext.h"
|
||||
#include "nsInlineFrame.h"
|
||||
#include "nsLineLayout.h"
|
||||
#include "nsBlockFrame.h"
|
||||
|
@ -13,6 +12,7 @@
|
|||
#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(gfxContext *aRenderingContext,
|
||||
nsInlineFrame::AddInlineMinISize(nsRenderingContext *aRenderingContext,
|
||||
nsIFrame::InlineMinISizeData *aData)
|
||||
{
|
||||
DoInlineIntrinsicISize(aRenderingContext, aData, nsLayoutUtils::MIN_ISIZE);
|
||||
}
|
||||
|
||||
/* virtual */ void
|
||||
nsInlineFrame::AddInlinePrefISize(gfxContext *aRenderingContext,
|
||||
nsInlineFrame::AddInlinePrefISize(nsRenderingContext *aRenderingContext,
|
||||
nsIFrame::InlinePrefISizeData *aData)
|
||||
{
|
||||
DoInlineIntrinsicISize(aRenderingContext, aData, nsLayoutUtils::PREF_ISIZE);
|
||||
|
@ -272,7 +272,7 @@ nsInlineFrame::AddInlinePrefISize(gfxContext *aRenderingContext,
|
|||
|
||||
/* virtual */
|
||||
LogicalSize
|
||||
nsInlineFrame::ComputeSize(gfxContext *aRenderingContext,
|
||||
nsInlineFrame::ComputeSize(nsRenderingContext *aRenderingContext,
|
||||
WritingMode aWM,
|
||||
const LogicalSize& aCBSize,
|
||||
nscoord aAvailableISize,
|
||||
|
|
|
@ -63,12 +63,12 @@ public:
|
|||
virtual nsresult StealFrame(nsIFrame* aChild) override;
|
||||
|
||||
// nsIHTMLReflow overrides
|
||||
virtual void AddInlineMinISize(gfxContext *aRenderingContext,
|
||||
virtual void AddInlineMinISize(nsRenderingContext *aRenderingContext,
|
||||
InlineMinISizeData *aData) override;
|
||||
virtual void AddInlinePrefISize(gfxContext *aRenderingContext,
|
||||
virtual void AddInlinePrefISize(nsRenderingContext *aRenderingContext,
|
||||
InlinePrefISizeData *aData) override;
|
||||
virtual mozilla::LogicalSize
|
||||
ComputeSize(gfxContext *aRenderingContext,
|
||||
ComputeSize(nsRenderingContext *aRenderingContext,
|
||||
mozilla::WritingMode aWritingMode,
|
||||
const mozilla::LogicalSize& aCBSize,
|
||||
nscoord aAvailableISize,
|
||||
|
|
|
@ -15,7 +15,7 @@ nsLeafFrame::~nsLeafFrame()
|
|||
}
|
||||
|
||||
/* virtual */ nscoord
|
||||
nsLeafFrame::GetMinISize(gfxContext *aRenderingContext)
|
||||
nsLeafFrame::GetMinISize(nsRenderingContext *aRenderingContext)
|
||||
{
|
||||
nscoord result;
|
||||
DISPLAY_MIN_WIDTH(this, result);
|
||||
|
@ -24,7 +24,7 @@ nsLeafFrame::GetMinISize(gfxContext *aRenderingContext)
|
|||
}
|
||||
|
||||
/* virtual */ nscoord
|
||||
nsLeafFrame::GetPrefISize(gfxContext *aRenderingContext)
|
||||
nsLeafFrame::GetPrefISize(nsRenderingContext *aRenderingContext)
|
||||
{
|
||||
nscoord result;
|
||||
DISPLAY_PREF_WIDTH(this, result);
|
||||
|
@ -34,7 +34,7 @@ nsLeafFrame::GetPrefISize(gfxContext *aRenderingContext)
|
|||
|
||||
/* virtual */
|
||||
LogicalSize
|
||||
nsLeafFrame::ComputeAutoSize(gfxContext* aRenderingContext,
|
||||
nsLeafFrame::ComputeAutoSize(nsRenderingContext* aRenderingContext,
|
||||
WritingMode aWM,
|
||||
const LogicalSize& aCBSize,
|
||||
nscoord aAvailableISize,
|
||||
|
|
|
@ -34,14 +34,14 @@ public:
|
|||
* Both GetMinISize and GetPrefISize will return whatever GetIntrinsicISize
|
||||
* returns.
|
||||
*/
|
||||
virtual nscoord GetMinISize(gfxContext *aRenderingContext) override;
|
||||
virtual nscoord GetPrefISize(gfxContext *aRenderingContext) override;
|
||||
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) override;
|
||||
virtual nscoord GetPrefISize(nsRenderingContext *aRenderingContext) override;
|
||||
|
||||
/**
|
||||
* Our auto size is just intrinsic width and intrinsic height.
|
||||
*/
|
||||
virtual mozilla::LogicalSize
|
||||
ComputeAutoSize(gfxContext* aRenderingContext,
|
||||
ComputeAutoSize(nsRenderingContext* aRenderingContext,
|
||||
mozilla::WritingMode aWM,
|
||||
const mozilla::LogicalSize& aCBSize,
|
||||
nscoord aAvailableISize,
|
||||
|
|
|
@ -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(gfxContext& aRenderingContext,
|
||||
nscoord nsPageFrame::GetXPosition(nsRenderingContext& aRenderingContext,
|
||||
nsFontMetrics& aFontMetrics,
|
||||
const nsRect& aRect,
|
||||
int32_t aJust,
|
||||
|
@ -268,7 +268,7 @@ nscoord nsPageFrame::GetXPosition(gfxContext& aRenderingContext,
|
|||
// @param aAscent - the ascent of the font
|
||||
// @param aHeight - the height of the font
|
||||
void
|
||||
nsPageFrame::DrawHeaderFooter(gfxContext& aRenderingContext,
|
||||
nsPageFrame::DrawHeaderFooter(nsRenderingContext& aRenderingContext,
|
||||
nsFontMetrics& aFontMetrics,
|
||||
nsHeaderFooterEnum aHeaderFooter,
|
||||
const nsString& aStrLeft,
|
||||
|
@ -313,7 +313,7 @@ nsPageFrame::DrawHeaderFooter(gfxContext& aRenderingContext,
|
|||
// @param aAscent - the ascent of the font
|
||||
// @param aWidth - available width for the string
|
||||
void
|
||||
nsPageFrame::DrawHeaderFooter(gfxContext& aRenderingContext,
|
||||
nsPageFrame::DrawHeaderFooter(nsRenderingContext& aRenderingContext,
|
||||
nsFontMetrics& aFontMetrics,
|
||||
nsHeaderFooterEnum aHeaderFooter,
|
||||
int32_t aJust,
|
||||
|
@ -326,6 +326,7 @@ nsPageFrame::DrawHeaderFooter(gfxContext& aRenderingContext,
|
|||
|
||||
nscoord contentWidth = aWidth - (mPD->mEdgePaperMargin.left + mPD->mEdgePaperMargin.right);
|
||||
|
||||
gfxContext* gfx = aRenderingContext.ThebesContext();
|
||||
DrawTarget* drawTarget = aRenderingContext.GetDrawTarget();
|
||||
|
||||
if ((aHeaderFooter == eHeader && aHeight < mPageContentMargin.top) ||
|
||||
|
@ -380,16 +381,16 @@ nsPageFrame::DrawHeaderFooter(gfxContext& aRenderingContext,
|
|||
}
|
||||
|
||||
// set up new clip and draw the text
|
||||
aRenderingContext.Save();
|
||||
aRenderingContext.Clip(
|
||||
NSRectToSnappedRect(aRect, PresContext()->AppUnitsPerDevPixel(), *drawTarget));
|
||||
aRenderingContext.SetColor(Color(0.f, 0.f, 0.f));
|
||||
gfx->Save();
|
||||
gfx->Clip(NSRectToSnappedRect(aRect, PresContext()->AppUnitsPerDevPixel(),
|
||||
*drawTarget));
|
||||
gfx->SetColor(Color(0.f, 0.f, 0.f));
|
||||
nsLayoutUtils::DrawString(this, aFontMetrics, &aRenderingContext,
|
||||
str.get(), str.Length(),
|
||||
nsPoint(x, y + aAscent),
|
||||
nullptr,
|
||||
DrawStringFlags::eForceHorizontal);
|
||||
aRenderingContext.Restore();
|
||||
gfx->Restore();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -487,7 +488,7 @@ public:
|
|||
#endif
|
||||
|
||||
virtual void Paint(nsDisplayListBuilder* aBuilder,
|
||||
gfxContext* aCtx) override {
|
||||
nsRenderingContext* aCtx) override {
|
||||
#ifdef DEBUG
|
||||
nsPageFrame* pageFrame = do_QueryFrame(mFrame);
|
||||
MOZ_ASSERT(pageFrame, "We should have an nsPageFrame");
|
||||
|
@ -606,7 +607,7 @@ nsPageFrame::SetPageNumInfo(int32_t aPageNumber, int32_t aTotalPages)
|
|||
|
||||
|
||||
void
|
||||
nsPageFrame::PaintHeaderFooter(gfxContext& aRenderingContext,
|
||||
nsPageFrame::PaintHeaderFooter(nsRenderingContext& aRenderingContext,
|
||||
nsPoint aPt, bool aDisableSubpixelAA)
|
||||
{
|
||||
nsPresContext* pc = PresContext();
|
||||
|
@ -619,7 +620,7 @@ nsPageFrame::PaintHeaderFooter(gfxContext& aRenderingContext,
|
|||
}
|
||||
|
||||
nsRect rect(aPt, mRect.Size());
|
||||
aRenderingContext.SetColor(Color(0.f, 0.f, 0.f));
|
||||
aRenderingContext.ThebesContext()->SetColor(Color(0.f, 0.f, 0.f));
|
||||
|
||||
DrawTargetAutoDisableSubpixelAntialiasing
|
||||
disable(aRenderingContext.GetDrawTarget(), aDisableSubpixelAA);
|
||||
|
|
|
@ -48,7 +48,7 @@ public:
|
|||
// user's settings
|
||||
virtual bool HonorPrintBackgroundSettings() override { return false; }
|
||||
|
||||
void PaintHeaderFooter(gfxContext& aRenderingContext,
|
||||
void PaintHeaderFooter(nsRenderingContext& aRenderingContext,
|
||||
nsPoint aPt, bool aSubpixelAA);
|
||||
|
||||
protected:
|
||||
|
@ -60,13 +60,13 @@ protected:
|
|||
eFooter
|
||||
} nsHeaderFooterEnum;
|
||||
|
||||
nscoord GetXPosition(gfxContext& aRenderingContext,
|
||||
nscoord GetXPosition(nsRenderingContext& aRenderingContext,
|
||||
nsFontMetrics& aFontMetrics,
|
||||
const nsRect& aRect,
|
||||
int32_t aJust,
|
||||
const nsString& aStr);
|
||||
|
||||
void DrawHeaderFooter(gfxContext& aRenderingContext,
|
||||
void DrawHeaderFooter(nsRenderingContext& aRenderingContext,
|
||||
nsFontMetrics& aFontMetrics,
|
||||
nsHeaderFooterEnum aHeaderFooter,
|
||||
int32_t aJust,
|
||||
|
@ -76,7 +76,7 @@ protected:
|
|||
nscoord aAscent,
|
||||
nscoord aWidth);
|
||||
|
||||
void DrawHeaderFooter(gfxContext& aRenderingContext,
|
||||
void DrawHeaderFooter(nsRenderingContext& aRenderingContext,
|
||||
nsFontMetrics& aFontMetrics,
|
||||
nsHeaderFooterEnum aHeaderFooter,
|
||||
const nsString& aStrLeft,
|
||||
|
|
|
@ -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(gfxContext* aRenderingContext,
|
||||
nsPlaceholderFrame::AddInlineMinISize(nsRenderingContext* aRenderingContext,
|
||||
nsIFrame::InlineMinISizeData* aData)
|
||||
{
|
||||
// Override AddInlineMinWith so that *nothing* happens. In
|
||||
|
@ -84,7 +84,7 @@ nsPlaceholderFrame::AddInlineMinISize(gfxContext* aRenderingContext,
|
|||
}
|
||||
|
||||
/* virtual */ void
|
||||
nsPlaceholderFrame::AddInlinePrefISize(gfxContext* aRenderingContext,
|
||||
nsPlaceholderFrame::AddInlinePrefISize(nsRenderingContext* aRenderingContext,
|
||||
nsIFrame::InlinePrefISizeData* aData)
|
||||
{
|
||||
// Override AddInlinePrefWith so that *nothing* happens. In
|
||||
|
|
|
@ -90,9 +90,9 @@ public:
|
|||
// nsIFrame overrides
|
||||
// We need to override GetXULMinSize and GetXULPrefSize because XUL uses
|
||||
// placeholders not within lines.
|
||||
virtual void AddInlineMinISize(gfxContext* aRenderingContext,
|
||||
virtual void AddInlineMinISize(nsRenderingContext* aRenderingContext,
|
||||
InlineMinISizeData* aData) override;
|
||||
virtual void AddInlinePrefISize(gfxContext* aRenderingContext,
|
||||
virtual void AddInlinePrefISize(nsRenderingContext* aRenderingContext,
|
||||
InlinePrefISizeData* aData) override;
|
||||
virtual nsSize GetXULMinSize(nsBoxLayoutState& aBoxLayoutState) override;
|
||||
virtual nsSize GetXULPrefSize(nsBoxLayoutState& aBoxLayoutState) override;
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
#include "nsPluginFrame.h"
|
||||
|
||||
#include "gfx2DGlue.h"
|
||||
#include "gfxContext.h"
|
||||
#include "gfxMatrix.h"
|
||||
#include "mozilla/gfx/2D.h"
|
||||
#include "mozilla/BasicEvents.h"
|
||||
|
@ -31,6 +30,7 @@
|
|||
#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(gfxContext *aRenderingContext)
|
||||
nsPluginFrame::GetMinISize(nsRenderingContext *aRenderingContext)
|
||||
{
|
||||
nscoord result = 0;
|
||||
|
||||
|
@ -392,7 +392,7 @@ nsPluginFrame::GetMinISize(gfxContext *aRenderingContext)
|
|||
}
|
||||
|
||||
/* virtual */ nscoord
|
||||
nsPluginFrame::GetPrefISize(gfxContext *aRenderingContext)
|
||||
nsPluginFrame::GetPrefISize(nsRenderingContext *aRenderingContext)
|
||||
{
|
||||
return nsPluginFrame::GetMinISize(aRenderingContext);
|
||||
}
|
||||
|
@ -871,16 +871,18 @@ nsPluginFrame::DidReflow(nsPresContext* aPresContext,
|
|||
}
|
||||
|
||||
/* static */ void
|
||||
nsPluginFrame::PaintPrintPlugin(nsIFrame* aFrame, gfxContext* aCtx,
|
||||
nsPluginFrame::PaintPrintPlugin(nsIFrame* aFrame, nsRenderingContext* 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(aCtx);
|
||||
aCtx->SetMatrix(aCtx->CurrentMatrix().Translate(devPixelPt));
|
||||
gfxContextMatrixAutoSaveRestore autoSR(ctx);
|
||||
ctx->SetMatrix(ctx->CurrentMatrix().Translate(devPixelPt));
|
||||
|
||||
// FIXME - Bug 385435: Doesn't aDirtyRect need translating too?
|
||||
|
||||
|
@ -998,7 +1000,7 @@ nsDisplayPlugin::GetBounds(nsDisplayListBuilder* aBuilder, bool* aSnap)
|
|||
|
||||
void
|
||||
nsDisplayPlugin::Paint(nsDisplayListBuilder* aBuilder,
|
||||
gfxContext* aCtx)
|
||||
nsRenderingContext* aCtx)
|
||||
{
|
||||
nsPluginFrame* f = static_cast<nsPluginFrame*>(mFrame);
|
||||
bool snap;
|
||||
|
@ -1270,7 +1272,7 @@ nsPluginFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
}
|
||||
|
||||
void
|
||||
nsPluginFrame::PrintPlugin(gfxContext& aRenderingContext,
|
||||
nsPluginFrame::PrintPlugin(nsRenderingContext& aRenderingContext,
|
||||
const nsRect& aDirtyRect)
|
||||
{
|
||||
nsCOMPtr<nsIObjectLoadingContent> obj(do_QueryInterface(mContent));
|
||||
|
@ -1341,15 +1343,17 @@ nsPluginFrame::PrintPlugin(gfxContext& aRenderingContext,
|
|||
window.width = presContext->AppUnitsToDevPixels(contentSize.width);
|
||||
window.height = presContext->AppUnitsToDevPixels(contentSize.height);
|
||||
|
||||
aRenderingContext.Save();
|
||||
gfxContext *ctx = aRenderingContext.ThebesContext();
|
||||
|
||||
ctx->Save();
|
||||
|
||||
/* Make sure plugins don't do any damage outside of where they're supposed to */
|
||||
aRenderingContext.NewPath();
|
||||
ctx->NewPath();
|
||||
gfxRect r(window.x, window.y, window.width, window.height);
|
||||
aRenderingContext.Rectangle(r);
|
||||
aRenderingContext.Clip();
|
||||
ctx->Rectangle(r);
|
||||
ctx->Clip();
|
||||
|
||||
gfxWindowsNativeDrawing nativeDraw(&aRenderingContext, r);
|
||||
gfxWindowsNativeDrawing nativeDraw(ctx, r);
|
||||
do {
|
||||
HDC dc = nativeDraw.BeginNativeDrawing();
|
||||
if (!dc)
|
||||
|
@ -1365,7 +1369,7 @@ nsPluginFrame::PrintPlugin(gfxContext& aRenderingContext,
|
|||
} while (nativeDraw.ShouldRenderAgain());
|
||||
nativeDraw.PaintToContext();
|
||||
|
||||
aRenderingContext.Restore();
|
||||
ctx->Restore();
|
||||
#endif
|
||||
|
||||
// XXX Nav 4.x always sent a SetWindow call after print. Should we do the same?
|
||||
|
@ -1599,7 +1603,7 @@ nsPluginFrame::BuildLayer(nsDisplayListBuilder* aBuilder,
|
|||
|
||||
void
|
||||
nsPluginFrame::PaintPlugin(nsDisplayListBuilder* aBuilder,
|
||||
gfxContext& aRenderingContext,
|
||||
nsRenderingContext& aRenderingContext,
|
||||
const nsRect& aDirtyRect, const nsRect& aPluginRect)
|
||||
{
|
||||
#if defined(MOZ_WIDGET_ANDROID)
|
||||
|
@ -1609,7 +1613,9 @@ nsPluginFrame::PaintPlugin(nsDisplayListBuilder* aBuilder,
|
|||
gfxRect dirtyGfxRect =
|
||||
PresContext()->AppUnitsToGfxUnits(aDirtyRect);
|
||||
|
||||
mInstanceOwner->Paint(aRenderingContext, frameGfxRect, dirtyGfxRect);
|
||||
gfxContext* ctx = aRenderingContext.ThebesContext();
|
||||
|
||||
mInstanceOwner->Paint(ctx, frameGfxRect, dirtyGfxRect);
|
||||
return;
|
||||
}
|
||||
#else
|
||||
|
|
|
@ -70,8 +70,8 @@ public:
|
|||
virtual void Init(nsIContent* aContent,
|
||||
nsContainerFrame* aParent,
|
||||
nsIFrame* aPrevInFlow) override;
|
||||
virtual nscoord GetMinISize(gfxContext *aRenderingContext) override;
|
||||
virtual nscoord GetPrefISize(gfxContext *aRenderingContext) override;
|
||||
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) override;
|
||||
virtual nscoord GetPrefISize(nsRenderingContext *aRenderingContext) override;
|
||||
virtual void Reflow(nsPresContext* aPresContext,
|
||||
ReflowOutput& aDesiredSize,
|
||||
const ReflowInput& aReflowInput,
|
||||
|
@ -252,12 +252,12 @@ protected:
|
|||
LayoutDeviceIntPoint GetRemoteTabChromeOffset();
|
||||
|
||||
static void PaintPrintPlugin(nsIFrame* aFrame,
|
||||
gfxContext* aRenderingContext,
|
||||
nsRenderingContext* aRenderingContext,
|
||||
const nsRect& aDirtyRect, nsPoint aPt);
|
||||
void PrintPlugin(gfxContext& aRenderingContext,
|
||||
void PrintPlugin(nsRenderingContext& aRenderingContext,
|
||||
const nsRect& aDirtyRect);
|
||||
void PaintPlugin(nsDisplayListBuilder* aBuilder,
|
||||
gfxContext& aRenderingContext,
|
||||
nsRenderingContext& 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,
|
||||
gfxContext* aCtx) override;
|
||||
nsRenderingContext* aCtx) override;
|
||||
virtual bool ComputeVisibility(nsDisplayListBuilder* aBuilder,
|
||||
nsRegion* aVisibleRegion) override;
|
||||
|
||||
|
|
|
@ -131,7 +131,7 @@ GetIsLineBreakAllowed(nsIFrame* aFrame, bool aIsLineBreakable,
|
|||
* happens across the boundary of those frames.
|
||||
*/
|
||||
static nscoord
|
||||
CalculateColumnPrefISize(gfxContext* aRenderingContext,
|
||||
CalculateColumnPrefISize(nsRenderingContext* aRenderingContext,
|
||||
const RubyColumnEnumerator& aEnumerator,
|
||||
nsIFrame::InlineIntrinsicISizeData* aBaseISizeData)
|
||||
{
|
||||
|
@ -167,7 +167,7 @@ CalculateColumnPrefISize(gfxContext* aRenderingContext,
|
|||
// See bug 1134945.
|
||||
/* virtual */ void
|
||||
nsRubyBaseContainerFrame::AddInlineMinISize(
|
||||
gfxContext *aRenderingContext, nsIFrame::InlineMinISizeData *aData)
|
||||
nsRenderingContext *aRenderingContext, nsIFrame::InlineMinISizeData *aData)
|
||||
{
|
||||
AutoRubyTextContainerArray textContainers(this);
|
||||
|
||||
|
@ -222,7 +222,7 @@ nsRubyBaseContainerFrame::AddInlineMinISize(
|
|||
|
||||
/* virtual */ void
|
||||
nsRubyBaseContainerFrame::AddInlinePrefISize(
|
||||
gfxContext *aRenderingContext, nsIFrame::InlinePrefISizeData *aData)
|
||||
nsRenderingContext *aRenderingContext, nsIFrame::InlinePrefISizeData *aData)
|
||||
{
|
||||
AutoRubyTextContainerArray textContainers(this);
|
||||
|
||||
|
@ -263,7 +263,7 @@ nsRubyBaseContainerFrame::CanContinueTextRun() const
|
|||
}
|
||||
|
||||
/* virtual */ LogicalSize
|
||||
nsRubyBaseContainerFrame::ComputeSize(gfxContext *aRenderingContext,
|
||||
nsRubyBaseContainerFrame::ComputeSize(nsRenderingContext *aRenderingContext,
|
||||
WritingMode aWM,
|
||||
const LogicalSize& aCBSize,
|
||||
nscoord aAvailableISize,
|
||||
|
|
|
@ -28,12 +28,12 @@ public:
|
|||
// nsIFrame overrides
|
||||
virtual bool IsFrameOfType(uint32_t aFlags) const override;
|
||||
virtual bool CanContinueTextRun() const override;
|
||||
virtual void AddInlineMinISize(gfxContext *aRenderingContext,
|
||||
virtual void AddInlineMinISize(nsRenderingContext *aRenderingContext,
|
||||
InlineMinISizeData *aData) override;
|
||||
virtual void AddInlinePrefISize(gfxContext *aRenderingContext,
|
||||
virtual void AddInlinePrefISize(nsRenderingContext *aRenderingContext,
|
||||
InlinePrefISizeData *aData) override;
|
||||
virtual mozilla::LogicalSize
|
||||
ComputeSize(gfxContext *aRenderingContext,
|
||||
ComputeSize(nsRenderingContext *aRenderingContext,
|
||||
mozilla::WritingMode aWritingMode,
|
||||
const mozilla::LogicalSize& aCBSize,
|
||||
nscoord aAvailableISize,
|
||||
|
|
|
@ -60,7 +60,7 @@ nsRubyFrame::GetFrameName(nsAString& aResult) const
|
|||
#endif
|
||||
|
||||
/* virtual */ void
|
||||
nsRubyFrame::AddInlineMinISize(gfxContext *aRenderingContext,
|
||||
nsRubyFrame::AddInlineMinISize(nsRenderingContext *aRenderingContext,
|
||||
nsIFrame::InlineMinISizeData *aData)
|
||||
{
|
||||
for (nsIFrame* frame = this; frame; frame = frame->GetNextInFlow()) {
|
||||
|
@ -72,7 +72,7 @@ nsRubyFrame::AddInlineMinISize(gfxContext *aRenderingContext,
|
|||
}
|
||||
|
||||
/* virtual */ void
|
||||
nsRubyFrame::AddInlinePrefISize(gfxContext *aRenderingContext,
|
||||
nsRubyFrame::AddInlinePrefISize(nsRenderingContext *aRenderingContext,
|
||||
nsIFrame::InlinePrefISizeData *aData)
|
||||
{
|
||||
for (nsIFrame* frame = this; frame; frame = frame->GetNextInFlow()) {
|
||||
|
|
|
@ -27,9 +27,9 @@ public:
|
|||
|
||||
// nsIFrame overrides
|
||||
virtual bool IsFrameOfType(uint32_t aFlags) const override;
|
||||
virtual void AddInlineMinISize(gfxContext *aRenderingContext,
|
||||
virtual void AddInlineMinISize(nsRenderingContext *aRenderingContext,
|
||||
InlineMinISizeData *aData) override;
|
||||
virtual void AddInlinePrefISize(gfxContext *aRenderingContext,
|
||||
virtual void AddInlinePrefISize(nsRenderingContext *aRenderingContext,
|
||||
InlinePrefISizeData *aData) override;
|
||||
virtual void Reflow(nsPresContext* aPresContext,
|
||||
ReflowOutput& aDesiredSize,
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче