Bug 651017, part 5: mechanical changes.

--HG--
extra : rebase_source : 8bbdf48488736b51d05e734e2e9316c1460cfed5
This commit is contained in:
Zack Weinberg 2011-04-16 18:22:44 -07:00
Родитель 0d75035ecd
Коммит 3929b6bfdd
62 изменённых файлов: 142 добавлений и 142 удалений

Просмотреть файл

@ -466,7 +466,7 @@ nsFontSizeTextAttr::Format(const nscoord& aValue, nsAString& aFormattedValue)
//
// XXX todo: consider sharing this code with layout module? (bug 474621)
float px =
NSAppUnitsToFloatPixels(aValue, nsIDeviceContext::AppUnitsPerCSSPixel());
NSAppUnitsToFloatPixels(aValue, nsDeviceContext::AppUnitsPerCSSPixel());
// Each pt is 4/3 of a CSS pixel.
int pts = NS_lround(px*3/4);

Просмотреть файл

@ -337,7 +337,7 @@ private:
*/
nscoord GetFontSize(nsIFrame *aFrame);
nsIDeviceContext *mDC;
nsDeviceContext *mDC;
};

Просмотреть файл

@ -79,7 +79,7 @@ class nsCSSStyleSheet;
class nsIViewManager;
class nsIDOMEvent;
class nsIDOMEventTarget;
class nsIDeviceContext;
class nsDeviceContext;
class nsIParser;
class nsIDOMNode;
class nsIDOMElement;

Просмотреть файл

