Bug 266236 part 9: Move nsBoundingMetrics to its own header and prune inclusions of nsRenderingContext.h.

--HG--
rename : gfx/src/nsThebesRenderingContext.cpp => gfx/src/nsRenderingContext.cpp
rename : gfx/src/nsThebesRenderingContext.h => gfx/src/nsRenderingContext.h
extra : rebase_source : 92660748436f03475e011184e2828f1db0ad63e0
This commit is contained in:
Zack Weinberg 2011-04-07 18:04:40 -07:00
Родитель 86131020a5
Коммит 1628ea1551
78 изменённых файлов: 208 добавлений и 178 удалений

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

@ -76,7 +76,6 @@
#include "nsReadableUtils.h"
#include "nsColor.h"
#include "nsRenderingContext.h"
#include "nsIDeviceContext.h"
#include "nsGfxCIID.h"
#include "nsIScriptSecurityManager.h"

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

@ -48,8 +48,6 @@
#include "nsDOMError.h"
#include "nsNodeInfoManager.h"
#include "nsRenderingContext.h"
#include "nsICanvasRenderingContextInternal.h"
#include "nsICanvasElementExternal.h"
#include "nsIDOMCanvasRenderingContext2D.h"

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

@ -61,7 +61,6 @@
#include "jstypedarray.h"
#include "nsJSUtils.h"
#include "nsRenderingContext.h"
#include "nsITimer.h"
#include "nsEventDispatcher.h"

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

@ -65,7 +65,6 @@
#include "nsIXPConnect.h"
#include "jsapi.h"
#include "nsRenderingContext.h"
#include "nsITimer.h"
#include "nsEventDispatcher.h"

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

@ -58,7 +58,6 @@
#include "nsIXPConnect.h"
#include "jsapi.h"
#include "nsRenderingContext.h"
#include "nsITimer.h"
#include "nsEventDispatcher.h"

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

@ -47,7 +47,6 @@
#include "nsIDOMHTMLMediaElement.h"
#include "nsNetUtil.h"
#include "nsHTMLMediaElement.h"
#include "nsRenderingContext.h"
#include "gfxContext.h"
#include "nsPresContext.h"
#include "nsDOMError.h"

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

@ -76,7 +76,6 @@
#include "gfxContext.h"
// for painting the background window
#include "nsRenderingContext.h"
#include "nsIDeviceContext.h"
#include "nsIRegion.h"
#include "nsILookAndFeel.h"

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

@ -48,7 +48,6 @@
#include "nsTArray.h"
#include "nsGUIEvent.h"
#include "nsRenderingContext.h"
#include "gfxContext.h"
#include "gfxImageSurface.h"
#include "gfxPattern.h"

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

@ -81,6 +81,7 @@ EXPORTS = \
nsThemeConstants.h \
gfxCrashReporterUtils.h \
nsIThebesFontMetrics.h \
nsBoundingMetrics.h \
$(NULL)
ifdef MOZ_X11

120
gfx/src/nsBoundingMetrics.h Normal file
Просмотреть файл

