BUg 910160. IWYU for gfx/src. r=roc

This commit is contained in:
Nicholas Cameron 2013-09-02 10:21:01 +12:00
Родитель 9fb3417161
Коммит c0366ce176
23 изменённых файлов: 239 добавлений и 121 удалений

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

@ -6,6 +6,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "X11Util.h"
#include "nsDebug.h" // for NS_ASSERTION, etc
namespace mozilla {

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

@ -21,10 +21,9 @@
# error Unknown toolkit
#endif
#include "mozilla/Scoped.h"
#include "gfxCore.h"
#include "nsDebug.h"
#include <string.h> // for memset
#include "gfxCore.h" // for NS_GFX
#include "mozilla/Scoped.h" // for SCOPED_TEMPLATE
namespace mozilla {

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

@ -10,15 +10,25 @@
#endif
#ifdef MOZ_GFXFEATUREREPORTER
#include "nsExceptionHandler.h"
#include "nsString.h"
#include "nsTArray.h"
#include "nsIObserverService.h"
#include "nsIObserver.h"
#include "nsAutoPtr.h"
#include "nsServiceManagerUtils.h"
#include "mozilla/Services.h"
#include "nsThreadUtils.h"
#include "gfxCrashReporterUtils.h"
#include <string.h> // for strcmp
#include "mozilla/Assertions.h" // for MOZ_ASSERT_HELPER2
#include "mozilla/Services.h" // for GetObserverService
#include "mozilla/mozalloc.h" // for operator new, etc
#include "nsAutoPtr.h" // for nsRefPtr
#include "nsCOMPtr.h" // for nsCOMPtr
#include "nsError.h" // for NS_OK, NS_FAILED, nsresult
#include "nsExceptionHandler.h" // for AppendAppNotesToCrashReport
#include "nsID.h"
#include "nsIEventTarget.h" // for NS_DISPATCH_NORMAL
#include "nsIObserver.h" // for nsIObserver, etc
#include "nsIObserverService.h" // for nsIObserverService
#include "nsIRunnable.h" // for nsIRunnable
#include "nsISupports.h"
#include "nsStringGlue.h" // for nsAutoCString, nsCString, etc
#include "nsTArray.h" // for nsTArray
#include "nsThreadUtils.h" // for NS_DispatchToMainThread, etc
#include "nscore.h" // for NS_IMETHOD, NS_IMETHODIMP, etc
namespace mozilla {

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

@ -5,17 +5,15 @@
#include "mozilla/Util.h"
#include "plstr.h"
#include "nsColor.h"
#include "nsColorNames.h"
#include "nsString.h"
#include "nscore.h"
#include "nsCoord.h"
#include "nsCOMPtr.h"
#include "nsIServiceManager.h"
#include <math.h>
#include "prprf.h"
#include <sys/types.h> // for int32_t
#include "mozilla/Util.h" // for ArrayLength
#include "mozilla/mozalloc.h" // for operator delete, etc
#include "nsColorNames.h" // for nsColorNames
#include "nsDebug.h" // for NS_ASSERTION, etc
#include "nsStaticNameTable.h"
#include "nsStringGlue.h" // for nsAutoCString, nsString, etc
#include "nscore.h" // for nsAString, etc
using namespace mozilla;

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

@ -6,8 +6,11 @@
#ifndef nsColor_h___
#define nsColor_h___
#include "gfxCore.h"
#include "nscore.h"
#include <stddef.h> // for size_t
#include <stdint.h> // for uint8_t, uint32_t
#include "gfxCore.h" // for NS_GFX_
#include "nscore.h" // for nsAString
#include "prtypes.h" // for PR_BEGIN_MACRO, etc
class nsAString;
class nsString;

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

@ -4,24 +4,36 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsDeviceContext.h"
#include <algorithm>
#include "gfxImageSurface.h"
#include "mozilla/Attributes.h"
#include "mozilla/Preferences.h"
#include "mozilla/Services.h"
#include "nsCRT.h"
#include "nsFontMetrics.h"
#include "nsIDeviceContextSpec.h"
#include "nsILanguageAtomService.h"
#include "nsIObserver.h"
#include "nsIObserverService.h"
#include "nsIScreen.h"
#include "nsIScreenManager.h"
#include "nsIServiceManager.h"
#include "nsIWidget.h"
#include "nsRenderingContext.h"
#include <algorithm> // for max
#include "gfxASurface.h" // for gfxASurface, etc
#include "gfxFont.h" // for gfxFontGroup
#include "gfxImageSurface.h" // for gfxImageSurface
#include "gfxPoint.h" // for gfxSize
#include "mozilla/Attributes.h" // for MOZ_FINAL
#include "mozilla/Preferences.h" // for Preferences
#include "mozilla/Services.h" // for GetObserverService
#include "mozilla/mozalloc.h" // for operator new
#include "nsCRT.h" // for nsCRT
#include "nsDebug.h" // for NS_NOTREACHED, NS_ASSERTION, etc
#include "nsFont.h" // for nsFont
#include "nsFontMetrics.h" // for nsFontMetrics
#include "nsIAtom.h" // for nsIAtom, do_GetAtom
#include "nsID.h"
#include "nsIDeviceContextSpec.h" // for nsIDeviceContextSpec
#include "nsILanguageAtomService.h" // for nsILanguageAtomService, etc
#include "nsIObserver.h" // for nsIObserver, etc
#include "nsIObserverService.h" // for nsIObserverService
#include "nsIScreen.h" // for nsIScreen
#include "nsIScreenManager.h" // for nsIScreenManager
#include "nsISupportsUtils.h" // for NS_ADDREF, NS_RELEASE
#include "nsIWidget.h" // for nsIWidget, NS_NATIVE_WINDOW
#include "nsRect.h" // for nsRect
#include "nsRenderingContext.h" // for nsRenderingContext
#include "nsServiceManagerUtils.h" // for do_GetService
#include "nsStringGlue.h" // for nsDependentString
#include "nsTArray.h" // for nsTArray, nsTArray_Impl
#include "nsThreadUtils.h" // for NS_IsMainThread
#include "nsTraceRefcnt.h" // for MOZ_COUNT_CTOR, etc
#if !XP_MACOSX
#include "gfxPDFSurface.h"

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

@ -6,11 +6,17 @@
#ifndef _NS_DEVICECONTEXT_H_
#define _NS_DEVICECONTEXT_H_
#include "gfxTypes.h"
#include "nsAutoPtr.h"
#include "nsCOMPtr.h"
#include "nsCoord.h"
#include "nsMathUtils.h"
#include <stdint.h> // for uint32_t
#include <sys/types.h> // for int32_t
#include "gfxTypes.h" // for gfxFloat
#include "mozilla/Assertions.h" // for MOZ_ASSERT_HELPER2
#include "nsAutoPtr.h" // for nsRefPtr
#include "nsCOMPtr.h" // for nsCOMPtr
#include "nsCoord.h" // for nscoord
#include "nsError.h" // for nsresult
#include "nsISupports.h" // for NS_INLINE_DECL_REFCOUNTING
#include "nsMathUtils.h" // for NS_round
#include "nscore.h" // for PRUnichar, nsAString
class gfxASurface;
class gfxUserFontSet;

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

@ -4,10 +4,17 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsFont.h"
#include "nsString.h"
#include "gfxFont.h" // for gfxFontStyle
#include "gfxFontConstants.h" // for NS_FONT_KERNING_AUTO, etc
#include "gfxFontFeatures.h" // for gfxFontFeature, etc
#include "gfxFontUtils.h" // for TRUETYPE_TAG
#include "nsCRT.h" // for nsCRT
#include "nsDebug.h" // for NS_ASSERTION
#include "nsISupports.h"
#include "nsMemory.h" // for NS_ARRAY_LENGTH
#include "nsUnicharUtils.h"
#include "nsCRT.h"
#include "gfxFont.h"
#include "nscore.h" // for PRUnichar
#include "prtypes.h" // for PR_STATIC_ASSERT
nsFont::nsFont(const char* aName, uint8_t aStyle, uint8_t aVariant,
uint16_t aWeight, int16_t aStretch, uint8_t aDecoration,

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

@ -6,13 +6,17 @@
#ifndef nsFont_h___
#define nsFont_h___
#include "gfxCore.h"
#include "nsCoord.h"
#include "nsStringGlue.h"
#include "nsTArray.h"
#include "gfxFontConstants.h"
#include <stdint.h> // for uint8_t, uint16_t
#include <sys/types.h> // for int16_t
#include "gfxCore.h" // for NS_GFX
#include "gfxFontFeatures.h"
#include "nsAutoPtr.h"
#include "nsAutoPtr.h" // for nsRefPtr
#include "nsCoord.h" // for nscoord
#include "nsStringFwd.h" // for nsSubstring
#include "nsStringGlue.h" // for nsString
#include "nsTArray.h" // for nsTArray
struct gfxFontStyle;
// XXX we need a method to enumerate all of the possible fonts on the
// system across family, weight, style, size, etc. But not here!
@ -34,8 +38,6 @@ const uint8_t kGenericFont_monospace = 0x08;
const uint8_t kGenericFont_cursive = 0x10;
const uint8_t kGenericFont_fantasy = 0x20;
struct gfxFontStyle;
// Font structure.
struct NS_GFX nsFont {
// The family name of the font

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

@ -4,11 +4,22 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsFontMetrics.h"
#include "nsBoundingMetrics.h"
#include "nsRenderingContext.h"
#include "nsDeviceContext.h"
#include "nsStyleConsts.h"
#include <algorithm>
#include <math.h> // for floor, ceil
#include <algorithm> // for max
#include "gfxPlatform.h" // for gfxPlatform
#include "gfxPoint.h" // for gfxPoint
#include "gfxRect.h" // for gfxRect
#include "gfxTypes.h" // for gfxFloat
#include "nsBoundingMetrics.h" // for nsBoundingMetrics
#include "nsDebug.h" // for NS_ERROR, NS_ABORT_IF_FALSE
#include "nsDeviceContext.h" // for nsDeviceContext
#include "nsIAtom.h" // for nsIAtom
#include "nsMathUtils.h" // for NS_round
#include "nsRenderingContext.h" // for nsRenderingContext
#include "nsStringGlue.h" // for nsString
#include "nsStyleConsts.h" // for NS_STYLE_HYPHENS_NONE
class gfxUserFontSet;
namespace {

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

@ -6,13 +6,21 @@
#ifndef NSFONTMETRICS__H__
#define NSFONTMETRICS__H__
#include "nsCOMPtr.h"
#include "nsCoord.h"
#include "nsFont.h"
#include "gfxFont.h"
#include <stdint.h> // for uint32_t
#include <sys/types.h> // for int32_t
#include "gfxFont.h" // for gfxFont, gfxFontGroup
#include "mozilla/Assertions.h" // for MOZ_ASSERT_HELPER2
#include "nsAutoPtr.h" // for nsRefPtr
#include "nsCOMPtr.h" // for nsCOMPtr
#include "nsCoord.h" // for nscoord
#include "nsError.h" // for nsresult
#include "nsFont.h" // for nsFont
#include "nsISupports.h" // for NS_INLINE_DECL_REFCOUNTING
#include "nscore.h" // for PRUnichar
class nsIAtom;
class gfxUserFontSet;
class nsDeviceContext;
class nsIAtom;
class nsRenderingContext;
struct nsBoundingMetrics;

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

@ -4,9 +4,10 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsRect.h"
#include "nsString.h"
#include "nsDeviceContext.h"
#include "prlog.h"
#include "mozilla/gfx/Types.h" // for NS_SIDE_BOTTOM, etc
#include "nsDeviceContext.h" // for nsDeviceContext
#include "nsStringGlue.h" // for nsAutoString, etc
#include "prtypes.h" // for PR_STATIC_ASSERT
// the mozilla::css::Side sequence must match the nsMargin nscoord sequence
PR_STATIC_ASSERT((NS_SIDE_TOP == 0) && (NS_SIDE_RIGHT == 1) && (NS_SIDE_BOTTOM == 2) && (NS_SIDE_LEFT == 3));

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

@ -7,17 +7,20 @@
#ifndef NSRECT_H
#define NSRECT_H
#include <stdio.h>
#include "nsCoord.h"
#include "nsPoint.h"
#include "nsSize.h"
#include "nsMargin.h"
#include "gfxCore.h"
#include "nsTraceRefcnt.h"
#include "mozilla/gfx/BaseRect.h"
#include "mozilla/Likely.h"
#include <climits>
#include <algorithm>
#include <stdio.h> // for FILE
#include <sys/types.h> // for int32_t, int64_t
#include <algorithm> // for max, min
#include <climits> // for INT_MAX
#include "gfxCore.h" // for NS_GFX
#include "mozilla/Likely.h" // for MOZ_UNLIKELY
#include "mozilla/gfx/BaseRect.h" // for BaseRect
#include "nsCoord.h" // for nscoord, etc
#include "nsDebug.h" // for NS_WARNING
#include "nsMargin.h" // for nsMargin, etc
#include "nsPoint.h" // for nsIntPoint, nsPoint
#include "nsSize.h" // for nsIntSize, nsSize
#include "nsTraceRefcnt.h" // for MOZ_COUNT_CTOR, etc
#include "nscore.h" // for NS_BUILD_REFCNT_LOGGING
struct nsIntRect;

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

@ -3,11 +3,14 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsRegion.h"
#include "nsISupportsImpl.h"
#include "nsTArray.h"
#include "mozilla/ThreadLocal.h"
#include "nsPrintfCString.h"
#include <algorithm>
#include <algorithm> // for max, min
#include "mozilla/Assertions.h" // for MOZ_ASSERT_HELPER2, etc
#include "mozilla/ThreadLocal.h" // for ThreadLocal
#include "mozilla/mozalloc.h" // for operator delete, etc
#include "nsDebug.h" // for NS_ASSERTION, NS_ERROR
#include "nsISupports.h" // for NS_ASSERT_OWNINGTHREAD, etc
#include "nsPrintfCString.h" // for nsPrintfCString
#include "nsTArray.h" // for nsTArray, nsTArray_Impl, etc
/*
* The SENTINEL values below guaranties that a < or >

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

@ -6,9 +6,16 @@
#ifndef nsRegion_h__
#define nsRegion_h__
#include "nsRect.h"
#include "nsPoint.h"
#include "nsString.h"
#include <stddef.h> // for size_t
#include <stdint.h> // for uint32_t, uint64_t
#include <sys/types.h> // for int32_t
#include "gfxCore.h" // for NS_GFX
#include "nsCoord.h" // for nscoord
#include "nsError.h" // for nsresult
#include "nsPoint.h" // for nsIntPoint, nsPoint
#include "nsRect.h" // for nsIntRect, nsRect
#include "nsStringGlue.h" // for nsCString
#include "xpcom-config.h" // for CPP_THROW_NEW
class nsIntRegion;

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

@ -4,9 +4,23 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsRenderingContext.h"
#include "nsBoundingMetrics.h"
#include "nsRegion.h"
#include <algorithm>
#include <string.h> // for strlen
#include <algorithm> // for min
#include "gfxColor.h" // for gfxRGBA
#include "gfxMatrix.h" // for gfxMatrix
#include "gfxPoint.h" // for gfxPoint, gfxSize
#include "gfxRect.h" // for gfxRect
#include "gfxTypes.h" // for gfxFloat
#include "mozilla/gfx/BasePoint.h" // for BasePoint
#include "mozilla/mozalloc.h" // for operator delete[], etc
#include "nsBoundingMetrics.h" // for nsBoundingMetrics
#include "nsCharTraits.h" // for NS_IS_LOW_SURROGATE
#include "nsDebug.h" // for NS_ERROR
#include "nsPoint.h" // for nsPoint
#include "nsRect.h" // for nsRect, nsIntRect
#include "nsRegion.h" // for nsIntRegionRectIterator, etc
class gfxASurface;
// XXXTodo: rename FORM_TWIPS to FROM_APPUNITS
#define FROM_TWIPS(_x) ((gfxFloat)((_x)/(mP2A)))

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

@ -6,16 +6,25 @@
#ifndef NSRENDERINGCONTEXT__H__
#define NSRENDERINGCONTEXT__H__
#include "nsAutoPtr.h"
#include "nsDeviceContext.h"
#include "nsFontMetrics.h"
#include "nsColor.h"
#include "nsCoord.h"
#include "gfxContext.h"
#include "mozilla/gfx/UserData.h"
#include <stdint.h> // for uint32_t
#include <sys/types.h> // for int32_t
#include "gfxContext.h" // for gfxContext
#include "mozilla/Assertions.h" // for MOZ_ASSERT_HELPER2
#include "mozilla/gfx/UserData.h" // for UserData, UserDataKey
#include "nsAutoPtr.h" // for nsRefPtr
#include "nsBoundingMetrics.h" // for nsBoundingMetrics
#include "nsColor.h" // for nscolor
#include "nsCoord.h" // for nscoord, NSToIntRound
#include "nsDeviceContext.h" // for nsDeviceContext
#include "nsFontMetrics.h" // for nsFontMetrics
#include "nsISupports.h" // for NS_INLINE_DECL_REFCOUNTING, etc
#include "nsStringGlue.h" // for nsString
#include "nscore.h" // for PRUnichar
struct nsPoint;
class gfxASurface;
class nsIntRegion;
struct nsPoint;
struct nsRect;
typedef enum {
nsLineStyle_kNone = 0,

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

@ -5,10 +5,19 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsScriptableRegion.h"
#include "nsCOMPtr.h"
#include "nsIXPConnect.h"
#include "nsServiceManagerUtils.h"
#include "jsapi.h"
#include <stdint.h> // for uint32_t
#include <sys/types.h> // for int32_t
#include "js/RootingAPI.h" // for Rooted
#include "js/Value.h" // for INT_TO_JSVAL, etc
#include "jsapi.h" // for JS_DefineElement, etc
#include "mozilla/Assertions.h" // for MOZ_ASSERT_HELPER2
#include "nsError.h" // for NS_OK, NS_ERROR_FAILURE, etc
#include "nsID.h"
#include "nsRect.h" // for nsIntRect
#include "nscore.h" // for NS_IMETHODIMP
class JSObject;
struct JSContext;
nsScriptableRegion::nsScriptableRegion()
{

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

@ -4,12 +4,18 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsThebesFontEnumerator.h"
#include "nsMemory.h"
#include "gfxPlatform.h"
#include "nsTArray.h"
#include "nsIAtom.h"
#include <stdint.h> // for uint32_t
#include "gfxPlatform.h" // for gfxPlatform
#include "mozilla/Assertions.h" // for MOZ_ASSERT_HELPER2
#include "nsCOMPtr.h" // for nsCOMPtr
#include "nsDebug.h" // for NS_ENSURE_ARG_POINTER
#include "nsError.h" // for NS_OK, NS_FAILED, nsresult
#include "nsIAtom.h" // for nsIAtom, do_GetAtom
#include "nsID.h"
#include "nsMemory.h" // for nsMemory
#include "nsStringGlue.h" // for nsAutoCString, nsAutoString, etc
#include "nsTArray.h" // for nsTArray, nsTArray_Impl, etc
#include "nscore.h" // for PRUnichar, NS_IMETHODIMP
NS_IMPL_ISUPPORTS1(nsThebesFontEnumerator, nsIFontEnumerator)

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

@ -6,8 +6,9 @@
#ifndef _NSTHEBESFONTENUMERATOR_H_
#define _NSTHEBESFONTENUMERATOR_H_
#include "nsIFontEnumerator.h"
#include "mozilla/Attributes.h"
#include "mozilla/Attributes.h" // for MOZ_FINAL
#include "nsIFontEnumerator.h" // for NS_DECL_NSIFONTENUMERATOR, etc
#include "nsISupports.h" // for NS_DECL_ISUPPORTS
class nsThebesFontEnumerator MOZ_FINAL : public nsIFontEnumerator
{

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

@ -3,15 +3,20 @@
* 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/. */
#include "gfxPlatform.h" // for gfxPlatform
#include "mozilla/Assertions.h" // for MOZ_ASSERT_HELPER2
#include "mozilla/Attributes.h" // for MOZ_FINAL
#include "mozilla/Module.h" // for Module, Module::CIDEntry, etc
#include "mozilla/ModuleUtils.h"
#include "mozilla/Attributes.h"
#include "nsCOMPtr.h"
#include "nsGfxCIID.h"
#include "nsThebesFontEnumerator.h"
#include "nsScriptableRegion.h"
#include "gfxPlatform.h"
#include "mozilla/mozalloc.h" // for operator new
#include "nsCOMPtr.h" // for nsCOMPtr
#include "nsError.h" // for NS_ERROR_NO_AGGREGATION, etc
#include "nsGfxCIID.h" // for NS_FONT_ENUMERATOR_CID, etc
#include "nsID.h" // for NS_DEFINE_NAMED_CID, etc
#include "nsIScriptableRegion.h" // for nsIScriptableRegion
#include "nsISupports.h" // for NS_DECL_ISUPPORTS, etc
#include "nsScriptableRegion.h" // for nsScriptableRegion
#include "nsThebesFontEnumerator.h" // for nsThebesFontEnumerator
// This class doesn't do anything; its only purpose is to give
// gfxPlatform::Init a way to force this component to be registered,

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

@ -16,6 +16,7 @@
#include "nsRect.h"
#include "nsDeviceContext.h"
#include "nsFont.h"
#include "gfxFontConstants.h"
#include "nsIAtom.h"
#include "nsIObserver.h"
#include "nsITimer.h"

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

@ -10,6 +10,8 @@
#define nsStaticNameTable_h___
#include "pldhash.h"
#include "nsString.h"
/* This class supports case insensitive lookup.
*
* It differs from atom tables: