This commit is contained in:
Peter.VanderBeken%pandora.be 2000-09-16 20:53:08 +00:00
Родитель f98a9a46af
Коммит f019ffd8cf
33 изменённых файлов: 39 добавлений и 343 удалений

Просмотреть файл

@ -80,7 +80,6 @@ $options{jar_manifests} = 0; # use jar.mn files for resources, not MANIFE
$options{jars} = 0; # build jar files
# Don't change these (where should they go?)
$optiondefines{transformiix}{MOZ_XSL} = 1;
$optiondefines{mathml}{MOZ_MATHML} = 1;
$optiondefines{svg}{MOZ_SVG} = 1;

Просмотреть файл

@ -112,7 +112,6 @@ $options{jar_manifests} = 0; # use jar.mn files for resources, not MANIFE
$options{jars} = 0; # build jar files
# Don't change these (where should they go?)
$optiondefines{transformiix}{MOZ_XSL} = 1;
$optiondefines{mathml}{MOZ_MATHML} = 1;
$optiondefines{svg}{MOZ_SVG} = 1;

Просмотреть файл

@ -1620,10 +1620,7 @@ sub BuildClientDist()
_InstallFromManifest(":mozilla:layout:events:src:MANIFEST", "$distdirectory:layout:");
_InstallFromManifest(":mozilla:layout:xml:document:public:MANIFEST", "$distdirectory:layout:");
_InstallFromManifest(":mozilla:layout:xml:content:public:MANIFEST", "$distdirectory:layout:");
if ($main::options{transformiix})
{
_InstallFromManifest(":mozilla:layout:xsl:document:src:MANIFEST_IDL", "$distdirectory:idl:");
}
_InstallFromManifest(":mozilla:layout:xsl:document:src:MANIFEST_IDL", "$distdirectory:idl:");
if ($main::options{svg})
{
_InstallFromManifest(":mozilla:layout:svg:base:public:MANIFEST", "$distdirectory:layout:");
@ -2426,14 +2423,7 @@ sub BuildLayoutProjects()
BuildOneProject(":mozilla:gfx:macbuild:gfx.mcp", "gfx$D.shlb", 1, $main::ALIAS_SYM_FILES, 0);
BuildOneProject(":mozilla:dom:macbuild:dom.mcp", "dom$D.shlb", 1, $main::ALIAS_SYM_FILES, 0);
BuildOneProject(":mozilla:modules:plugin:macbuild:plugin.mcp", "plugin$D.shlb", 1, $main::ALIAS_SYM_FILES, 1);
if ($main::options{transformiix})
{
BuildOneProject(":mozilla:layout:macbuild:layoutxsl.mcp", "layoutxsl$D.o", 0, 0, 0);
}
else
{
BuildOneProject(":mozilla:layout:macbuild:layoutxsl.mcp", "layoutxsl$D.o stub", 0, 0, 0);
}
BuildOneProject(":mozilla:layout:macbuild:layoutxsl.mcp", "layoutxsl$D.o", 0, 0, 0);
if ($main::options{mathml})
{
BuildOneProject(":mozilla:layout:macbuild:layoutmathml.mcp", "layoutmathml$D.o", 0, 0, 0);

Просмотреть файл

@ -28,9 +28,7 @@ class nsIDocument;
class nsIPresContext;
class nsIPresShell;
class nsIStyleSheet;
#ifdef MOZ_XSL
class nsITransformMediator;
#endif
#define NS_IDOCUMENT_VIEWER_IID \
{ 0xa6cf9057, 0x15b3, 0x11d2,{0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32}}
@ -55,9 +53,7 @@ public:
NS_IMETHOD CreateDocumentViewerUsing(nsIPresContext* aPresContext,
nsIDocumentViewer*& aResult) = 0;
#ifdef MOZ_XSL
NS_IMETHOD SetTransformMediator(nsITransformMediator* aMediator)=0;
#endif
};
#endif /* nsIDocumentViewer_h___ */

Просмотреть файл

@ -86,9 +86,7 @@
#include "nsIDOMFocusListener.h"
#include "nsISelectionController.h"
#ifdef MOZ_XSL
#include "nsITransformMediator.h"
#endif
static NS_DEFINE_CID(kEventQueueService, NS_EVENTQUEUESERVICE_CID);
@ -215,9 +213,7 @@ public:
NS_IMETHOD GetPresContext(nsIPresContext*& aResult);
NS_IMETHOD CreateDocumentViewerUsing(nsIPresContext* aPresContext,
nsIDocumentViewer*& aResult);
#ifdef MOZ_XSL
NS_IMETHOD SetTransformMediator(nsITransformMediator* aMediator);
#endif
// nsIContentViewerEdit
NS_DECL_NSICONTENTVIEWEREDIT
@ -266,11 +262,9 @@ protected:
nsCOMPtr<nsIDeviceContext> mDeviceContext; // ??? can't hurt, but...
nsIView* mView; // [WEAK] cleaned up by view mgr
// the following six items are explicitly in this order
// the following seven items are explicitly in this order
// so they will be destroyed in the reverse order (pinkerton, scc)
#ifdef MOZ_XSL
nsCOMPtr<nsITransformMediator> mTransformMediator;
#endif
nsCOMPtr<nsIDocument> mDocument;
nsCOMPtr<nsIWidget> mWindow; // ??? should we really own it?
nsCOMPtr<nsIViewManager> mViewManager;
@ -1298,7 +1292,6 @@ void DocumentViewerImpl::DocumentReadyForPrinting()
}
}
#ifdef MOZ_XSL
NS_IMETHODIMP
DocumentViewerImpl::SetTransformMediator(nsITransformMediator* aMediator)
{
@ -1307,7 +1300,6 @@ DocumentViewerImpl::SetTransformMediator(nsITransformMediator* aMediator)
mTransformMediator = aMediator;
return NS_OK;
}
#endif
#ifdef XP_MAC
#pragma mark -