@ -0,0 +1,120 @@
/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Christopher Blizzard <blizzard@mozilla.org>.
* Portions created by the Initial Developer are Copyright (C) 2002
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef __nsBoundingMetrics_h
#define __nsBoundingMetrics_h
#include "nsCoord.h"
/* Struct used for accurate measurements of a string, in order to
* allow precise positioning when processing MathML. This is in its
* own header file because some very-widely-included headers need it
* but not the rest of nsIFontMetrics, or vice versa.
*/
#ifdef MOZ_MATHML
struct nsBoundingMetrics {
///////////
// Metrics that _exactly_ enclose the text:
// The character coordinate system is the one used on X Windows:
// 1. The origin is located at the intersection of the baseline
// with the left of the character's cell.
// 2. All horizontal bearings are oriented from left to right.
// 2. All horizontal bearings are oriented from left to right.
// 3. The ascent is oriented from bottom to top (being 0 at the orgin).
// 4. The descent is oriented from top to bottom (being 0 at the origin).
// Note that Win32/Mac/PostScript use a different convention for
// the descent (all vertical measurements are oriented from bottom
// to top on these palatforms). Make sure to flip the sign of the
// descent on these platforms for cross-platform compatibility.
// Any of the following member variables listed here can have
// positive or negative value.
nscoord leftBearing;
/* The horizontal distance from the origin of the drawing
operation to the left-most part of the drawn string. */
nscoord rightBearing;
/* The horizontal distance from the origin of the drawing
operation to the right-most part of the drawn string.
The _exact_ width of the string is therefore:
rightBearing - leftBearing */
nscoord ascent;
/* The vertical distance from the origin of the drawing
operation to the top-most part of the drawn string. */
nscoord descent;
/* The vertical distance from the origin of the drawing
operation to the bottom-most part of the drawn string.
The _exact_ height of the string is therefore:
ascent + descent */
nscoord width;
/* The horizontal distance from the origin of the drawing
operation to the correct origin for drawing another string
to follow the current one. Depending on the font, this
could be greater than or less than the right bearing. */
nsBoundingMetrics() : leftBearing(0), rightBearing(0),
ascent(0), descent(0), width(0)
{}
void
operator += (const nsBoundingMetrics& bm) {
if (ascent + descent == 0 && rightBearing - leftBearing == 0) {
ascent = bm.ascent;
descent = bm.descent;
leftBearing = width + bm.leftBearing;
rightBearing = width + bm.rightBearing;
}
else {
if (ascent < bm.ascent) ascent = bm.ascent;
if (descent < bm.descent) descent = bm.descent;
leftBearing = PR_MIN(leftBearing, width + bm.leftBearing);
rightBearing = PR_MAX(rightBearing, width + bm.rightBearing);
}
width += bm.width;
}
};
#endif // MOZ_MATHML
#endif // __nsBoundingMetrics_h

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

@ -38,6 +38,8 @@
* ***** END LICENSE BLOCK ***** */
#include "nsRenderingContext.h"
#include "nsBoundingMetrics.h"
#include "nsRegion.h"
// XXXTodo: rename FORM_TWIPS to FROM_APPUNITS
#define FROM_TWIPS(_x) ((gfxFloat)((_x)/(mP2A)))

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

