--- a/config/autoconf.mk.in
+++ b/config/autoconf.mk.in
@@ -248,17 +248,16 @@ MOZ_LIBVPX_INCLUDES = @MOZ_LIBVPX_INCLUD
MOZ_NATIVE_ZLIB = @SYSTEM_ZLIB@
MOZ_NATIVE_BZ2 = @SYSTEM_BZ2@
MOZ_NATIVE_JPEG = @SYSTEM_JPEG@
MOZ_NATIVE_PNG = @SYSTEM_PNG@
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@
MOZ_SVG_DLISTS = @MOZ_SVG_DLISTS@
MOZ_CAIRO_CFLAGS = @MOZ_CAIRO_CFLAGS@
MOZ_SMIL = @MOZ_SMIL@
MOZ_XSLT_STANDALONE = @MOZ_XSLT_STANDALONE@
--- a/configure.in
+++ b/configure.in
@@ -4797,17 +4797,16 @@ MOZ_ARG_HEADER(Application)
ENABLE_TESTS=1
MOZ_ACTIVEX_SCRIPTING_SUPPORT=
MOZ_BRANDING_DIRECTORY=
MOZ_OFFICIAL_BRANDING=
MOZ_FEEDS=1
MOZ_INSTALLER=1
MOZ_JSDEBUGGER=1
-MOZ_MATHML=1
MOZ_CSS_ANIMATIONS=1
MOZ_MORK=
MOZ_MORKREADER=1
MOZ_AUTH_EXTENSION=1
MOZ_NO_ACTIVEX_SUPPORT=1
MOZ_NO_FAST_LOAD=
MOZ_OGG=1
MOZ_RAW=
@@ -6403,27 +6402,16 @@ MOZ_EXTENSIONS=`${PERL} ${srcdir}/build/
dnl Ensure every extension exists, to avoid mostly-inscrutable error messages
dnl when trying to build a nonexistent extension.
for extension in $MOZ_EXTENSIONS; do
if test ! -d "${srcdir}/extensions/${extension}"; then
AC_MSG_ERROR([Unrecognized extension provided to --enable-extensions: ${extension}.])
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 ========================================================
dnl SVG Display Lists
dnl ========================================================
if test -n "$MOZ_SVG_DLISTS"; then
AC_DEFINE(MOZ_SVG_DLISTS)
fi
@@ -8744,17 +8732,16 @@ AC_SUBST(IMPLIB)
AC_SUBST(FILTER)
AC_SUBST(BIN_FLAGS)
AC_SUBST(NS_USE_NATIVE)
AC_SUBST(MOZ_WIDGET_TOOLKIT)
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)
AC_SUBST(MOZ_PREF_EXTENSIONS)
AC_SUBST(MOZ_SMIL)
AC_SUBST(MOZ_XSLT_STANDALONE)
AC_SUBST(MOZ_JS_LIBS)
AC_SUBST(MOZ_PSM)
--- a/content/Makefile.in
+++ b/content/Makefile.in
@@ -38,30 +38,26 @@
DEPTH = ..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
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
endif
ifdef MOZ_XTF
PARALLEL_DIRS += xtf
endif
-ifdef MOZ_MATHML
-PARALLEL_DIRS += mathml
-endif
-
ifdef ENABLE_TESTS
TOOL_DIRS += test
endif
# Prevent floating point errors caused by VC++ optimizations
ifeq ($(OS_ARCH)_$(GNU_CC),WINNT_)
ifeq (,$(filter-out 1200 1300 1310,$(_MSC_VER)))
CFLAGS += -Op
--- a/content/base/public/nsContentCreatorFunctions.h
+++ b/content/base/public/nsContentCreatorFunctions.h
@@ -106,21 +106,19 @@ NS_NewHTMLElement(nsIContent** aResult,
mozilla::dom::FromParser aFromParser);
// First argument should be nsHTMLTag, but that adds dependency to parser
// for a bunch of files.
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
NS_NewXULElement(nsIContent** aResult, already_AddRefed<nsINodeInfo> aNodeInfo);
void
NS_TrustedNewXULElement(nsIContent** aResult, already_AddRefed<nsINodeInfo> aNodeInfo);
#endif
--- a/content/base/src/nsGkAtomList.h
+++ b/content/base/src/nsGkAtomList.h
@@ -1378,17 +1378,16 @@ GK_ATOM(onrepeatEvent, "onrepeatEvent")
GK_ATOM(repeatCount, "repeatCount")
GK_ATOM(repeatDur, "repeatDur")
GK_ATOM(repeatEvent, "repeatEvent")
GK_ATOM(restart, "restart")
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")
GK_ATOM(_moz_math_columnline_, "_moz-math-columnline")
GK_ATOM(_moz_math_fontstyle_, "_moz-math-font-style")
GK_ATOM(_moz_math_rowalign_, "_moz-math-rowalign")
GK_ATOM(_moz_math_rowline_, "_moz-math-rowline")
@@ -1662,17 +1661,16 @@ GK_ATOM(vectorproduct_, "vectorproduct")
GK_ATOM(vector_, "vector")
GK_ATOM(verythickmathspace_, "verythickmathspace")
GK_ATOM(verythinmathspace_, "verythinmathspace")
GK_ATOM(veryverythickmathspace_, "veryverythickmathspace")
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")
GK_ATOM(booleanFromString, "boolean-from-string")
GK_ATOM(countNonEmpty, "count-non-empty")
GK_ATOM(daysFromDate, "days-from-date")
GK_ATOM(init, "init")
GK_ATOM(instance, "instance")
--- a/content/base/src/nsNameSpaceManager.cpp
+++ b/content/base/src/nsNameSpaceManager.cpp
@@ -230,21 +230,19 @@ NS_NewElement(nsIContent** aResult, PRIn
if (aElementType == kNameSpaceID_XHTML) {
return NS_NewHTMLElement(aResult, aNodeInfo, aFromParser);
}
#ifdef MOZ_XUL
if (aElementType == kNameSpaceID_XUL) {
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);
}
if (aElementType == kNameSpaceID_XMLEvents) {
return NS_NewXMLEventsElement(aResult, aNodeInfo);
}
#ifdef MOZ_XTF
if (aElementType > kNameSpaceID_LastBuiltin) {
@@ -260,19 +258,17 @@ NS_NewElement(nsIContent** aResult, PRIn
PRBool
NameSpaceManagerImpl::HasElementCreator(PRInt32 aNameSpaceID)
{
return aNameSpaceID == kNameSpaceID_XHTML ||
#ifdef MOZ_XUL
aNameSpaceID == kNameSpaceID_XUL ||
#endif
-#ifdef MOZ_MATHML
aNameSpaceID == kNameSpaceID_MathML ||
-#endif
aNameSpaceID == kNameSpaceID_SVG ||
aNameSpaceID == kNameSpaceID_XMLEvents ||
PR_FALSE;
}
nsresult NameSpaceManagerImpl::AddNameSpace(const nsAString& aURI,
const PRInt32 aNameSpaceID)
{
--- a/content/events/public/nsEventStates.h
+++ b/content/events/public/nsEventStates.h
@@ -237,19 +237,17 @@ private:
#define NS_EVENT_STATE_USERDISABLED NS_DEFINE_EVENT_STATE_MACRO(20)
// Content suppressed by the user (ad blocking, etc).
#define NS_EVENT_STATE_SUPPRESSED NS_DEFINE_EVENT_STATE_MACRO(21)
// Content is still loading such that there is nothing to show the
// user (eg an image which hasn't started coming in yet).
#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.
#define NS_EVENT_STATE_HANDLER_DISABLED NS_DEFINE_EVENT_STATE_MACRO(26)
// Content is in the indeterminate state.
#define NS_EVENT_STATE_INDETERMINATE NS_DEFINE_EVENT_STATE_MACRO(27)
// Handler for the content has crashed
#define NS_EVENT_STATE_HANDLER_CRASHED NS_DEFINE_EVENT_STATE_MACRO(28)
--- a/content/svg/content/src/nsSVGFeatures.cpp
+++ b/content/svg/content/src/nsSVGFeatures.cpp
@@ -101,19 +101,17 @@ nsSVGFeatures::HaveFeatures(nsISupports*
return PR_TRUE;
}
/*static*/ PRBool
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;
}
/*static*/ PRBool
nsSVGFeatures::HaveExtensions(const nsSubstring& aExtensions)
{
--- a/content/xml/document/src/nsXMLContentSink.cpp
+++ b/content/xml/document/src/nsXMLContentSink.cpp
@@ -1652,15 +1652,13 @@ nsXMLContentSink::UpdateChildCounts()
PRBool
nsXMLContentSink::IsMonolithicContainer(nsINodeInfo* aNodeInfo)
{
return ((aNodeInfo->NamespaceID() == kNameSpaceID_XHTML &&
(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
);
}
--- a/dom/base/nsDOMClassInfo.cpp
+++ b/dom/base/nsDOMClassInfo.cpp
@@ -1418,20 +1418,18 @@ static nsDOMClassInfoData sClassInfoData
NS_DEFINE_CLASSINFO_DATA(NotifyAudioAvailableEvent, nsDOMGenericSH,
DOM_DEFAULT_SCRIPTABLE_FLAGS)
NS_DEFINE_CLASSINFO_DATA(SimpleGestureEvent, nsDOMGenericSH,
DOM_DEFAULT_SCRIPTABLE_FLAGS)
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)
NS_DEFINE_CHROME_ONLY_CLASSINFO_DATA(ChromeWorker, nsDOMGenericSH,
DOM_DEFAULT_SCRIPTABLE_FLAGS)
NS_DEFINE_CLASSINFO_DATA(WebGLRenderingContext, nsWebGLViewportHandlerSH,
DOM_DEFAULT_SCRIPTABLE_FLAGS)
@@ -4134,26 +4132,24 @@ nsDOMClassInfo::Init()
DOM_CLASSINFO_MAP_BEGIN(MozTouchEvent, nsIDOMMozTouchEvent)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMMozTouchEvent)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMMouseEvent)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMNSMouseEvent)
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)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMNSEventTarget)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMEventTarget)
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)
DOM_CLASSINFO_MAP_ENTRY(nsIAbstractWorker)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMNSEventTarget)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMEventTarget)
DOM_CLASSINFO_MAP_END
--- a/dom/base/nsDOMClassInfoClasses.h
+++ b/dom/base/nsDOMClassInfoClasses.h
@@ -450,19 +450,17 @@ DOMCI_CLASS(DataTransfer)
DOMCI_CLASS(NotifyPaintEvent)
DOMCI_CLASS(NotifyAudioAvailableEvent)
DOMCI_CLASS(SimpleGestureEvent)
DOMCI_CLASS(MozTouchEvent)
-#ifdef MOZ_MATHML
DOMCI_CLASS(MathMLElement)
-#endif
DOMCI_CLASS(Worker)
DOMCI_CLASS(ChromeWorker)
// WebGL
DOMCI_CLASS(WebGLRenderingContext)
DOMCI_CLASS(WebGLBuffer)
DOMCI_CLASS(WebGLTexture)
--- a/gfx/src/nsBoundingMetrics.h
+++ b/gfx/src/nsBoundingMetrics.h
@@ -41,17 +41,16 @@
#include "nsCoord.h"
/* Struct used for accurate measurements of a string, in order to
* allow precise positioning when processing MathML. This is in its
* own header file because some very-widely-included headers need it
* but not the rest of nsFontMetrics, or vice versa.
*/
-#ifdef MOZ_MATHML
struct nsBoundingMetrics {
///////////
// Metrics that _exactly_ enclose the text:
// The character coordinate system is the one used on X Windows:
// 1. The origin is located at the intersection of the baseline
// with the left of the character's cell.
@@ -110,11 +109,10 @@ struct nsBoundingMetrics {
if (ascent < bm.ascent) ascent = bm.ascent;
if (descent < bm.descent) descent = bm.descent;
leftBearing = PR_MIN(leftBearing, width + bm.leftBearing);
rightBearing = PR_MAX(rightBearing, width + bm.rightBearing);
}
width += bm.width;
}
};
-#endif // MOZ_MATHML
#endif // __nsBoundingMetrics_h
--- a/gfx/src/nsFontMetrics.cpp
+++ b/gfx/src/nsFontMetrics.cpp
@@ -343,17 +343,16 @@ nsFontMetrics::DrawString(const PRUnicha
AutoTextRun textRun(this, aTextRunConstructionContext, aString, aLength);
gfxPoint pt(aX, aY);
if (mTextRunRTL) {
pt.x += textRun->GetAdvanceWidth(0, aLength, &provider);
}
textRun->Draw(aContext->ThebesContext(), pt, 0, aLength, &provider, nsnull);
}
-#ifdef MOZ_MATHML
nsBoundingMetrics
nsFontMetrics::GetBoundingMetrics(const PRUnichar *aString, PRUint32 aLength,
nsRenderingContext *aContext)
{
if (aLength == 0)
return nsBoundingMetrics();
StubPropertyProvider provider;
@@ -366,9 +365,8 @@ nsFontMetrics::GetBoundingMetrics(const
nsBoundingMetrics m;
m.leftBearing = NSToCoordFloor( theMetrics.mBoundingBox.X());
m.rightBearing = NSToCoordCeil( theMetrics.mBoundingBox.XMost());
m.ascent = NSToCoordCeil( -theMetrics.mBoundingBox.Y());
m.descent = NSToCoordCeil( theMetrics.mBoundingBox.YMost());
m.width = NSToCoordRound( theMetrics.mAdvanceWidth);
return m;
}
-#endif /* MOZ_MATHML */
--- a/gfx/src/nsFontMetrics.h
+++ b/gfx/src/nsFontMetrics.h
@@ -212,21 +212,19 @@ public:
void DrawString(const char *aString, PRUint32 aLength,
nscoord aX, nscoord aY,
nsRenderingContext *aContext);
void DrawString(const PRUnichar* aString, PRUint32 aLength,
nscoord aX, nscoord aY,
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; }
gfxFontGroup* GetThebesFontGroup() { return mFontGroup; }
gfxUserFontSet* GetUserFontSet() { return mFontGroup->GetUserFontSet(); }
PRInt32 AppUnitsPerDevPixel() { return mP2A; }
--- a/gfx/src/nsRenderingContext.cpp
+++ b/gfx/src/nsRenderingContext.cpp
@@ -535,17 +535,16 @@ nsRenderingContext::GetWidth(const PRUni
PRInt32 len = FindSafeLength(aString, aLength, maxChunkLength);
width += mFontMetrics->GetWidth(aString, len, this);
aLength -= len;
aString += len;
}
return width;
}
-#ifdef MOZ_MATHML
nsBoundingMetrics
nsRenderingContext::GetBoundingMetrics(const PRUnichar* aString,
PRUint32 aLength)
{
PRUint32 maxChunkLength = GetMaxChunkLength();
PRInt32 len = FindSafeLength(aString, aLength, maxChunkLength);
// Assign directly in the first iteration. This ensures that
// negative ascent/descent can be returned and the left bearing
@@ -560,17 +559,16 @@ nsRenderingContext::GetBoundingMetrics(c
nsBoundingMetrics metrics
= mFontMetrics->GetBoundingMetrics(aString, len, this);
totalMetrics += metrics;
aLength -= len;
aString += len;
}
return totalMetrics;
}
-#endif
void
nsRenderingContext::DrawString(const char *aString, PRUint32 aLength,
nscoord aX, nscoord aY)
{
PRUint32 maxChunkLength = GetMaxChunkLength();
while (aLength > 0) {
PRInt32 len = FindSafeLength(aString, aLength, maxChunkLength);
--- a/gfx/src/nsRenderingContext.h
+++ b/gfx/src/nsRenderingContext.h
@@ -127,20 +127,18 @@ public:
nscoord GetWidth(char aC);
nscoord GetWidth(PRUnichar aC);
nscoord GetWidth(const nsString& aString);
nscoord GetWidth(const char* aString);
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,
nscoord aX, nscoord aY);
void DrawString(const PRUnichar *aString, PRUint32 aLength,
nscoord aX, nscoord aY);
protected:
--- a/intl/unicharutil/tables/Makefile.in
+++ b/intl/unicharutil/tables/Makefile.in
@@ -45,22 +45,19 @@ include $(DEPTH)/config/autoconf.mk
include $(topsrcdir)/config/rules.mk
_PROP_TABLES = \
htmlEntityVersions.properties \
html40Latin1.properties \
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)
endif
libs:: $(_PROP_TABLES)
$(INSTALL) $^ $(DIST)/bin/res/entityTables
--- a/layout/Makefile.in
+++ b/layout/Makefile.in
@@ -49,28 +49,23 @@ PARALLEL_DIRS = \
base \
generic \
forms \
tables \
svg/base/src \
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
endif
DIRS += build
ifdef ENABLE_TESTS
--- a/layout/base/Makefile.in
+++ b/layout/base/Makefile.in
@@ -161,23 +161,19 @@ LOCAL_INCLUDES += \
-I$(srcdir)/../../content/base/src \
-I$(srcdir)/../../content/events/src \
-I$(srcdir)/../../content/xbl/src \
-I$(srcdir)/../../view/src \
-I$(srcdir)/../../dom/base \
-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
ifndef MOZ_XUL
nsIBoxObject.idl: %: $(topsrcdir)/layout/xul/base/public/%
$(INSTALL) $^ .
nsPIBoxObject.h: %: $(topsrcdir)/layout/xul/base/public/%
--- a/layout/base/nsCSSFrameConstructor.cpp
+++ b/layout/base/nsCSSFrameConstructor.cpp
@@ -134,19 +134,17 @@
#include "nsBlockFrame.h"
#include "nsIScrollableFrame.h"
#include "nsIXBLService.h"
#undef NOISY_FIRST_LETTER
-#ifdef MOZ_MATHML
#include "nsMathMLParts.h"
-#endif
#include "nsSVGFeatures.h"
#include "nsSVGEffects.h"
#include "nsSVGUtils.h"
#include "nsSVGOuterSVGFrame.h"
#include "nsRefreshDriver.h"
#include "nsRuleProcessorData.h"
@@ -1898,37 +1896,33 @@ nsCSSFrameConstructor::ConstructTable(ns
// create the pseudo SC for the outer table as a child of the inner SC
nsRefPtr<nsStyleContext> outerStyleContext;
outerStyleContext = mPresShell->StyleSet()->
ResolveAnonymousBoxStyle(nsCSSAnonBoxes::tableOuter, styleContext);
// 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 =
aState.GetGeometricParent(outerStyleContext->GetStyleDisplay(),
aParentFrame);
// Init the table outer frame
InitAndRestoreFrame(aState, content, geometricParent, nsnull, newFrame);
// 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);
// Put the newly created frames into the right child list
SetInitialSingleChild(newFrame, innerFrame);
rv = aState.AddChild(newFrame, aFrameItems, content, styleContext,
@@ -1979,21 +1973,19 @@ nsCSSFrameConstructor::ConstructTableRow
{
NS_PRECONDITION(aDisplay->mDisplay == NS_STYLE_DISPLAY_TABLE_ROW,
"Unexpected call");
nsIContent* const content = aItem.mContent;
nsStyleContext* const styleContext = aItem.mStyleContext;
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)) {
return NS_ERROR_OUT_OF_MEMORY;
}
InitAndRestoreFrame(aState, content, aParentFrame, nsnull, newFrame);
nsFrameItems childItems;
@@ -2067,28 +2059,26 @@ nsCSSFrameConstructor::ConstructTableCel
"Unexpected call");
nsIContent* const content = aItem.mContent;
nsStyleContext* const styleContext = aItem.mStyleContext;
const PRUint32 nameSpaceID = aItem.mNameSpaceID;
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.
// This won't break us because MathML table frames are all subclasses of the default
// table code, and so we can freely mix <mtable> with <mtr> or <tr>, <mtd> or <td>.
// What will happen is just that non-MathML frames won't understand MathML attributes
// and will therefore miss the special handling that the MathML code does.
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.
newFrame = NS_NewTableCellFrame(mPresShell, styleContext, borderCollapse);
if (NS_UNLIKELY(!newFrame)) {
return NS_ERROR_OUT_OF_MEMORY;
}
@@ -2099,24 +2089,20 @@ nsCSSFrameConstructor::ConstructTableCel
// Resolve pseudo style and initialize the body cell frame
nsRefPtr<nsStyleContext> innerPseudoStyle;
innerPseudoStyle = mPresShell->StyleSet()->
ResolveAnonymousBoxStyle(nsCSSAnonBoxes::cellContent, styleContext);
// 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;
}
if (NS_UNLIKELY(!cellInnerFrame)) {
newFrame->Destroy();
return NS_ERROR_OUT_OF_MEMORY;
}
@@ -3669,19 +3655,17 @@ nsCSSFrameConstructor::ConstructFrameFro
NS_ASSERTION(!(bits & FCDATA_FUNC_IS_DATA_GETTER),
"Should have dealt with this inside the data finder");
// Some sets of bits are not compatible with each other
#define CHECK_ONLY_ONE_BIT(_bit1, _bit2) \
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);
CHECK_ONLY_ONE_BIT(FCDATA_FUNC_IS_FULL_CTOR,
FCDATA_DISALLOW_GENERATED_CONTENT);
CHECK_ONLY_ONE_BIT(FCDATA_FUNC_IS_FULL_CTOR, FCDATA_ALLOW_BLOCK_STYLES);
#undef CHECK_ONLY_ONE_BIT
NS_ASSERTION(!(bits & FCDATA_FORCED_NON_SCROLLABLE_BLOCK) ||
@@ -3805,17 +3789,16 @@ nsCSSFrameConstructor::ConstructFrameFro
content->HasAttr(kNameSpaceID_None, nsGkAtoms::tooltip))) {
nsIRootBox* rootBox = nsIRootBox::GetRootBox(mPresShell);
if (rootBox) {
rootBox->AddTooltipSupport(content);
}
}
#endif
-#ifdef MOZ_MATHML
if (NS_SUCCEEDED(rv) && (bits & FCDATA_WRAP_KIDS_IN_BLOCKS)) {
nsFrameItems newItems;
nsFrameItems currentBlock;
nsIFrame* f;
while ((f = childItems.FirstChild()) != nsnull) {
PRBool wrapFrame = IsInlineFrame(f) || IsFrameSpecial(f);
if (!wrapFrame) {
rv = FlushAccumulatedBlock(aState, content, newFrame, ¤tBlock, &newItems);
@@ -3834,17 +3817,16 @@ nsCSSFrameConstructor::ConstructFrameFro
if (childItems.NotEmpty()) {
// an error must have occurred, delete unprocessed frames
childItems.DestroyFrames();
}
childItems = newItems;
}
-#endif
// Set the frame's initial child list
// Note that MathML depends on this being called even if
// childItems is empty!
newFrame->SetInitialChildList(nsnull, childItems);
}
NS_ASSERTION(newFrame->IsFrameOfType(nsIFrame::eLineParticipant) ==
@@ -4582,17 +4564,16 @@ nsCSSFrameConstructor::ResolveStyleConte
NS_ASSERTION(aContent->IsNodeOfType(nsINode::eTEXT),
"shouldn't waste time creating style contexts for "
"comments and processing instructions");
return styleSet->ResolveStyleForNonElement(aParentStyleContext);
}
// MathML Mod - RBS
-#ifdef MOZ_MATHML
nsresult
nsCSSFrameConstructor::FlushAccumulatedBlock(nsFrameConstructorState& aState,
nsIContent* aContent,
nsIFrame* aParentFrame,
nsFrameItems* aBlockItems,
nsFrameItems* aNewItems)
{
if (aBlockItems->IsEmpty()) {
@@ -4697,17 +4678,16 @@ nsCSSFrameConstructor::FindMathMLData(El
SIMPLE_MATHML_CREATE(merror_, NS_NewMathMLmrowFrame),
SIMPLE_MATHML_CREATE(menclose_, NS_NewMathMLmencloseFrame),
SIMPLE_MATHML_CREATE(semantics_, NS_NewMathMLsemanticsFrame)
};
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.
#define SIMPLE_SVG_FCDATA(_func) \
FCDATA_DECL(FCDATA_DISALLOW_OUT_OF_FLOW | \
FCDATA_SKIP_ABSPOS_PUSH | \
FCDATA_DISALLOW_GENERATED_CONTENT, _func)
#define SIMPLE_SVG_CREATE(_tag, _func) \
@@ -5177,21 +5157,19 @@ nsCSSFrameConstructor::AddFrameConstruct
return;
}
data = FindHTMLData(element, aTag, aNameSpaceID, aParentFrame,
styleContext);
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);
}
// Now check for XUL display types
if (!data) {
data = FindXULDisplayData(display, element, styleContext);
@@ -6541,24 +6519,22 @@ nsCSSFrameConstructor::ContentAppended(n
if (parentFrame->IsLeaf()) {
// Nothing to do here; we shouldn't be constructing kids of leaves
// Clear lazy bits so we don't try to construct again.
ClearLazyBits(aFirstNewContent, nsnull);
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
// need to append to the last special sibling, not to the frame itself.
PRBool parentSpecial = IsFrameSpecial(parentFrame);
if (parentSpecial) {
#ifdef DEBUG
if (gNoisyContentUpdates) {
@@ -7008,24 +6984,22 @@ nsCSSFrameConstructor::ContentRangeInser
// Don't construct kids of leaves
if (parentFrame->IsLeaf()) {
// Clear lazy bits so we don't try to construct again.
ClearLazyBits(aStartChild, aEndChild);
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),
GetFloatContainingBlock(parentFrame),
aFrameState);
// Recover state for the containing block - we need to know if
@@ -7433,30 +7407,28 @@ nsCSSFrameConstructor::ContentRemoved(ns
// Just reframe the parent, since framesets are weird like that.
*aDidReconstruct = PR_TRUE;
LAYOUT_PHASE_TEMP_EXIT();
nsresult rv = RecreateFramesForContent(parentFrame->GetContent(), PR_FALSE);
LAYOUT_PHASE_TEMP_REENTER();
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.
nsIFrame* possibleMathMLAncestor = parentType == nsGkAtoms::blockFrame ?
parentFrame->GetParent() : parentFrame;
if (possibleMathMLAncestor->IsFrameOfType(nsIFrame::eMathML)) {
*aDidReconstruct = PR_TRUE;
LAYOUT_PHASE_TEMP_EXIT();
nsresult rv = RecreateFramesForContent(possibleMathMLAncestor->GetContent(), PR_FALSE);
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
// wrapper frame.)
nsIFrame* grandparentFrame = parentFrame->GetParent();
if (grandparentFrame && grandparentFrame->IsBoxFrame() &&
(grandparentFrame->GetStateBits() & NS_STATE_BOX_WRAPS_KIDS_IN_BLOCK) &&
// check if this frame is the only one needing wrapping
--- a/layout/base/nsCSSFrameConstructor.h
+++ b/layout/base/nsCSSFrameConstructor.h
@@ -673,22 +673,20 @@ private:
FCDATA_FUNC_IS_FULL_CTOR to indicate what the full-constructor
function will do. */
#define FCDATA_DISALLOW_OUT_OF_FLOW 0x8
/* If FCDATA_FORCE_NULL_ABSPOS_CONTAINER is set, make sure to push a
null absolute containing block before processing children for this
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. */
#define FCDATA_SUPPRESS_FRAME 0x40
/* If FCDATA_MAY_NEED_SCROLLFRAME is set, the new frame should be wrapped in
a scrollframe if its overflow type so requires. */
#define FCDATA_MAY_NEED_SCROLLFRAME 0x80
#ifdef MOZ_XUL
@@ -1266,17 +1264,16 @@ private:
PendingBinding * aPendingBinding,
nsFrameItems& aChildItems);
nsresult GetAnonymousContent(nsIContent* aParent,
nsIFrame* aParentFrame,
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.
* The anonymous block is added to aNewItems and aBlockItems is cleared.
*/
nsresult FlushAccumulatedBlock(nsFrameConstructorState& aState,
nsIContent* aContent,
nsIFrame* aParentFrame,
@@ -1284,17 +1281,16 @@ private:
nsFrameItems* aNewItems);
// Function to find FrameConstructionData for aContent. Will return
// null if aContent is not MathML.
static const FrameConstructionData* FindMathMLData(Element* aElement,
nsIAtom* aTag,
PRInt32 aNameSpaceID,
nsStyleContext* aStyleContext);
-#endif
// Function to find FrameConstructionData for aContent. Will return
// null if aContent is not XUL.
static const FrameConstructionData* FindXULTagData(Element* aElement,
nsIAtom* aTag,
PRInt32 aNameSpaceID,
nsStyleContext* aStyleContext);
// XUL data-finding helper functions and structures
--- a/layout/base/nsDisplayItemTypes.h
+++ b/layout/base/nsDisplayItemTypes.h
@@ -114,29 +114,27 @@ enum Type {
TYPE_XUL_TEXT_BOX,
TYPE_XUL_TREE_BODY,
TYPE_XUL_TREE_COL_SPLITTER_TARGET,
#ifdef DEBUG_LAYOUT
TYPE_XUL_DEBUG,
#endif
#endif
-#ifdef MOZ_MATHML
TYPE_MATHML_BAR,
TYPE_MATHML_CHAR_BACKGROUND,
TYPE_MATHML_CHAR_FOREGROUND,
TYPE_MATHML_ERROR,
TYPE_MATHML_MENCLOSE_NOTATION,
TYPE_MATHML_SELECTION_RECT,
TYPE_MATHML_SLASH,
#ifdef NS_DEBUG
TYPE_MATHML_BOUNDING_METRICS,
TYPE_MATHML_CHAR_DEBUG,
#endif
-#endif
#ifdef NS_DEBUG
TYPE_DEBUG_BORDER,
TYPE_DEBUG_IMAGE_MAP,
TYPE_DEBUG_PLACEHOLDER,
TYPE_EVENT_TARGET_BORDER,
#endif
--- a/layout/build/Makefile.in
+++ b/layout/build/Makefile.in
@@ -76,16 +76,17 @@ EXPORTS = \
SHARED_LIBRARY_LIBS = \
../base/$(LIB_PREFIX)gkbase_s.$(LIB_SUFFIX) \
../forms/$(LIB_PREFIX)gkforms_s.$(LIB_SUFFIX) \
../generic/$(LIB_PREFIX)gkgeneric_s.$(LIB_SUFFIX) \
../ipc/$(LIB_PREFIX)gkipc_s.$(LIB_SUFFIX) \
../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) \
$(DEPTH)/content/html/content/src/$(LIB_PREFIX)gkconhtmlcon_s.$(LIB_SUFFIX) \
$(DEPTH)/content/html/document/src/$(LIB_PREFIX)gkconhtmldoc_s.$(LIB_SUFFIX) \
$(DEPTH)/content/xml/content/src/$(LIB_PREFIX)gkconxmlcon_s.$(LIB_SUFFIX) \
$(DEPTH)/content/xml/document/src/$(LIB_PREFIX)gkconxmldoc_s.$(LIB_SUFFIX) \
$(DEPTH)/content/xslt/src/base/$(LIB_PREFIX)txbase_s.$(LIB_SUFFIX) \
@@ -107,16 +108,17 @@ SHARED_LIBRARY_LIBS = \
$(DEPTH)/dom/src/threads/$(LIB_PREFIX)domthreads_s.$(LIB_SUFFIX) \
$(DEPTH)/dom/indexedDB/$(LIB_PREFIX)dom_indexeddb_s.$(LIB_SUFFIX) \
$(DEPTH)/editor/libeditor/text/$(LIB_PREFIX)texteditor_s.$(LIB_SUFFIX) \
$(DEPTH)/editor/libeditor/base/$(LIB_PREFIX)editorbase_s.$(LIB_SUFFIX) \
$(DEPTH)/parser/html/$(LIB_PREFIX)html5p_s.$(LIB_SUFFIX) \
$(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)))
SHARED_LIBRARY_LIBS += \
$(DEPTH)/dom/system/unix/$(LIB_PREFIX)domsystemunix_s.$(LIB_SUFFIX) \
$(NULL)
LOCAL_INCLUDES += \
-I$(topsrcdir)/dom/system/unix \
@@ -215,23 +217,16 @@ SHARED_LIBRARY_LIBS += \
$(NULL)
endif
LOCAL_INCLUDES += \
-I$(srcdir)/../inspector/src \
$(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) \
$(NULL)
endif
SHARED_LIBRARY_LIBS += \
../svg/base/src/$(LIB_PREFIX)gksvgbase_s.$(LIB_SUFFIX) \
@@ -295,16 +290,17 @@ include $(topsrcdir)/config/rules.mk
LOCAL_INCLUDES += -I$(srcdir)/../base \
-I$(srcdir)/../generic \
-I$(srcdir)/../forms \
-I$(srcdir)/../tables \
-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 \
-I$(topsrcdir)/content/html/document/src \
-I$(topsrcdir)/content/html/style/src \
-I$(topsrcdir)/content/xslt/src/base \
-I$(topsrcdir)/content/xslt/src/xml \
-I$(topsrcdir)/content/xslt/src/xpath \
@@ -330,19 +326,15 @@ LOCAL_INCLUDES += -I$(srcdir)/../base \
-I$(topsrcdir)/editor/composer/src \
-I$(topsrcdir)/js/src/xpconnect/src \
-I$(topsrcdir)/js/src/xpconnect/loader \
-I$(topsrcdir)/caps/include \
-I$(topsrcdir)/netwerk/base/src \
-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)
ifeq ($(GNU_CXX),1)
LDFLAGS += -Wl,-LD_LAYOUT:lgot_buffer=50
endif
endif
--- a/layout/build/nsContentDLF.cpp
+++ b/layout/build/nsContentDLF.cpp
@@ -100,19 +100,17 @@ static const char* const gHTMLTypes[] =
VIEWSOURCE_CONTENT_TYPE,
APPLICATION_XHTML_XML,
0
};
static const char* const gXMLTypes[] = {
TEXT_XML,
APPLICATION_XML,
-#ifdef MOZ_MATHML
APPLICATION_MATHML_XML,
-#endif
APPLICATION_RDF_XML,
TEXT_RDF,
0
};
static const char* const gSVGTypes[] = {
IMAGE_SVG_XML,
0
--- a/layout/build/nsContentDLF.h
+++ b/layout/build/nsContentDLF.h
@@ -85,23 +85,16 @@ public:
private:
static nsresult EnsureUAStyleSheet();
static PRBool IsImageContentType(const char* aContentType);
};
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" }, \
{ "Gecko-Content-Viewers", AUDIO_WEBM, "@mozilla.org/content/document-loader-factory;1" },
#else
#define CONTENTDLF_WEBM_CATEGORIES
#endif
@@ -118,13 +111,13 @@ NS_NewContentDocumentLoaderFactory(nsIDo
{ "Gecko-Content-Viewers", TEXT_XML, "@mozilla.org/content/document-loader-factory;1" }, \
{ "Gecko-Content-Viewers", APPLICATION_XML, "@mozilla.org/content/document-loader-factory;1" }, \
{ "Gecko-Content-Viewers", APPLICATION_RDF_XML, "@mozilla.org/content/document-loader-factory;1" }, \
{ "Gecko-Content-Viewers", TEXT_RDF, "@mozilla.org/content/document-loader-factory;1" }, \
{ "Gecko-Content-Viewers", TEXT_XUL, "@mozilla.org/content/document-loader-factory;1" }, \
{ "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
--- a/layout/build/nsLayoutStatics.cpp
+++ b/layout/build/nsLayoutStatics.cpp
@@ -84,32 +84,29 @@
#include "nsHTMLDNSPrefetch.h"
#include "nsHtml5Module.h"
#include "nsCrossSiteListenerProxy.h"
#include "nsFocusManager.h"
#include "nsFrameList.h"
#include "nsListControlFrame.h"
#include "nsHTMLInputElement.h"
#include "nsSVGUtils.h"
+#include "nsMathMLAtoms.h"
+#include "nsMathMLOperators.h"
#ifdef MOZ_XUL
#include "nsXULPopupManager.h"
#include "nsXULContentUtils.h"
#include "nsXULElement.h"
#include "nsXULPrototypeCache.h"
#include "nsXULTooltipListener.h"
#include "inDOMView.h"
#endif
-#ifdef MOZ_MATHML
-#include "nsMathMLAtoms.h"
-#include "nsMathMLOperators.h"
-#endif
-
#include "nsHTMLEditor.h"
#include "nsTextServicesDocument.h"
#ifdef MOZ_MEDIA
#include "nsMediaDecoder.h"
#include "nsHTMLMediaElement.h"
#endif
@@ -210,19 +207,17 @@ nsLayoutStatics::Initialize()
NS_ERROR("Could not initialize nsXULContentUtils");
return rv;
}
inDOMView::InitAtoms();
#endif
-#ifdef MOZ_MATHML
nsMathMLOperators::AddRefTable();
-#endif
nsEditProperty::RegisterAtoms();
nsTextServicesDocument::RegisterAtoms();
#ifdef DEBUG
nsFrame::DisplayReflowStartup();
#endif
nsDOMAttribute::Initialize();
@@ -323,19 +318,17 @@ nsLayoutStatics::Shutdown()
#ifdef MOZ_XUL
nsXULContentUtils::Finish();
nsXULElement::ReleaseGlobals();
nsXULPrototypeCache::ReleaseGlobals();
nsSprocketLayout::Shutdown();
#endif
-#ifdef MOZ_MATHML
nsMathMLOperators::ReleaseTable();
-#endif
nsCSSFrameConstructor::ReleaseGlobals();
nsFloatManager::Shutdown();
nsImageFrame::ReleaseGlobals();
nsCSSScanner::ReleaseGlobals();
nsTextFragment::Shutdown();
--- a/layout/generic/nsHTMLReflowMetrics.h
+++ b/layout/generic/nsHTMLReflowMetrics.h
@@ -39,24 +39,22 @@
#ifndef nsHTMLReflowMetrics_h___
#define nsHTMLReflowMetrics_h___
#include <stdio.h>
#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
* overflow, we use these indices.
*
* eOverflowType_LENGTH is needed (for gcc 4.5.*, at least) to ensure
* that 2 is a valid value of nsOverflowType for use in
* NS_FOR_FRAME_OVERFLOW_TYPES.
@@ -233,25 +231,23 @@ struct nsCollapsingMargin {
struct nsHTMLReflowMetrics {
nscoord width, height; // [OUT] desired width and height (border-box)
nscoord ascent; // [OUT] baseline (from top), or ASK_FOR_BASELINE
PRUint32 mFlags;
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
// bounding box and italic correction. For example, the bounding box of
// 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.
nsCollapsingMargin mCarriedOutBottomMargin;
// For frames that have content that overflow their content area
// (HasOverflowAreas() is true) these rectangles represent the total
// area of the frame including visible overflow, i.e., don't include
--- a/layout/generic/nsTextFrameThebes.cpp
+++ b/layout/generic/nsTextFrameThebes.cpp
@@ -6804,20 +6804,18 @@ nsTextFrame::ReflowText(nsLineLayout& aL
PRUint32 transformedOffset = provider.GetStart().GetSkippedOffset();
// The metrics for the text go in here
gfxTextRun::Metrics textMetrics;
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);
PRBool forceBreakAfter = PR_FALSE;
if (forceBreak >= offset + length) {
forceBreakAfter = forceBreak == offset + length;
// The break is not within the text considered for this textframe.
forceBreak = -1;
--- a/layout/style/nsCSSParser.cpp
+++ b/layout/style/nsCSSParser.cpp
@@ -5615,23 +5615,21 @@ CSSParserImpl::ParseSingleValueProperty(
}
PRUint32 variant = nsCSSProps::ParserVariant(aPropID);
if (variant == 0) {
NS_ABORT_IF_FALSE(PR_FALSE, "not a single value property");
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)) {
default:
NS_ABORT_IF_FALSE(PR_FALSE, "should not be reached");
case 0:
return ParseVariant(aValue, variant, kwtable);
case CSS_PROPERTY_VALUE_NONNEGATIVE:
--- a/layout/style/nsCSSPropList.h
+++ b/layout/style/nsCSSPropList.h
@@ -2509,17 +2509,16 @@ CSS_PROP_XUL(
stack_sizing,
CSS_PROP_DOMPROP_PREFIXED(StackSizing),
CSS_PROPERTY_PARSE_VALUE,
VARIANT_HK,
kStackSizingKTable,
CSS_PROP_NO_OFFSET,
eStyleAnimType_None)
-#ifdef MOZ_MATHML
#ifndef CSS_PROP_LIST_EXCLUDE_INTERNAL
CSS_PROP_FONT(
-moz-script-level,
script_level,
ScriptLevel,
// REVIEW: no range restriction?
// NOTE: CSSParserImpl::ParseSingleValueProperty only accepts this
// property when mUnsafeRulesEnabled is set.
@@ -2546,17 +2545,16 @@ CSS_PROP_FONT(
ScriptMinSize,
// REVIEW: no range restriction?
CSS_PROPERTY_PARSE_INACCESSIBLE,
0,
nsnull,
CSS_PROP_NO_OFFSET,
eStyleAnimType_None)
#endif
-#endif
CSS_PROP_SVGRESET(
clip-path,
clip_path,
ClipPath,
CSS_PROPERTY_PARSE_VALUE,
VARIANT_HUO,
nsnull,
--- a/layout/style/nsCSSPseudoClassList.h
+++ b/layout/style/nsCSSPseudoClassList.h
@@ -154,21 +154,19 @@ CSS_STATE_PSEUDO_CLASS(mozTypeUnsupporte
NS_EVENT_STATE_TYPE_UNSUPPORTED)
CSS_STATE_PSEUDO_CLASS(mozHandlerDisabled, ":-moz-handler-disabled",
NS_EVENT_STATE_HANDLER_DISABLED)
CSS_STATE_PSEUDO_CLASS(mozHandlerBlocked, ":-moz-handler-blocked",
NS_EVENT_STATE_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
CSS_STATE_PSEUDO_CLASS(required, ":required", NS_EVENT_STATE_REQUIRED)
CSS_STATE_PSEUDO_CLASS(optional, ":optional", NS_EVENT_STATE_OPTIONAL)
CSS_STATE_PSEUDO_CLASS(valid, ":valid", NS_EVENT_STATE_VALID)
CSS_STATE_PSEUDO_CLASS(invalid, ":invalid", NS_EVENT_STATE_INVALID)
CSS_STATE_PSEUDO_CLASS(inRange, ":in-range", NS_EVENT_STATE_INRANGE)
--- a/layout/style/nsCSSPseudoElementList.h
+++ b/layout/style/nsCSSPseudoElementList.h
@@ -76,16 +76,14 @@ CSS_PSEUDO_ELEMENT(mozSelection, ":-moz-
CSS_PSEUDO_ELEMENT(mozFocusInner, ":-moz-focus-inner", 0)
CSS_PSEUDO_ELEMENT(mozFocusOuter, ":-moz-focus-outer", 0)
// XXXbz should we really allow random content to style these? Maybe
// use our flags to prevent that?
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)
--- a/layout/style/nsRuleNode.cpp
+++ b/layout/style/nsRuleNode.cpp
@@ -1368,19 +1368,17 @@ CheckFontCallback(const nsRuleData* aRul
// and 'narrower' values of 'font-stretch' depend on the parent.
const nsCSSValue& size = *aRuleData->ValueForFontSize();
const nsCSSValue& weight = *aRuleData->ValueForFontWeight();
if (size.IsRelativeLengthUnit() ||
size.GetUnit() == eCSSUnit_Percent ||
(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))) {
NS_ASSERTION(aResult == nsRuleNode::eRulePartialReset ||
aResult == nsRuleNode::eRuleFullReset ||
aResult == nsRuleNode::eRulePartialMixed ||
aResult == nsRuleNode::eRuleFullMixed,
"we know we already have a reset-counted property");
@@ -1590,17 +1588,17 @@ static const CheckCallbackFn gCheckCallb
#define STYLE_STRUCT(name, checkdata_cb, ctor_args) \
checkdata_cb,
#include "nsStyleStructList.h"
#undef STYLE_STRUCT
};
-#if defined(MOZ_MATHML) && defined(DEBUG)
+#ifdef DEBUG
static PRBool
AreAllMathMLPropertiesUndefined(const nsRuleData* aRuleData)
{
return
aRuleData->ValueForScriptLevel()->GetUnit() == eCSSUnit_Null &&
aRuleData->ValueForScriptSizeMultiplier()->GetUnit() == eCSSUnit_Null &&
aRuleData->ValueForScriptMinSize()->GetUnit() == eCSSUnit_Null;
}
@@ -1626,42 +1624,38 @@ nsRuleNode::CheckSpecifiedProperties(con
ExamineCSSValue(*values, specified, inherited);
}
#if 0
printf("CheckSpecifiedProperties: SID=%d total=%d spec=%d inh=%d.\n",
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
* over Partial, and Reset or Inherited over Mixed, since we can
* optimize based on the edge cases and not the in-between cases.
*/
nsRuleNode::RuleDetail result;
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
// this as fully specified. Code in nsMathMLElementFactory will
// rebuild the rule tree and style data when MathML is first enabled
// (see nsMathMLElement::BindToTree).
|| (aSID == eStyleStruct_Font && specified + 3 == total &&
!mPresContext->Document()->GetMathMLEnabled())
-#endif
) {
if (inherited == 0)
result = eRuleFullReset;
else
result = eRuleFullMixed;
} else if (specified == 0)
result = eRuleNone;
else if (specified == inherited)
@@ -2377,17 +2371,16 @@ nsRuleNode::AdjustLogicalBoxProp(nsStyle
aHighestNode->mStyleData.mResetData-> \
mStyleStructs[eStyleStruct_##type_] = data_; \
/* Propagate the bit down. */ \
PropagateDependentBit(NS_STYLE_INHERIT_BIT(type_), aHighestNode); \
} \
\
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
// This is called after mScriptLevel, mScriptMinSize and mScriptSizeMultiplier
// have been set in aFont.
//
// Here are the invariants we enforce:
// 1) A decrease in size must not reduce the size below minscriptsize.
@@ -2436,17 +2429,16 @@ ComputeScriptLevelSize(const nsStyleFont
return NS_MAX(minScriptSize, scriptLevelSize);
} else {
// scriptminsize can only make sizes larger than the unconstrained size
NS_ASSERTION(*aUnconstrainedSize <= scriptLevelSize, "How can this ever happen?");
// Apply constraint #2
return NS_MIN(scriptLevelSize, NS_MAX(*aUnconstrainedSize, minScriptSize));
}
}
-#endif
struct SetFontSizeCalcOps : public css::BasicCoordCalcOps,
public css::NumbersAlreadyNormalizedOps
{
// The parameters beyond aValue that we need for CalcLengthWith.
const nscoord mParentSize;
const nsStyleFont* const mParentFont;
nsPresContext* const mPresContext;
@@ -2587,29 +2579,27 @@ nsRuleNode::SetFontSize(nsPresContext* a
else if (eCSSUnit_Initial == sizeValue->GetUnit()) {
// The initial value is 'medium', which has magical sizing based on
// the generic font family, so do that here too.
*aSize = baseSize;
zoom = PR_TRUE;
} 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
// do anything here.
if (!aUsedStartStruct && aParentSize != aScriptLevelAdjustedParentSize) {
// There was no rule affecting the size but the size has been
// affected by the parent's size via scriptlevel change. So we cannot
// store the data in the rule tree.
aCanStoreInRuleTree = PR_FALSE;
*aSize = aScriptLevelAdjustedParentSize;
}
-#endif
}
// We want to zoom the cascaded size so that em-based measurements,
// line-heights, etc., work.
if (zoom) {
*aSize = nsStyleFont::ZoomText(aPresContext, *aSize);
}
}
@@ -2806,17 +2796,16 @@ nsRuleNode::SetFont(nsPresContext* aPres
// font-stretch: enum, inherit, initial, -moz-system-font
SetDiscrete(*aRuleData->ValueForFontStretch(),
aFont->mFont.stretch, aCanStoreInRuleTree,
SETDSC_SYSTEM_FONT | SETDSC_ENUMERATED,
aParentFont->mFont.stretch,
defaultVariableFont->stretch,
0, 0, 0, systemFont.stretch);
-#ifdef MOZ_MATHML
// Compute scriptlevel, scriptminsize and scriptsizemultiplier now so
// they're available for font-size computation.
// -moz-script-min-size: length
const nsCSSValue* scriptMinSizeValue = aRuleData->ValueForScriptMinSize();
if (scriptMinSizeValue->IsLengthUnit()) {
// scriptminsize in font units (em, ex) has to be interpreted relative
// to the parent font, or the size definitions are circular and we
@@ -2846,17 +2835,16 @@ nsRuleNode::SetFont(nsPresContext* aPres
}
else if (eCSSUnit_Inherit == scriptLevelValue->GetUnit()) {
aCanStoreInRuleTree = PR_FALSE;
aFont->mScriptLevel = aParentFont->mScriptLevel;
}
else if (eCSSUnit_Initial == scriptLevelValue->GetUnit()) {
aFont->mScriptLevel = 0;
}
-#endif
// font-feature-settings
const nsCSSValue* featureSettingsValue =
aRuleData->ValueForFontFeatureSettings();
if (eCSSUnit_Inherit == featureSettingsValue->GetUnit()) {
aCanStoreInRuleTree = PR_FALSE;
aFont->mFont.featureSettings = aParentFont->mFont.featureSettings;
} else if (eCSSUnit_Normal == featureSettingsValue->GetUnit() ||
@@ -2880,28 +2868,25 @@ nsRuleNode::SetFont(nsPresContext* aPres
} else if (eCSSUnit_System_Font == languageOverrideValue->GetUnit()) {
aFont->mFont.languageOverride = systemFont.languageOverride;
} else if (eCSSUnit_String == languageOverrideValue->GetUnit()) {
languageOverrideValue->GetStringValue(aFont->mFont.languageOverride);
}
// 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
// need to call SetFontSize again to compute the
// scriptminsize-unconstrained size. This is OK even if we have a
// start struct, because if we have a start struct then 'font-size'
// was specified and so scriptminsize has no effect.
aFont->mScriptUnconstrainedSize = aFont->mSize;
@@ -2909,17 +2894,16 @@ nsRuleNode::SetFont(nsPresContext* aPres
SetFontSize(aPresContext, aRuleData, aFont, aParentFont,
&aFont->mScriptUnconstrainedSize, systemFont,
aParentFont->mScriptUnconstrainedSize,
scriptLevelAdjustedUnconstrainedParentSize,
aUsedStartStruct, atRoot, aCanStoreInRuleTree);
}
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)
if (0 < aFont->mSize && aFont->mSize < aMinFontSize)
aFont->mFont.size = aMinFontSize;
else
aFont->mFont.size = aFont->mSize;
--- a/layout/style/nsStyleStruct.cpp
+++ b/layout/style/nsStyleStruct.cpp
@@ -116,52 +116,46 @@ static nsChangeHint CalcShadowDifference
// nsStyleFont
//
nsStyleFont::nsStyleFont(const nsFont& aFont, nsPresContext *aPresContext)
: mFont(aFont),
mGenericID(kGenericFont_NONE)
{
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);
}
nsStyleFont::nsStyleFont(nsPresContext* aPresContext)
: mFont(*(aPresContext->GetDefaultFont(kPresContext_DefaultVariableFont_ID))),
mGenericID(kGenericFont_NONE)
{
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*
nsStyleFont::operator new(size_t sz, nsPresContext* aContext) CPP_THROW_NEW {
void* result = aContext->AllocateFromShell(sz);
if (result)
memset(result, 0, sz);
return result;
--- a/layout/style/nsStyleStruct.h
+++ b/layout/style/nsStyleStruct.h
@@ -133,24 +133,22 @@ struct nsStyleFont {
// from mFont.size which is our "actual size" and is
// enforced to be >= the user's preferred min-size.
// mFont.size should be used for display purposes
// while mSize is the value to return in
// getComputedStyle() for example.
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 {
nsStyleCoord mLocation; // percent, coord, none
nscolor mColor;
};
class nsStyleGradient {
--- a/parser/htmlparser/src/CParserContext.cpp
+++ b/parser/htmlparser/src/CParserContext.cpp
@@ -83,19 +83,17 @@ CParserContext::SetMimeType(const nsACSt
if (mMimeType.EqualsLiteral(TEXT_HTML))
mDocType = eHTML_Strict;
else if (mMimeType.EqualsLiteral(TEXT_XML) ||
mMimeType.EqualsLiteral(APPLICATION_XML) ||
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;
}
nsresult
CParserContext::GetTokenizer(nsIDTD* aDTD,
nsIContentSink* aSink,
--- a/toolkit/toolkit-makefiles.sh
+++ b/toolkit/toolkit-makefiles.sh
@@ -359,16 +359,23 @@ MAKEFILES_libsydneyaudio="
"
MAKEFILES_libnestegg="
media/libnestegg/Makefile
media/libnestegg/include/Makefile
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
netwerk/base/public/Makefile
netwerk/base/src/Makefile
netwerk/build/Makefile
netwerk/cache/Makefile
netwerk/cookie/Makefile
@@ -747,16 +754,17 @@ add_makefiles "
$MAKEFILES_jsdebugger
$MAKEFILES_jsctypes
$MAKEFILES_content
$MAKEFILES_layout
$MAKEFILES_libimg
$MAKEFILES_libjar
$MAKEFILES_libreg
$MAKEFILES_libpref
+ $MAKEFILES_mathml
$MAKEFILES_plugin
$MAKEFILES_netwerk
$MAKEFILES_uriloader
$MAKEFILES_profile
$MAKEFILES_rdf
$MAKEFILES_sun_java
$MAKEFILES_caps
$MAKEFILES_chrome
@@ -1097,25 +1105,16 @@ if [ "$NS_TRACE_MALLOC" ]; then
fi
if [ "$MOZ_MAPINFO" ]; then
add_makefiles "
tools/codesighs/Makefile
"
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
dom/interfaces/smil/Makefile
"
fi
if [ "$MOZ_XTF" ]; then