Просмотреть файл

@ -28,9 +28,6 @@
class nsIAtom;
class nsICSSLoader;
#ifdef MOZ_XSL
class nsITransformMediator;
#endif
#define NS_IXMLDOCUMENT_IID \
{ 0xa6cf90ca, 0x15b3, 0x11d2, \

Просмотреть файл

@ -43,13 +43,9 @@ include $(topsrcdir)/config/rules.mk
DEFINES += -D_IMPL_NS_HTML
ifdef MOZ_XSL
INCLUDES += -I$(srcdir)
INCLUDES += -I$(srcdir)/../../../xsl/document/src
endif
INCLUDES += \
-I$(srcdir) \
-I$(srcdir)/../../../xsl/document/src \
-I$(srcdir)/../../../html/base/src \
-I$(srcdir)/../../../html/document/src \
-I$(srcdir)/../../../html/content/src \

Просмотреть файл

@ -25,9 +25,6 @@ LIBRARY_NAME=raptorxmldoc_s
MODULE=raptor
DEFINES=-D_IMPL_NS_HTML -DWIN32_LEAN_AND_MEAN
!if defined(MOZ_XSL)
DEFINES=$(DEFINES) -DMOZ_XSL
!endif
CPPSRCS= \
nsXMLContentSink.cpp \

Просмотреть файл

@ -68,11 +68,9 @@
#include "prtime.h"
#include "prlog.h"
#include "prmem.h"
#ifdef MOZ_XSL
#include "nsXSLContentSink.h"
#include "nsParserCIID.h"
#include "nsIDocumentViewer.h"
#endif
// XXX misnamed header file, but oh well
#include "nsHTMLTokens.h"
@ -80,16 +78,10 @@
static char kNameSpaceSeparator = ':';
static char kNameSpaceDef[] = "xmlns";
static char kStyleSheetPI[] = "xml-stylesheet";
#ifdef MOZ_XSL
static char kXSLType[] = "text/xsl";
#endif
static NS_DEFINE_CID(kNameSpaceManagerCID, NS_NAMESPACEMANAGER_CID);
#ifdef MOZ_XSL
static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID);
#endif
nsINameSpaceManager* nsXMLContentSink::gNameSpaceManager = nsnull;
PRUint32 nsXMLContentSink::gRefCnt = 0;
@ -158,9 +150,7 @@ nsXMLContentSink::nsXMLContentSink()
mInScript = PR_FALSE;
mStyleSheetCount = 0;
mCSSLoader = nsnull;
#ifdef MOZ_XSL
mXSLTransformMediator = nsnull;
#endif
}
nsXMLContentSink::~nsXMLContentSink()
@ -229,25 +219,14 @@ nsXMLContentSink::Init(nsIDocument* aDoc,
return aDoc->GetNodeInfoManager(*getter_AddRefs(mNodeInfoManager));
}
#ifndef MOZ_XSL
NS_IMPL_ADDREF(nsXMLContentSink)
NS_IMPL_RELEASE(nsXMLContentSink)
#else
NS_IMPL_THREADSAFE_ADDREF(nsXMLContentSink)
NS_IMPL_THREADSAFE_RELEASE(nsXMLContentSink)
#endif
NS_INTERFACE_MAP_BEGIN(nsXMLContentSink)
NS_INTERFACE_MAP_ENTRY(nsIXMLContentSink)
NS_INTERFACE_MAP_ENTRY(nsIContentSink)
#ifdef MOZ_XSL
NS_INTERFACE_MAP_ENTRY(nsIObserver)
NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference)
#endif
NS_INTERFACE_MAP_ENTRY(nsIStreamLoaderObserver)
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIXMLContentSink)
NS_INTERFACE_MAP_END
@ -279,10 +258,6 @@ nsXMLContentSink::DidBuildModel(PRInt32 aQualityLevel)
mDocument->SetRootContent(mDocElement);
#ifndef MOZ_XSL
StartLayout();
mDocument->EndLoad();
#else
nsresult rv;
if (mXSLTransformMediator) {
rv = SetupTransformMediator();
@ -292,7 +267,6 @@ nsXMLContentSink::DidBuildModel(PRInt32 aQualityLevel)
StartLayout();
mDocument->EndLoad();
}
#endif
// Drop our reference to the parser to get rid of a circular
// reference.
@ -301,7 +275,6 @@ nsXMLContentSink::DidBuildModel(PRInt32 aQualityLevel)
return NS_OK;
}
#ifdef MOZ_XSL
// The observe method is called on completion of the transform. The nsISupports argument is an
// nsIDOMElement interface to the root node of the output content model.
NS_IMETHODIMP
@ -320,7 +293,7 @@ nsXMLContentSink::Observe(nsISupports *aSubject, const PRUnichar *aTopic, const
mXSLTransformMediator->GetResultDocument(getter_AddRefs(resultDOMDoc));
nsCOMPtr<nsIDocument> resultDoc = do_QueryInterface(resultDOMDoc);
mDocument->EndLoad();
nsCOMPtr<nsIDocument> sourceDoc = mDocument;
NS_RELEASE(mDocument);
mDocument = resultDoc;
@ -336,6 +309,10 @@ nsXMLContentSink::Observe(nsISupports *aSubject, const PRUnichar *aTopic, const
// Reset the observer on the transform mediator
mXSLTransformMediator->SetTransformObserver(nsnull);
// Start the layout process
StartLayout();
sourceDoc->EndLoad();
}
else
{
@ -350,11 +327,11 @@ nsXMLContentSink::Observe(nsISupports *aSubject, const PRUnichar *aTopic, const
mXSLTransformMediator = nsnull;
mDocument->SetRootContent(mDocElement);
}
// Start the layout process
StartLayout();
mDocument->EndLoad();
// Start the layout process
StartLayout();
mDocument->EndLoad();
}
}
return rv;
}
@ -393,7 +370,6 @@ nsXMLContentSink::SetupTransformMediator()
return rv;
}
#endif
NS_IMETHODIMP
nsXMLContentSink::WillInterrupt(void)
@ -642,12 +618,8 @@ nsXMLContentSink::OpenContainer(const nsIParserNode& aNode)
// For XSL, we need to wait till after the transform
// to set the root content object. Hence, the following
// ifndef.
#ifdef MOZ_XSL
if (!mXSLTransformMediator)
mDocument->SetRootContent(mDocElement);
#else
mDocument->SetRootContent(mDocElement);
#endif
}
else {
nsCOMPtr<nsIContent> parent = getter_AddRefs(GetCurrentContent());
@ -975,7 +947,6 @@ static void SplitMimeType(const nsString& aValue, nsString& aType, nsString& aPa
aType.StripWhitespace();
}
#ifdef MOZ_XSL
nsresult
nsXMLContentSink::CreateStyleSheetURL(nsIURI** aUrl,
const nsAReadableString& aHref)
@ -1091,7 +1062,6 @@ nsXMLContentSink::ProcessXSLStyleLink(nsIContent* aElement,
return rv;
}
#endif
nsresult
nsXMLContentSink::ProcessCSSStyleLink(nsIContent* aElement,
@ -1188,13 +1158,8 @@ nsXMLContentSink::AddProcessingInstruction(const nsIParserNode& aNode)
media.ToLowerCase();
}
result = GetQuotedAttributeValue(text, NS_ConvertASCIItoUCS2("alternate"), alternate);
#ifndef MOZ_XSL
result = ProcessCSSStyleLink(node, href, alternate.EqualsWithConversion("yes"),
title, type, media);
#else
result = ProcessStyleLink(node, href, alternate.EqualsWithConversion("yes"),
title, type, media);
#endif
}
}