@ -128,7 +128,7 @@ nsScreen::GetHeight(PRInt32* aHeight)
NS_IMETHODIMP
nsScreen::GetPixelDepth(PRInt32* aPixelDepth)
{
nsIDeviceContext* context = GetDeviceContext();
nsDeviceContext* context = GetDeviceContext();
if (!context) {
*aPixelDepth = -1;
@ -194,7 +194,7 @@ nsScreen::GetAvailTop(PRInt32* aAvailTop)
return rv;
}
nsIDeviceContext*
nsDeviceContext*
nsScreen::GetDeviceContext()
{
return nsLayoutUtils::GetDeviceContextForScreenInfo(mDocShell);
@ -203,7 +203,7 @@ nsScreen::GetDeviceContext()
nsresult
nsScreen::GetRect(nsRect& aRect)
{
nsIDeviceContext *context = GetDeviceContext();
nsDeviceContext *context = GetDeviceContext();
if (!context) {
return NS_ERROR_FAILURE;
@ -222,7 +222,7 @@ nsScreen::GetRect(nsRect& aRect)
nsresult
nsScreen::GetAvailRect(nsRect& aRect)
{
nsIDeviceContext *context = GetDeviceContext();
nsDeviceContext *context = GetDeviceContext();
if (!context) {
return NS_ERROR_FAILURE;

Просмотреть файл

@ -43,7 +43,7 @@
#include "nsCOMPtr.h"
class nsIDocShell;
class nsIDeviceContext;
class nsDeviceContext;
struct nsRect;
// Script "screen" object
@ -59,7 +59,7 @@ public:
NS_DECL_NSIDOMSCREEN
protected:
nsIDeviceContext* GetDeviceContext();
nsDeviceContext* GetDeviceContext();
nsresult GetRect(nsRect& aRect);
nsresult GetAvailRect(nsRect& aRect);

Просмотреть файл

@ -900,7 +900,7 @@ TabChild::InitWidget(const nsIntSize& size)
nsnull, 0, // no parents
nsIntRect(nsIntPoint(0, 0), size),
nsnull, // HandleWidgetEvent
nsnull // nsIDeviceContext
nsnull // nsDeviceContext
);
RenderFrameChild* remoteFrame =

Просмотреть файл

@ -1197,7 +1197,7 @@ nsCSSRendering::PaintBoxShadowOuter(nsPresContext* aPresContext,
// Draw the widget shape
gfxContextMatrixAutoSaveRestore save(shadowContext);
nsIDeviceContext* devCtx = aPresContext->DeviceContext();
nsDeviceContext* devCtx = aPresContext->DeviceContext();
nsRefPtr<nsRenderingContext> wrapperCtx;
devCtx->CreateRenderingContextInstance(*getter_AddRefs(wrapperCtx));
wrapperCtx->Init(devCtx, shadowContext);

Просмотреть файл

@ -62,7 +62,7 @@
class nsIPresShell;
class nsIContent;
class nsRenderingContext;
class nsIDeviceContext;
class nsDeviceContext;
class nsDisplayTableItem;
class nsDisplayItem;

Просмотреть файл

@ -438,7 +438,7 @@ protected:
nsWeakPtr mContainer; // it owns me!
nsWeakPtr mTopContainerWhilePrinting;
nsCOMPtr<nsIDeviceContext> mDeviceContext; // We create and own this baby
nsRefPtr<nsDeviceContext> mDeviceContext; // We create and own this baby
// the following six items are explicitly in this order
// so they will be destroyed in the reverse order (pinkerton, scc)
@ -2277,7 +2277,7 @@ DocumentViewerImpl::MakeWindow(const nsSize& aSize, nsIView* aContainerView)
if (NS_FAILED(rv))
return rv;
nsIDeviceContext *dx = mPresContext->DeviceContext();
nsDeviceContext *dx = mPresContext->DeviceContext();
rv = mViewManager->Init(dx);
if (NS_FAILED(rv))

Просмотреть файл

@ -3334,7 +3334,7 @@ nsLayoutUtils::DrawSingleUnscaledImage(nsRenderingContext* aRenderingContext,
aImage->GetHeight(&imageSize.height);
NS_ENSURE_TRUE(imageSize.width > 0 && imageSize.height > 0, NS_ERROR_FAILURE);
nscoord appUnitsPerCSSPixel = nsIDeviceContext::AppUnitsPerCSSPixel();
nscoord appUnitsPerCSSPixel = nsDeviceContext::AppUnitsPerCSSPixel();
nsSize size(imageSize.width*appUnitsPerCSSPixel,
imageSize.height*appUnitsPerCSSPixel);
@ -3379,7 +3379,7 @@ nsLayoutUtils::DrawSingleImage(nsRenderingContext* aRenderingContext,
if (aSourceArea) {
source = *aSourceArea;
} else {
nscoord appUnitsPerCSSPixel = nsIDeviceContext::AppUnitsPerCSSPixel();
nscoord appUnitsPerCSSPixel = nsDeviceContext::AppUnitsPerCSSPixel();
source.SizeTo(imageSize.width*appUnitsPerCSSPixel,
imageSize.height*appUnitsPerCSSPixel);
}
@ -3474,7 +3474,7 @@ nsLayoutUtils::GetWholeImageDestination(const nsIntSize& aWholeImageSize,
double scaleY = double(aDestArea.height)/aImageSourceArea.height;
nscoord destOffsetX = NSToCoordRound(aImageSourceArea.x*scaleX);
nscoord destOffsetY = NSToCoordRound(aImageSourceArea.y*scaleY);
nscoord appUnitsPerCSSPixel = nsIDeviceContext::AppUnitsPerCSSPixel();
nscoord appUnitsPerCSSPixel = nsDeviceContext::AppUnitsPerCSSPixel();
nscoord wholeSizeX = NSToCoordRound(aWholeImageSize.width*appUnitsPerCSSPixel*scaleX);
nscoord wholeSizeY = NSToCoordRound(aWholeImageSize.height*appUnitsPerCSSPixel*scaleY);
return nsRect(aDestArea.TopLeft() - nsPoint(destOffsetX, destOffsetY),
@ -3676,7 +3676,7 @@ nsLayoutUtils::GetRectDifferenceStrips(const nsRect& aR1, const nsRect& aR2,
aHStrip->height -= HStripStart;
}
nsIDeviceContext*
nsDeviceContext*
nsLayoutUtils::GetDeviceContextForScreenInfo(nsIDocShell* aDocShell)
{
nsCOMPtr<nsIDocShell> docShell = aDocShell;
@ -3696,7 +3696,7 @@ nsLayoutUtils::GetDeviceContextForScreenInfo(nsIDocShell* aDocShell)
nsRefPtr<nsPresContext> presContext;
docShell->GetPresContext(getter_AddRefs(presContext));
if (presContext) {
nsIDeviceContext* context = presContext->DeviceContext();
nsDeviceContext* context = presContext->DeviceContext();
if (context) {
return context;
}

Просмотреть файл

@ -1212,7 +1212,7 @@ public:
* dimensions for the given docshell. For some reason, this is more
* complicated than it ought to be in multi-monitor situations.
*/
static nsIDeviceContext*
static nsDeviceContext*
GetDeviceContextForScreenInfo(nsIDocShell* aDocShell);
/**

Просмотреть файл

@ -878,7 +878,7 @@ nsPresContext::UpdateAfterPreferencesChanged()
}
nsresult
nsPresContext::Init(nsIDeviceContext* aDeviceContext)
nsPresContext::Init(nsDeviceContext* aDeviceContext)
{
NS_ASSERTION(!mInitialized, "attempt to reinit pres context");
NS_ENSURE_ARG(aDeviceContext);

Просмотреть файл

@ -48,7 +48,7 @@
#include "nsCOMPtr.h"
#include "nsIPresShell.h"
#include "nsRect.h"
#include "nsIDeviceContext.h"
#include "nsDeviceContext.h"
#include "nsFont.h"
#include "nsIWeakReference.h"
#include "nsITheme.h"
@ -196,7 +196,7 @@ public:
/**
* Initialize the presentation context from a particular device.
*/
NS_HIDDEN_(nsresult) Init(nsIDeviceContext* aDeviceContext);
NS_HIDDEN_(nsresult) Init(nsDeviceContext* aDeviceContext);
/**
* Set the presentation shell that this context is bound to.
@ -544,7 +544,7 @@ public:
float GetPrintPreviewScale() { return mPPScale; }
void SetPrintPreviewScale(float aScale) { mPPScale = aScale; }
nsIDeviceContext* DeviceContext() { return mDeviceContext; }
nsDeviceContext* DeviceContext() { return mDeviceContext; }
nsIEventStateManager* EventStateManager() { return mEventManager; }
nsIAtom* GetLanguageFromCharset() { return mLanguage; }
@ -586,25 +586,25 @@ public:
return DevPixelsToAppUnits(mAutoQualityMinFontSizePixelsPref);
}
static PRInt32 AppUnitsPerCSSPixel() { return nsIDeviceContext::AppUnitsPerCSSPixel(); }
static PRInt32 AppUnitsPerCSSPixel() { return nsDeviceContext::AppUnitsPerCSSPixel(); }
PRInt32 AppUnitsPerDevPixel() const { return mDeviceContext->AppUnitsPerDevPixel(); }
static PRInt32 AppUnitsPerCSSInch() { return nsIDeviceContext::AppUnitsPerCSSInch(); }
static PRInt32 AppUnitsPerCSSInch() { return nsDeviceContext::AppUnitsPerCSSInch(); }
static nscoord CSSPixelsToAppUnits(PRInt32 aPixels)
{ return NSIntPixelsToAppUnits(aPixels,
nsIDeviceContext::AppUnitsPerCSSPixel()); }
nsDeviceContext::AppUnitsPerCSSPixel()); }
static nscoord CSSPixelsToAppUnits(float aPixels)
{ return NSFloatPixelsToAppUnits(aPixels,
float(nsIDeviceContext::AppUnitsPerCSSPixel())); }
float(nsDeviceContext::AppUnitsPerCSSPixel())); }
static PRInt32 AppUnitsToIntCSSPixels(nscoord aAppUnits)
{ return NSAppUnitsToIntPixels(aAppUnits,
float(nsIDeviceContext::AppUnitsPerCSSPixel())); }
float(nsDeviceContext::AppUnitsPerCSSPixel())); }
static float AppUnitsToFloatCSSPixels(nscoord aAppUnits)
{ return NSAppUnitsToFloatPixels(aAppUnits,
float(nsIDeviceContext::AppUnitsPerCSSPixel())); }
float(nsDeviceContext::AppUnitsPerCSSPixel())); }
nscoord DevPixelsToAppUnits(PRInt32 aPixels) const
{ return NSIntPixelsToAppUnits(aPixels,
@ -644,7 +644,7 @@ public:
static nscoord CSSTwipsToAppUnits(float aTwips)
{ return NSToCoordRoundWithClamp(
nsIDeviceContext::AppUnitsPerCSSInch() * NS_TWIPS_TO_INCHES(aTwips)); }
nsDeviceContext::AppUnitsPerCSSInch() * NS_TWIPS_TO_INCHES(aTwips)); }
// Margin-specific version, since they often need TwipsToAppUnits
static nsMargin CSSTwipsToAppUnits(const nsIntMargin &marginInTwips)
@ -654,7 +654,7 @@ public:
CSSTwipsToAppUnits(float(marginInTwips.bottom))); }
static nscoord CSSPointsToAppUnits(float aPoints)
{ return NSToCoordRound(aPoints * nsIDeviceContext::AppUnitsPerCSSInch() /
{ return NSToCoordRound(aPoints * nsDeviceContext::AppUnitsPerCSSInch() /
POINTS_PER_INCH_FLOAT); }
nscoord RoundAppUnitsToNearestDevPixels(nscoord aAppUnits) const
@ -1048,7 +1048,7 @@ protected:
nsPresContextType mType;
nsIPresShell* mShell; // [WEAK]
nsCOMPtr<nsIDocument> mDocument;
nsIDeviceContext* mDeviceContext; // [STRONG] could be weak, but
nsDeviceContext* mDeviceContext; // [STRONG] could be weak, but
// better safe than sorry.
// Cannot reintroduce cycles
// since there is no dependency

Просмотреть файл

@ -3758,7 +3758,7 @@ PresShell::GetReferenceRenderingContext()
{
NS_TIME_FUNCTION_MIN(1.0);
nsIDeviceContext* devCtx = mPresContext->DeviceContext();
nsDeviceContext* devCtx = mPresContext->DeviceContext();
nsRefPtr<nsRenderingContext> rc;
if (mPresContext->IsScreen()) {
devCtx->CreateRenderingContextInstance(*getter_AddRefs(rc));
@ -5272,7 +5272,7 @@ PresShell::RenderDocument(const nsRect& aRect, PRUint32 aFlags,
aThebesContext->Translate(gfxPoint(-nsPresContext::AppUnitsToFloatCSSPixels(aRect.x),
-nsPresContext::AppUnitsToFloatCSSPixels(aRect.y)));
nsIDeviceContext* devCtx = mPresContext->DeviceContext();
nsDeviceContext* devCtx = mPresContext->DeviceContext();
gfxFloat scale = gfxFloat(devCtx->AppUnitsPerDevPixel())/nsPresContext::AppUnitsPerCSSPixel();
aThebesContext->Scale(scale, scale);
@ -5550,7 +5550,7 @@ PresShell::PaintRangePaintInfo(nsTArray<nsAutoPtr<RangePaintInfo> >* aItems,
if (!pc || aArea.width == 0 || aArea.height == 0)
return nsnull;
nsIDeviceContext* deviceContext = pc->DeviceContext();
nsDeviceContext* deviceContext = pc->DeviceContext();
// use the rectangle to create the surface
nsIntRect pixelArea = aArea.ToOutsidePixels(pc->AppUnitsPerDevPixel());
@ -8430,7 +8430,7 @@ PresShell::VerifyIncrementalReflow()
nsPresContext::eContext_Galley);
NS_ENSURE_TRUE(cx, PR_FALSE);
nsIDeviceContext *dc = mPresContext->DeviceContext();
nsDeviceContext *dc = mPresContext->DeviceContext();
nsresult rv = cx->Init(dc);
NS_ENSURE_SUCCESS(rv, PR_FALSE);

Просмотреть файл

@ -185,7 +185,7 @@ nsFormControlFrame::GetUsableScreenRect(nsPresContext* aPresContext)
{
nsRect screen;
nsIDeviceContext *context = aPresContext->DeviceContext();
nsDeviceContext *context = aPresContext->DeviceContext();
PRBool dropdownCanOverlapOSBar = PR_FALSE;
nsILookAndFeel *lookAndFeel = aPresContext->LookAndFeel();
lookAndFeel->GetMetric(nsILookAndFeel::eMetric_MenusCanOverlapOSBar,

Просмотреть файл

@ -55,7 +55,7 @@ class nsLineBox;
// Some macros for container classes to do sanity checking on
// width/height/x/y values computed during reflow.
// NOTE: AppUnitsPerCSSPixel value hardwired here to remove the
// dependency on nsIDeviceContext.h. It doesn't matter if it's a
// dependency on nsDeviceContext.h. It doesn't matter if it's a
// little off.
#ifdef DEBUG
#define CRAZY_W (1000000*60)

Просмотреть файл

@ -813,7 +813,7 @@ nsObjectFrame::CreateWidget(nscoord aWidth,
// XXX is the above comment correct?
viewMan->SetViewVisibility(view, nsViewVisibility_kHide);
nsCOMPtr<nsIDeviceContext> dx;
nsRefPtr<nsDeviceContext> dx;
viewMan->GetDeviceContext(*getter_AddRefs(dx));
//this is ugly. it was ripped off from didreflow(). MMP

Просмотреть файл

@ -532,7 +532,7 @@ nsSimplePageSequenceFrame::PrintNextPage()
mPageData->mPrintSettings->GetPrintOptions(nsIPrintSettings::kPrintOddPages, &printOddPages);
// Begin printing of the document
nsIDeviceContext *dc = PresContext()->DeviceContext();
nsDeviceContext *dc = PresContext()->DeviceContext();
nsresult rv = NS_OK;

Просмотреть файл

@ -939,7 +939,7 @@ EndSwapDocShellsForDocument(nsIDocument* aDocument, void*)
NS_PRECONDITION(aDocument, "");
// Our docshell and view trees have been updated for the new hierarchy.
// Now also update all nsThebesDeviceContext::mWidget to that of the
// Now also update all nsDeviceContext::mWidget to that of the
// container view in the new hierarchy.
nsCOMPtr<nsISupports> container = aDocument->GetContainer();
nsCOMPtr<nsIDocShell> ds = do_QueryInterface(container);
@ -951,7 +951,7 @@ EndSwapDocShellsForDocument(nsIDocument* aDocument, void*)
if (dv) {
nsCOMPtr<nsPresContext> pc;
dv->GetPresContext(getter_AddRefs(pc));
nsIDeviceContext* dc = pc ? pc->DeviceContext() : nsnull;
nsDeviceContext* dc = pc ? pc->DeviceContext() : nsnull;
if (dc) {
nsIView* v = dv->FindContainerView();
dc->Init(v ? v->GetNearestWidget(nsnull) : nsnull);

Просмотреть файл

@ -39,7 +39,7 @@
// Interfaces
#include "nsIDOMWindow.h"
#include "nsIDeviceContext.h"
#include "nsDeviceContext.h"
#include "nsIPrintProgressParams.h"
#include "nsIPrintOptions.h"
#include "nsTArray.h"
@ -92,7 +92,7 @@ public:
ePrintDataType mType; // the type of data this is (Printing or Print Preview)
nsCOMPtr<nsIDeviceContext> mPrintDC;
nsRefPtr<nsDeviceContext> mPrintDC;
FILE *mDebugFilePtr; // a file where information can go to when printing
nsPrintObject * mPrintObject;

Просмотреть файл

@ -207,7 +207,7 @@ static const char * gPrintRangeStr[] = {"kRangeAllPages", "kRangeSpecified
// Forward Declarations
static void DumpPrintObjectsListStart(const char * aStr, nsTArray<nsPrintObject*> * aDocList);
static void DumpPrintObjectsTree(nsPrintObject * aPO, int aLevel= 0, FILE* aFD = nsnull);
static void DumpPrintObjectsTreeLayout(nsPrintObject * aPO,nsIDeviceContext * aDC, int aLevel= 0, FILE * aFD = nsnull);
static void DumpPrintObjectsTreeLayout(nsPrintObject * aPO,nsDeviceContext * aDC, int aLevel= 0, FILE * aFD = nsnull);
#define DUMP_DOC_LIST(_title) DumpPrintObjectsListStart((_title), mPrt->mPrintDocList);
#define DUMP_DOC_TREE DumpPrintObjectsTree(mPrt->mPrintObject);
@ -430,7 +430,7 @@ static void RootFrameList(nsPresContext* aPresContext, FILE* out, PRInt32 aInden
static void DumpViews(nsIDocShell* aDocShell, FILE* out);
static void DumpLayoutData(char* aTitleStr, char* aURLStr,
nsPresContext* aPresContext,
nsIDeviceContext * aDC, nsIFrame * aRootFrame,
nsDeviceContext * aDC, nsIFrame * aRootFrame,
nsIDocShell * aDocShell, FILE* aFD);
#endif
@ -3567,7 +3567,7 @@ DumpViews(nsIDocShell* aDocShell, FILE* out)
void DumpLayoutData(char* aTitleStr,
char* aURLStr,
nsPresContext* aPresContext,
nsIDeviceContext * aDC,
nsDeviceContext * aDC,
nsIFrame * aRootFrame,
nsIDocShekk * aDocShell,
FILE* aFD = nsnull)
@ -3701,7 +3701,7 @@ static void GetDocTitleAndURL(nsPrintObject* aPO, char *& aDocStr, char *& aURLS
//-------------------------------------------------------------
static void DumpPrintObjectsTreeLayout(nsPrintObject * aPO,
nsIDeviceContext * aDC,
nsDeviceContext * aDC,
int aLevel, FILE * aFD)
{
if (!kPrintingLogMod || kPrintingLogMod->level != DUMP_LAYOUT_LEVEL) return;

Просмотреть файл

@ -50,7 +50,7 @@
// Classes
class nsPagePrintTimer;
class nsIDocShellTreeNode;
class nsIDeviceContext;
class nsDeviceContext;
class nsIDocumentViewerPrint;
class nsPrintObject;
class nsIDocShell;

Просмотреть файл

@ -111,7 +111,7 @@ GetHeight(nsPresContext* aPresContext, const nsMediaFeature*,
return NS_OK;
}
inline static nsIDeviceContext*
inline static nsDeviceContext*
GetDeviceContextFor(nsPresContext* aPresContext)
{
// It would be nice to call
@ -223,11 +223,11 @@ static nsresult
GetColor(nsPresContext* aPresContext, const nsMediaFeature*,
nsCSSValue& aResult)
{
// FIXME: This implementation is bogus. nsThebesDeviceContext
// FIXME: This implementation is bogus. nsDeviceContext
// doesn't provide reliable information (should be fixed in bug
// 424386).
// FIXME: On a monochrome device, return 0!
nsIDeviceContext *dx = GetDeviceContextFor(aPresContext);
nsDeviceContext *dx = GetDeviceContextFor(aPresContext);
PRUint32 depth;
dx->GetDepth(depth);
// The spec says to use bits *per color component*, so divide by 3,
@ -268,7 +268,7 @@ GetResolution(nsPresContext* aPresContext, const nsMediaFeature*,
nsCSSValue& aResult)
{
// Resolution values are in device pixels, not CSS pixels.
nsIDeviceContext *dx = GetDeviceContextFor(aPresContext);
nsDeviceContext *dx = GetDeviceContextFor(aPresContext);
float dpi = float(dx->AppUnitsPerPhysicalInch()) / float(dx->AppUnitsPerDevPixel());
aResult.SetFloatValue(dpi, eCSSUnit_Inch);
return NS_OK;

Просмотреть файл

@ -2654,7 +2654,7 @@ nsRuleNode::SetFont(nsPresContext* aPresContext, nsStyleContext* aContext,
}
// XXXldb All of this platform-specific stuff should be in the
// nsIDeviceContext implementations, not here.
// nsDeviceContext implementations, not here.
#ifdef XP_WIN
//

Просмотреть файл

@ -177,7 +177,7 @@ protected:
friend class CharacterIterator;
// Use a power of 2 here. It's not so important to match
// nsIDeviceContext::AppUnitsPerDevPixel, but since we do a lot of
// nsDeviceContext::AppUnitsPerDevPixel, but since we do a lot of
// multiplying by 1/GetTextRunUnitsFactor, it's good for it to be a
// power of 2 to avoid accuracy loss.
static PRUint32 GetTextRunUnitsFactor() { return 64; }

Просмотреть файл

@ -1465,7 +1465,7 @@ nsRenderingContext*
nsSVGRenderState::GetRenderingContext(nsIFrame *aFrame)
{
if (!mRenderingContext) {
nsIDeviceContext* devCtx = aFrame->PresContext()->DeviceContext();
nsDeviceContext* devCtx = aFrame->PresContext()->DeviceContext();
devCtx->CreateRenderingContextInstance(*getter_AddRefs(mRenderingContext));
if (!mRenderingContext)
return nsnull;

Просмотреть файл

@ -1158,7 +1158,7 @@ nsMenuPopupFrame::SetPopupPosition(nsIFrame* aAnchorFrame, PRBool aIsMove)
// the screen rectangle of the root frame, in dev pixels.
nsRect rootScreenRect = rootFrame->GetScreenRectInAppUnits();
nsIDeviceContext* devContext = presContext->DeviceContext();
nsDeviceContext* devContext = presContext->DeviceContext();
nscoord offsetForContextMenu = 0;
// if mScreenXPos and mScreenYPos are -1, then we are anchored. If they
// have other values, then the popup appears unanchored at that screen

Просмотреть файл

@ -622,7 +622,7 @@ void nsTextBoxFrame::PaintOneShadow(gfxContext* aCtx,
// Conjure an nsRenderingContext from a gfxContext for DrawText
nsRefPtr<nsRenderingContext> renderingContext = nsnull;
nsIDeviceContext* devCtx = PresContext()->DeviceContext();
nsDeviceContext* devCtx = PresContext()->DeviceContext();
devCtx->CreateRenderingContextInstance(*getter_AddRefs(renderingContext));
if (!renderingContext)
return;

Просмотреть файл

@ -3751,8 +3751,8 @@ nsTreeBodyFrame::PaintProgressMeter(PRInt32 aRowIndex,
PRInt32 width, height;
image->GetWidth(&width);
image->GetHeight(&height);
nsSize size(width*nsIDeviceContext::AppUnitsPerCSSPixel(),
height*nsIDeviceContext::AppUnitsPerCSSPixel());
nsSize size(width*nsDeviceContext::AppUnitsPerCSSPixel(),
height*nsDeviceContext::AppUnitsPerCSSPixel());
nsLayoutUtils::DrawImage(&aRenderingContext, image,
nsLayoutUtils::GetGraphicsFilterForFrame(this),
nsRect(meterRect.TopLeft(), size), meterRect, meterRect.TopLeft(),
@ -3772,8 +3772,8 @@ nsTreeBodyFrame::PaintProgressMeter(PRInt32 aRowIndex,
PRInt32 width, height;
image->GetWidth(&width);
image->GetHeight(&height);
nsSize size(width*nsIDeviceContext::AppUnitsPerCSSPixel(),
height*nsIDeviceContext::AppUnitsPerCSSPixel());
nsSize size(width*nsDeviceContext::AppUnitsPerCSSPixel(),
height*nsDeviceContext::AppUnitsPerCSSPixel());
nsLayoutUtils::DrawImage(&aRenderingContext, image,
nsLayoutUtils::GetGraphicsFilterForFrame(this),
nsRect(meterRect.TopLeft(), size), meterRect, meterRect.TopLeft(),

Просмотреть файл

@ -45,7 +45,7 @@
class nsIWidget;
struct nsRect;
class nsRegion;
class nsIDeviceContext;
class nsDeviceContext;
class nsIViewObserver;
#define NS_IVIEWMANAGER_IID \
@ -63,7 +63,7 @@ public:
* because it holds a reference to this instance.
* @result The result of the initialization, NS_OK if no errors
*/
NS_IMETHOD Init(nsIDeviceContext* aContext) = 0;
NS_IMETHOD Init(nsDeviceContext* aContext) = 0;
/**
* Create an ordinary view
@ -275,7 +275,7 @@ public:
* Get the device context associated with this manager
* @result device context
*/
NS_IMETHOD GetDeviceContext(nsIDeviceContext *&aContext) = 0;
NS_IMETHOD GetDeviceContext(nsDeviceContext *&aContext) = 0;
class UpdateViewBatch {
public:

Просмотреть файл

@ -735,7 +735,7 @@ nsresult nsView::CreateWidget(nsWidgetInitData *aWidgetInitData,
nsIntRect trect = CalcWidgetBounds(aWidgetInitData->mWindowType);
nsCOMPtr<nsIDeviceContext> dx;
nsRefPtr<nsDeviceContext> dx;
mViewManager->GetDeviceContext(*getter_AddRefs(dx));
nsIWidget* parentWidget =
@ -775,7 +775,7 @@ nsresult nsView::CreateWidgetForParent(nsIWidget* aParentWidget,
nsIntRect trect = CalcWidgetBounds(aWidgetInitData->mWindowType);
nsCOMPtr<nsIDeviceContext> dx;
nsRefPtr<nsDeviceContext> dx;
mViewManager->GetDeviceContext(*getter_AddRefs(dx));
mWindow =
@ -802,7 +802,7 @@ nsresult nsView::CreateWidgetForPopup(nsWidgetInitData *aWidgetInitData,
nsIntRect trect = CalcWidgetBounds(aWidgetInitData->mWindowType);
nsCOMPtr<nsIDeviceContext> dx;
nsRefPtr<nsDeviceContext> dx;
mViewManager->GetDeviceContext(*getter_AddRefs(dx));
// XXX/cjones: having these two separate creation cases seems ... um
@ -872,7 +872,7 @@ nsresult nsIView::AttachToTopLevelWidget(nsIWidget* aWidget)
oldView->DetachFromTopLevelWidget();
}
nsCOMPtr<nsIDeviceContext> dx;
nsRefPtr<nsDeviceContext> dx;
mViewManager->GetDeviceContext(*getter_AddRefs(dx));
// Note, the previous device context will be released. Detaching

Просмотреть файл

@ -211,7 +211,7 @@ nsViewManager::CreateRegion(nsIRegion* *result)
// We don't hold a reference to the presentation context because it
// holds a reference to us.
NS_IMETHODIMP nsViewManager::Init(nsIDeviceContext* aContext)
NS_IMETHODIMP nsViewManager::Init(nsDeviceContext* aContext)
{
NS_PRECONDITION(nsnull != aContext, "null ptr");
@ -1521,7 +1521,7 @@ NS_IMETHODIMP nsViewManager::GetViewObserver(nsIViewObserver *&aObserver)
return NS_ERROR_NO_INTERFACE;
}
NS_IMETHODIMP nsViewManager::GetDeviceContext(nsIDeviceContext *&aContext)
NS_IMETHODIMP nsViewManager::GetDeviceContext(nsDeviceContext *&aContext)
{
NS_IF_ADDREF(mContext);
aContext = mContext;

Просмотреть файл

@ -48,7 +48,7 @@
#include "nsIRegion.h"
#include "nsView.h"
#include "nsIViewObserver.h"
#include "nsIDeviceContext.h"
#include "nsDeviceContext.h"
/**
@ -100,7 +100,7 @@ public:
NS_DECL_ISUPPORTS
NS_IMETHOD Init(nsIDeviceContext* aContext);
NS_IMETHOD Init(nsDeviceContext* aContext);
NS_IMETHOD_(nsIView*) CreateView(const nsRect& aBounds,
const nsIView* aParent,
@ -144,7 +144,7 @@ public:
NS_IMETHOD SetViewObserver(nsIViewObserver *aObserver);
NS_IMETHOD GetViewObserver(nsIViewObserver *&aObserver);
NS_IMETHOD GetDeviceContext(nsIDeviceContext *&aContext);
NS_IMETHOD GetDeviceContext(nsDeviceContext *&aContext);
virtual nsIViewManager* BeginUpdateViewBatch(void);
NS_IMETHOD EndUpdateViewBatch(PRUint32 aUpdateFlags);
@ -275,7 +275,7 @@ public: // NOT in nsIViewManager, so private to the view module
}
private:
nsCOMPtr<nsIDeviceContext> mContext;
nsRefPtr<nsDeviceContext> mContext;
nsIViewObserver *mObserver;
// relative to mRootView and set only on the root view manager
nsPoint mMouseLocation;

Просмотреть файл

@ -60,7 +60,7 @@ class nsIAppShell;
class nsIToolkit;
class nsFontMetrics;
class nsRenderingContext;
class nsIDeviceContext;
class nsDeviceContext;
struct nsFont;
class nsIRollupListener;
class nsIMenuRollup;
@ -307,7 +307,7 @@ class nsIWidget : public nsISupports {
nsNativeWidget aNativeParent,
const nsIntRect &aRect,
EVENT_CALLBACK aHandleEventFunction,
nsIDeviceContext *aContext,
nsDeviceContext *aContext,
nsIAppShell *aAppShell = nsnull,
nsIToolkit *aToolkit = nsnull,
nsWidgetInitData *aInitData = nsnull) = 0;
@ -331,7 +331,7 @@ class nsIWidget : public nsISupports {
virtual already_AddRefed<nsIWidget>
CreateChild(const nsIntRect &aRect,
EVENT_CALLBACK aHandleEventFunction,
nsIDeviceContext *aContext,
nsDeviceContext *aContext,
nsIAppShell *aAppShell = nsnull,
nsIToolkit *aToolkit = nsnull,
nsWidgetInitData *aInitData = nsnull,
@ -350,7 +350,7 @@ class nsIWidget : public nsISupports {
* aContext The new device context for the view
*/
NS_IMETHOD AttachViewToTopLevel(EVENT_CALLBACK aViewEventFunction,
nsIDeviceContext *aContext) = 0;
nsDeviceContext *aContext) = 0;
/**
* Accessor functions to get and set secondary client data. Used by
@ -936,7 +936,7 @@ class nsIWidget : public nsISupports {
virtual void FreeNativeData(void * data, PRUint32 aDataType) = 0;//~~~
// GetDeviceContext returns a weak pointer to this widget's device context
virtual nsIDeviceContext* GetDeviceContext() = 0;
virtual nsDeviceContext* GetDeviceContext() = 0;
//@}

Просмотреть файл

@ -197,7 +197,7 @@ nsWindow::Create(nsIWidget *aParent,
nsNativeWidget aNativeParent,
const nsIntRect &aRect,
EVENT_CALLBACK aHandleEventFunction,
nsIDeviceContext *aContext,
nsDeviceContext *aContext,
nsIAppShell *aAppShell,
nsIToolkit *aToolkit,
nsWidgetInitData *aInitData)

Просмотреть файл

@ -86,7 +86,7 @@ public:
nsNativeWidget aNativeParent,
const nsIntRect &aRect,
EVENT_CALLBACK aHandleEventFunction,
nsIDeviceContext *aContext,
nsDeviceContext *aContext,
nsIAppShell *aAppShell,
nsIToolkit *aToolkit,
nsWidgetInitData *aInitData);

Просмотреть файл

@ -308,7 +308,7 @@ public:
nsNativeWidget aNativeParent,
const nsIntRect &aRect,
EVENT_CALLBACK aHandleEventFunction,
nsIDeviceContext *aContext,
nsDeviceContext *aContext,
nsIAppShell *aAppShell = nsnull,
nsIToolkit *aToolkit = nsnull,
nsWidgetInitData *aInitData = nsnull);

Просмотреть файл

@ -534,7 +534,7 @@ nsresult nsChildView::Create(nsIWidget *aParent,
nsNativeWidget aNativeParent,
const nsIntRect &aRect,
EVENT_CALLBACK aHandleEventFunction,
nsIDeviceContext *aContext,
nsDeviceContext *aContext,
nsIAppShell *aAppShell,
nsIToolkit *aToolkit,
nsWidgetInitData *aInitData)

Просмотреть файл

@ -214,7 +214,7 @@ public:
nsNativeWidget aNativeParent,
const nsIntRect &aRect,
EVENT_CALLBACK aHandleEventFunction,
nsIDeviceContext *aContext,
nsDeviceContext *aContext,
nsIAppShell *aAppShell = nsnull,
nsIToolkit *aToolkit = nsnull,
nsWidgetInitData *aInitData = nsnull);
@ -308,7 +308,7 @@ protected:
PRBool aRectIsFrameRect);
nsresult CreatePopupContentView(const nsIntRect &aRect,
EVENT_CALLBACK aHandleEventFunction,
nsIDeviceContext *aContext,
nsDeviceContext *aContext,
nsIAppShell *aAppShell,
nsIToolkit *aToolkit);
void DestroyNativeWindow();

Просмотреть файл

@ -240,7 +240,7 @@ nsresult nsCocoaWindow::Create(nsIWidget *aParent,
nsNativeWidget aNativeParent,
const nsIntRect &aRect,
EVENT_CALLBACK aHandleEventFunction,
nsIDeviceContext *aContext,
nsDeviceContext *aContext,
nsIAppShell *aAppShell,
nsIToolkit *aToolkit,
nsWidgetInitData *aInitData)
@ -448,7 +448,7 @@ nsresult nsCocoaWindow::CreateNativeWindow(const NSRect &aRect,
NS_IMETHODIMP nsCocoaWindow::CreatePopupContentView(const nsIntRect &aRect,
EVENT_CALLBACK aHandleEventFunction,
nsIDeviceContext *aContext,
nsDeviceContext *aContext,
nsIAppShell *aAppShell,
nsIToolkit *aToolkit)
{

Просмотреть файл

@ -49,7 +49,7 @@
#include "gfxASurface.h"
@class CellDrawView;
class nsIDeviceContext;
class nsDeviceContext;
class nsNativeThemeCocoa : private nsNativeTheme,
public nsITheme
@ -66,17 +66,17 @@ public:
PRUint8 aWidgetType,
const nsRect& aRect,
const nsRect& aDirtyRect);
NS_IMETHOD GetWidgetBorder(nsIDeviceContext* aContext,
NS_IMETHOD GetWidgetBorder(nsDeviceContext* aContext,
nsIFrame* aFrame,
PRUint8 aWidgetType,
nsIntMargin* aResult);
virtual PRBool GetWidgetPadding(nsIDeviceContext* aContext,
virtual PRBool GetWidgetPadding(nsDeviceContext* aContext,
nsIFrame* aFrame,
PRUint8 aWidgetType,
nsIntMargin* aResult);
virtual PRBool GetWidgetOverflow(nsIDeviceContext* aContext, nsIFrame* aFrame,
virtual PRBool GetWidgetOverflow(nsDeviceContext* aContext, nsIFrame* aFrame,
PRUint8 aWidgetType, nsRect* aOverflowRect);
NS_IMETHOD GetMinimumWidgetSize(nsRenderingContext* aContext, nsIFrame* aFrame,

Просмотреть файл

@ -1952,7 +1952,7 @@ static const nsIntMargin kAquaComboboxBorder(4, 3, 20, 3);
static const nsIntMargin kAquaSearchfieldBorder(19, 3, 5, 2);
NS_IMETHODIMP
nsNativeThemeCocoa::GetWidgetBorder(nsIDeviceContext* aContext,
nsNativeThemeCocoa::GetWidgetBorder(nsDeviceContext* aContext,
nsIFrame* aFrame,
PRUint8 aWidgetType,
nsIntMargin* aResult)
@ -2059,7 +2059,7 @@ nsNativeThemeCocoa::GetWidgetBorder(nsIDeviceContext* aContext,
// whatever values you want in GetWidgetBorder and only use this to return PR_TRUE
// if you want to override CSS padding values.
PRBool
nsNativeThemeCocoa::GetWidgetPadding(nsIDeviceContext* aContext,
nsNativeThemeCocoa::GetWidgetPadding(nsDeviceContext* aContext,
nsIFrame* aFrame,
PRUint8 aWidgetType,
nsIntMargin* aResult)
@ -2080,7 +2080,7 @@ nsNativeThemeCocoa::GetWidgetPadding(nsIDeviceContext* aContext,
}
PRBool
nsNativeThemeCocoa::GetWidgetOverflow(nsIDeviceContext* aContext, nsIFrame* aFrame,
nsNativeThemeCocoa::GetWidgetOverflow(nsDeviceContext* aContext, nsIFrame* aFrame,
PRUint8 aWidgetType, nsRect* aOverflowRect)
{
switch (aWidgetType) {

Просмотреть файл

@ -878,7 +878,7 @@ nsNativeThemeGTK::DrawWidgetBackground(nsRenderingContext* aContext,
}
NS_IMETHODIMP
nsNativeThemeGTK::GetWidgetBorder(nsIDeviceContext* aContext, nsIFrame* aFrame,
nsNativeThemeGTK::GetWidgetBorder(nsDeviceContext* aContext, nsIFrame* aFrame,
PRUint8 aWidgetType, nsIntMargin* aResult)
{
GtkTextDirection direction = GetTextDirection(aFrame);
@ -929,7 +929,7 @@ nsNativeThemeGTK::GetWidgetBorder(nsIDeviceContext* aContext, nsIFrame* aFrame,
}
PRBool
nsNativeThemeGTK::GetWidgetPadding(nsIDeviceContext* aContext,
nsNativeThemeGTK::GetWidgetPadding(nsDeviceContext* aContext,
nsIFrame* aFrame, PRUint8 aWidgetType,
nsIntMargin* aResult)
{
@ -958,7 +958,7 @@ nsNativeThemeGTK::GetWidgetPadding(nsIDeviceContext* aContext,
}
PRBool
nsNativeThemeGTK::GetWidgetOverflow(nsIDeviceContext* aContext,
nsNativeThemeGTK::GetWidgetOverflow(nsDeviceContext* aContext,
nsIFrame* aFrame, PRUint8 aWidgetType,
nsRect* aOverflowRect)
{

Просмотреть файл

@ -59,15 +59,15 @@ public:
const nsRect& aRect,
const nsRect& aDirtyRect);
NS_IMETHOD GetWidgetBorder(nsIDeviceContext* aContext, nsIFrame* aFrame,
NS_IMETHOD GetWidgetBorder(nsDeviceContext* aContext, nsIFrame* aFrame,
PRUint8 aWidgetType, nsIntMargin* aResult);
virtual NS_HIDDEN_(PRBool) GetWidgetPadding(nsIDeviceContext* aContext,
virtual NS_HIDDEN_(PRBool) GetWidgetPadding(nsDeviceContext* aContext,
nsIFrame* aFrame,
PRUint8 aWidgetType,
nsIntMargin* aResult);
virtual NS_HIDDEN_(PRBool) GetWidgetOverflow(nsIDeviceContext* aContext,
virtual NS_HIDDEN_(PRBool) GetWidgetOverflow(nsDeviceContext* aContext,
nsIFrame* aFrame,
PRUint8 aWidgetType,
nsRect* aOverflowRect);

Просмотреть файл

@ -3822,7 +3822,7 @@ nsWindow::Create(nsIWidget *aParent,
nsNativeWidget aNativeParent,
const nsIntRect &aRect,
EVENT_CALLBACK aHandleEventFunction,
nsIDeviceContext *aContext,
nsDeviceContext *aContext,
nsIAppShell *aAppShell,
nsIToolkit *aToolkit,
nsWidgetInitData *aInitData)

Просмотреть файл

@ -137,7 +137,7 @@ public:
nsNativeWidget aNativeParent,
const nsIntRect &aRect,
EVENT_CALLBACK aHandleEventFunction,
nsIDeviceContext *aContext,
nsDeviceContext *aContext,
nsIAppShell *aAppShell,
nsIToolkit *aToolkit,
nsWidgetInitData *aInitData);

Просмотреть файл

@ -52,7 +52,7 @@
#include <uconv.h> // XXX hack XXX
class nsString;
class nsIDeviceContext;
class nsDeviceContext;
#ifndef min
#define min(a,b) (((a) < (b)) ? (a) : (b))

Просмотреть файл

@ -338,7 +338,7 @@ NS_METHOD nsWindow::Create(nsIWidget* aParent,
nsNativeWidget aNativeParent,
const nsIntRect& aRect,
EVENT_CALLBACK aHandleEventFunction,
nsIDeviceContext* aContext,
nsDeviceContext* aContext,
nsIAppShell* aAppShell,
nsIToolkit* aToolkit,
nsWidgetInitData* aInitData)

Просмотреть файл

@ -165,7 +165,7 @@ public:
nsNativeWidget aNativeParent,
const nsIntRect& aRect,
EVENT_CALLBACK aHandleEventFunction,
nsIDeviceContext* aContext,
nsDeviceContext* aContext,
nsIAppShell* aAppShell = nsnull,
nsIToolkit* aToolkit = nsnull,
nsWidgetInitData* aInitData = nsnull);

Просмотреть файл

@ -346,7 +346,7 @@ nsNativeThemeQt::DrawWidgetBackground(QPainter *qPainter,
}
NS_IMETHODIMP
nsNativeThemeQt::GetWidgetBorder(nsIDeviceContext* ,
nsNativeThemeQt::GetWidgetBorder(nsDeviceContext* ,
nsIFrame* aFrame,
PRUint8 aWidgetType,
nsIntMargin* aResult)
@ -369,7 +369,7 @@ nsNativeThemeQt::GetWidgetBorder(nsIDeviceContext* ,
}
PRBool
nsNativeThemeQt::GetWidgetPadding(nsIDeviceContext* ,
nsNativeThemeQt::GetWidgetPadding(nsDeviceContext* ,
nsIFrame*, PRUint8 aWidgetType,
nsIntMargin* aResult)
{

Просмотреть файл

@ -53,7 +53,7 @@ class QStyleOptionFrameV2;
class QStyleOptionComboBox;
class QRect;
class nsIFrame;
class nsIDeviceContext;
class nsDeviceContext;
class nsNativeThemeQt : private nsNativeTheme,
public nsITheme
@ -68,7 +68,7 @@ public:
const nsRect& aRect,
const nsRect& aClipRect);
NS_IMETHOD GetWidgetBorder(nsIDeviceContext* aContext,
NS_IMETHOD GetWidgetBorder(nsDeviceContext* aContext,
nsIFrame* aFrame,
PRUint8 aWidgetType,
nsIntMargin* aResult);
@ -89,7 +89,7 @@ public:
PRBool WidgetIsContainer(PRUint8 aWidgetType);
virtual NS_HIDDEN_(PRBool) GetWidgetPadding(nsIDeviceContext* aContext,
virtual NS_HIDDEN_(PRBool) GetWidgetPadding(nsDeviceContext* aContext,
nsIFrame* aFrame,
PRUint8 aWidgetType,
nsIntMargin* aResult);

Просмотреть файл

@ -2182,7 +2182,7 @@ nsWindow::Create(nsIWidget *aParent,
nsNativeWidget aNativeParent,
const nsIntRect &aRect,
EVENT_CALLBACK aHandleEventFunction,
nsIDeviceContext *aContext,
nsDeviceContext *aContext,
nsIAppShell *aAppShell,
nsIToolkit *aToolkit,
nsWidgetInitData *aInitData)
@ -2240,7 +2240,7 @@ nsWindow::Create(nsIWidget *aParent,
already_AddRefed<nsIWidget>
nsWindow::CreateChild(const nsIntRect& aRect,
EVENT_CALLBACK aHandleEventFunction,
nsIDeviceContext* aContext,
nsDeviceContext* aContext,
nsIAppShell* aAppShell,
nsIToolkit* aToolkit,
nsWidgetInitData* aInitData,

Просмотреть файл

@ -127,7 +127,7 @@ public:
nsNativeWidget aNativeParent,
const nsIntRect &aRect,
EVENT_CALLBACK aHandleEventFunction,
nsIDeviceContext *aContext,
nsDeviceContext *aContext,
nsIAppShell *aAppShell,
nsIToolkit *aToolkit,
nsWidgetInitData *aInitData);
@ -135,7 +135,7 @@ public:
virtual already_AddRefed<nsIWidget>
CreateChild(const nsIntRect& aRect,
EVENT_CALLBACK aHandleEventFunction,
nsIDeviceContext* aContext,
nsDeviceContext* aContext,
nsIAppShell* aAppShell = nsnull,
nsIToolkit* aToolkit = nsnull,
nsWidgetInitData* aInitData = nsnull,

Просмотреть файл

@ -1584,7 +1584,7 @@ RENDER_AGAIN:
}
NS_IMETHODIMP
nsNativeThemeWin::GetWidgetBorder(nsIDeviceContext* aContext,
nsNativeThemeWin::GetWidgetBorder(nsDeviceContext* aContext,
nsIFrame* aFrame,
PRUint8 aWidgetType,
nsIntMargin* aResult)
@ -1671,7 +1671,7 @@ nsNativeThemeWin::GetWidgetBorder(nsIDeviceContext* aContext,
}
PRBool
nsNativeThemeWin::GetWidgetPadding(nsIDeviceContext* aContext,
nsNativeThemeWin::GetWidgetPadding(nsDeviceContext* aContext,
nsIFrame* aFrame,
PRUint8 aWidgetType,
nsIntMargin* aResult)
@ -1808,7 +1808,7 @@ nsNativeThemeWin::GetWidgetPadding(nsIDeviceContext* aContext,
}
PRBool
nsNativeThemeWin::GetWidgetOverflow(nsIDeviceContext* aContext,
nsNativeThemeWin::GetWidgetOverflow(nsDeviceContext* aContext,
nsIFrame* aFrame,
PRUint8 aOverflowRect,
nsRect* aResult)
@ -2346,7 +2346,7 @@ nsNativeThemeWin::ClassicThemeSupportsWidget(nsPresContext* aPresContext,
}
nsresult
nsNativeThemeWin::ClassicGetWidgetBorder(nsIDeviceContext* aContext,
nsNativeThemeWin::ClassicGetWidgetBorder(nsDeviceContext* aContext,
nsIFrame* aFrame,
PRUint8 aWidgetType,
nsIntMargin* aResult)

Просмотреть файл

@ -58,17 +58,17 @@ public:
const nsRect& aRect,
const nsRect& aDirtyRect);
NS_IMETHOD GetWidgetBorder(nsIDeviceContext* aContext,
NS_IMETHOD GetWidgetBorder(nsDeviceContext* aContext,
nsIFrame* aFrame,
PRUint8 aWidgetType,
nsIntMargin* aResult);
virtual PRBool GetWidgetPadding(nsIDeviceContext* aContext,
virtual PRBool GetWidgetPadding(nsDeviceContext* aContext,
nsIFrame* aFrame,
PRUint8 aWidgetType,
nsIntMargin* aResult);
virtual PRBool GetWidgetOverflow(nsIDeviceContext* aContext,
virtual PRBool GetWidgetOverflow(nsDeviceContext* aContext,
nsIFrame* aFrame,
PRUint8 aWidgetType,
nsRect* aOverflowRect);
@ -109,7 +109,7 @@ protected:
PRUint8 aWidgetType,
const nsRect& aRect,
const nsRect& aClipRect);
nsresult ClassicGetWidgetBorder(nsIDeviceContext* aContext,
nsresult ClassicGetWidgetBorder(nsDeviceContext* aContext,
nsIFrame* aFrame,
PRUint8 aWidgetType,
nsIntMargin* aResult);

Просмотреть файл

@ -549,7 +549,7 @@ nsWindow::Create(nsIWidget *aParent,
nsNativeWidget aNativeParent,
const nsIntRect &aRect,
EVENT_CALLBACK aHandleEventFunction,
nsIDeviceContext *aContext,
nsDeviceContext *aContext,
nsIAppShell *aAppShell,
nsIToolkit *aToolkit,
nsWidgetInitData *aInitData)

Просмотреть файл

@ -118,7 +118,7 @@ public:
nsNativeWidget aNativeParent,
const nsIntRect &aRect,
EVENT_CALLBACK aHandleEventFunction,
nsIDeviceContext *aContext,
nsDeviceContext *aContext,
nsIAppShell *aAppShell = nsnull,
nsIToolkit *aToolkit = nsnull,
nsWidgetInitData *aInitData = nsnull);

Просмотреть файл

@ -108,7 +108,7 @@ PuppetWidget::Create(nsIWidget *aParent,
nsNativeWidget aNativeParent,
const nsIntRect &aRect,
EVENT_CALLBACK aHandleEventFunction,
nsIDeviceContext *aContext,
nsDeviceContext *aContext,
nsIAppShell *aAppShell,
nsIToolkit *aToolkit,
nsWidgetInitData *aInitData)
@ -148,7 +148,7 @@ PuppetWidget::Create(nsIWidget *aParent,
already_AddRefed<nsIWidget>
PuppetWidget::CreateChild(const nsIntRect &aRect,
EVENT_CALLBACK aHandleEventFunction,
nsIDeviceContext *aContext,
nsDeviceContext *aContext,
nsIAppShell *aAppShell,
nsIToolkit *aToolkit,
nsWidgetInitData *aInitData,

Просмотреть файл

@ -74,7 +74,7 @@ public:
nsNativeWidget aNativeParent,
const nsIntRect& aRect,
EVENT_CALLBACK aHandleEventFunction,
nsIDeviceContext* aContext,
nsDeviceContext* aContext,
nsIAppShell* aAppShell = nsnull,
nsIToolkit* aToolkit = nsnull,
nsWidgetInitData* aInitData = nsnull);
@ -82,7 +82,7 @@ public:
virtual already_AddRefed<nsIWidget>
CreateChild(const nsIntRect &aRect,
EVENT_CALLBACK aHandleEventFunction,
nsIDeviceContext *aContext,
nsDeviceContext *aContext,
nsIAppShell *aAppShell = nsnull,
nsIToolkit *aToolkit = nsnull,
nsWidgetInitData *aInitData = nsnull,
@ -166,7 +166,7 @@ public:
//NS_IMETHOD CaptureMouse(PRBool aCapture);
virtual LayerManager* GetLayerManager(LayerManagerPersistence aPersistence = LAYER_MANAGER_CURRENT,
bool* aAllowRetaining = nsnull);
// virtual nsIDeviceContext* GetDeviceContext();
// virtual nsDeviceContext* GetDeviceContext();
virtual gfxASurface* GetThebesSurface();
NS_IMETHOD ResetInputState();

Просмотреть файл

@ -588,7 +588,7 @@ nsBaseDragService::DrawDragForImage(nsPresContext* aPresContext,
// if the image is larger than half the screen size, scale it down. This
// scaling algorithm is the same as is used in nsPresShell::PaintRangePaintInfo
nsIDeviceContext* deviceContext = aPresContext->DeviceContext();
nsDeviceContext* deviceContext = aPresContext->DeviceContext();
nsRect maxSize;
deviceContext->GetClientRect(maxSize);
nscoord maxWidth = aPresContext->AppUnitsToDevPixels(maxSize.width >> 1);

Просмотреть файл

@ -37,7 +37,7 @@
* ***** END LICENSE BLOCK ***** */
#include "nsBaseWidget.h"
#include "nsIDeviceContext.h"
#include "nsDeviceContext.h"
#include "nsCOMPtr.h"
#include "nsGfxCIID.h"
#include "nsWidgetsCID.h"
@ -163,7 +163,7 @@ nsBaseWidget::~nsBaseWidget()
void nsBaseWidget::BaseCreate(nsIWidget *aParent,
const nsIntRect &aRect,
EVENT_CALLBACK aHandleEventFunction,
nsIDeviceContext *aContext,
nsDeviceContext *aContext,
nsIAppShell *aAppShell,
nsIToolkit *aToolkit,
nsWidgetInitData *aInitData)
@ -252,7 +252,7 @@ NS_IMETHODIMP nsBaseWidget::SetClientData(void* aClientData)
already_AddRefed<nsIWidget>
nsBaseWidget::CreateChild(const nsIntRect &aRect,
EVENT_CALLBACK aHandleEventFunction,
nsIDeviceContext *aContext,
nsDeviceContext *aContext,
nsIAppShell *aAppShell,
nsIToolkit *aToolkit,
nsWidgetInitData *aInitData,
@ -292,7 +292,7 @@ nsBaseWidget::CreateChild(const nsIntRect &aRect,
// Attach a view to our widget which we'll send events to.
NS_IMETHODIMP
nsBaseWidget::AttachViewToTopLevel(EVENT_CALLBACK aViewEventFunction,
nsIDeviceContext *aContext)
nsDeviceContext *aContext)
{
NS_ASSERTION((mWindowType == eWindowType_toplevel ||
mWindowType == eWindowType_dialog ||
@ -915,7 +915,7 @@ nsIToolkit* nsBaseWidget::GetToolkit()
// Return the used device context
//
//-------------------------------------------------------------------------
nsIDeviceContext* nsBaseWidget::GetDeviceContext()
nsDeviceContext* nsBaseWidget::GetDeviceContext()
{
return mContext;
}

Просмотреть файл

@ -113,7 +113,7 @@ public:
virtual void SetShowsToolbarButton(PRBool aShow) {}
NS_IMETHOD HideWindowChrome(PRBool aShouldHide);
NS_IMETHOD MakeFullScreen(PRBool aFullScreen);
virtual nsIDeviceContext* GetDeviceContext();
virtual nsDeviceContext* GetDeviceContext();
virtual nsIToolkit* GetToolkit();
virtual LayerManager* GetLayerManager(LayerManagerPersistence aPersistence,
bool* aAllowRetaining = nsnull);
@ -164,12 +164,12 @@ public:
virtual already_AddRefed<nsIWidget>
CreateChild(const nsIntRect &aRect,
EVENT_CALLBACK aHandleEventFunction,
nsIDeviceContext *aContext,
nsDeviceContext *aContext,
nsIAppShell *aAppShell = nsnull,
nsIToolkit *aToolkit = nsnull,
nsWidgetInitData *aInitData = nsnull,
PRBool aForceUseIWidgetParent = PR_FALSE);
NS_IMETHOD AttachViewToTopLevel(EVENT_CALLBACK aViewEventFunction, nsIDeviceContext *aContext);
NS_IMETHOD AttachViewToTopLevel(EVENT_CALLBACK aViewEventFunction, nsDeviceContext *aContext);
virtual ViewWrapper* GetAttachedViewPtr();
NS_IMETHOD SetAttachedViewPtr(ViewWrapper* aViewWrapper);
NS_IMETHOD ResizeClient(PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight, PRBool aRepaint);
@ -227,7 +227,7 @@ protected:
virtual void BaseCreate(nsIWidget *aParent,
const nsIntRect &aRect,
EVENT_CALLBACK aHandleEventFunction,
nsIDeviceContext *aContext,
nsDeviceContext *aContext,
nsIAppShell *aAppShell,
nsIToolkit *aToolkit,
nsWidgetInitData *aInitData);
@ -268,7 +268,7 @@ protected:
ViewWrapper* mViewWrapperPtr;
EVENT_CALLBACK mEventCallback;
EVENT_CALLBACK mViewCallback;
nsIDeviceContext* mContext;
nsDeviceContext* mContext;
nsIToolkit* mToolkit;
nsRefPtr<LayerManager> mLayerManager;
nsRefPtr<LayerManager> mBasicLayerManager;