Bug 660762 - Remove --disable-mathml support. r=roc

This commit is contained in:
Matheus Kerschbaum 2011-06-02 13:11:33 +02:00
parent d431d20e49
commit 7406ce377f
37 changed files with 23 additions and 182 deletions

View File

@ -253,7 +253,6 @@ MOZ_TREE_CAIRO = @MOZ_TREE_CAIRO@
MOZ_TREE_PIXMAN = @MOZ_TREE_PIXMAN@
MOZ_UPDATE_XTERM = @MOZ_UPDATE_XTERM@
MOZ_MATHML = @MOZ_MATHML@
MOZ_CSS_ANIMATIONS = @MOZ_CSS_ANIMATIONS@
MOZ_PERMISSIONS = @MOZ_PERMISSIONS@
MOZ_XTF = @MOZ_XTF@

View File

@ -4802,7 +4802,6 @@ MOZ_OFFICIAL_BRANDING=
MOZ_FEEDS=1
MOZ_INSTALLER=1
MOZ_JSDEBUGGER=1
MOZ_MATHML=1
MOZ_CSS_ANIMATIONS=1
MOZ_MORK=
MOZ_MORKREADER=1
@ -6408,17 +6407,6 @@ for extension in $MOZ_EXTENSIONS; do
fi
done
dnl ========================================================
dnl MathML on by default
dnl ========================================================
MOZ_ARG_DISABLE_BOOL(mathml,
[ --disable-mathml Disable MathML support],
MOZ_MATHML=,
MOZ_MATHML=1 )
if test "$MOZ_MATHML"; then
AC_DEFINE(MOZ_MATHML)
fi
AC_DEFINE(MOZ_CSS_ANIMATIONS)
dnl ========================================================
@ -8749,7 +8737,6 @@ AC_SUBST(MOZ_UPDATE_XTERM)
AC_SUBST(MINIMO)
AC_SUBST(MOZ_PLATFORM_MAEMO)
AC_SUBST(MOZ_AUTH_EXTENSION)
AC_SUBST(MOZ_MATHML)
AC_SUBST(MOZ_CSS_ANIMATIONS)
AC_SUBST(MOZ_PERMISSIONS)
AC_SUBST(MOZ_XTF)

View File

@ -43,7 +43,7 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = content
PARALLEL_DIRS = base canvas events html smil svg xml xul xbl xslt
PARALLEL_DIRS = base canvas events html mathml smil svg xml xul xbl xslt
ifdef MOZ_MEDIA
PARALLEL_DIRS += media
@ -53,10 +53,6 @@ ifdef MOZ_XTF
PARALLEL_DIRS += xtf
endif
ifdef MOZ_MATHML
PARALLEL_DIRS += mathml
endif
ifdef ENABLE_TESTS
TOOL_DIRS += test
endif

View File

@ -111,11 +111,9 @@ already_AddRefed<nsGenericHTMLElement>
CreateHTMLElement(PRUint32 aNodeType, already_AddRefed<nsINodeInfo> aNodeInfo,
mozilla::dom::FromParser aFromParser);
#ifdef MOZ_MATHML
nsresult
NS_NewMathMLElement(nsIContent** aResult,
already_AddRefed<nsINodeInfo> aNodeInfo);
#endif
#ifdef MOZ_XUL
nsresult

View File

@ -1383,7 +1383,6 @@ GK_ATOM(to, "to")
GK_ATOM(XML, "XML")
#endif
#ifdef MOZ_MATHML
// internal MathML attributes: different from columnalign_, columnlines_,
// fontstyle_, rowalign_ and rowlines_
GK_ATOM(_moz_math_columnalign_, "_moz-math-columnalign")
@ -1667,7 +1666,6 @@ GK_ATOM(veryverythinmathspace_, "veryverythinmathspace")
GK_ATOM(voffset_, "voffset")
GK_ATOM(xref_, "xref")
GK_ATOM(math, "math") // the only one without an underscore
#endif
#ifndef DISABLE_XFORMS_HOOKS
GK_ATOM(avg, "avg")

View File

@ -235,11 +235,9 @@ NS_NewElement(nsIContent** aResult, PRInt32 aElementType,
return NS_NewXULElement(aResult, aNodeInfo);
}
#endif
#ifdef MOZ_MATHML
if (aElementType == kNameSpaceID_MathML) {
return NS_NewMathMLElement(aResult, aNodeInfo);
}
#endif
if (aElementType == kNameSpaceID_SVG) {
return NS_NewSVGElement(aResult, aNodeInfo, aFromParser);
}
@ -265,9 +263,7 @@ NameSpaceManagerImpl::HasElementCreator(PRInt32 aNameSpaceID)
#ifdef MOZ_XUL
aNameSpaceID == kNameSpaceID_XUL ||
#endif
#ifdef MOZ_MATHML
aNameSpaceID == kNameSpaceID_MathML ||
#endif
aNameSpaceID == kNameSpaceID_SVG ||
aNameSpaceID == kNameSpaceID_XMLEvents ||
PR_FALSE;

View File

@ -242,9 +242,7 @@ private:
#define NS_EVENT_STATE_LOADING NS_DEFINE_EVENT_STATE_MACRO(22)
// Content is of a type that gecko can't handle.
#define NS_EVENT_STATE_TYPE_UNSUPPORTED NS_DEFINE_EVENT_STATE_MACRO(23)
#ifdef MOZ_MATHML
#define NS_EVENT_STATE_INCREMENT_SCRIPT_LEVEL NS_DEFINE_EVENT_STATE_MACRO(24)
#endif
// Handler for the content has been blocked.
#define NS_EVENT_STATE_HANDLER_BLOCKED NS_DEFINE_EVENT_STATE_MACRO(25)
// Handler for the content has been disabled.

