diff --git a/layout/base/nsIPresShell.h b/layout/base/nsIPresShell.h index fe509454f3d..550798f095c 100644 --- a/layout/base/nsIPresShell.h +++ b/layout/base/nsIPresShell.h @@ -66,29 +66,22 @@ #include "nsWeakReference.h" #include // for FILE definition -class nsIAtom; class nsIContent; -class nsIContentIterator; class nsIDocument; -class nsIDocumentObserver; class nsIFrame; class nsPresContext; class nsStyleSet; class nsIViewManager; -class nsIDeviceContext; class nsIRenderingContext; class nsIPageSequenceFrame; -class nsString; class nsAString; class nsCaret; -class nsStyleContext; class nsFrameSelection; class nsFrameManager; class nsILayoutHistoryState; class nsIReflowCallback; class nsIDOMNode; class nsIRegion; -class nsIStyleFrameConstruction; class nsIStyleSheet; class nsCSSFrameConstructor; class nsISelection; @@ -97,7 +90,6 @@ class nsWeakFrame; class nsIScrollableFrame; class gfxASurface; class gfxContext; -class nsPIDOMEventTarget; class nsIDOMEvent; class nsDisplayList; class nsDisplayListBuilder; @@ -127,8 +119,8 @@ typedef struct CapturingContentInfo { } CapturingContentInfo; #define NS_IPRESSHELL_IID \ -{ 0x6736ae7e, 0x25f9, 0x4594, \ - { 0xb5, 0x26, 0x49, 0x39, 0x17, 0x63, 0x2f, 0x94 } } +{ 0x84f1a428, 0x6bbe, 0x4958, \ + { 0xa1, 0x08, 0x8a, 0xe0, 0x78, 0xb8, 0x63, 0xf4 } } // Constants for ScrollContentIntoView() function #define NS_PRESSHELL_SCROLL_TOP 0 @@ -688,12 +680,16 @@ public: /** * Called to disable nsITheme support in a specific presshell. */ - virtual NS_HIDDEN_(void) DisableThemeSupport() = 0; + void DisableThemeSupport() + { + // Doesn't have to be dynamic. Just set the bool. + mIsThemeSupportDisabled = PR_TRUE; + } /** * Indicates whether theme support is enabled. */ - virtual PRBool IsThemeSupportEnabled() = 0; + PRBool IsThemeSupportEnabled() const { return !mIsThemeSupportDisabled; } /** * Get the set of agent style sheets for this presentation @@ -1015,6 +1011,7 @@ protected: PRPackedBool mIsDestroying; PRPackedBool mIsReflowing; PRPackedBool mPaintingSuppressed; // For all documents we initially lock down painting. + PRPackedBool mIsThemeSupportDisabled; // Whether or not form controls should use nsITheme in this shell. #ifdef ACCESSIBILITY /** diff --git a/layout/base/nsPresContext.cpp b/layout/base/nsPresContext.cpp index ee247d89901..c37b98e265e 100644 --- a/layout/base/nsPresContext.cpp +++ b/layout/base/nsPresContext.cpp @@ -1829,13 +1829,8 @@ nsPresContext::GetUserFontSetInternal() // that's a bad thing to do, and the caller was responsible for // flushing first. If we're not (e.g., in frame construction), it's // ok. -#ifdef DEBUG - { - PRBool inReflow; - NS_ASSERTION(!userFontSetGottenBefore || !mShell->IsReflowLocked(), - "FlushUserFontSet should have been called first"); - } -#endif + NS_ASSERTION(!userFontSetGottenBefore || !mShell->IsReflowLocked(), + "FlushUserFontSet should have been called first"); FlushUserFontSet(); } diff --git a/layout/base/nsPresShell.cpp b/layout/base/nsPresShell.cpp index 9dde8f0e4fe..7cd56e0e902 100644 --- a/layout/base/nsPresShell.cpp +++ b/layout/base/nsPresShell.cpp @@ -743,9 +743,6 @@ public: virtual NS_HIDDEN_(void) UnsuppressPainting(); - virtual NS_HIDDEN_(void) DisableThemeSupport(); - virtual PRBool IsThemeSupportEnabled(); - virtual nsresult GetAgentStyleSheets(nsCOMArray& aSheets); virtual nsresult SetAgentStyleSheets(const nsCOMArray& aSheets); @@ -1178,8 +1175,6 @@ protected: PRPackedBool mSuppressInterruptibleReflows; - PRPackedBool mIsThemeSupportDisabled; // Whether or not form controls should use nsITheme in this shell. - PRPackedBool mIsDocumentGone; // We've been disconnected from the document. // We will refuse to paint the document until either // (a) our timer fires or (b) all frames are constructed. @@ -4426,19 +4421,6 @@ PresShell::UnsuppressPainting() UnsuppressAndInvalidate(); } -void -PresShell::DisableThemeSupport() -{ - // Doesn't have to be dynamic. Just set the bool. - mIsThemeSupportDisabled = PR_TRUE; -} - -PRBool -PresShell::IsThemeSupportEnabled() -{ - return !mIsThemeSupportDisabled; -} - // Post a request to handle an arbitrary callback after reflow has finished. nsresult PresShell::PostReflowCallback(nsIReflowCallback* aCallback)