Просмотреть файл

@ -26,11 +26,9 @@
#include "nsIXMLContentSink.h"
#include "nsIViewManager.h"
#include "nsIScrollableView.h"
#ifdef MOZ_XSL
#include "nsIObserver.h"
#include "nsWeakReference.h"
#include "nsITransformMediator.h"
#endif
#include "nsIUnicharInputStream.h"
#include "nsIStreamLoader.h"
#include "nsISupportsArray.h"
@ -59,10 +57,8 @@ typedef enum {
// XXX Till the parser knows a little bit more about XML,
// this is a HTMLContentSink.
class nsXMLContentSink : public nsIXMLContentSink,
#ifdef MOZ_XSL
public nsIObserver,
public nsSupportsWeakReference,
#endif
public nsIStreamLoaderObserver
{
public:
@ -100,12 +96,10 @@ public:
NS_IMETHOD AddNotation(const nsIParserNode& aNode);
NS_IMETHOD AddEntityReference(const nsIParserNode& aNode);
#ifdef MOZ_XSL
// nsIObserver
NS_IMETHOD Observe(nsISupports *aSubject,
const PRUnichar *aTopic,
const PRUnichar *someData);
#endif
NS_IMETHOD ResumeParsing();
NS_IMETHOD EvaluateScript(nsString& aScript, nsIURI *aScriptURI, PRUint32 aLineNo, const char* aVersion);
@ -139,7 +133,6 @@ protected:
const nsString& aHref, PRBool aAlternate,
const nsString& aTitle, const nsString& aType,
const nsString& aMedia);
#ifdef MOZ_XSL
nsresult ProcessStyleLink(nsIContent* aElement,
const nsString& aHref, PRBool aAlternate,
const nsString& aTitle, const nsString& aType,
@ -152,7 +145,7 @@ protected:
nsresult CreateStyleSheetURL(nsIURI** aUrl, const nsAReadableString& aHref);
nsresult LoadXSLStyleSheet(nsIURI* aUrl, const nsString& aType);
nsresult SetupTransformMediator();
#endif
nsresult AddText(const nsString& aString);
static void
@ -190,9 +183,7 @@ protected:
PRInt32 mStyleSheetCount;
nsICSSLoader* mCSSLoader;
nsCOMPtr<nsINodeInfoManager> mNodeInfoManager;
#ifdef MOZ_XSL
nsCOMPtr<nsITransformMediator> mXSLTransformMediator;
#endif
};
#endif // nsXMLContentSink_h__

Просмотреть файл

@ -26,9 +26,6 @@
#include "nsMarkupDocument.h"
#include "nsIXMLDocument.h"
#include "nsIHTMLContentContainer.h"
#ifdef MOZ_XSL
#include "nsITransformMediator.h"
#endif
class nsIParser;
class nsIDOMNode;

Просмотреть файл

@ -25,9 +25,6 @@ LIBRARY_NAME=raptorxsldoc_s
MODULE=raptor
DEFINES=-D_IMPL_NS_HTML -DWIN32_LEAN_AND_MEAN
!if defined(MOZ_XSL)
DEFINES=$(DEFINES) -DMOZ_XSL
!endif
XPIDLSRCS= .\nsIDocumentTransformer.idl \
$(NULL)

Просмотреть файл

@ -25,3 +25,6 @@
*/
#include "MacSharedPrefix.h"
#define MOZ_XSL 1
#define HAVE_RINT 1

Просмотреть файл

@ -25,3 +25,6 @@
*/
#include "MacSharedPrefix_debug.h"
#define MOZ_XSL 1
#define HAVE_RINT 1

Просмотреть файл

@ -25,7 +25,7 @@
* Nisheeth Ranjan, nisheeth@netscape.com
* -- implemented rint function, which was not available on Windows.
*
* $Id: NumberFunctionCall.cpp,v 1.7 2000-07-11 09:47:37 axel%pike.org Exp $
* $Id: NumberFunctionCall.cpp,v 1.8 2000-09-16 20:53:01 Peter.VanderBeken%pandora.be Exp $
*/
/*
@ -65,7 +65,7 @@ NumberFunctionCall::NumberFunctionCall(short type) : FunctionCall() {
}
} //-- NumberFunctionCall
#if !defined(HAVE_RINT) && !defined(XP_MAC)
#if !defined(HAVE_RINT)
static double rint(double r)
{
double integerPart = 0;

Просмотреть файл

@ -26,7 +26,7 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
DIRS = base html xml xul xbl
DIRS = base html xml xul xbl xsl
ifdef MOZ_MATHML
DIRS += mathml
@ -36,10 +36,6 @@ ifdef MOZ_SVG
DIRS += svg
endif
ifdef MOZ_XSL
DIRS += xsl
endif
DIRS += events build
ifdef ENABLE_TESTS

Просмотреть файл

@ -86,9 +86,7 @@
#include "nsIDOMFocusListener.h"
#include "nsISelectionController.h"
#ifdef MOZ_XSL
#include "nsITransformMediator.h"
#endif
static NS_DEFINE_CID(kEventQueueService, NS_EVENTQUEUESERVICE_CID);
@ -215,9 +213,7 @@ public:
NS_IMETHOD GetPresContext(nsIPresContext*& aResult);
NS_IMETHOD CreateDocumentViewerUsing(nsIPresContext* aPresContext,
nsIDocumentViewer*& aResult);
#ifdef MOZ_XSL
NS_IMETHOD SetTransformMediator(nsITransformMediator* aMediator);
#endif
// nsIContentViewerEdit
NS_DECL_NSICONTENTVIEWEREDIT
@ -266,11 +262,9 @@ protected:
nsCOMPtr<nsIDeviceContext> mDeviceContext; // ??? can't hurt, but...
nsIView* mView; // [WEAK] cleaned up by view mgr
// the following six items are explicitly in this order
// the following seven items are explicitly in this order
// so they will be destroyed in the reverse order (pinkerton, scc)
#ifdef MOZ_XSL
nsCOMPtr<nsITransformMediator> mTransformMediator;
#endif
nsCOMPtr<nsIDocument> mDocument;
nsCOMPtr<nsIWidget> mWindow; // ??? should we really own it?
nsCOMPtr<nsIViewManager> mViewManager;
@ -1298,7 +1292,6 @@ void DocumentViewerImpl::DocumentReadyForPrinting()
}
}
#ifdef MOZ_XSL
NS_IMETHODIMP
DocumentViewerImpl::SetTransformMediator(nsITransformMediator* aMediator)
{
@ -1307,7 +1300,6 @@ DocumentViewerImpl::SetTransformMediator(nsITransformMediator* aMediator)
mTransformMediator = aMediator;
return NS_OK;
}
#endif
#ifdef XP_MAC
#pragma mark -

Просмотреть файл

@ -28,9 +28,7 @@ class nsIDocument;
class nsIPresContext;
class nsIPresShell;
class nsIStyleSheet;
#ifdef MOZ_XSL
class nsITransformMediator;
#endif
#define NS_IDOCUMENT_VIEWER_IID \
{ 0xa6cf9057, 0x15b3, 0x11d2,{0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32}}
@ -55,9 +53,7 @@ public:
NS_IMETHOD CreateDocumentViewerUsing(nsIPresContext* aPresContext,
nsIDocumentViewer*& aResult) = 0;
#ifdef MOZ_XSL
NS_IMETHOD SetTransformMediator(nsITransformMediator* aMediator)=0;
#endif
};
#endif /* nsIDocumentViewer_h___ */

Просмотреть файл

@ -1,63 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Mozilla Communicator client code.
*
* The Initial Developer of the Original Code is Netscape Communications
* Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
#ifndef nsIDocumentViewer_h___
#define nsIDocumentViewer_h___
#include "nsIContentViewer.h"
class nsIDocument;
class nsIPresContext;
class nsIPresShell;
class nsIStyleSheet;
#ifdef MOZ_XSL
class nsITransformMediator;
#endif
#define NS_IDOCUMENT_VIEWER_IID \
{ 0xa6cf9057, 0x15b3, 0x11d2,{0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32}}
/**
* A document viewer is a kind of content viewer that uses NGLayout
* to manage the presentation of the content.
*/
class nsIDocumentViewer : public nsIContentViewer
{
public:
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOCUMENT_VIEWER_IID)
NS_IMETHOD SetUAStyleSheet(nsIStyleSheet* aUAStyleSheet) = 0;
NS_IMETHOD GetDocument(nsIDocument*& aResult) = 0;
NS_IMETHOD GetPresShell(nsIPresShell*& aResult) = 0;
NS_IMETHOD GetPresContext(nsIPresContext*& aResult) = 0;
NS_IMETHOD CreateDocumentViewerUsing(nsIPresContext* aPresContext,
nsIDocumentViewer*& aResult) = 0;
#ifdef MOZ_XSL
NS_IMETHOD SetTransformMediator(nsITransformMediator* aMediator)=0;
#endif
};
#endif /* nsIDocumentViewer_h___ */