View File

@ -106,9 +106,7 @@ nsSVGFeatures::HaveExtension(const nsAString& aExtension)
{
#define SVG_SUPPORTED_EXTENSION(str) if (aExtension.EqualsLiteral(str)) return PR_TRUE;
SVG_SUPPORTED_EXTENSION("http://www.w3.org/1999/xhtml")
#ifdef MOZ_MATHML
SVG_SUPPORTED_EXTENSION("http://www.w3.org/1998/Math/MathML")
#endif
#undef SVG_SUPPORTED_EXTENSION
return PR_FALSE;

View File

@ -1657,10 +1657,8 @@ nsXMLContentSink::IsMonolithicContainer(nsINodeInfo* aNodeInfo)
(aNodeInfo->NameAtom() == nsGkAtoms::tr ||
aNodeInfo->NameAtom() == nsGkAtoms::select ||
aNodeInfo->NameAtom() == nsGkAtoms::object ||
aNodeInfo->NameAtom() == nsGkAtoms::applet))
#ifdef MOZ_MATHML
|| (aNodeInfo->NamespaceID() == kNameSpaceID_MathML &&
aNodeInfo->NameAtom() == nsGkAtoms::applet)) ||
(aNodeInfo->NamespaceID() == kNameSpaceID_MathML &&
(aNodeInfo->NameAtom() == nsGkAtoms::math))
#endif
);
}

View File

@ -1423,10 +1423,8 @@ static nsDOMClassInfoData sClassInfoData[] = {
NS_DEFINE_CLASSINFO_DATA(MozTouchEvent, nsDOMGenericSH,
DOM_DEFAULT_SCRIPTABLE_FLAGS)
#ifdef MOZ_MATHML
NS_DEFINE_CLASSINFO_DATA_WITH_NAME(MathMLElement, Element, nsElementSH,
ELEMENT_SCRIPTABLE_FLAGS)
#endif
NS_DEFINE_CLASSINFO_DATA(Worker, nsDOMGenericSH,
DOM_DEFAULT_SCRIPTABLE_FLAGS)
@ -4139,7 +4137,6 @@ nsDOMClassInfo::Init()
DOM_CLASSINFO_UI_EVENT_MAP_ENTRIES
DOM_CLASSINFO_MAP_END
#ifdef MOZ_MATHML
DOM_CLASSINFO_MAP_BEGIN_NO_CLASS_IF(MathMLElement, nsIDOMElement)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMElement)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMNSElement)
@ -4148,7 +4145,6 @@ nsDOMClassInfo::Init()
DOM_CLASSINFO_MAP_ENTRY(nsIDOM3Node)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMNodeSelector)
DOM_CLASSINFO_MAP_END
#endif
DOM_CLASSINFO_MAP_BEGIN(Worker, nsIWorker)
DOM_CLASSINFO_MAP_ENTRY(nsIWorker)

View File

@ -455,9 +455,7 @@ DOMCI_CLASS(SimpleGestureEvent)
DOMCI_CLASS(MozTouchEvent)
#ifdef MOZ_MATHML
DOMCI_CLASS(MathMLElement)
#endif
DOMCI_CLASS(Worker)
DOMCI_CLASS(ChromeWorker)

View File

@ -46,7 +46,6 @@
* but not the rest of nsFontMetrics, or vice versa.
*/
#ifdef MOZ_MATHML
struct nsBoundingMetrics {
///////////
@ -115,6 +114,5 @@ struct nsBoundingMetrics {
width += bm.width;
}
};
#endif // MOZ_MATHML
#endif // __nsBoundingMetrics_h

View File

@ -348,7 +348,6 @@ nsFontMetrics::DrawString(const PRUnichar* aString, PRUint32 aLength,
textRun->Draw(aContext->ThebesContext(), pt, 0, aLength, &provider, nsnull);
}
#ifdef MOZ_MATHML
nsBoundingMetrics
nsFontMetrics::GetBoundingMetrics(const PRUnichar *aString, PRUint32 aLength,
nsRenderingContext *aContext)
@ -371,4 +370,3 @@ nsFontMetrics::GetBoundingMetrics(const PRUnichar *aString, PRUint32 aLength,
m.width = NSToCoordRound( theMetrics.mAdvanceWidth);
return m;
}
#endif /* MOZ_MATHML */

View File

@ -217,11 +217,9 @@ public:
nsRenderingContext *aContext,
nsRenderingContext *aTextRunConstructionContext);
#ifdef MOZ_MATHML
nsBoundingMetrics GetBoundingMetrics(const PRUnichar *aString,
PRUint32 aLength,
nsRenderingContext *aContext);
#endif /* MOZ_MATHML */
void SetTextRunRTL(PRBool aIsRTL) { mTextRunRTL = aIsRTL; }
PRBool GetTextRunRTL() { return mTextRunRTL; }

View File