@ -39,16 +39,16 @@
#ifndef NSRENDERINGCONTEXT__H__
#define NSRENDERINGCONTEXT__H__
#include "nsAutoPtr.h"
#include "nsCOMPtr.h"
#include "nsIDeviceContext.h"
#include "nsIThebesFontMetrics.h"
#include "nsIRegion.h"
#include "nsPoint.h"
#include "nsSize.h"
#include "nsColor.h"
#include "nsRect.h"
#include "nsCoord.h"
#include "gfxContext.h"
class nsIntRegion;
typedef enum {
nsLineStyle_kNone = 0,
nsLineStyle_kSolid = 1,
@ -56,81 +56,6 @@ typedef enum {
nsLineStyle_kDotted = 3
} nsLineStyle;
#ifdef MOZ_MATHML
/* Struct used for accurate measurements of a string in order
* to allow precise positioning when processing MathML.
*/
struct nsBoundingMetrics {
///////////
// Metrics that _exactly_ enclose the text:
// The character coordinate system is the one used on X Windows:
// 1. The origin is located at the intersection of the baseline
// with the left of the character's cell.
// 2. All horizontal bearings are oriented from left to right.
// 2. All horizontal bearings are oriented from left to right.
// 3. The ascent is oriented from bottom to top (being 0 at the orgin).
// 4. The descent is oriented from top to bottom (being 0 at the origin).
// Note that Win32/Mac/PostScript use a different convention for
// the descent (all vertical measurements are oriented from bottom
// to top on these palatforms). Make sure to flip the sign of the
// descent on these platforms for cross-platform compatibility.
// Any of the following member variables listed here can have
// positive or negative value.
nscoord leftBearing;
/* The horizontal distance from the origin of the drawing
operation to the left-most part of the drawn string. */
nscoord rightBearing;
/* The horizontal distance from the origin of the drawing
operation to the right-most part of the drawn string.
The _exact_ width of the string is therefore:
rightBearing - leftBearing */
nscoord ascent;
/* The vertical distance from the origin of the drawing
operation to the top-most part of the drawn string. */
nscoord descent;
/* The vertical distance from the origin of the drawing
operation to the bottom-most part of the drawn string.
The _exact_ height of the string is therefore:
ascent + descent */
nscoord width;
/* The horizontal distance from the origin of the drawing
operation to the correct origin for drawing another string
to follow the current one. Depending on the font, this
could be greater than or less than the right bearing. */
nsBoundingMetrics() : leftBearing(0), rightBearing(0),
ascent(0), descent(0), width(0)
{}
void
operator += (const nsBoundingMetrics& bm) {
if (ascent + descent == 0 && rightBearing - leftBearing == 0) {
ascent = bm.ascent;
descent = bm.descent;
leftBearing = width + bm.leftBearing;
rightBearing = width + bm.rightBearing;
}
else {
if (ascent < bm.ascent) ascent = bm.ascent;
if (descent < bm.descent) descent = bm.descent;
leftBearing = PR_MIN(leftBearing, width + bm.leftBearing);
rightBearing = PR_MAX(rightBearing, width + bm.rightBearing);
}
width += bm.width;
}
};
#endif // MOZ_MATHML
class nsRenderingContext
{
public:

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

@ -40,7 +40,6 @@
#include <stdlib.h>
#include "nsSystemFontsGTK2.h"
#include "nsRenderingContext.h"
#include "prlink.h"
#include <gtk/gtk.h>

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

@ -38,8 +38,8 @@
#ifndef _NS_SYSTEMFONTSMAC_H_
#define _NS_SYSTEMFONTSMAC_H_
#include <gfxFont.h>
#include <nsIDeviceContext.h>
#include "gfxFont.h"
#include "nsIDeviceContext.h"
class nsSystemFontsMac
{

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

@ -39,7 +39,7 @@
#include "nsFont.h"
#include "nsGfxCIID.h"
#include "nsIFontMetrics.h"
#include "nsIThebesFontMetrics.h"
#include "nsHashtable.h"
#include "nsILanguageAtomService.h"
#include "nsUnicharUtils.h"

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

@ -36,7 +36,9 @@
*
* ***** END LICENSE BLOCK ***** */
#include "nsThebesFontMetrics.h"
#include "nsThebesFontMetrics.h"
#include "nsBoundingMetrics.h"
#include "nsThebesDeviceContext.h"
#include "nsFont.h"
#include "nsString.h"

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

@ -40,14 +40,15 @@
#define NSTHEBESFONTMETRICS__H__
#include "nsIThebesFontMetrics.h"
#include "nsRenderingContext.h"
#include "nsCOMPtr.h"
#include "nsThebesDeviceContext.h"
#include "nsIAtom.h"
#include "nsRenderingContext.h"
#include "gfxFont.h"
#include "gfxTextRunCache.h"
class nsIAtom;
class nsIDeviceContext;
class nsThebesDeviceContext;
class nsThebesFontMetrics : public nsIThebesFontMetrics
{
public:
@ -57,7 +58,7 @@ public:
NS_DECL_ISUPPORTS
NS_IMETHOD Init(const nsFont& aFont, nsIAtom* aLanguage,
nsIDeviceContext *aContext,
nsIDeviceContext *aContext,
gfxUserFontSet *aUserFontSet = nsnull);
NS_IMETHOD Destroy();
NS_IMETHOD GetXHeight(nscoord& aResult);

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

@ -47,6 +47,7 @@
#include "nsCSSFrameConstructor.h"
#include "gfxUtils.h"
#include "nsImageFrame.h"
#include "nsRenderingContext.h"
#ifdef DEBUG
#include <stdio.h>

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

@ -40,7 +40,6 @@
#ifndef nsCSSRendering_h___
#define nsCSSRendering_h___
#include "nsRenderingContext.h"
#include "nsStyleConsts.h"
#include "gfxBlur.h"
#include "gfxContext.h"
@ -49,6 +48,7 @@
struct nsPoint;
class nsStyleContext;
class nsPresContext;
class nsRenderingContext;
struct nsCSSRendering {
/**

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

@ -45,6 +45,7 @@
#include "nsDisplayList.h"
#include "nsCSSRendering.h"
#include "nsRenderingContext.h"
#include "nsISelectionController.h"
#include "nsIPresShell.h"
#include "nsRegion.h"

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

@ -1325,13 +1325,12 @@ public:
MOZ_COUNT_DTOR(nsDisplayReflowCount);
}
#endif
virtual void Paint(nsDisplayListBuilder* aBuilder, nsRenderingContext* aCtx) {
nsPoint pt = ToReferenceFrame();
nsRenderingContext::AutoPushTranslation translate(aCtx, pt);
mFrame->PresContext()->PresShell()->PaintCount(mFrameName, aCtx,
mFrame->PresContext(),
mFrame, mColor);
mFrame->PresContext(),
mFrame, ToReferenceFrame(),
mColor);
}
NS_DISPLAY_DECL_NAME("nsDisplayReflowCount", TYPE_REFLOW_COUNT)
protected:

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

@ -128,6 +128,7 @@
#include "nsGfxCIID.h"
#include "nsStyleSheetService.h"
#include "nsURILoader.h"
#include "nsRenderingContext.h"
#include "nsIPrompt.h"
#include "imgIContainer.h" // image animation mode constants

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

@ -806,6 +806,7 @@ public:
nsRenderingContext* aRenderingContext,
nsPresContext * aPresContext,
nsIFrame * aFrame,
const nsPoint& aOffset,
PRUint32 aColor) = 0;
virtual NS_HIDDEN_(void) SetPaintFrameCount(PRBool aOn) = 0;
virtual PRBool IsPaintingFrameCounts() = 0;

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

@ -52,7 +52,6 @@
#include "nsImageLoader.h"
#include "nsIContent.h"
#include "nsIFrame.h"
#include "nsRenderingContext.h"
#include "nsIURL.h"
#include "nsIDocument.h"
#include "nsStyleContext.h"

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

@ -139,9 +139,9 @@
#include "nsDisplayList.h"
#include "nsIRegion.h"
#include "nsRegion.h"
#include "nsRenderingContext.h"
#ifdef MOZ_REFLOW_PERF
#include "nsRenderingContext.h"
#include "nsIFontMetrics.h"
#endif
@ -407,7 +407,9 @@ public:
void Add(const char * aName, nsIFrame * aFrame);
ReflowCounter * LookUp(const char * aName);
void PaintCount(const char * aName, nsRenderingContext* aRenderingContext, nsPresContext* aPresContext, nsIFrame * aFrame, PRUint32 aColor);
void PaintCount(const char *aName, nsRenderingContext* aRenderingContext,
nsPresContext *aPresContext, nsIFrame *aFrame,
const nsPoint &aOffset, PRUint32 aColor);
FILE * GetOutFile() { return mFD; }
@ -933,6 +935,7 @@ public:
nsRenderingContext* aRenderingContext,
nsPresContext* aPresContext,
nsIFrame * aFrame,
const nsPoint& aOffset,
PRUint32 aColor);
virtual NS_HIDDEN_(void) SetPaintFrameCount(PRBool aOn);
virtual PRBool IsPaintingFrameCounts();
@ -8593,10 +8596,12 @@ PresShell::PaintCount(const char * aName,
nsRenderingContext* aRenderingContext,
nsPresContext* aPresContext,
nsIFrame * aFrame,
const nsPoint& aOffset,
PRUint32 aColor)
{
if (mReflowCountMgr) {
mReflowCountMgr->PaintCount(aName, aRenderingContext, aPresContext, aFrame, aColor);
mReflowCountMgr->PaintCount(aName, aRenderingContext, aPresContext,
aFrame, aOffset, aColor);
}
}
@ -8779,20 +8784,23 @@ void ReflowCountMgr::Add(const char * aName, nsIFrame * aFrame)
}
//------------------------------------------------------------------
void ReflowCountMgr::PaintCount(const char * aName,
nsRenderingContext* aRenderingContext,
nsPresContext* aPresContext,
nsIFrame* aFrame,
void ReflowCountMgr::PaintCount(const char* aName,
nsRenderingContext* aRenderingContext,
nsPresContext* aPresContext,
nsIFrame* aFrame,
const nsPoint& aOffset,
PRUint32 aColor)
{
if (mPaintFrameByFrameCounts &&
nsnull != mIndiFrameCounts &&
if (mPaintFrameByFrameCounts &&
nsnull != mIndiFrameCounts &&
aFrame != nsnull) {
char * key = new char[16];
sprintf(key, "%p", (void*)aFrame);
IndiReflowCounter * counter = (IndiReflowCounter *)PL_HashTableLookup(mIndiFrameCounts, key);
IndiReflowCounter * counter =
(IndiReflowCounter *)PL_HashTableLookup(mIndiFrameCounts, key);
if (counter != nsnull && counter->mName.EqualsASCII(aName)) {
aRenderingContext->PushState();
aRenderingContext->Translate(aOffset);
nsFont font("Times", NS_FONT_STYLE_NORMAL, NS_FONT_VARIANT_NORMAL,
NS_FONT_WEIGHT_NORMAL, NS_FONT_STRETCH_NORMAL, 0,
nsPresContext::CSSPixelsToAppUnits(11));

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

@ -35,7 +35,6 @@
*
* ***** END LICENSE BLOCK ***** */
#include "nsButtonFrameRenderer.h"
#include "nsRenderingContext.h"
#include "nsCSSRendering.h"
#include "nsPresContext.h"
#include "nsGkAtoms.h"

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

@ -91,6 +91,7 @@
#include "nsITheme.h"
#include "nsThemeConstants.h"
#include "nsPLDOMEvent.h"
#include "nsRenderingContext.h"
namespace dom = mozilla::dom;

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

@ -61,6 +61,7 @@
#endif
#include "nsIServiceManager.h"
#include "nsDisplayList.h"
#include "nsRenderingContext.h"
class nsLegendFrame;

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

@ -39,6 +39,7 @@
#include "nsIContent.h"
#include "nsCOMPtr.h"
#include "nsCSSRendering.h"
#include "nsRenderingContext.h"
#ifdef ACCESSIBILITY
#include "nsAccessibilityService.h"
#endif

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

@ -39,6 +39,7 @@
#include "nsIContent.h"
#include "nsCOMPtr.h"
#include "nsCSSRendering.h"
#include "nsRenderingContext.h"
#ifdef ACCESSIBILITY
#include "nsAccessibilityService.h"
#endif

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

@ -43,7 +43,6 @@
#include "nsHTMLParts.h"
#include "nsIFormControl.h"
#include "nsRenderingContext.h"
#include "nsPresContext.h"
#include "nsIPresShell.h"
#include "nsStyleContext.h"

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

@ -39,7 +39,6 @@
#include "nsIFormControlFrame.h"
#include "nsIFormControl.h"
#include "nsHTMLParts.h"
#include "nsRenderingContext.h"
#include "nsPresContext.h"
#include "nsIPresShell.h"
#include "nsStyleContext.h"

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

@ -68,6 +68,7 @@
#include "nsIContent.h"
#include "nsIAtom.h"
#include "nsPresContext.h"
#include "nsRenderingContext.h"
#include "nsGkAtoms.h"
#include "nsLayoutUtils.h"
#include "nsIComponentManager.h"

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

@ -89,6 +89,7 @@
#include "nsCSSFrameConstructor.h"
#include "nsCSSRendering.h"
#include "FrameLayerBuilder.h"
#include "nsRenderingContext.h"
#ifdef IBMBIDI
#include "nsBidiPresUtils.h"

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

@ -40,17 +40,15 @@
#ifndef nsCanvasFrame_h___
#define nsCanvasFrame_h___
#include "nsHTMLContainerFrame.h"
#include "nsStyleContext.h"
#include "nsRenderingContext.h"
#include "nsGUIEvent.h"
#include "nsGkAtoms.h"
#include "nsIScrollPositionListener.h"
#include "nsDisplayList.h"
#include "nsAbsoluteContainingBlock.h"
#include "nsDisplayList.h"
#include "nsGkAtoms.h"
class nsPresContext;
class nsRenderingContext;
class nsEvent;
/**
* Root frame class.
@ -59,7 +57,7 @@ class nsPresContext;
* It only supports having a single child frame which must be an area
* frame
*/
class nsCanvasFrame : public nsHTMLContainerFrame,
class nsCanvasFrame : public nsHTMLContainerFrame,
public nsIScrollPositionListener
{
public:

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

@ -44,7 +44,6 @@
#include "nsIContent.h"
#include "nsIDocument.h"
#include "nsPresContext.h"
#include "nsRenderingContext.h"
#include "nsStyleContext.h"
#include "nsRect.h"
#include "nsPoint.h"

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

@ -44,8 +44,7 @@
#include "nsISupports.h"
#include "nsMargin.h"
#include "nsRect.h"
// for MOZ_MATHML
#include "nsRenderingContext.h" //to get struct nsBoundingMetrics
#include "nsBoundingMetrics.h" // for MOZ_MATHML
//----------------------------------------------------------------------

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

@ -47,7 +47,6 @@
#include "nsPresContext.h"
#include "nsIPresShell.h"
#include "nsIDeviceContext.h"
#include "nsRenderingContext.h"
#include "nsIFontMetrics.h"
#include "nsBlockFrame.h"
#include "nsLineBox.h"

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

@ -42,7 +42,6 @@
#include "nsHTMLParts.h"
#include "nsIContent.h"
#include "nsPresContext.h"
#include "nsRenderingContext.h"
#include "nsGkAtoms.h"
#include "nsIPresShell.h"
#include "nsIDeviceContext.h"

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

@ -82,7 +82,6 @@ using mozilla::layout::RenderFrameParent;
#include "nsWeakReference.h"
#include "nsIDOMWindow.h"
#include "nsIDOMDocument.h"
#include "nsRenderingContext.h"
#include "nsIDOMNSHTMLDocument.h"
#include "nsDisplayList.h"
#include "nsUnicharUtils.h"

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

@ -47,7 +47,6 @@
#include "nsHTMLVideoElement.h"
#include "nsIDOMHTMLVideoElement.h"
#include "nsDisplayList.h"
#include "nsRenderingContext.h"
#include "gfxContext.h"
#include "gfxImageSurface.h"
#include "nsPresContext.h"

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

@ -57,6 +57,7 @@
#include "nsIDocument.h"
#include "nsIServiceManager.h"
#include "nsITreeColumns.h"
#include "mozilla/dom/Element.h"
#ifdef ACCESSIBILITY
#include "nsIAccessible.h"

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

@ -46,6 +46,8 @@
#include "nsIDOMNodeList.h"
#include "nsServiceManagerUtils.h"
#include "inIDOMUtils.h"
#include "nsIContent.h"
#include "nsBindingManager.h"
/*****************************************************************************
* This implementation does not currently operaate according to the W3C spec.

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

@ -43,6 +43,7 @@
#include "nsIPresShell.h"
#include "nsIFrame.h"
#include "nsReadableUtils.h"
#include "nsRenderingContext.h"
#include "prprf.h"

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

@ -39,17 +39,16 @@
#define __inFlasher_h__
#include "inIFlasher.h"
#include "nsCoord.h"
#include "nsColor.h"
#include "nsIDOMElement.h"
#include "nsRenderingContext.h"
#include "nsCOMPtr.h"
class nsRenderingContext;
#define BOUND_INNER 0
#define BOUND_OUTER 1
#define DIR_VERTICAL 0
#define DIR_HORIZONTAL 1
#define DIR_HORIZONTAL 1
class inFlasher : public inIFlasher
{

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

@ -38,16 +38,15 @@
#ifndef __inLayoutUtils_h__
#define __inLayoutUtils_h__
#include "nsCOMPtr.h"
#include "nsIDOMElement.h"
#include "nsIDOMWindowInternal.h"
#include "nsIFrame.h"
#include "nsRenderingContext.h"
#include "nsIEventStateManager.h"
#include "nsIDOMDocument.h"
#include "nsBindingManager.h"
class nsBindingManager;
class nsIDOMDocument;
class nsIDOMElement;
class nsIDOMNode;
class nsIDOMWindowInternal;
class nsIEventStateManager;
class nsIFrame;
class nsIPresShell;
class nsISupports;
class inLayoutUtils
{

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

@ -40,12 +40,12 @@
#ifndef nsIMathMLFrame_h___
#define nsIMathMLFrame_h___
#include "nsRenderingContext.h"
#include "nsIFrame.h"
struct nsPresentationData;
struct nsEmbellishData;
struct nsHTMLReflowMetrics;
class nsRenderingContext;
// For MathML, this 'type' will be used to determine the spacing between frames
// Subclasses can return a 'type' that will give them a particular spacing

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

@ -49,7 +49,6 @@
#include "nsPresContext.h"
#include "nsStyleContext.h"
#include "nsStyleConsts.h"
#include "nsRenderingContext.h"
#include "nsIFontMetrics.h"
#include "nsMathMLForeignFrameWrapper.h"

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

@ -57,6 +57,7 @@
#include "nsStyleUtil.h"
#include "nsDisplayList.h"
#include "nsAttrName.h"
#include "nsRenderingContext.h"
eMathMLFrameType
nsMathMLFrame::GetMathMLFrameType()

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

@ -41,7 +41,6 @@
#include "nsCOMPtr.h"
#include "nsPresContext.h"
#include "nsRenderingContext.h"
#include "nsIFontMetrics.h"
#include "nsStyleContext.h"
#include "nsMathMLAtoms.h"

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

@ -42,7 +42,6 @@
#include "nsPresContext.h"
#include "nsStyleContext.h"
#include "nsStyleConsts.h"
#include "nsRenderingContext.h"
#include "nsIFontMetrics.h"
#include "nsContentUtils.h"
#include "nsCSSFrameConstructor.h"

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

@ -42,7 +42,6 @@
#include "nsStyleContext.h"
#include "nsStyleConsts.h"
#include "nsINameSpaceManager.h"
#include "nsRenderingContext.h"
#include "nsIFontMetrics.h"
#include "nsCSSRendering.h"

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

@ -45,7 +45,6 @@
#include "nsPresContext.h"
#include "nsStyleContext.h"
#include "nsStyleConsts.h"
#include "nsRenderingContext.h"
#include "nsIFontMetrics.h"
#include "nsMathMLmpaddedFrame.h"

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

@ -42,7 +42,6 @@
#include "nsFrame.h"
#include "nsPresContext.h"
#include "nsStyleConsts.h"
#include "nsRenderingContext.h"
#include "nsIFontMetrics.h"
#include "nsMathMLmphantomFrame.h"

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

@ -42,7 +42,6 @@
#include "nsFrame.h"
#include "nsStyleContext.h"
#include "nsStyleConsts.h"
#include "nsRenderingContext.h"
#include "nsIFontMetrics.h"
#include "nsMathMLmrowFrame.h"

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

@ -42,7 +42,6 @@
#include "nsPresContext.h"
#include "nsStyleContext.h"
#include "nsStyleConsts.h"
#include "nsRenderingContext.h"
#include "nsIFontMetrics.h"
#include "nsMathMLmspaceFrame.h"

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

@ -43,7 +43,6 @@
#include "nsStyleContext.h"
#include "nsStyleConsts.h"
#include "nsINameSpaceManager.h"
#include "nsRenderingContext.h"
#include "nsIFontMetrics.h"
#include "nsMathMLmstyleFrame.h"

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

@ -44,7 +44,6 @@
#include "nsPresContext.h"
#include "nsStyleContext.h"
#include "nsStyleConsts.h"
#include "nsRenderingContext.h"
#include "nsIFontMetrics.h"
#include "nsMathMLmsubFrame.h"

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

@ -43,7 +43,6 @@
#include "nsPresContext.h"
#include "nsStyleContext.h"
#include "nsStyleConsts.h"
#include "nsRenderingContext.h"
#include "nsIFontMetrics.h"
#include "nsMathMLmsupFrame.h"

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

@ -130,6 +130,7 @@ static const char kPrintingPromptService[] = "@mozilla.org/embedcomp/printingpro
#include "nsIDeviceContextSpec.h"
#include "nsIViewManager.h"
#include "nsIView.h"
#include "nsRenderingContext.h"
#include "nsIPageSequenceFrame.h"
#include "nsIURL.h"
@ -2334,7 +2335,7 @@ nsPrintEngine::DoPrint(nsPrintObject * aPO)
poPresContext->SetIsRenderingOnlySelection(PR_TRUE);
// temporarily creating rendering context
// which is needed to dinf the selection frames
// which is needed to find the selection frames
nsRefPtr<nsRenderingContext> rc;
mPrt->mPrintDC->CreateRenderingContext(*getter_AddRefs(rc));

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

@ -40,7 +40,6 @@
#include "nsStyleContext.h"
#include "nsStyleConsts.h"
#include "nsPresContext.h"
#include "nsRenderingContext.h"
#include "nsCSSRendering.h"
#include "nsIContent.h"
#include "prinrval.h"

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

@ -36,7 +36,6 @@
* ***** END LICENSE BLOCK ***** */
#include "nsTableRowFrame.h"
#include "nsTableRowGroupFrame.h"
#include "nsRenderingContext.h"
#include "nsIPresShell.h"
#include "nsPresContext.h"
#include "nsStyleContext.h"

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

@ -40,7 +40,6 @@
#include "nsTableRowFrame.h"
#include "nsTableFrame.h"
#include "nsTableCellFrame.h"
#include "nsRenderingContext.h"
#include "nsPresContext.h"
#include "nsStyleContext.h"
#include "nsStyleConsts.h"

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

@ -50,7 +50,6 @@
#include "nsIDOMNode.h"
#include "nsIDOMNamedNodeMap.h"
#include "nsIDOMAttr.h"
#include "nsRenderingContext.h"
#include "nsIDocument.h"
#include "nsIDeviceContext.h"
#include "nsITheme.h"

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

@ -39,7 +39,6 @@
#include "nsCSSRendering.h"
#include "nsIDocument.h"
#include "nsPageFrame.h"
#include "nsRenderingContext.h"
#include "nsGUIEvent.h"
#include "nsIDOMEvent.h"
#include "nsStyleConsts.h"

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

@ -39,6 +39,7 @@
#include "nsBoxFrame.h"
#include "nsCSSRendering.h"
#include "nsRenderingContext.h"
#include "nsStyleContext.h"
#include "nsDisplayList.h"

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

@ -55,7 +55,6 @@
#include "nsHTMLParts.h"
#include "nsString.h"
#include "nsLeafFrame.h"
#include "nsRenderingContext.h"
#include "nsIPresShell.h"
#include "nsIDocument.h"
#include "nsIHTMLDocument.h"

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

@ -49,7 +49,6 @@
#include "nsIFontMetrics.h"
#include "nsGkAtoms.h"
#include "nsPresContext.h"
#include "nsRenderingContext.h"
#include "nsStyleContext.h"
#include "nsIContent.h"
#include "nsINameSpaceManager.h"

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

@ -58,7 +58,6 @@
#include "nsIView.h"
#include "nsIViewManager.h"
#include "nsStyleContext.h"
#include "nsRenderingContext.h"
#include "nsIDeviceContext.h"
#include "nsIFontMetrics.h"
#include "nsITimer.h"

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

@ -37,7 +37,6 @@
#include "nsHTMLParts.h"
#include "nsIDocument.h"
#include "nsRenderingContext.h"
#include "nsGUIEvent.h"
#include "nsStyleConsts.h"
#include "nsGkAtoms.h"

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

@ -49,6 +49,7 @@
#include "nsIDOMXULElement.h"
#include "nsIDOMDocument.h"
#include "nsPresContext.h"
#include "nsRenderingContext.h"
#include "nsIDocument.h"
#include "nsINameSpaceManager.h"
#include "nsScrollbarButtonFrame.h"

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

@ -106,6 +106,7 @@
#include "nsEventDispatcher.h"
#include "nsDisplayList.h"
#include "nsTreeBoxObject.h"
#include "nsRenderingContext.h"
#ifdef IBMBIDI
#include "nsBidiUtils.h"
@ -2772,8 +2773,8 @@ nsTreeBodyFrame::HandleEvent(nsPresContext* aPresContext,
return NS_OK;
}
nsLineStyle nsTreeBodyFrame::ConvertBorderStyleToLineStyle(PRUint8 aBorderStyle)
static nsLineStyle
ConvertBorderStyleToLineStyle(PRUint8 aBorderStyle)
{
switch (aBorderStyle) {
case NS_STYLE_BORDER_STYLE_DOTTED:

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

@ -382,13 +382,10 @@ protected:
nsresult ScrollToColumnInternal(const ScrollParts& aParts, nsITreeColumn* aCol);
nsresult ScrollHorzInternal(const ScrollParts& aParts, PRInt32 aPosition);
nsresult EnsureRowIsVisibleInternal(const ScrollParts& aParts, PRInt32 aRow);
// Convert client pixels into appunits in our coordinate space.
nsPoint AdjustClientCoordsToBoxCoordSpace(PRInt32 aX, PRInt32 aY);
// Convert a border style into line style.
nsLineStyle ConvertBorderStyleToLineStyle(PRUint8 aBorderStyle);
// Cache the box object
void EnsureBoxObject();

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

@ -41,7 +41,6 @@
#include "nscore.h"
#include "nsIView.h"
#include "nsEvent.h"
#include "nsRenderingContext.h"
class nsIWidget;
struct nsRect;

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

@ -59,6 +59,7 @@
#include "nsIMenuFrame.h"
#include "prlink.h"
#include "nsIDOMHTMLInputElement.h"
#include "nsRenderingContext.h"
#include "nsWidgetAtoms.h"
#include "mozilla/Services.h"

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

@ -47,7 +47,6 @@
#include "nsWindow.h"
#include "nsGTKToolkit.h"
#include "nsIDeviceContext.h"
#include "nsRenderingContext.h"
#include "nsIRollupListener.h"
#include "nsIMenuRollup.h"
#include "nsIDOMNode.h"

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

@ -72,6 +72,7 @@
#include "nsUnicharUtils.h"
#include "gfxASurface.h"
#include "gfxContext.h"
#include "nsRect.h"
#include "nsMathUtils.h"
//-------------------------------------------------------------------------

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

@ -43,9 +43,9 @@
#include "nsITransferable.h"
#include "nsISupportsArray.h"
#include "nsIDOMDocument.h"
#include "nsCOMPtr.h"
#include "nsRenderingContext.h"
#include "nsIDOMDataTransfer.h"
#include "nsCOMPtr.h"
#include "nsPoint.h"
#include "gfxImageSurface.h"