Просмотреть файл

@ -86,9 +86,7 @@
#include "nsIDOMFocusListener.h"
#include "nsISelectionController.h"
#ifdef MOZ_XSL
#include "nsITransformMediator.h"
#endif
static NS_DEFINE_CID(kEventQueueService, NS_EVENTQUEUESERVICE_CID);
@ -215,9 +213,7 @@ public:
NS_IMETHOD GetPresContext(nsIPresContext*& aResult);
NS_IMETHOD CreateDocumentViewerUsing(nsIPresContext* aPresContext,
nsIDocumentViewer*& aResult);
#ifdef MOZ_XSL
NS_IMETHOD SetTransformMediator(nsITransformMediator* aMediator);
#endif
// nsIContentViewerEdit
NS_DECL_NSICONTENTVIEWEREDIT
@ -266,11 +262,9 @@ protected:
nsCOMPtr<nsIDeviceContext> mDeviceContext; // ??? can't hurt, but...
nsIView* mView; // [WEAK] cleaned up by view mgr
// the following six items are explicitly in this order
// the following seven items are explicitly in this order
// so they will be destroyed in the reverse order (pinkerton, scc)
#ifdef MOZ_XSL
nsCOMPtr<nsITransformMediator> mTransformMediator;
#endif
nsCOMPtr<nsIDocument> mDocument;
nsCOMPtr<nsIWidget> mWindow; // ??? should we really own it?
nsCOMPtr<nsIViewManager> mViewManager;
@ -1298,7 +1292,6 @@ void DocumentViewerImpl::DocumentReadyForPrinting()
}
}
#ifdef MOZ_XSL
NS_IMETHODIMP
DocumentViewerImpl::SetTransformMediator(nsITransformMediator* aMediator)
{
@ -1307,7 +1300,6 @@ DocumentViewerImpl::SetTransformMediator(nsITransformMediator* aMediator)
mTransformMediator = aMediator;
return NS_OK;
}
#endif
#ifdef XP_MAC
#pragma mark -

