Bug 911292 - Minimize the #includes in layout/mathml; r=mats

This commit is contained in:
Ehsan Akhgari 2013-08-30 17:37:12 -04:00
parent b37a2fa1ba
commit 669ff96c05
39 changed files with 59 additions and 175 deletions

View File

@ -6,12 +6,13 @@
#ifndef nsIMathMLFrame_h___
#define nsIMathMLFrame_h___
#include "nsIFrame.h"
#include "nsQueryFrame.h"
struct nsPresentationData;
struct nsEmbellishData;
struct nsHTMLReflowMetrics;
class nsRenderingContext;
class nsIFrame;
// 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

View File

@ -3,23 +3,18 @@
* 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 "nsMathMLChar.h"
#include "mozilla/MathAlgorithms.h"
#include "nsCOMPtr.h"
#include "nsFrame.h"
#include "nsIFrame.h"
#include "nsPresContext.h"
#include "nsStyleContext.h"
#include "nsStyleConsts.h"
#include "nsString.h"
#include "nsUnicharUtils.h"
#include "nsRenderingContext.h"
#include "gfxPlatform.h"
#include "mozilla/Preferences.h"
#include "nsISupportsPrimitives.h"
#include "nsIComponentManager.h"
#include "nsIPersistentProperties2.h"
#include "nsIServiceManager.h"
#include "nsIObserverService.h"
#include "nsIObserver.h"
#include "nsNetUtil.h"
@ -31,7 +26,6 @@
#include "nsDisplayList.h"
#include "nsMathMLOperators.h"
#include "nsMathMLChar.h"
#include <algorithm>
using namespace mozilla;
@ -613,6 +607,12 @@ InitGlobals(nsPresContext* aPresContext)
// -----------------------------------------------------------------------------
// And now the implementation of nsMathMLChar
nsMathMLChar::~nsMathMLChar()
{
MOZ_COUNT_DTOR(nsMathMLChar);
mStyleContext->Release();
}
nsStyleContext*
nsMathMLChar::GetStyleContext() const
{

View File

@ -7,9 +7,21 @@
#define nsMathMLChar_h___
#include "nsMathMLOperators.h"
#include "nsMathMLFrame.h"
#include "nsPoint.h"
#include "nsRect.h"
#include "nsString.h"
#include "nsBoundingMetrics.h"
class nsGlyphTable;
class nsIFrame;
class nsDisplayListBuilder;
class nsDisplayListSet;
class nsRect;
class nsPresContext;
class nsRenderingContext;
class nsBoundingMetrics;
class nsStyleContext;
class nsFont;
// Hints for Stretch() to indicate criteria for stretching
enum {
@ -71,10 +83,7 @@ public:
}
// not a virtual destructor: this class is not intended to be subclassed
~nsMathMLChar() {
MOZ_COUNT_DTOR(nsMathMLChar);
mStyleContext->Release();
}
~nsMathMLChar();
void Display(nsDisplayListBuilder* aBuilder,
nsIFrame* aForFrame,

View File

@ -3,32 +3,21 @@
* 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 "nsCOMPtr.h"
#include "nsHTMLParts.h"
#include "nsFrame.h"
#include "nsMathMLContainerFrame.h"
#include "nsPresContext.h"
#include "nsIPresShell.h"
#include "nsCSSAnonBoxes.h"
#include "nsStyleContext.h"
#include "nsStyleConsts.h"
#include "nsINameSpaceManager.h"
#include "nsRenderingContext.h"
#include "nsIDOMMutationEvent.h"
#include "nsFrameManager.h"
#include "nsStyleChangeList.h"
#include "nsGkAtoms.h"
#include "nsMathMLParts.h"
#include "nsMathMLContainerFrame.h"
#include "nsAutoPtr.h"
#include "nsStyleSet.h"
#include "nsDisplayList.h"
#include "nsCSSFrameConstructor.h"
#include "nsIReflowCallback.h"
#include "mozilla/Likely.h"
#include "nsIScriptError.h"
#include "nsContentUtils.h"
#include "nsMathMLElement.h"
using namespace mozilla;

View File

@ -7,15 +7,11 @@
#define nsMathMLContainerFrame_h___
#include "mozilla/Attributes.h"
#include "nsCOMPtr.h"
#include "nsContainerFrame.h"
#include "nsBlockFrame.h"
#include "nsInlineFrame.h"
#include "nsMathMLAtoms.h"
#include "nsMathMLOperators.h"
#include "nsMathMLChar.h"
#include "nsMathMLFrame.h"
#include "nsMathMLParts.h"
#include "mozilla/Likely.h"
/*

View File

@ -3,18 +3,17 @@
* 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 "nsINameSpaceManager.h"
#include "nsMathMLFrame.h"
#include "nsINameSpaceManager.h"
#include "nsMathMLChar.h"
#include "nsCSSPseudoElements.h"
#include "nsMathMLElement.h"
// used to map attributes into CSS rules
#include "nsStyleSet.h"
#include "nsAutoPtr.h"
#include "nsDisplayList.h"
#include "nsRenderingContext.h"
#include "nsContentUtils.h"
#include "nsIScriptError.h"
eMathMLFrameType
nsMathMLFrame::GetMathMLFrameType()

View File

@ -7,16 +7,9 @@
#define nsMathMLFrame_h___
#include "mozilla/Attributes.h"
#include "nsCOMPtr.h"
#include "nsPresContext.h"
#include "nsFontMetrics.h"
#include "nsStyleContext.h"
#include "nsMathMLAtoms.h"
#include "nsMathMLOperators.h"
#include "nsIMathMLFrame.h"
#include "nsFrame.h"
#include "nsCSSValue.h"
#include "nsMathMLElement.h"
#include "nsLayoutUtils.h"
class nsMathMLChar;

View File

@ -3,18 +3,15 @@
* 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 "nsMathMLOperators.h"
#include "nsCOMPtr.h"
#include "nsString.h"
#include "nsHashtable.h"
#include "nsTArray.h"
#include "nsIComponentManager.h"
#include "nsIPersistentProperties2.h"
#include "nsNetUtil.h"
#include "nsCRT.h"
#include "nsMathMLOperators.h"
// operator dictionary entry
struct OperatorData {
OperatorData(void)

View File

@ -6,7 +6,8 @@
#ifndef nsMathMLOperators_h___
#define nsMathMLOperators_h___
#include "nsCoord.h"
#include <stdint.h>
#include "nsStringFwd.h"
enum nsStretchDirection {
NS_STRETCH_DIRECTION_UNSUPPORTED = -1,

View File

@ -3,11 +3,6 @@
* 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 "nsCOMPtr.h"
#include "nsFrame.h"
#include "nsPresContext.h"
#include "nsStyleContext.h"
#include "nsStyleConsts.h"
#include "nsMathMLSelectedFrame.h"
#include "nsDisplayList.h"

View File

@ -3,14 +3,9 @@
* 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 "nsCOMPtr.h"
#include "nsFrame.h"
#include "nsPresContext.h"
#include "nsStyleContext.h"
#include "nsStyleConsts.h"
#include "nsContentUtils.h"
#include "nsCSSFrameConstructor.h"
#include "nsMathMLTokenFrame.h"
#include "nsPresContext.h"
#include "nsContentUtils.h"
#include "nsTextFrame.h"
#include "RestyleManager.h"
#include <algorithm>

View File

@ -7,7 +7,6 @@
#define nsMathMLTokenFrame_h___
#include "mozilla/Attributes.h"
#include "nsCOMPtr.h"
#include "nsMathMLContainerFrame.h"
//

View File

@ -3,28 +3,17 @@
* 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 "nsMathMLmactionFrame.h"
#include "nsCOMPtr.h"
#include "nsFrame.h"
#include "nsPresContext.h"
#include "nsStyleContext.h"
#include "nsStyleConsts.h"
#include "nsINameSpaceManager.h"
#include "nsCSSRendering.h"
#include "prprf.h" // For PR_snprintf()
#include "nsIDocShellTreeItem.h"
#include "nsIDocShellTreeOwner.h"
#include "nsIWebBrowserChrome.h"
#include "nsIInterfaceRequestor.h"
#include "nsIInterfaceRequestorUtils.h"
#include "nsIDOMElement.h"
#include "nsTextFragment.h"
#include "nsMathMLmactionFrame.h"
#include "nsAutoPtr.h"
#include "nsStyleSet.h"
#include "nsDisplayList.h"
#include "nsIDOMEvent.h"
//
// <maction> -- bind actions to a subexpression - implementation

View File

@ -3,18 +3,14 @@
* 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 "nsCOMPtr.h"
#include "nsFrame.h"
#include "nsMathMLmencloseFrame.h"
#include "nsPresContext.h"
#include "nsStyleContext.h"
#include "nsStyleConsts.h"
#include "nsRenderingContext.h"
#include "nsWhitespaceTokenizer.h"
#include "nsMathMLmencloseFrame.h"
#include "nsDisplayList.h"
#include "gfxContext.h"
#include "nsMathMLChar.h"
#include <algorithm>
//

View File

@ -8,7 +8,6 @@
#define nsMathMLmencloseFrame_h___
#include "mozilla/Attributes.h"
#include "nsCOMPtr.h"
#include "nsMathMLContainerFrame.h"
//

View File

@ -4,14 +4,9 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsCOMPtr.h"
#include "nsFrame.h"
#include "nsPresContext.h"
#include "nsStyleContext.h"
#include "nsStyleConsts.h"
#include "nsRenderingContext.h"
#include "nsMathMLmfencedFrame.h"
#include "nsRenderingContext.h"
#include "nsMathMLChar.h"
#include <algorithm>
//

View File

@ -7,7 +7,6 @@
#define nsMathMLmfencedFrame_h
#include "mozilla/Attributes.h"
#include "nsCOMPtr.h"
#include "nsMathMLContainerFrame.h"
//

View File

@ -4,16 +4,12 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsCOMPtr.h"
#include "nsFrame.h"
#include "nsPresContext.h"
#include "nsStyleContext.h"
#include "nsStyleConsts.h"
#include "nsRenderingContext.h"
#include "nsMathMLmfracFrame.h"
#include "nsPresContext.h"
#include "nsRenderingContext.h"
#include "nsDisplayList.h"
#include "gfxContext.h"
#include "nsMathMLElement.h"
#include <algorithm>
//

View File

@ -7,7 +7,6 @@
#define nsMathMLmfracFrame_h___
#include "mozilla/Attributes.h"
#include "nsCOMPtr.h"
#include "nsMathMLContainerFrame.h"
//

View File

@ -4,14 +4,9 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsCOMPtr.h"
#include "nsFrame.h"
#include "nsPresContext.h"
#include "nsStyleContext.h"
#include "nsStyleConsts.h"
#include "nsRenderingContext.h"
#include "nsMathMLmmultiscriptsFrame.h"
#include "nsPresContext.h"
#include "nsRenderingContext.h"
#include <algorithm>
//

View File

@ -7,7 +7,6 @@
#define nsMathMLmmultiscriptsFrame_h___
#include "mozilla/Attributes.h"
#include "nsCOMPtr.h"
#include "nsMathMLContainerFrame.h"
//

View File

@ -3,16 +3,12 @@
* 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 "nsCOMPtr.h"
#include "nsFrame.h"
#include "nsMathMLmoFrame.h"
#include "nsPresContext.h"
#include "nsStyleContext.h"
#include "nsStyleConsts.h"
#include "nsRenderingContext.h"
#include "nsContentUtils.h"
#include "nsFrameSelection.h"
#include "nsMathMLmoFrame.h"
#include "nsMathMLElement.h"
#include <algorithm>
//

View File

@ -7,8 +7,8 @@
#define nsMathMLmoFrame_h___
#include "mozilla/Attributes.h"
#include "nsCOMPtr.h"
#include "nsMathMLTokenFrame.h"
#include "nsMathMLChar.h"
//
// <mo> -- operator, fence, or separator

View File

@ -4,14 +4,8 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsCOMPtr.h"
#include "nsCRT.h" // to get NS_IS_SPACE
#include "nsFrame.h"
#include "nsPresContext.h"
#include "nsStyleContext.h"
#include "nsStyleConsts.h"
#include "nsMathMLmpaddedFrame.h"
#include "nsMathMLElement.h"
#include <algorithm>
//

View File

@ -7,7 +7,6 @@
#define nsMathMLmpaddedFrame_h___
#include "mozilla/Attributes.h"
#include "nsCOMPtr.h"
#include "nsMathMLContainerFrame.h"
//

View File

@ -4,11 +4,6 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsCOMPtr.h"
#include "nsFrame.h"
#include "nsPresContext.h"
#include "nsStyleConsts.h"
#include "nsMathMLmphantomFrame.h"
//

View File

@ -7,7 +7,6 @@
#define nsMathMLmphantomFrame_h___
#include "mozilla/Attributes.h"
#include "nsCOMPtr.h"
#include "nsMathMLContainerFrame.h"
//

View File

@ -3,15 +3,9 @@
* 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 "nsCOMPtr.h"
#include "nsFrame.h"
#include "nsPresContext.h"
#include "nsStyleContext.h"
#include "nsStyleConsts.h"
#include "nsRenderingContext.h"
#include "nsMathMLmrootFrame.h"
#include "nsPresContext.h"
#include "nsRenderingContext.h"
#include <algorithm>
//

View File

@ -7,8 +7,8 @@
#define nsMathMLmrootFrame_h___
#include "mozilla/Attributes.h"
#include "nsCOMPtr.h"
#include "nsMathMLContainerFrame.h"
#include "nsMathMLChar.h"
//
// <msqrt> and <mroot> -- form a radical

View File

@ -3,12 +3,6 @@
* 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 "nsCOMPtr.h"
#include "nsFrame.h"
#include "nsStyleContext.h"
#include "nsStyleConsts.h"
#include "nsMathMLmrowFrame.h"
//

View File

@ -7,7 +7,6 @@
#define nsMathMLmrowFrame_h___
#include "mozilla/Attributes.h"
#include "nsCOMPtr.h"
#include "nsMathMLContainerFrame.h"
//

View File

@ -3,14 +3,8 @@
* 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 "nsCOMPtr.h"
#include "nsFrame.h"
#include "nsPresContext.h"
#include "nsStyleContext.h"
#include "nsStyleConsts.h"
#include "nsMathMLmspaceFrame.h"
#include "nsMathMLElement.h"
#include <algorithm>

View File

@ -7,7 +7,6 @@
#define nsMathMLmspaceFrame_h___
#include "mozilla/Attributes.h"
#include "nsCOMPtr.h"
#include "nsMathMLContainerFrame.h"
//

View File

@ -3,13 +3,6 @@
* 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 "nsCOMPtr.h"
#include "nsFrame.h"
#include "nsStyleContext.h"
#include "nsStyleConsts.h"
#include "nsINameSpaceManager.h"
#include "nsMathMLmstyleFrame.h"
//

View File

@ -7,7 +7,6 @@
#define nsMathMLmstyleFrame_h___
#include "mozilla/Attributes.h"
#include "nsCOMPtr.h"
#include "nsMathMLContainerFrame.h"
//

View File

@ -3,24 +3,17 @@
* 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 "nsCOMPtr.h"
#include "nsFrame.h"
#include "nsBlockFrame.h"
#include "nsMathMLmtableFrame.h"
#include "nsPresContext.h"
#include "nsStyleContext.h"
#include "nsStyleConsts.h"
#include "nsTableRowFrame.h"
#include "nsINameSpaceManager.h"
#include "nsRenderingContext.h"
#include "nsTArray.h"
#include "nsCSSFrameConstructor.h"
#include "nsTableOuterFrame.h"
#include "nsTableFrame.h"
#include "nsTableCellFrame.h"
#include "celldata.h"
#include "nsMathMLmtableFrame.h"
#include "RestyleManager.h"
#include <algorithm>

View File

@ -7,8 +7,11 @@
#define nsMathMLmtableFrame_h___
#include "mozilla/Attributes.h"
#include "nsCOMPtr.h"
#include "nsMathMLContainerFrame.h"
#include "nsBlockFrame.h"
#include "nsTableOuterFrame.h"
#include "nsTableRowFrame.h"
#include "nsTableCellFrame.h"
//
// <mtable> -- table or matrix

View File

@ -3,16 +3,9 @@
* 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 "nsCOMPtr.h"
#include "nsFrame.h"
#include "nsPresContext.h"
#include "nsStyleContext.h"
#include "nsStyleConsts.h"
#include "nsINameSpaceManager.h"
#include "nsRenderingContext.h"
#include "nsMathMLmunderoverFrame.h"
#include "nsPresContext.h"
#include "nsRenderingContext.h"
#include "nsMathMLmmultiscriptsFrame.h"
#include <algorithm>

View File

@ -7,7 +7,6 @@
#define nsMathMLmunderoverFrame_h___
#include "mozilla/Attributes.h"
#include "nsCOMPtr.h"
#include "nsMathMLContainerFrame.h"
//