diff --git a/content/base/public/nsINode.h b/content/base/public/nsINode.h index 6762ef876879..7c496ab863a7 100644 --- a/content/base/public/nsINode.h +++ b/content/base/public/nsINode.h @@ -905,12 +905,12 @@ protected: return FlagsAsSlots(); } - nsSlots* slots = CreateSlots(); - if (slots) { - mFlagsOrSlots = reinterpret_cast(slots); + nsSlots* newSlots = CreateSlots(); + if (newSlots) { + mFlagsOrSlots = reinterpret_cast(newSlots); } - return slots; + return newSlots; } nsTObserverArray *GetMutationObservers() diff --git a/gfx/src/thebes/nsSystemFontsQt.cpp b/gfx/src/thebes/nsSystemFontsQt.cpp index d44305f4621c..07562099bd49 100644 --- a/gfx/src/thebes/nsSystemFontsQt.cpp +++ b/gfx/src/thebes/nsSystemFontsQt.cpp @@ -36,13 +36,14 @@ * * ***** END LICENSE BLOCK ***** */ +#include +#include + #include "nsIDeviceContext.h" #include "nsIRenderingContext.h" #include "nsSystemFontsQt.h" #include "gfxQtPlatform.h" -#include -#include nsSystemFontsQt::nsSystemFontsQt() : mDefaultFontName(NS_LITERAL_STRING("sans-serif")) diff --git a/gfx/thebes/src/gfxFT2Fonts.cpp b/gfx/thebes/src/gfxFT2Fonts.cpp index fd2450b3eeb7..db4d4fd9d1d0 100644 --- a/gfx/thebes/src/gfxFT2Fonts.cpp +++ b/gfx/thebes/src/gfxFT2Fonts.cpp @@ -38,8 +38,8 @@ #include "gfxPlatformGtk.h" #define gfxToolkitPlatform gfxPlatformGtk #elif defined(MOZ_WIDGET_QT) -#include "gfxQtPlatform.h" #include +#include "gfxQtPlatform.h" #define gfxToolkitPlatform gfxQtPlatform #elif defined(XP_WIN) #ifdef WINCE diff --git a/gfx/thebes/src/gfxQtNativeRenderer.cpp b/gfx/thebes/src/gfxQtNativeRenderer.cpp index 588d6cb722f0..533814154029 100644 --- a/gfx/thebes/src/gfxQtNativeRenderer.cpp +++ b/gfx/thebes/src/gfxQtNativeRenderer.cpp @@ -35,13 +35,14 @@ * * ***** END LICENSE BLOCK ***** */ +#include + #include "gfxQtNativeRenderer.h" #include "gfxContext.h" #include "gfxQtPlatform.h" #include "cairo.h" -#include typedef struct { gfxQtNativeRenderer* mRenderer; diff --git a/layout/generic/nsObjectFrame.cpp b/layout/generic/nsObjectFrame.cpp index febe135fdeaf..80842e9588bf 100644 --- a/layout/generic/nsObjectFrame.cpp +++ b/layout/generic/nsObjectFrame.cpp @@ -46,6 +46,13 @@ /* rendering objects for replaced elements implemented by a plugin */ +#ifdef MOZ_X11 +#ifdef MOZ_WIDGET_QT +#include +#include +#endif +#endif + #include "nscore.h" #include "nsCOMPtr.h" #include "nsPresContext.h" @@ -55,12 +62,6 @@ #include "nsIViewManager.h" #include "nsIDOMKeyListener.h" #include "nsIDOMDragEvent.h" -#ifdef MOZ_X11 -#ifdef MOZ_WIDGET_QT -#include -#include -#endif -#endif #include "nsIPluginHost.h" #include "nsString.h" #include "nsReadableUtils.h" diff --git a/modules/libpr0n/decoders/icon/qt/nsIconChannel.cpp b/modules/libpr0n/decoders/icon/qt/nsIconChannel.cpp index 354d4ae09215..1591f816e6df 100644 --- a/modules/libpr0n/decoders/icon/qt/nsIconChannel.cpp +++ b/modules/libpr0n/decoders/icon/qt/nsIconChannel.cpp @@ -35,6 +35,10 @@ * * ***** END LICENSE BLOCK ***** */ +#include +#include +#include + #include #include @@ -49,10 +53,6 @@ #include "nsIconChannel.h" #include "nsGtkQtIconsConverter.h" -#include -#include -#include - NS_IMPL_ISUPPORTS2(nsIconChannel, nsIRequest, nsIChannel) diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp index 184186a34138..06e841e98a7c 100644 --- a/toolkit/xre/nsAppRunner.cpp +++ b/toolkit/xre/nsAppRunner.cpp @@ -48,14 +48,14 @@ #define XPCOM_TRANSLATE_NSGM_ENTRY_POINT 1 -#include "nsAppRunner.h" -#include "nsUpdateDriver.h" - #if defined(MOZ_WIDGET_QT) #include #include #endif +#include "nsAppRunner.h" +#include "nsUpdateDriver.h" + #ifdef XP_MACOSX #include "MacLaunchHelper.h" #include "MacApplicationDelegate.h" diff --git a/widget/src/qt/mozqwidget.cpp b/widget/src/qt/mozqwidget.cpp index 0e87c6e508ae..b03f9efdb9a2 100644 --- a/widget/src/qt/mozqwidget.cpp +++ b/widget/src/qt/mozqwidget.cpp @@ -1,6 +1,3 @@ -#include "mozqwidget.h" -#include "nsWindow.h" - #include #include #include @@ -13,6 +10,9 @@ #include #include +#include "mozqwidget.h" +#include "nsWindow.h" + MozQWidget::MozQWidget(nsWindow* aReceiver, QGraphicsItem* aParent) : QGraphicsWidget(aParent), diff --git a/widget/src/qt/mozqwidget.h b/widget/src/qt/mozqwidget.h index 119d78606876..1b8df4480ea9 100644 --- a/widget/src/qt/mozqwidget.h +++ b/widget/src/qt/mozqwidget.h @@ -1,12 +1,12 @@ #ifndef MOZQWIDGET_H #define MOZQWIDGET_H -#include "nsIWidget.h" - #include #include #include +#include "nsIWidget.h" + class QEvent; class QPixmap; class QWidget; diff --git a/widget/src/qt/nsAppShell.h b/widget/src/qt/nsAppShell.h index 29ecf81d0b91..0541ca1a47ee 100644 --- a/widget/src/qt/nsAppShell.h +++ b/widget/src/qt/nsAppShell.h @@ -39,10 +39,9 @@ #ifndef nsAppShell_h__ #define nsAppShell_h__ +#include #include "nsBaseAppShell.h" #include "nsCOMPtr.h" -#include - /** * Native QT Application shell wrapper diff --git a/widget/src/qt/nsBidiKeyboard.cpp b/widget/src/qt/nsBidiKeyboard.cpp index e05f1c7ac16e..dffc5e2c2bc5 100644 --- a/widget/src/qt/nsBidiKeyboard.cpp +++ b/widget/src/qt/nsBidiKeyboard.cpp @@ -36,11 +36,11 @@ * * ***** END LICENSE BLOCK ***** */ -#include "nsBidiKeyboard.h" - #include #include +#include "nsBidiKeyboard.h" + NS_IMPL_ISUPPORTS1(nsBidiKeyboard, nsIBidiKeyboard) nsBidiKeyboard::nsBidiKeyboard() : nsIBidiKeyboard() diff --git a/widget/src/qt/nsDragService.cpp b/widget/src/qt/nsDragService.cpp index 4562f9f00d94..70bb05ce68b3 100644 --- a/widget/src/qt/nsDragService.cpp +++ b/widget/src/qt/nsDragService.cpp @@ -36,14 +36,14 @@ * * ***** END LICENSE BLOCK ***** */ +#include "qmimedata.h" +#include "qwidget.h" + #include "nsDragService.h" #include "nsISupportsPrimitives.h" #include "nsXPIDLString.h" #include "nsIDOMMouseEvent.h" -#include "qmimedata.h" -#include "qwidget.h" - NS_IMPL_ADDREF_INHERITED(nsDragService, nsBaseDragService) NS_IMPL_RELEASE_INHERITED(nsDragService, nsBaseDragService) NS_IMPL_QUERY_INTERFACE2(nsDragService, nsIDragService, nsIDragSession ) diff --git a/widget/src/qt/nsDragService.h b/widget/src/qt/nsDragService.h index 73d9f1faacc3..5a3e5bb90788 100644 --- a/widget/src/qt/nsDragService.h +++ b/widget/src/qt/nsDragService.h @@ -39,9 +39,10 @@ #ifndef nsDragService_h__ #define nsDragService_h__ -#include "nsBaseDragService.h" #include +#include "nsBaseDragService.h" + /* Header file */ class nsDragService : public nsBaseDragService { diff --git a/widget/src/qt/nsFilePicker.cpp b/widget/src/qt/nsFilePicker.cpp index 306323912a1f..4319c69b201b 100644 --- a/widget/src/qt/nsFilePicker.cpp +++ b/widget/src/qt/nsFilePicker.cpp @@ -37,6 +37,11 @@ * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ + +#include +#include +#include + #include "nsFilePicker.h" #include "nsILocalFile.h" @@ -48,10 +53,6 @@ #include "nsReadableUtils.h" #include "nsIWidget.h" -#include -#include -#include - /* Implementation file */ NS_IMPL_ISUPPORTS1(nsFilePicker, nsIFilePicker) diff --git a/widget/src/qt/nsFilePicker.h b/widget/src/qt/nsFilePicker.h index 74427310e98e..ee7cb469ec96 100644 --- a/widget/src/qt/nsFilePicker.h +++ b/widget/src/qt/nsFilePicker.h @@ -40,12 +40,12 @@ #ifndef NSFILEPICKER_H #define NSFILEPICKER_H +#include #include "nsBaseFilePicker.h" #include "nsString.h" #include "nsIURI.h" #include "nsTArray.h" #include "nsCOMArray.h" -#include class nsIWidget; class nsILocalFile; diff --git a/widget/src/qt/nsLookAndFeel.cpp b/widget/src/qt/nsLookAndFeel.cpp index 221d6770869f..1da78cdde916 100644 --- a/widget/src/qt/nsLookAndFeel.cpp +++ b/widget/src/qt/nsLookAndFeel.cpp @@ -37,11 +37,13 @@ * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ -#include "nsLookAndFeel.h" #include #include #include + +#include "nsLookAndFeel.h" + #include #undef NS_LOOKANDFEEL_DEBUG diff --git a/widget/src/qt/nsNativeThemeQt.cpp b/widget/src/qt/nsNativeThemeQt.cpp index e555e8a042e1..f89102aaad10 100644 --- a/widget/src/qt/nsNativeThemeQt.cpp +++ b/widget/src/qt/nsNativeThemeQt.cpp @@ -38,8 +38,6 @@ * * ***** END LICENSE BLOCK ***** */ -#include "nsIFrame.h" - #include #include #include @@ -51,6 +49,8 @@ #include #include +#include "nsIFrame.h" + #include "nsCoord.h" #include "nsNativeThemeQt.h" #include "nsIDeviceContext.h" diff --git a/widget/src/qt/nsScreenManagerQt.cpp b/widget/src/qt/nsScreenManagerQt.cpp index 43b53773b05e..b5999af30c99 100644 --- a/widget/src/qt/nsScreenManagerQt.cpp +++ b/widget/src/qt/nsScreenManagerQt.cpp @@ -37,12 +37,12 @@ * * ***** END LICENSE BLOCK ***** */ -#include "nsScreenManagerQt.h" -#include "nsScreenQt.h" - #include "qdesktopwidget.h" #include "qapplication.h" +#include "nsScreenManagerQt.h" +#include "nsScreenQt.h" + nsScreenManagerQt::nsScreenManagerQt() { desktop = 0; diff --git a/widget/src/qt/nsScreenQt.cpp b/widget/src/qt/nsScreenQt.cpp index 19b9f8d98ec8..ebdbdd62be3f 100644 --- a/widget/src/qt/nsScreenQt.cpp +++ b/widget/src/qt/nsScreenQt.cpp @@ -37,14 +37,14 @@ * * ***** END LICENSE BLOCK ***** */ -#include "nsScreenQt.h" - #include #include #include #include #include +#include "nsScreenQt.h" + nsScreenQt::nsScreenQt(int aScreen) : mScreen(aScreen) { diff --git a/widget/src/qt/nsSound.cpp b/widget/src/qt/nsSound.cpp index 5bd367f86d28..dc3fe7f2b196 100644 --- a/widget/src/qt/nsSound.cpp +++ b/widget/src/qt/nsSound.cpp @@ -36,6 +36,9 @@ * * ***** END LICENSE BLOCK ***** */ +#include +#include + #include #include "nscore.h" @@ -52,9 +55,6 @@ #include "nsNativeCharsetUtils.h" #include "nsAutoPtr.h" -#include -#include - /* used with esd_open_sound */ static int esdref = -1; static PRLibrary *elib = nsnull; diff --git a/widget/src/qt/nsToolkit.cpp b/widget/src/qt/nsToolkit.cpp index 218db1f48035..0a7cf962201e 100644 --- a/widget/src/qt/nsToolkit.cpp +++ b/widget/src/qt/nsToolkit.cpp @@ -38,8 +38,10 @@ * * ***** END LICENSE BLOCK ***** */ -#include "nscore.h" // needed for 'nsnull' #include "nsToolkit.h" + +#include "nscore.h" // needed for 'nsnull' + #include "nsGUIEvent.h" #include "nsWidgetAtoms.h" //#include "plevent.h" diff --git a/widget/src/qt/nsToolkit.h b/widget/src/qt/nsToolkit.h index 771a6fc99638..d67d108e431c 100644 --- a/widget/src/qt/nsToolkit.h +++ b/widget/src/qt/nsToolkit.h @@ -38,9 +38,10 @@ #ifndef nsToolkit_h__ #define nsToolkit_h__ +#include + #include "nsIToolkit.h" #include "nsString.h" -#include /** * Wrapper around the thread running the message pump. diff --git a/widget/src/qt/nsWidgetFactory.cpp b/widget/src/qt/nsWidgetFactory.cpp index 182c16259bca..2d6fc517dfcf 100644 --- a/widget/src/qt/nsWidgetFactory.cpp +++ b/widget/src/qt/nsWidgetFactory.cpp @@ -39,13 +39,14 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsWindow.h" +#include "nsAppShell.h" + #include "nsIGenericFactory.h" #include "nsIModule.h" #include "nsCOMPtr.h" #include "nsWidgetsCID.h" -#include "nsAppShell.h" -#include "nsWindow.h" #include "nsToolkit.h" #include "nsHTMLFormatConverter.h" #include "nsTransferable.h" diff --git a/widget/src/qt/nsWindow.cpp b/widget/src/qt/nsWindow.cpp index b024de338f4e..9809142c15ae 100644 --- a/widget/src/qt/nsWindow.cpp +++ b/widget/src/qt/nsWindow.cpp @@ -42,6 +42,25 @@ * * ***** END LICENSE BLOCK ***** */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + #include "prlink.h" #include "nsWindow.h" @@ -66,25 +85,6 @@ #include "nsIInterfaceRequestorUtils.h" #include "nsAutoPtr.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - #include "gfxQtPlatform.h" #include "gfxXlibSurface.h" #include "gfxQPainterSurface.h" diff --git a/widget/src/qt/nsWindow.h b/widget/src/qt/nsWindow.h index 14d2b3fa0daa..c01acd286e79 100644 --- a/widget/src/qt/nsWindow.h +++ b/widget/src/qt/nsWindow.h @@ -41,16 +41,17 @@ #ifndef __nsWindow_h__ #define __nsWindow_h__ +#include +#include + #include "nsAutoPtr.h" #include "nsBaseWidget.h" #include "nsGUIEvent.h" -#include #include "nsWeakReference.h" #include "nsWidgetAtoms.h" -#include #ifdef MOZ_LOGGING