Просмотреть файл

@ -59,6 +59,7 @@ SHARED_LIBRARY_LIBS = \
$(DIST)/lib/libgkhtmltable_s.$(LIB_SUFFIX) \
$(DIST)/lib/libgkxmlcon_s.$(LIB_SUFFIX) \
$(DIST)/lib/libgkxmldoc_s.$(LIB_SUFFIX) \
$(DIST)/lib/libgkxsldoc_s.$(LIB_SUFFIX) \
$(DIST)/lib/libgkxulcon_s.$(LIB_SUFFIX) \
$(DIST)/lib/libgkxulbase_s.$(LIB_SUFFIX) \
$(DIST)/lib/libgkxbl_s.$(LIB_SUFFIX) \
@ -85,12 +86,6 @@ SHARED_LIBRARY_LIBS += \
$(NSNULL)
endif
ifdef MOZ_XSL
SHARED_LIBRARY_LIBS += \
$(DIST)/lib/libgkxsldoc_s.$(LIB_SUFFIX) \
$(NSNULL)
endif
EXTRA_DSO_LDOPTS = \
-L$(DIST)/bin \
$(EXTRA_DSO_LIBS) \

Просмотреть файл

@ -72,9 +72,7 @@ LLIBS= \
$(DIST)\lib\raptorhtmltable_s.lib \
$(DIST)\lib\raptorxmlcontent_s.lib \
$(DIST)\lib\raptorxmldoc_s.lib \
!if defined(MOZ_XSL)
$(DIST)\lib\raptorxsldoc_s.lib \
!endif
$(DIST)\lib\raptorxulbase_s.lib \
$(DIST)\lib\raptorxulcontent_s.lib \
$(DIST)\lib\raptorxbl_s.lib \