@ -540,7 +540,6 @@ nsRenderingContext::GetWidth(const PRUnichar *aString, PRUint32 aLength)
return width;
}
#ifdef MOZ_MATHML
nsBoundingMetrics
nsRenderingContext::GetBoundingMetrics(const PRUnichar* aString,
PRUint32 aLength)
@ -565,7 +564,6 @@ nsRenderingContext::GetBoundingMetrics(const PRUnichar* aString,
}
return totalMetrics;
}
#endif
void
nsRenderingContext::DrawString(const char *aString, PRUint32 aLength,

View File

@ -132,10 +132,8 @@ public:
nscoord GetWidth(const char* aString, PRUint32 aLength);
nscoord GetWidth(const PRUnichar *aString, PRUint32 aLength);
#ifdef MOZ_MATHML
nsBoundingMetrics GetBoundingMetrics(const PRUnichar *aString,
PRUint32 aLength);
#endif
void DrawString(const nsString& aString, nscoord aX, nscoord aY);
void DrawString(const char *aString, PRUint32 aLength,

View File

@ -50,12 +50,9 @@ _PROP_TABLES = \
html40Symbols.properties \
html40Special.properties \
transliterate.properties \
mathml20.properties \
$(NULL)
ifdef MOZ_MATHML
_PROP_TABLES += mathml20.properties
endif
ifeq ($(MOZ_WIDGET_TOOLKIT), qt)
CFLAGS += $(MOZ_QT_CFLAGS)
CXXFLAGS += $(MOZ_QT_CFLAGS)

View File

@ -54,18 +54,13 @@ PARALLEL_DIRS = \
xul/base/public \
xul/base/src \
ipc \
mathml \
$(NULL)
ifdef NS_PRINTING
PARALLEL_DIRS += printing
endif
ifdef MOZ_MATHML
PARALLEL_DIRS += \
mathml \
$(NULL)
endif
PARALLEL_DIRS += inspector/public inspector/src
ifdef ENABLE_TESTS
PARALLEL_DIRS += inspector/tests

View File

@ -166,13 +166,9 @@ LOCAL_INCLUDES += \
-I$(srcdir)/../../content/html/content/src \
-I$(srcdir)/../../content/svg/content/src \
-I$(srcdir)/../svg/base/src \
-I$(srcdir)/../mathml \
$(NULL)
ifdef MOZ_MATHML
LOCAL_INCLUDES += \
-I$(srcdir)/../mathml
endif
CXXFLAGS += $(MOZ_CAIRO_CFLAGS)
DEFINES += -D_IMPL_NS_LAYOUT

View File

@ -139,9 +139,7 @@
#undef NOISY_FIRST_LETTER
#ifdef MOZ_MATHML
#include "nsMathMLParts.h"
#endif
#include "nsSVGFeatures.h"
#include "nsSVGEffects.h"
#include "nsSVGUtils.h"
@ -1903,11 +1901,9 @@ nsCSSFrameConstructor::ConstructTable(nsFrameConstructorState& aState,
// Create the outer table frame which holds the caption and inner table frame
nsIFrame* newFrame;
#ifdef MOZ_MATHML
if (kNameSpaceID_MathML == nameSpaceID)
newFrame = NS_NewMathMLmtableOuterFrame(mPresShell, outerStyleContext);
else
#endif
newFrame = NS_NewTableOuterFrame(mPresShell, outerStyleContext);
nsIFrame* geometricParent =
@ -1919,11 +1915,9 @@ nsCSSFrameConstructor::ConstructTable(nsFrameConstructorState& aState,
// Create the inner table frame
nsIFrame* innerFrame;
#ifdef MOZ_MATHML
if (kNameSpaceID_MathML == nameSpaceID)
innerFrame = NS_NewMathMLmtableFrame(mPresShell, styleContext);
else
#endif
innerFrame = NS_NewTableFrame(mPresShell, styleContext);
InitAndRestoreFrame(aState, content, newFrame, nsnull, innerFrame);
@ -1984,11 +1978,9 @@ nsCSSFrameConstructor::ConstructTableRow(nsFrameConstructorState& aState,
const PRUint32 nameSpaceID = aItem.mNameSpaceID;
nsIFrame* newFrame;
#ifdef MOZ_MATHML
if (kNameSpaceID_MathML == nameSpaceID)
newFrame = NS_NewMathMLmtrFrame(mPresShell, styleContext);
else
#endif
newFrame = NS_NewTableRowFrame(mPresShell, styleContext);
if (NS_UNLIKELY(!newFrame)) {
@ -2072,7 +2064,6 @@ nsCSSFrameConstructor::ConstructTableCell(nsFrameConstructorState& aState,
PRBool borderCollapse = IsBorderCollapse(aParentFrame);
nsIFrame* newFrame;
#ifdef MOZ_MATHML
// <mtable> is border separate in mathml.css and the MathML code doesn't implement
// border collapse. For those users who style <mtable> with border collapse,
// give them the default non-MathML table frames that understand border collapse.
@ -2083,7 +2074,6 @@ nsCSSFrameConstructor::ConstructTableCell(nsFrameConstructorState& aState,
if (kNameSpaceID_MathML == nameSpaceID && !borderCollapse)
newFrame = NS_NewMathMLmtdFrame(mPresShell, styleContext);
else
#endif
// Warning: If you change this and add a wrapper frame around table cell
// frames, make sure Bug 368554 doesn't regress!
// See IsInAutoWidthTableCellForQuirk() in nsImageFrame.cpp.
@ -2104,14 +2094,10 @@ nsCSSFrameConstructor::ConstructTableCell(nsFrameConstructorState& aState,
// Create a block frame that will format the cell's content
PRBool isBlock;
nsIFrame* cellInnerFrame;
#ifdef MOZ_MATHML
if (kNameSpaceID_MathML == nameSpaceID) {
cellInnerFrame = NS_NewMathMLmtdInnerFrame(mPresShell, innerPseudoStyle);
isBlock = PR_FALSE;
}
else
#endif
{
} else {
cellInnerFrame = NS_NewBlockFormattingContext(mPresShell, innerPseudoStyle);
isBlock = PR_TRUE;
}
@ -3674,9 +3660,7 @@ nsCSSFrameConstructor::ConstructFrameFromItemInternal(FrameConstructionItem& aIt
NS_ASSERTION(!(bits & _bit1) || !(bits & _bit2), \
"Only one of these bits should be set")
CHECK_ONLY_ONE_BIT(FCDATA_FUNC_IS_FULL_CTOR, FCDATA_FORCE_NULL_ABSPOS_CONTAINER);
#ifdef MOZ_MATHML
CHECK_ONLY_ONE_BIT(FCDATA_FUNC_IS_FULL_CTOR, FCDATA_WRAP_KIDS_IN_BLOCKS);
#endif
CHECK_ONLY_ONE_BIT(FCDATA_FUNC_IS_FULL_CTOR, FCDATA_MAY_NEED_SCROLLFRAME);
CHECK_ONLY_ONE_BIT(FCDATA_FUNC_IS_FULL_CTOR, FCDATA_IS_POPUP);
CHECK_ONLY_ONE_BIT(FCDATA_FUNC_IS_FULL_CTOR, FCDATA_SKIP_ABSPOS_PUSH);
@ -3810,7 +3794,6 @@ nsCSSFrameConstructor::ConstructFrameFromItemInternal(FrameConstructionItem& aIt
}
#endif
#ifdef MOZ_MATHML
if (NS_SUCCEEDED(rv) && (bits & FCDATA_WRAP_KIDS_IN_BLOCKS)) {
nsFrameItems newItems;
nsFrameItems currentBlock;
@ -3839,7 +3822,6 @@ nsCSSFrameConstructor::ConstructFrameFromItemInternal(FrameConstructionItem& aIt
childItems = newItems;
}
#endif
// Set the frame's initial child list
// Note that MathML depends on this being called even if
@ -4587,7 +4569,6 @@ nsCSSFrameConstructor::ResolveStyleContext(nsStyleContext* aParentStyleContext,
}
// MathML Mod - RBS
#ifdef MOZ_MATHML
nsresult
nsCSSFrameConstructor::FlushAccumulatedBlock(nsFrameConstructorState& aState,
nsIContent* aContent,
@ -4702,7 +4683,6 @@ nsCSSFrameConstructor::FindMathMLData(Element* aElement,
return FindDataByTag(aTag, aElement, aStyleContext, sMathMLData,
NS_ARRAY_LENGTH(sMathMLData));
}
#endif // MOZ_MATHML
// Only outer <svg> elements can be floated or positioned. All other SVG
// should be in-flow.
@ -5182,11 +5162,9 @@ nsCSSFrameConstructor::AddFrameConstructionItemsInternal(nsFrameConstructorState
if (!data) {
data = FindXULTagData(element, aTag, aNameSpaceID, styleContext);
}
#ifdef MOZ_MATHML
if (!data) {
data = FindMathMLData(element, aTag, aNameSpaceID, styleContext);
}
#endif
if (!data) {
data = FindSVGData(element, aTag, aNameSpaceID, aParentFrame,
styleContext);
@ -6546,14 +6524,12 @@ nsCSSFrameConstructor::ContentAppended(nsIContent* aContainer,
return NS_OK;
}
#ifdef MOZ_MATHML
if (parentFrame->IsFrameOfType(nsIFrame::eMathML)) {
LAYOUT_PHASE_TEMP_EXIT();
nsresult rv = RecreateFramesForContent(parentFrame->GetContent(), PR_FALSE);
LAYOUT_PHASE_TEMP_REENTER();
return rv;
}
#endif
// If the frame we are manipulating is a ``special'' frame (that is, one
// that's been created as a result of a block-in-inline situation) then we
@ -7013,14 +6989,12 @@ nsCSSFrameConstructor::ContentRangeInserted(nsIContent* aContainer,
return NS_OK;
}
#ifdef MOZ_MATHML
if (parentFrame->IsFrameOfType(nsIFrame::eMathML)) {
LAYOUT_PHASE_TEMP_EXIT();
nsresult rv = RecreateFramesForContent(parentFrame->GetContent(), PR_FALSE);
LAYOUT_PHASE_TEMP_REENTER();
return rv;
}
#endif
nsFrameConstructorState state(mPresShell, mFixedContainingBlock,
GetAbsoluteContainingBlock(parentFrame),
@ -7438,7 +7412,6 @@ nsCSSFrameConstructor::ContentRemoved(nsIContent* aContainer,
return rv;
}
#ifdef MOZ_MATHML
// If we're a child of MathML, then we should reframe the MathML content.
// If we're non-MathML, then we would be wrapped in a block so we need to
// check our grandparent in that case.
@ -7451,7 +7424,6 @@ nsCSSFrameConstructor::ContentRemoved(nsIContent* aContainer,
LAYOUT_PHASE_TEMP_REENTER();
return rv;
}
#endif
// Undo XUL wrapping if it's no longer needed.
// (If we're in the XUL block-wrapping situation, parentFrame is the

View File

@ -678,12 +678,10 @@ private:
frame. If this is not set, the frame will be pushed as the
absolute containing block as needed, based on its style */
#define FCDATA_FORCE_NULL_ABSPOS_CONTAINER 0x10
#ifdef MOZ_MATHML
/* If FCDATA_WRAP_KIDS_IN_BLOCKS is set, the inline kids of the frame
will be wrapped in blocks. This is only usable for MathML at the
moment. */
#define FCDATA_WRAP_KIDS_IN_BLOCKS 0x20
#endif /* MOZ_MATHML */
/* If FCDATA_SUPPRESS_FRAME is set, no frame should be created for the
content. If this bit is set, nothing else in the struct needs to be
set. */
@ -1271,7 +1269,6 @@ private:
nsTArray<nsIAnonymousContentCreator::ContentInfo>& aAnonContent);
//MathML Mod - RBS
#ifdef MOZ_MATHML
/**
* Takes the frames in aBlockItems and wraps them in a new anonymous block
* frame whose content is aContent and whose parent will be aParentFrame.
@ -1289,7 +1286,6 @@ private:
nsIAtom* aTag,
PRInt32 aNameSpaceID,
nsStyleContext* aStyleContext);
#endif
// Function to find FrameConstructionData for aContent. Will return
// null if aContent is not XUL.

View File

@ -119,7 +119,6 @@ enum Type {
#endif
#endif
#ifdef MOZ_MATHML
TYPE_MATHML_BAR,
TYPE_MATHML_CHAR_BACKGROUND,
TYPE_MATHML_CHAR_FOREGROUND,
@ -131,7 +130,6 @@ enum Type {
TYPE_MATHML_BOUNDING_METRICS,
TYPE_MATHML_CHAR_DEBUG,
#endif
#endif
#ifdef NS_DEBUG
TYPE_DEBUG_BORDER,

View File

@ -81,6 +81,7 @@ SHARED_LIBRARY_LIBS = \
../style/$(LIB_PREFIX)gkstyle_s.$(LIB_SUFFIX) \
../tables/$(LIB_PREFIX)gktable_s.$(LIB_SUFFIX) \
../xul/base/src/$(LIB_PREFIX)gkxulbase_s.$(LIB_SUFFIX) \
../mathml/$(LIB_PREFIX)gkmathml_s.$(LIB_SUFFIX) \
$(DEPTH)/content/base/src/$(LIB_PREFIX)gkconbase_s.$(LIB_SUFFIX) \
$(DEPTH)/content/canvas/src/$(LIB_PREFIX)gkconcvs_s.$(LIB_SUFFIX) \
$(DEPTH)/content/events/src/$(LIB_PREFIX)gkconevents_s.$(LIB_SUFFIX) \
@ -112,6 +113,7 @@ SHARED_LIBRARY_LIBS = \
$(DEPTH)/caps/src/$(LIB_PREFIX)caps_s.$(LIB_SUFFIX) \
$(DEPTH)/editor/libeditor/html/$(LIB_PREFIX)htmleditor_s.$(LIB_SUFFIX) \
$(DEPTH)/editor/txtsvc/src/$(LIB_PREFIX)txtsvc_s.$(LIB_SUFFIX) \
$(DEPTH)/content/mathml/content/src/$(LIB_PREFIX)gkcontentmathml_s.$(LIB_SUFFIX) \
$(NULL)
ifneq (,$(filter qt gtk2,$(MOZ_WIDGET_TOOLKIT)))
@ -220,13 +222,6 @@ LOCAL_INCLUDES += \
$(NULL)
SHARED_LIBRARY_LIBS += ../inspector/src/$(LIB_PREFIX)inspector_s.$(LIB_SUFFIX)
ifdef MOZ_MATHML
SHARED_LIBRARY_LIBS += \
../mathml/$(LIB_PREFIX)gkmathml_s.$(LIB_SUFFIX) \
$(DEPTH)/content/mathml/content/src/$(LIB_PREFIX)gkcontentmathml_s.$(LIB_SUFFIX) \
$(NULL)
endif
ifdef MOZ_XTF
SHARED_LIBRARY_LIBS += \
$(DEPTH)/content/xtf/src/$(LIB_PREFIX)gkcontentxtf_s.$(LIB_SUFFIX) \
@ -300,6 +295,7 @@ LOCAL_INCLUDES += -I$(srcdir)/../base \
-I$(srcdir)/../style \
-I$(srcdir)/../xul/content/src \
-I$(srcdir)/../xul/base/src \
-I$(srcdir)/../mathml \
-I$(topsrcdir)/content/base/src \
-I$(topsrcdir)/content/canvas/src \
-I$(topsrcdir)/content/html/content/src \
@ -335,10 +331,6 @@ LOCAL_INCLUDES += -I$(srcdir)/../base \
-I$(topsrcdir)/content/svg/content/src \
$(NULL)
ifdef MOZ_MATHML
LOCAL_INCLUDES += -I$(srcdir)/../mathml
endif
DEFINES += -D_IMPL_NS_LAYOUT
ifeq ($(OS_ARCH),IRIX)

View File

@ -105,9 +105,7 @@ static const char* const gHTMLTypes[] = {
static const char* const gXMLTypes[] = {
TEXT_XML,
APPLICATION_XML,
#ifdef MOZ_MATHML
APPLICATION_MATHML_XML,
#endif
APPLICATION_RDF_XML,
TEXT_RDF,
0

View File

@ -90,13 +90,6 @@ private:
nsresult
NS_NewContentDocumentLoaderFactory(nsIDocumentLoaderFactory** aResult);
#ifdef MOZ_MATHML
#define CONTENTDLF_MATHML_CATEGORIES \
{ "Gecko-Content-Viewers", APPLICATION_MATHML_XML, "@mozilla.org/content/document-loader-factory;1" },
#else
#define CONTENTDLF_MATHML_CATEGORIES
#endif
#ifdef MOZ_WEBM
#define CONTENTDLF_WEBM_CATEGORIES \
{ "Gecko-Content-Viewers", VIDEO_WEBM, "@mozilla.org/content/document-loader-factory;1" }, \
@ -123,7 +116,7 @@ NS_NewContentDocumentLoaderFactory(nsIDocumentLoaderFactory** aResult);
{ "Gecko-Content-Viewers", APPLICATION_CACHED_XUL, "@mozilla.org/content/document-loader-factory;1" }, \
{ "Gecko-Content-Viewers", VIEWSOURCE_CONTENT_TYPE, "@mozilla.org/content/document-loader-factory;1" }, \
{ "Gecko-Content-Viewers", IMAGE_SVG_XML, "@mozilla.org/content/document-loader-factory;1" }, \
CONTENTDLF_MATHML_CATEGORIES \
{ "Gecko-Content-Viewers", APPLICATION_MATHML_XML, "@mozilla.org/content/document-loader-factory;1" }, \
CONTENTDLF_WEBM_CATEGORIES
#endif

View File

@ -89,6 +89,8 @@
#include "nsListControlFrame.h"
#include "nsHTMLInputElement.h"
#include "nsSVGUtils.h"
#include "nsMathMLAtoms.h"
#include "nsMathMLOperators.h"
#ifdef MOZ_XUL
#include "nsXULPopupManager.h"
@ -100,11 +102,6 @@
#include "inDOMView.h"
#endif
#ifdef MOZ_MATHML
#include "nsMathMLAtoms.h"
#include "nsMathMLOperators.h"
#endif
#include "nsHTMLEditor.h"
#include "nsTextServicesDocument.h"
@ -215,9 +212,7 @@ nsLayoutStatics::Initialize()
#endif
#ifdef MOZ_MATHML
nsMathMLOperators::AddRefTable();
#endif
nsEditProperty::RegisterAtoms();
nsTextServicesDocument::RegisterAtoms();
@ -328,9 +323,7 @@ nsLayoutStatics::Shutdown()
nsSprocketLayout::Shutdown();
#endif
#ifdef MOZ_MATHML
nsMathMLOperators::ReleaseTable();
#endif
nsCSSFrameConstructor::ReleaseGlobals();
nsFloatManager::Shutdown();

View File

@ -44,14 +44,12 @@
#include "nsISupports.h"
#include "nsMargin.h"
#include "nsRect.h"
#include "nsBoundingMetrics.h" // for MOZ_MATHML
#include "nsBoundingMetrics.h"
//----------------------------------------------------------------------
// Option flags
#ifdef MOZ_MATHML
#define NS_REFLOW_CALC_BOUNDING_METRICS 0x0001
#endif
/**
* When we store overflow areas as an array of scrollable and visual
@ -238,7 +236,6 @@ struct nsHTMLReflowMetrics {
enum { ASK_FOR_BASELINE = nscoord_MAX };
#ifdef MOZ_MATHML
// Metrics that _exactly_ enclose the text to allow precise MathML placements.
// If the NS_REFLOW_CALC_BOUNDING_METRICS flag is set, then the caller is
// requesting that you also compute additional details about your inner
@ -246,7 +243,6 @@ struct nsHTMLReflowMetrics {
// msup is the smallest rectangle that _exactly_ encloses both the text
// of the base and the text of the superscript.
nsBoundingMetrics mBoundingMetrics; // [OUT]
#endif
// Carried out bottom margin values. This is the collapsed
// (generational) bottom margin value.

View File

@ -6809,10 +6809,8 @@ nsTextFrame::ReflowText(nsLineLayout& aLineLayout, nscoord aAvailableWidth,
gfxFont::BoundingBoxType boundingBoxType = IsFloatingFirstLetterChild() ?
gfxFont::TIGHT_HINTED_OUTLINE_EXTENTS :
gfxFont::LOOSE_INK_EXTENTS;
#ifdef MOZ_MATHML
NS_ASSERTION(!(NS_REFLOW_CALC_BOUNDING_METRICS & aMetrics.mFlags),
"We shouldn't be passed NS_REFLOW_CALC_BOUNDING_METRICS anymore");
#endif
PRInt32 limitLength = length;
PRInt32 forceBreak = aLineLayout.GetForcedBreakPosition(mContent);

View File

@ -5620,13 +5620,11 @@ CSSParserImpl::ParseSingleValueProperty(nsCSSValue& aValue,
return PR_FALSE;
}
#ifdef MOZ_MATHML
// We only allow 'script-level' when unsafe rules are enabled, because
// otherwise it could interfere with rulenode optimizations if used in
// a non-MathML-enabled document.
if (aPropID == eCSSProperty_script_level && !mUnsafeRulesEnabled)
return PR_FALSE;
#endif
const PRInt32 *kwtable = nsCSSProps::kKeywordTableTable[aPropID];
switch (nsCSSProps::ValueRestrictions(aPropID)) {

View File

@ -2514,7 +2514,6 @@ CSS_PROP_XUL(
CSS_PROP_NO_OFFSET,
eStyleAnimType_None)
#ifdef MOZ_MATHML
#ifndef CSS_PROP_LIST_EXCLUDE_INTERNAL
CSS_PROP_FONT(
-moz-script-level,
@ -2551,7 +2550,6 @@ CSS_PROP_FONT(
CSS_PROP_NO_OFFSET,
eStyleAnimType_None)
#endif
#endif
CSS_PROP_SVGRESET(
clip-path,

View File

@ -159,11 +159,9 @@ CSS_STATE_PSEUDO_CLASS(mozHandlerBlocked, ":-moz-handler-blocked",
CSS_STATE_PSEUDO_CLASS(mozHandlerCrashed, ":-moz-handler-crashed",
NS_EVENT_STATE_HANDLER_CRASHED)
#ifdef MOZ_MATHML
CSS_STATE_PSEUDO_CLASS(mozMathIncrementScriptLevel,
":-moz-math-increment-script-level",
NS_EVENT_STATE_INCREMENT_SCRIPT_LEVEL)
#endif
// CSS 3 UI
// http://www.w3.org/TR/2004/CR-css3-ui-20040511/#pseudo-classes

View File

@ -81,10 +81,8 @@ CSS_PSEUDO_ELEMENT(mozFocusOuter, ":-moz-focus-outer", 0)
CSS_PSEUDO_ELEMENT(mozListBullet, ":-moz-list-bullet", 0)
CSS_PSEUDO_ELEMENT(mozListNumber, ":-moz-list-number", 0)
#ifdef MOZ_MATHML
CSS_PSEUDO_ELEMENT(mozMathStretchy, ":-moz-math-stretchy", 0)
CSS_PSEUDO_ELEMENT(mozMathAnonymous, ":-moz-math-anonymous", 0)
#endif
// HTML5 Forms pseudo elements
CSS_PSEUDO_ELEMENT(mozProgressBar, ":-moz-progress-bar", 0)

View File

@ -1373,9 +1373,7 @@ CheckFontCallback(const nsRuleData* aRuleData,
(size.GetUnit() == eCSSUnit_Enumerated &&
(size.GetIntValue() == NS_STYLE_FONT_SIZE_SMALLER ||
size.GetIntValue() == NS_STYLE_FONT_SIZE_LARGER)) ||
#ifdef MOZ_MATHML
aRuleData->ValueForScriptLevel()->GetUnit() == eCSSUnit_Integer ||
#endif
(weight.GetUnit() == eCSSUnit_Enumerated &&
(weight.GetIntValue() == NS_STYLE_FONT_WEIGHT_BOLDER ||
weight.GetIntValue() == NS_STYLE_FONT_WEIGHT_LIGHTER))) {
@ -1595,7 +1593,7 @@ static const CheckCallbackFn gCheckCallbacks[] = {
};
#if defined(MOZ_MATHML) && defined(DEBUG)
#ifdef DEBUG
static PRBool
AreAllMathMLPropertiesUndefined(const nsRuleData* aRuleData)
{
@ -1631,12 +1629,10 @@ nsRuleNode::CheckSpecifiedProperties(const nsStyleStructID aSID,
aSID, total, specified, inherited);
#endif
#ifdef MOZ_MATHML
NS_ASSERTION(aSID != eStyleStruct_Font ||
mPresContext->Document()->GetMathMLEnabled() ||
AreAllMathMLPropertiesUndefined(aRuleData),
"MathML style property was defined even though MathML is disabled");
#endif
/*
* Return the most specific information we can: prefer None or Full
@ -1647,7 +1643,6 @@ nsRuleNode::CheckSpecifiedProperties(const nsStyleStructID aSID,
if (inherited == total)
result = eRuleFullInherited;
else if (specified == total
#ifdef MOZ_MATHML
// MathML defines 3 properties in Font that will never be set when
// MathML is not in use. Therefore if all but three
// properties have been set, and MathML is not enabled, we can treat
@ -1656,7 +1651,6 @@ nsRuleNode::CheckSpecifiedProperties(const nsStyleStructID aSID,
// (see nsMathMLElement::BindToTree).
|| (aSID == eStyleStruct_Font && specified + 3 == total &&
!mPresContext->Document()->GetMathMLEnabled())
#endif
) {
if (inherited == 0)
result = eRuleFullReset;
@ -2382,7 +2376,6 @@ nsRuleNode::AdjustLogicalBoxProp(nsStyleContext* aContext,
\
return data_;
#ifdef MOZ_MATHML
// This function figures out how much scaling should be suppressed to
// satisfy scriptminsize. This is our attempt to implement
// http://www.w3.org/TR/MathML2/chapter3.html#id.3.3.4.2.2
@ -2441,7 +2434,6 @@ ComputeScriptLevelSize(const nsStyleFont* aFont, const nsStyleFont* aParentFont,
return NS_MIN(scriptLevelSize, NS_MAX(*aUnconstrainedSize, minScriptSize));
}
}
#endif
struct SetFontSizeCalcOps : public css::BasicCoordCalcOps,
public css::NumbersAlreadyNormalizedOps
@ -2592,7 +2584,6 @@ nsRuleNode::SetFontSize(nsPresContext* aPresContext,
} else {
NS_ASSERTION(eCSSUnit_Null == sizeValue->GetUnit(),
"What kind of font-size value is this?");
#ifdef MOZ_MATHML
// if aUsedStartStruct is true, then every single property in the
// font struct is being set all at once. This means scriptlevel is not
// going to have any influence on the font size; there is no need to
@ -2604,7 +2595,6 @@ nsRuleNode::SetFontSize(nsPresContext* aPresContext,
aCanStoreInRuleTree = PR_FALSE;
*aSize = aScriptLevelAdjustedParentSize;
}
#endif
}
// We want to zoom the cascaded size so that em-based measurements,
@ -2811,7 +2801,6 @@ nsRuleNode::SetFont(nsPresContext* aPresContext, nsStyleContext* aContext,
defaultVariableFont->stretch,
0, 0, 0, systemFont.stretch);
#ifdef MOZ_MATHML
// Compute scriptlevel, scriptminsize and scriptsizemultiplier now so
// they're available for font-size computation.
@ -2851,7 +2840,6 @@ nsRuleNode::SetFont(nsPresContext* aPresContext, nsStyleContext* aContext,
else if (eCSSUnit_Initial == scriptLevelValue->GetUnit()) {
aFont->mScriptLevel = 0;
}
#endif
// font-feature-settings
const nsCSSValue* featureSettingsValue =
@ -2885,18 +2873,15 @@ nsRuleNode::SetFont(nsPresContext* aPresContext, nsStyleContext* aContext,
// font-size: enum, length, percent, inherit
nscoord scriptLevelAdjustedParentSize = aParentFont->mSize;
#ifdef MOZ_MATHML
nscoord scriptLevelAdjustedUnconstrainedParentSize;
scriptLevelAdjustedParentSize =
ComputeScriptLevelSize(aFont, aParentFont, aPresContext,
&scriptLevelAdjustedUnconstrainedParentSize);
NS_ASSERTION(!aUsedStartStruct || aFont->mScriptUnconstrainedSize == aFont->mSize,
"If we have a start struct, we should have reset everything coming in here");
#endif
SetFontSize(aPresContext, aRuleData, aFont, aParentFont, &aFont->mSize,
systemFont, aParentFont->mSize, scriptLevelAdjustedParentSize,
aUsedStartStruct, atRoot, aCanStoreInRuleTree);
#ifdef MOZ_MATHML
if (aParentFont->mSize == aParentFont->mScriptUnconstrainedSize &&
scriptLevelAdjustedParentSize == scriptLevelAdjustedUnconstrainedParentSize) {
// Fast path: we have not been affected by scriptminsize so we don't
@ -2914,7 +2899,6 @@ nsRuleNode::SetFont(nsPresContext* aPresContext, nsStyleContext* aContext,
}
NS_ASSERTION(aFont->mScriptUnconstrainedSize <= aFont->mSize,
"scriptminsize should never be making things bigger");
#endif
// enforce the user' specified minimum font-size on the value that we expose
// (but don't change font-size:0)

View File

@ -121,25 +121,21 @@ nsStyleFont::nsStyleFont(const nsFont& aFont, nsPresContext *aPresContext)
{
MOZ_COUNT_CTOR(nsStyleFont);
mSize = mFont.size = nsStyleFont::ZoomText(aPresContext, mFont.size);
#ifdef MOZ_MATHML
mScriptUnconstrainedSize = mSize;
mScriptMinSize = aPresContext->CSSTwipsToAppUnits(
NS_POINTS_TO_TWIPS(NS_MATHML_DEFAULT_SCRIPT_MIN_SIZE_PT));
mScriptLevel = 0;
mScriptSizeMultiplier = NS_MATHML_DEFAULT_SCRIPT_SIZE_MULTIPLIER;
#endif
}
nsStyleFont::nsStyleFont(const nsStyleFont& aSrc)
: mFont(aSrc.mFont)
, mSize(aSrc.mSize)
, mGenericID(aSrc.mGenericID)
#ifdef MOZ_MATHML
, mScriptLevel(aSrc.mScriptLevel)
, mScriptUnconstrainedSize(aSrc.mScriptUnconstrainedSize)
, mScriptMinSize(aSrc.mScriptMinSize)
, mScriptSizeMultiplier(aSrc.mScriptSizeMultiplier)
#endif
{
MOZ_COUNT_CTOR(nsStyleFont);
}
@ -150,13 +146,11 @@ nsStyleFont::nsStyleFont(nsPresContext* aPresContext)
{
MOZ_COUNT_CTOR(nsStyleFont);
mSize = mFont.size = nsStyleFont::ZoomText(aPresContext, mFont.size);
#ifdef MOZ_MATHML
mScriptUnconstrainedSize = mSize;
mScriptMinSize = aPresContext->CSSTwipsToAppUnits(
NS_POINTS_TO_TWIPS(NS_MATHML_DEFAULT_SCRIPT_MIN_SIZE_PT));
mScriptLevel = 0;
mScriptSizeMultiplier = NS_MATHML_DEFAULT_SCRIPT_SIZE_MULTIPLIER;
#endif
}
void*

View File

@ -138,14 +138,12 @@ struct nsStyleFont {
PRUint8 mGenericID; // [inherited] generic CSS font family, if any;
// value is a kGenericFont_* constant, see nsFont.h.
#ifdef MOZ_MATHML
// MathML scriptlevel support
PRInt8 mScriptLevel; // [inherited]
// The value mSize would have had if scriptminsize had never been applied
nscoord mScriptUnconstrainedSize;
nscoord mScriptMinSize; // [inherited] length
float mScriptSizeMultiplier; // [inherited]
#endif
};
struct nsStyleGradientStop {

View File

@ -88,9 +88,7 @@ CParserContext::SetMimeType(const nsACString& aMimeType)
mMimeType.EqualsLiteral(APPLICATION_XHTML_XML) ||
mMimeType.EqualsLiteral(TEXT_XUL) ||
mMimeType.EqualsLiteral(IMAGE_SVG_XML) ||
#ifdef MOZ_MATHML
mMimeType.EqualsLiteral(APPLICATION_MATHML_XML) ||
#endif
mMimeType.EqualsLiteral(APPLICATION_RDF_XML) ||
mMimeType.EqualsLiteral(TEXT_RDF))
mDocType = eXML;

View File

@ -364,6 +364,13 @@ MAKEFILES_libnestegg="
media/libnestegg/src/Makefile
"
MAKEFILES_mathml="
content/mathml/Makefile
content/mathml/content/Makefile
content/mathml/content/src/Makefile
layout/mathml/Makefile
"
MAKEFILES_netwerk="
netwerk/Makefile
netwerk/base/Makefile
@ -752,6 +759,7 @@ add_makefiles "
$MAKEFILES_libjar
$MAKEFILES_libreg
$MAKEFILES_libpref
$MAKEFILES_mathml
$MAKEFILES_plugin
$MAKEFILES_netwerk
$MAKEFILES_uriloader
@ -1102,15 +1110,6 @@ if [ "$MOZ_MAPINFO" ]; then
"
fi
if [ "$MOZ_MATHML" ]; then
add_makefiles "
content/mathml/Makefile
content/mathml/content/Makefile
content/mathml/content/src/Makefile
layout/mathml/Makefile
"
fi
if [ "$MOZ_SMIL" ]; then
add_makefiles "
content/smil/Makefile