Просмотреть файл

@ -70,9 +70,7 @@ LLIBS= \
$(DIST)\lib\raptorsvgbase_s.lib \
$(DIST)\lib\raptorsvgcontent_s.lib \
!endif
!ifdef MOZ_XSL
$(DIST)\lib\raptorxsldoc_s.lib \
!endif
$(DIST)\lib\img32$(VERSION_NUMBER).lib \
$(DIST)\lib\util.lib \
$(DIST)\lib\xpcom.lib \

Двоичные данные
layout/macbuild/layoutIDL.mcp

Двоичный файл не отображается.

Просмотреть файл

@ -27,9 +27,7 @@ DIRS= \
xml \
xul \
xbl \
!if defined(MOZ_XSL)
xsl \
!endif
!ifdef MOZ_MATHML
mathml \
!endif

Просмотреть файл

@ -28,9 +28,6 @@
class nsIAtom;
class nsICSSLoader;
#ifdef MOZ_XSL
class nsITransformMediator;
#endif
#define NS_IXMLDOCUMENT_IID \
{ 0xa6cf90ca, 0x15b3, 0x11d2, \

Просмотреть файл

@ -43,13 +43,9 @@ include $(topsrcdir)/config/rules.mk
DEFINES += -D_IMPL_NS_HTML
ifdef MOZ_XSL
INCLUDES += -I$(srcdir)
INCLUDES += -I$(srcdir)/../../../xsl/document/src
endif
INCLUDES += \
-I$(srcdir) \
-I$(srcdir)/../../../xsl/document/src \
-I$(srcdir)/../../../html/base/src \
-I$(srcdir)/../../../html/document/src \
-I$(srcdir)/../../../html/content/src \

Просмотреть файл

@ -25,9 +25,6 @@ LIBRARY_NAME=raptorxmldoc_s
MODULE=raptor
DEFINES=-D_IMPL_NS_HTML -DWIN32_LEAN_AND_MEAN
!if defined(MOZ_XSL)
DEFINES=$(DEFINES) -DMOZ_XSL
!endif
CPPSRCS= \
nsXMLContentSink.cpp \

Просмотреть файл

@ -68,11 +68,9 @@
#include "prtime.h"
#include "prlog.h"
#include "prmem.h"
#ifdef MOZ_XSL
#include "nsXSLContentSink.h"
#include "nsParserCIID.h"
#include "nsIDocumentViewer.h"
#endif
// XXX misnamed header file, but oh well
#include "nsHTMLTokens.h"
@ -80,16 +78,10 @@
static char kNameSpaceSeparator = ':';
static char kNameSpaceDef[] = "xmlns";
static char kStyleSheetPI[] = "xml-stylesheet";
#ifdef MOZ_XSL
static char kXSLType[] = "text/xsl";
#endif
static NS_DEFINE_CID(kNameSpaceManagerCID, NS_NAMESPACEMANAGER_CID);
#ifdef MOZ_XSL
static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID);
#endif
nsINameSpaceManager* nsXMLContentSink::gNameSpaceManager = nsnull;
PRUint32 nsXMLContentSink::gRefCnt = 0;
@ -158,9 +150,7 @@ nsXMLContentSink::nsXMLContentSink()
mInScript = PR_FALSE;
mStyleSheetCount = 0;
mCSSLoader = nsnull;
#ifdef MOZ_XSL
mXSLTransformMediator = nsnull;
#endif
}
nsXMLContentSink::~nsXMLContentSink()
@ -229,25 +219,14 @@ nsXMLContentSink::Init(nsIDocument* aDoc,
return aDoc->GetNodeInfoManager(*getter_AddRefs(mNodeInfoManager));
}
#ifndef MOZ_XSL
NS_IMPL_ADDREF(nsXMLContentSink)
NS_IMPL_RELEASE(nsXMLContentSink)
#else
NS_IMPL_THREADSAFE_ADDREF(nsXMLContentSink)
NS_IMPL_THREADSAFE_RELEASE(nsXMLContentSink)
#endif
NS_INTERFACE_MAP_BEGIN(nsXMLContentSink)
NS_INTERFACE_MAP_ENTRY(nsIXMLContentSink)
NS_INTERFACE_MAP_ENTRY(nsIContentSink)
#ifdef MOZ_XSL
NS_INTERFACE_MAP_ENTRY(nsIObserver)
NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference)
#endif
NS_INTERFACE_MAP_ENTRY(nsIStreamLoaderObserver)
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIXMLContentSink)
NS_INTERFACE_MAP_END
@ -279,10 +258,6 @@ nsXMLContentSink::DidBuildModel(PRInt32 aQualityLevel)
mDocument->SetRootContent(mDocElement);
#ifndef MOZ_XSL
StartLayout();
mDocument->EndLoad();
#else
nsresult rv;
if (mXSLTransformMediator) {
rv = SetupTransformMediator();
@ -292,7 +267,6 @@ nsXMLContentSink::DidBuildModel(PRInt32 aQualityLevel)
StartLayout();
mDocument->EndLoad();
}
#endif
// Drop our reference to the parser to get rid of a circular
// reference.
@ -301,7 +275,6 @@ nsXMLContentSink::DidBuildModel(PRInt32 aQualityLevel)
return NS_OK;
}
#ifdef MOZ_XSL
// The observe method is called on completion of the transform. The nsISupports argument is an
// nsIDOMElement interface to the root node of the output content model.
NS_IMETHODIMP
@ -320,7 +293,7 @@ nsXMLContentSink::Observe(nsISupports *aSubject, const PRUnichar *aTopic, const
mXSLTransformMediator->GetResultDocument(getter_AddRefs(resultDOMDoc));
nsCOMPtr<nsIDocument> resultDoc = do_QueryInterface(resultDOMDoc);
mDocument->EndLoad();
nsCOMPtr<nsIDocument> sourceDoc = mDocument;
NS_RELEASE(mDocument);
mDocument = resultDoc;
@ -336,6 +309,10 @@ nsXMLContentSink::Observe(nsISupports *aSubject, const PRUnichar *aTopic, const
// Reset the observer on the transform mediator
mXSLTransformMediator->SetTransformObserver(nsnull);
// Start the layout process
StartLayout();
sourceDoc->EndLoad();
}
else
{
@ -350,11 +327,11 @@ nsXMLContentSink::Observe(nsISupports *aSubject, const PRUnichar *aTopic, const
mXSLTransformMediator = nsnull;
mDocument->SetRootContent(mDocElement);
}
// Start the layout process
StartLayout();
mDocument->EndLoad();
// Start the layout process
StartLayout();
mDocument->EndLoad();
}
}
return rv;
}
@ -393,7 +370,6 @@ nsXMLContentSink::SetupTransformMediator()
return rv;
}
#endif
NS_IMETHODIMP
nsXMLContentSink::WillInterrupt(void)
@ -642,12 +618,8 @@ nsXMLContentSink::OpenContainer(const nsIParserNode& aNode)
// For XSL, we need to wait till after the transform
// to set the root content object. Hence, the following
// ifndef.
#ifdef MOZ_XSL
if (!mXSLTransformMediator)
mDocument->SetRootContent(mDocElement);
#else
mDocument->SetRootContent(mDocElement);
#endif
}
else {
nsCOMPtr<nsIContent> parent = getter_AddRefs(GetCurrentContent());
@ -975,7 +947,6 @@ static void SplitMimeType(const nsString& aValue, nsString& aType, nsString& aPa
aType.StripWhitespace();
}
#ifdef MOZ_XSL
nsresult
nsXMLContentSink::CreateStyleSheetURL(nsIURI** aUrl,
const nsAReadableString& aHref)
@ -1091,7 +1062,6 @@ nsXMLContentSink::ProcessXSLStyleLink(nsIContent* aElement,
return rv;
}
#endif
nsresult
nsXMLContentSink::ProcessCSSStyleLink(nsIContent* aElement,
@ -1188,13 +1158,8 @@ nsXMLContentSink::AddProcessingInstruction(const nsIParserNode& aNode)
media.ToLowerCase();
}
result = GetQuotedAttributeValue(text, NS_ConvertASCIItoUCS2("alternate"), alternate);
#ifndef MOZ_XSL
result = ProcessCSSStyleLink(node, href, alternate.EqualsWithConversion("yes"),
title, type, media);
#else
result = ProcessStyleLink(node, href, alternate.EqualsWithConversion("yes"),
title, type, media);
#endif
}
}

Просмотреть файл

@ -26,11 +26,9 @@
#include "nsIXMLContentSink.h"
#include "nsIViewManager.h"
#include "nsIScrollableView.h"
#ifdef MOZ_XSL
#include "nsIObserver.h"
#include "nsWeakReference.h"
#include "nsITransformMediator.h"
#endif
#include "nsIUnicharInputStream.h"
#include "nsIStreamLoader.h"
#include "nsISupportsArray.h"
@ -59,10 +57,8 @@ typedef enum {
// XXX Till the parser knows a little bit more about XML,
// this is a HTMLContentSink.
class nsXMLContentSink : public nsIXMLContentSink,
#ifdef MOZ_XSL
public nsIObserver,
public nsSupportsWeakReference,
#endif
public nsIStreamLoaderObserver
{
public:
@ -100,12 +96,10 @@ public:
NS_IMETHOD AddNotation(const nsIParserNode& aNode);
NS_IMETHOD AddEntityReference(const nsIParserNode& aNode);
#ifdef MOZ_XSL
// nsIObserver
NS_IMETHOD Observe(nsISupports *aSubject,
const PRUnichar *aTopic,
const PRUnichar *someData);
#endif
NS_IMETHOD ResumeParsing();
NS_IMETHOD EvaluateScript(nsString& aScript, nsIURI *aScriptURI, PRUint32 aLineNo, const char* aVersion);
@ -139,7 +133,6 @@ protected:
const nsString& aHref, PRBool aAlternate,
const nsString& aTitle, const nsString& aType,
const nsString& aMedia);
#ifdef MOZ_XSL
nsresult ProcessStyleLink(nsIContent* aElement,
const nsString& aHref, PRBool aAlternate,
const nsString& aTitle, const nsString& aType,
@ -152,7 +145,7 @@ protected:
nsresult CreateStyleSheetURL(nsIURI** aUrl, const nsAReadableString& aHref);
nsresult LoadXSLStyleSheet(nsIURI* aUrl, const nsString& aType);
nsresult SetupTransformMediator();
#endif
nsresult AddText(const nsString& aString);
static void
@ -190,9 +183,7 @@ protected:
PRInt32 mStyleSheetCount;
nsICSSLoader* mCSSLoader;
nsCOMPtr<nsINodeInfoManager> mNodeInfoManager;
#ifdef MOZ_XSL
nsCOMPtr<nsITransformMediator> mXSLTransformMediator;
#endif
};
#endif // nsXMLContentSink_h__

Просмотреть файл

@ -26,9 +26,6 @@
#include "nsMarkupDocument.h"
#include "nsIXMLDocument.h"
#include "nsIHTMLContentContainer.h"
#ifdef MOZ_XSL
#include "nsITransformMediator.h"
#endif
class nsIParser;
class nsIDOMNode;

Просмотреть файл

@ -1,67 +0,0 @@
#!nmake
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
DEPTH=..\..\..\..
LIBRARY_NAME=raptorxsldoc_s
MODULE=raptor
DEFINES=-D_IMPL_NS_HTML -DWIN32_LEAN_AND_MEAN
!if defined(MOZ_XSL)
DEFINES=$(DEFINES) -DMOZ_XSL
!endif
XPIDLSRCS= .\nsIDocumentTransformer.idl \
$(NULL)
CPPSRCS= \
nsXSLContentSink.cpp \
nsTransformMediator.cpp \
$(NULL)
CPP_OBJS= \
.\$(OBJDIR)\nsXSLContentSink.obj \
.\$(OBJDIR)\nsTransformMediator.obj \
$(NULL)
EXPORTS = \
nsITransformMediator.h \
$(NULL)
LINCS=-I$(PUBLIC)\xpcom -I$(PUBLIC)\raptor -I$(PUBLIC)\js \
-I..\..\..\html\style\src -I..\..\..\html\base\src -I$(PUBLIC)\dom \
-I..\..\..\html\content\src -I..\..\..\html\document\src \
-I..\..\..\xul\content\src -I..\..\..\xml\document\src \
-I$(PUBLIC)\netlib -I..\..\..\base\src -I$(PUBLIC)\pref \
-I$(PUBLIC)\expat
LCFLAGS = \
$(LCFLAGS) \
$(DEFINES) \
$(NULL)
include <$(DEPTH)\config\rules.mak>
install:: $(LIBRARY)
$(MAKE_INSTALL) $(LIBRARY) $(DIST)\lib
clobber::
rm -f $(DIST)\lib\$(LIBRARY_NAME).lib

Просмотреть файл

@ -24,10 +24,6 @@ MODULE=rdf
LIBRARY_NAME=rdfcontent_s
DEFINES=-D_IMPL_NS_DOM
!if defined(MOZ_XSL)
DEFINES=$(DEFINES) -DMOZ_XSL
!endif
LCFLAGS = \
$(LCFLAGS) \