зеркало из https://github.com/mozilla/pjs.git
Enabling XSLT hooks in layout in default build. Bug #42228. r=axel@pike.org, a=waterson@mozilla.org.
This commit is contained in:
Родитель
f98a9a46af
Коммит
f019ffd8cf
|
@ -80,7 +80,6 @@ $options{jar_manifests} = 0; # use jar.mn files for resources, not MANIFE
|
||||||
$options{jars} = 0; # build jar files
|
$options{jars} = 0; # build jar files
|
||||||
|
|
||||||
# Don't change these (where should they go?)
|
# Don't change these (where should they go?)
|
||||||
$optiondefines{transformiix}{MOZ_XSL} = 1;
|
|
||||||
$optiondefines{mathml}{MOZ_MATHML} = 1;
|
$optiondefines{mathml}{MOZ_MATHML} = 1;
|
||||||
$optiondefines{svg}{MOZ_SVG} = 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
|
$options{jars} = 0; # build jar files
|
||||||
|
|
||||||
# Don't change these (where should they go?)
|
# Don't change these (where should they go?)
|
||||||
$optiondefines{transformiix}{MOZ_XSL} = 1;
|
|
||||||
$optiondefines{mathml}{MOZ_MATHML} = 1;
|
$optiondefines{mathml}{MOZ_MATHML} = 1;
|
||||||
$optiondefines{svg}{MOZ_SVG} = 1;
|
$optiondefines{svg}{MOZ_SVG} = 1;
|
||||||
|
|
||||||
|
|
|
@ -1620,10 +1620,7 @@ sub BuildClientDist()
|
||||||
_InstallFromManifest(":mozilla:layout:events:src:MANIFEST", "$distdirectory:layout:");
|
_InstallFromManifest(":mozilla:layout:events:src:MANIFEST", "$distdirectory:layout:");
|
||||||
_InstallFromManifest(":mozilla:layout:xml:document:public:MANIFEST", "$distdirectory:layout:");
|
_InstallFromManifest(":mozilla:layout:xml:document:public:MANIFEST", "$distdirectory:layout:");
|
||||||
_InstallFromManifest(":mozilla:layout:xml:content: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})
|
if ($main::options{svg})
|
||||||
{
|
{
|
||||||
_InstallFromManifest(":mozilla:layout:svg:base:public:MANIFEST", "$distdirectory:layout:");
|
_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: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: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);
|
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);
|
||||||
{
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
if ($main::options{mathml})
|
if ($main::options{mathml})
|
||||||
{
|
{
|
||||||
BuildOneProject(":mozilla:layout:macbuild:layoutmathml.mcp", "layoutmathml$D.o", 0, 0, 0);
|
BuildOneProject(":mozilla:layout:macbuild:layoutmathml.mcp", "layoutmathml$D.o", 0, 0, 0);
|
||||||
|
|
|
@ -28,9 +28,7 @@ class nsIDocument;
|
||||||
class nsIPresContext;
|
class nsIPresContext;
|
||||||
class nsIPresShell;
|
class nsIPresShell;
|
||||||
class nsIStyleSheet;
|
class nsIStyleSheet;
|
||||||
#ifdef MOZ_XSL
|
|
||||||
class nsITransformMediator;
|
class nsITransformMediator;
|
||||||
#endif
|
|
||||||
|
|
||||||
#define NS_IDOCUMENT_VIEWER_IID \
|
#define NS_IDOCUMENT_VIEWER_IID \
|
||||||
{ 0xa6cf9057, 0x15b3, 0x11d2,{0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32}}
|
{ 0xa6cf9057, 0x15b3, 0x11d2,{0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32}}
|
||||||
|
@ -55,9 +53,7 @@ public:
|
||||||
NS_IMETHOD CreateDocumentViewerUsing(nsIPresContext* aPresContext,
|
NS_IMETHOD CreateDocumentViewerUsing(nsIPresContext* aPresContext,
|
||||||
nsIDocumentViewer*& aResult) = 0;
|
nsIDocumentViewer*& aResult) = 0;
|
||||||
|
|
||||||
#ifdef MOZ_XSL
|
|
||||||
NS_IMETHOD SetTransformMediator(nsITransformMediator* aMediator)=0;
|
NS_IMETHOD SetTransformMediator(nsITransformMediator* aMediator)=0;
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* nsIDocumentViewer_h___ */
|
#endif /* nsIDocumentViewer_h___ */
|
||||||
|
|
|
@ -86,9 +86,7 @@
|
||||||
#include "nsIDOMFocusListener.h"
|
#include "nsIDOMFocusListener.h"
|
||||||
#include "nsISelectionController.h"
|
#include "nsISelectionController.h"
|
||||||
|
|
||||||
#ifdef MOZ_XSL
|
|
||||||
#include "nsITransformMediator.h"
|
#include "nsITransformMediator.h"
|
||||||
#endif
|
|
||||||
|
|
||||||
static NS_DEFINE_CID(kEventQueueService, NS_EVENTQUEUESERVICE_CID);
|
static NS_DEFINE_CID(kEventQueueService, NS_EVENTQUEUESERVICE_CID);
|
||||||
|
|
||||||
|
@ -215,9 +213,7 @@ public:
|
||||||
NS_IMETHOD GetPresContext(nsIPresContext*& aResult);
|
NS_IMETHOD GetPresContext(nsIPresContext*& aResult);
|
||||||
NS_IMETHOD CreateDocumentViewerUsing(nsIPresContext* aPresContext,
|
NS_IMETHOD CreateDocumentViewerUsing(nsIPresContext* aPresContext,
|
||||||
nsIDocumentViewer*& aResult);
|
nsIDocumentViewer*& aResult);
|
||||||
#ifdef MOZ_XSL
|
|
||||||
NS_IMETHOD SetTransformMediator(nsITransformMediator* aMediator);
|
NS_IMETHOD SetTransformMediator(nsITransformMediator* aMediator);
|
||||||
#endif
|
|
||||||
|
|
||||||
// nsIContentViewerEdit
|
// nsIContentViewerEdit
|
||||||
NS_DECL_NSICONTENTVIEWEREDIT
|
NS_DECL_NSICONTENTVIEWEREDIT
|
||||||
|
@ -266,11 +262,9 @@ protected:
|
||||||
nsCOMPtr<nsIDeviceContext> mDeviceContext; // ??? can't hurt, but...
|
nsCOMPtr<nsIDeviceContext> mDeviceContext; // ??? can't hurt, but...
|
||||||
nsIView* mView; // [WEAK] cleaned up by view mgr
|
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)
|
// so they will be destroyed in the reverse order (pinkerton, scc)
|
||||||
#ifdef MOZ_XSL
|
|
||||||
nsCOMPtr<nsITransformMediator> mTransformMediator;
|
nsCOMPtr<nsITransformMediator> mTransformMediator;
|
||||||
#endif
|
|
||||||
nsCOMPtr<nsIDocument> mDocument;
|
nsCOMPtr<nsIDocument> mDocument;
|
||||||
nsCOMPtr<nsIWidget> mWindow; // ??? should we really own it?
|
nsCOMPtr<nsIWidget> mWindow; // ??? should we really own it?
|
||||||
nsCOMPtr<nsIViewManager> mViewManager;
|
nsCOMPtr<nsIViewManager> mViewManager;
|
||||||
|
@ -1298,7 +1292,6 @@ void DocumentViewerImpl::DocumentReadyForPrinting()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef MOZ_XSL
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
DocumentViewerImpl::SetTransformMediator(nsITransformMediator* aMediator)
|
DocumentViewerImpl::SetTransformMediator(nsITransformMediator* aMediator)
|
||||||
{
|
{
|
||||||
|
@ -1307,7 +1300,6 @@ DocumentViewerImpl::SetTransformMediator(nsITransformMediator* aMediator)
|
||||||
mTransformMediator = aMediator;
|
mTransformMediator = aMediator;
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef XP_MAC
|
#ifdef XP_MAC
|
||||||
#pragma mark -
|
#pragma mark -
|
||||||
|
|
|
@ -28,9 +28,6 @@
|
||||||
|
|
||||||
class nsIAtom;
|
class nsIAtom;
|
||||||
class nsICSSLoader;
|
class nsICSSLoader;
|
||||||
#ifdef MOZ_XSL
|
|
||||||
class nsITransformMediator;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define NS_IXMLDOCUMENT_IID \
|
#define NS_IXMLDOCUMENT_IID \
|
||||||
{ 0xa6cf90ca, 0x15b3, 0x11d2, \
|
{ 0xa6cf90ca, 0x15b3, 0x11d2, \
|
||||||
|
|
|
@ -43,13 +43,9 @@ include $(topsrcdir)/config/rules.mk
|
||||||
|
|
||||||
DEFINES += -D_IMPL_NS_HTML
|
DEFINES += -D_IMPL_NS_HTML
|
||||||
|
|
||||||
ifdef MOZ_XSL
|
|
||||||
INCLUDES += -I$(srcdir)
|
|
||||||
INCLUDES += -I$(srcdir)/../../../xsl/document/src
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
||||||
INCLUDES += \
|
INCLUDES += \
|
||||||
|
-I$(srcdir) \
|
||||||
|
-I$(srcdir)/../../../xsl/document/src \
|
||||||
-I$(srcdir)/../../../html/base/src \
|
-I$(srcdir)/../../../html/base/src \
|
||||||
-I$(srcdir)/../../../html/document/src \
|
-I$(srcdir)/../../../html/document/src \
|
||||||
-I$(srcdir)/../../../html/content/src \
|
-I$(srcdir)/../../../html/content/src \
|
||||||
|
|
|
@ -25,9 +25,6 @@ LIBRARY_NAME=raptorxmldoc_s
|
||||||
MODULE=raptor
|
MODULE=raptor
|
||||||
|
|
||||||
DEFINES=-D_IMPL_NS_HTML -DWIN32_LEAN_AND_MEAN
|
DEFINES=-D_IMPL_NS_HTML -DWIN32_LEAN_AND_MEAN
|
||||||
!if defined(MOZ_XSL)
|
|
||||||
DEFINES=$(DEFINES) -DMOZ_XSL
|
|
||||||
!endif
|
|
||||||
|
|
||||||
CPPSRCS= \
|
CPPSRCS= \
|
||||||
nsXMLContentSink.cpp \
|
nsXMLContentSink.cpp \
|
||||||
|
|
|
@ -68,11 +68,9 @@
|
||||||
#include "prtime.h"
|
#include "prtime.h"
|
||||||
#include "prlog.h"
|
#include "prlog.h"
|
||||||
#include "prmem.h"
|
#include "prmem.h"
|
||||||
#ifdef MOZ_XSL
|
|
||||||
#include "nsXSLContentSink.h"
|
#include "nsXSLContentSink.h"
|
||||||
#include "nsParserCIID.h"
|
#include "nsParserCIID.h"
|
||||||
#include "nsIDocumentViewer.h"
|
#include "nsIDocumentViewer.h"
|
||||||
#endif
|
|
||||||
|
|
||||||
// XXX misnamed header file, but oh well
|
// XXX misnamed header file, but oh well
|
||||||
#include "nsHTMLTokens.h"
|
#include "nsHTMLTokens.h"
|
||||||
|
@ -80,16 +78,10 @@
|
||||||
static char kNameSpaceSeparator = ':';
|
static char kNameSpaceSeparator = ':';
|
||||||
static char kNameSpaceDef[] = "xmlns";
|
static char kNameSpaceDef[] = "xmlns";
|
||||||
static char kStyleSheetPI[] = "xml-stylesheet";
|
static char kStyleSheetPI[] = "xml-stylesheet";
|
||||||
|
|
||||||
#ifdef MOZ_XSL
|
|
||||||
static char kXSLType[] = "text/xsl";
|
static char kXSLType[] = "text/xsl";
|
||||||
#endif
|
|
||||||
|
|
||||||
static NS_DEFINE_CID(kNameSpaceManagerCID, NS_NAMESPACEMANAGER_CID);
|
static NS_DEFINE_CID(kNameSpaceManagerCID, NS_NAMESPACEMANAGER_CID);
|
||||||
|
|
||||||
#ifdef MOZ_XSL
|
|
||||||
static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID);
|
static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID);
|
||||||
#endif
|
|
||||||
|
|
||||||
nsINameSpaceManager* nsXMLContentSink::gNameSpaceManager = nsnull;
|
nsINameSpaceManager* nsXMLContentSink::gNameSpaceManager = nsnull;
|
||||||
PRUint32 nsXMLContentSink::gRefCnt = 0;
|
PRUint32 nsXMLContentSink::gRefCnt = 0;
|
||||||
|
@ -158,9 +150,7 @@ nsXMLContentSink::nsXMLContentSink()
|
||||||
mInScript = PR_FALSE;
|
mInScript = PR_FALSE;
|
||||||
mStyleSheetCount = 0;
|
mStyleSheetCount = 0;
|
||||||
mCSSLoader = nsnull;
|
mCSSLoader = nsnull;
|
||||||
#ifdef MOZ_XSL
|
|
||||||
mXSLTransformMediator = nsnull;
|
mXSLTransformMediator = nsnull;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nsXMLContentSink::~nsXMLContentSink()
|
nsXMLContentSink::~nsXMLContentSink()
|
||||||
|
@ -229,25 +219,14 @@ nsXMLContentSink::Init(nsIDocument* aDoc,
|
||||||
return aDoc->GetNodeInfoManager(*getter_AddRefs(mNodeInfoManager));
|
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_ADDREF(nsXMLContentSink)
|
||||||
NS_IMPL_THREADSAFE_RELEASE(nsXMLContentSink)
|
NS_IMPL_THREADSAFE_RELEASE(nsXMLContentSink)
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
NS_INTERFACE_MAP_BEGIN(nsXMLContentSink)
|
NS_INTERFACE_MAP_BEGIN(nsXMLContentSink)
|
||||||
NS_INTERFACE_MAP_ENTRY(nsIXMLContentSink)
|
NS_INTERFACE_MAP_ENTRY(nsIXMLContentSink)
|
||||||
NS_INTERFACE_MAP_ENTRY(nsIContentSink)
|
NS_INTERFACE_MAP_ENTRY(nsIContentSink)
|
||||||
#ifdef MOZ_XSL
|
|
||||||
NS_INTERFACE_MAP_ENTRY(nsIObserver)
|
NS_INTERFACE_MAP_ENTRY(nsIObserver)
|
||||||
NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference)
|
NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference)
|
||||||
#endif
|
|
||||||
NS_INTERFACE_MAP_ENTRY(nsIStreamLoaderObserver)
|
NS_INTERFACE_MAP_ENTRY(nsIStreamLoaderObserver)
|
||||||
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIXMLContentSink)
|
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIXMLContentSink)
|
||||||
NS_INTERFACE_MAP_END
|
NS_INTERFACE_MAP_END
|
||||||
|
@ -279,10 +258,6 @@ nsXMLContentSink::DidBuildModel(PRInt32 aQualityLevel)
|
||||||
|
|
||||||
mDocument->SetRootContent(mDocElement);
|
mDocument->SetRootContent(mDocElement);
|
||||||
|
|
||||||
#ifndef MOZ_XSL
|
|
||||||
StartLayout();
|
|
||||||
mDocument->EndLoad();
|
|
||||||
#else
|
|
||||||
nsresult rv;
|
nsresult rv;
|
||||||
if (mXSLTransformMediator) {
|
if (mXSLTransformMediator) {
|
||||||
rv = SetupTransformMediator();
|
rv = SetupTransformMediator();
|
||||||
|
@ -292,7 +267,6 @@ nsXMLContentSink::DidBuildModel(PRInt32 aQualityLevel)
|
||||||
StartLayout();
|
StartLayout();
|
||||||
mDocument->EndLoad();
|
mDocument->EndLoad();
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
// Drop our reference to the parser to get rid of a circular
|
// Drop our reference to the parser to get rid of a circular
|
||||||
// reference.
|
// reference.
|
||||||
|
@ -301,7 +275,6 @@ nsXMLContentSink::DidBuildModel(PRInt32 aQualityLevel)
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef MOZ_XSL
|
|
||||||
// The observe method is called on completion of the transform. The nsISupports argument is an
|
// 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.
|
// nsIDOMElement interface to the root node of the output content model.
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
|
@ -320,7 +293,7 @@ nsXMLContentSink::Observe(nsISupports *aSubject, const PRUnichar *aTopic, const
|
||||||
mXSLTransformMediator->GetResultDocument(getter_AddRefs(resultDOMDoc));
|
mXSLTransformMediator->GetResultDocument(getter_AddRefs(resultDOMDoc));
|
||||||
nsCOMPtr<nsIDocument> resultDoc = do_QueryInterface(resultDOMDoc);
|
nsCOMPtr<nsIDocument> resultDoc = do_QueryInterface(resultDOMDoc);
|
||||||
|
|
||||||
mDocument->EndLoad();
|
nsCOMPtr<nsIDocument> sourceDoc = mDocument;
|
||||||
NS_RELEASE(mDocument);
|
NS_RELEASE(mDocument);
|
||||||
|
|
||||||
mDocument = resultDoc;
|
mDocument = resultDoc;
|
||||||
|
@ -336,6 +309,10 @@ nsXMLContentSink::Observe(nsISupports *aSubject, const PRUnichar *aTopic, const
|
||||||
|
|
||||||
// Reset the observer on the transform mediator
|
// Reset the observer on the transform mediator
|
||||||
mXSLTransformMediator->SetTransformObserver(nsnull);
|
mXSLTransformMediator->SetTransformObserver(nsnull);
|
||||||
|
|
||||||
|
// Start the layout process
|
||||||
|
StartLayout();
|
||||||
|
sourceDoc->EndLoad();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -350,11 +327,11 @@ nsXMLContentSink::Observe(nsISupports *aSubject, const PRUnichar *aTopic, const
|
||||||
|
|
||||||
mXSLTransformMediator = nsnull;
|
mXSLTransformMediator = nsnull;
|
||||||
mDocument->SetRootContent(mDocElement);
|
mDocument->SetRootContent(mDocElement);
|
||||||
}
|
|
||||||
|
|
||||||
// Start the layout process
|
// Start the layout process
|
||||||
StartLayout();
|
StartLayout();
|
||||||
mDocument->EndLoad();
|
mDocument->EndLoad();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
@ -393,7 +370,6 @@ nsXMLContentSink::SetupTransformMediator()
|
||||||
|
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsXMLContentSink::WillInterrupt(void)
|
nsXMLContentSink::WillInterrupt(void)
|
||||||
|
@ -642,12 +618,8 @@ nsXMLContentSink::OpenContainer(const nsIParserNode& aNode)
|
||||||
// For XSL, we need to wait till after the transform
|
// For XSL, we need to wait till after the transform
|
||||||
// to set the root content object. Hence, the following
|
// to set the root content object. Hence, the following
|
||||||
// ifndef.
|
// ifndef.
|
||||||
#ifdef MOZ_XSL
|
|
||||||
if (!mXSLTransformMediator)
|
if (!mXSLTransformMediator)
|
||||||
mDocument->SetRootContent(mDocElement);
|
mDocument->SetRootContent(mDocElement);
|
||||||
#else
|
|
||||||
mDocument->SetRootContent(mDocElement);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
nsCOMPtr<nsIContent> parent = getter_AddRefs(GetCurrentContent());
|
nsCOMPtr<nsIContent> parent = getter_AddRefs(GetCurrentContent());
|
||||||
|
@ -975,7 +947,6 @@ static void SplitMimeType(const nsString& aValue, nsString& aType, nsString& aPa
|
||||||
aType.StripWhitespace();
|
aType.StripWhitespace();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef MOZ_XSL
|
|
||||||
nsresult
|
nsresult
|
||||||
nsXMLContentSink::CreateStyleSheetURL(nsIURI** aUrl,
|
nsXMLContentSink::CreateStyleSheetURL(nsIURI** aUrl,
|
||||||
const nsAReadableString& aHref)
|
const nsAReadableString& aHref)
|
||||||
|
@ -1091,7 +1062,6 @@ nsXMLContentSink::ProcessXSLStyleLink(nsIContent* aElement,
|
||||||
|
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
nsXMLContentSink::ProcessCSSStyleLink(nsIContent* aElement,
|
nsXMLContentSink::ProcessCSSStyleLink(nsIContent* aElement,
|
||||||
|
@ -1188,13 +1158,8 @@ nsXMLContentSink::AddProcessingInstruction(const nsIParserNode& aNode)
|
||||||
media.ToLowerCase();
|
media.ToLowerCase();
|
||||||
}
|
}
|
||||||
result = GetQuotedAttributeValue(text, NS_ConvertASCIItoUCS2("alternate"), alternate);
|
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"),
|
result = ProcessStyleLink(node, href, alternate.EqualsWithConversion("yes"),
|
||||||
title, type, media);
|
title, type, media);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,11 +26,9 @@
|
||||||
#include "nsIXMLContentSink.h"
|
#include "nsIXMLContentSink.h"
|
||||||
#include "nsIViewManager.h"
|
#include "nsIViewManager.h"
|
||||||
#include "nsIScrollableView.h"
|
#include "nsIScrollableView.h"
|
||||||
#ifdef MOZ_XSL
|
|
||||||
#include "nsIObserver.h"
|
#include "nsIObserver.h"
|
||||||
#include "nsWeakReference.h"
|
#include "nsWeakReference.h"
|
||||||
#include "nsITransformMediator.h"
|
#include "nsITransformMediator.h"
|
||||||
#endif
|
|
||||||
#include "nsIUnicharInputStream.h"
|
#include "nsIUnicharInputStream.h"
|
||||||
#include "nsIStreamLoader.h"
|
#include "nsIStreamLoader.h"
|
||||||
#include "nsISupportsArray.h"
|
#include "nsISupportsArray.h"
|
||||||
|
@ -59,10 +57,8 @@ typedef enum {
|
||||||
// XXX Till the parser knows a little bit more about XML,
|
// XXX Till the parser knows a little bit more about XML,
|
||||||
// this is a HTMLContentSink.
|
// this is a HTMLContentSink.
|
||||||
class nsXMLContentSink : public nsIXMLContentSink,
|
class nsXMLContentSink : public nsIXMLContentSink,
|
||||||
#ifdef MOZ_XSL
|
|
||||||
public nsIObserver,
|
public nsIObserver,
|
||||||
public nsSupportsWeakReference,
|
public nsSupportsWeakReference,
|
||||||
#endif
|
|
||||||
public nsIStreamLoaderObserver
|
public nsIStreamLoaderObserver
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -100,12 +96,10 @@ public:
|
||||||
NS_IMETHOD AddNotation(const nsIParserNode& aNode);
|
NS_IMETHOD AddNotation(const nsIParserNode& aNode);
|
||||||
NS_IMETHOD AddEntityReference(const nsIParserNode& aNode);
|
NS_IMETHOD AddEntityReference(const nsIParserNode& aNode);
|
||||||
|
|
||||||
#ifdef MOZ_XSL
|
|
||||||
// nsIObserver
|
// nsIObserver
|
||||||
NS_IMETHOD Observe(nsISupports *aSubject,
|
NS_IMETHOD Observe(nsISupports *aSubject,
|
||||||
const PRUnichar *aTopic,
|
const PRUnichar *aTopic,
|
||||||
const PRUnichar *someData);
|
const PRUnichar *someData);
|
||||||
#endif
|
|
||||||
|
|
||||||
NS_IMETHOD ResumeParsing();
|
NS_IMETHOD ResumeParsing();
|
||||||
NS_IMETHOD EvaluateScript(nsString& aScript, nsIURI *aScriptURI, PRUint32 aLineNo, const char* aVersion);
|
NS_IMETHOD EvaluateScript(nsString& aScript, nsIURI *aScriptURI, PRUint32 aLineNo, const char* aVersion);
|
||||||
|
@ -139,7 +133,6 @@ protected:
|
||||||
const nsString& aHref, PRBool aAlternate,
|
const nsString& aHref, PRBool aAlternate,
|
||||||
const nsString& aTitle, const nsString& aType,
|
const nsString& aTitle, const nsString& aType,
|
||||||
const nsString& aMedia);
|
const nsString& aMedia);
|
||||||
#ifdef MOZ_XSL
|
|
||||||
nsresult ProcessStyleLink(nsIContent* aElement,
|
nsresult ProcessStyleLink(nsIContent* aElement,
|
||||||
const nsString& aHref, PRBool aAlternate,
|
const nsString& aHref, PRBool aAlternate,
|
||||||
const nsString& aTitle, const nsString& aType,
|
const nsString& aTitle, const nsString& aType,
|
||||||
|
@ -152,7 +145,7 @@ protected:
|
||||||
nsresult CreateStyleSheetURL(nsIURI** aUrl, const nsAReadableString& aHref);
|
nsresult CreateStyleSheetURL(nsIURI** aUrl, const nsAReadableString& aHref);
|
||||||
nsresult LoadXSLStyleSheet(nsIURI* aUrl, const nsString& aType);
|
nsresult LoadXSLStyleSheet(nsIURI* aUrl, const nsString& aType);
|
||||||
nsresult SetupTransformMediator();
|
nsresult SetupTransformMediator();
|
||||||
#endif
|
|
||||||
nsresult AddText(const nsString& aString);
|
nsresult AddText(const nsString& aString);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -190,9 +183,7 @@ protected:
|
||||||
PRInt32 mStyleSheetCount;
|
PRInt32 mStyleSheetCount;
|
||||||
nsICSSLoader* mCSSLoader;
|
nsICSSLoader* mCSSLoader;
|
||||||
nsCOMPtr<nsINodeInfoManager> mNodeInfoManager;
|
nsCOMPtr<nsINodeInfoManager> mNodeInfoManager;
|
||||||
#ifdef MOZ_XSL
|
|
||||||
nsCOMPtr<nsITransformMediator> mXSLTransformMediator;
|
nsCOMPtr<nsITransformMediator> mXSLTransformMediator;
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // nsXMLContentSink_h__
|
#endif // nsXMLContentSink_h__
|
||||||
|
|
|
@ -26,9 +26,6 @@
|
||||||
#include "nsMarkupDocument.h"
|
#include "nsMarkupDocument.h"
|
||||||
#include "nsIXMLDocument.h"
|
#include "nsIXMLDocument.h"
|
||||||
#include "nsIHTMLContentContainer.h"
|
#include "nsIHTMLContentContainer.h"
|
||||||
#ifdef MOZ_XSL
|
|
||||||
#include "nsITransformMediator.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
class nsIParser;
|
class nsIParser;
|
||||||
class nsIDOMNode;
|
class nsIDOMNode;
|
||||||
|
|
|
@ -25,9 +25,6 @@ LIBRARY_NAME=raptorxsldoc_s
|
||||||
MODULE=raptor
|
MODULE=raptor
|
||||||
|
|
||||||
DEFINES=-D_IMPL_NS_HTML -DWIN32_LEAN_AND_MEAN
|
DEFINES=-D_IMPL_NS_HTML -DWIN32_LEAN_AND_MEAN
|
||||||
!if defined(MOZ_XSL)
|
|
||||||
DEFINES=$(DEFINES) -DMOZ_XSL
|
|
||||||
!endif
|
|
||||||
|
|
||||||
XPIDLSRCS= .\nsIDocumentTransformer.idl \
|
XPIDLSRCS= .\nsIDocumentTransformer.idl \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
|
@ -25,3 +25,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "MacSharedPrefix.h"
|
#include "MacSharedPrefix.h"
|
||||||
|
|
||||||
|
#define MOZ_XSL 1
|
||||||
|
#define HAVE_RINT 1
|
||||||
|
|
|
@ -25,3 +25,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "MacSharedPrefix_debug.h"
|
#include "MacSharedPrefix_debug.h"
|
||||||
|
|
||||||
|
#define MOZ_XSL 1
|
||||||
|
#define HAVE_RINT 1
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
* Nisheeth Ranjan, nisheeth@netscape.com
|
* Nisheeth Ranjan, nisheeth@netscape.com
|
||||||
* -- implemented rint function, which was not available on Windows.
|
* -- 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
|
} //-- NumberFunctionCall
|
||||||
|
|
||||||
#if !defined(HAVE_RINT) && !defined(XP_MAC)
|
#if !defined(HAVE_RINT)
|
||||||
static double rint(double r)
|
static double rint(double r)
|
||||||
{
|
{
|
||||||
double integerPart = 0;
|
double integerPart = 0;
|
||||||
|
|
|
@ -26,7 +26,7 @@ VPATH = @srcdir@
|
||||||
|
|
||||||
include $(DEPTH)/config/autoconf.mk
|
include $(DEPTH)/config/autoconf.mk
|
||||||
|
|
||||||
DIRS = base html xml xul xbl
|
DIRS = base html xml xul xbl xsl
|
||||||
|
|
||||||
ifdef MOZ_MATHML
|
ifdef MOZ_MATHML
|
||||||
DIRS += mathml
|
DIRS += mathml
|
||||||
|
@ -36,10 +36,6 @@ ifdef MOZ_SVG
|
||||||
DIRS += svg
|
DIRS += svg
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef MOZ_XSL
|
|
||||||
DIRS += xsl
|
|
||||||
endif
|
|
||||||
|
|
||||||
DIRS += events build
|
DIRS += events build
|
||||||
|
|
||||||
ifdef ENABLE_TESTS
|
ifdef ENABLE_TESTS
|
||||||
|
|
|
@ -86,9 +86,7 @@
|
||||||
#include "nsIDOMFocusListener.h"
|
#include "nsIDOMFocusListener.h"
|
||||||
#include "nsISelectionController.h"
|
#include "nsISelectionController.h"
|
||||||
|
|
||||||
#ifdef MOZ_XSL
|
|
||||||
#include "nsITransformMediator.h"
|
#include "nsITransformMediator.h"
|
||||||
#endif
|
|
||||||
|
|
||||||
static NS_DEFINE_CID(kEventQueueService, NS_EVENTQUEUESERVICE_CID);
|
static NS_DEFINE_CID(kEventQueueService, NS_EVENTQUEUESERVICE_CID);
|
||||||
|
|
||||||
|
@ -215,9 +213,7 @@ public:
|
||||||
NS_IMETHOD GetPresContext(nsIPresContext*& aResult);
|
NS_IMETHOD GetPresContext(nsIPresContext*& aResult);
|
||||||
NS_IMETHOD CreateDocumentViewerUsing(nsIPresContext* aPresContext,
|
NS_IMETHOD CreateDocumentViewerUsing(nsIPresContext* aPresContext,
|
||||||
nsIDocumentViewer*& aResult);
|
nsIDocumentViewer*& aResult);
|
||||||
#ifdef MOZ_XSL
|
|
||||||
NS_IMETHOD SetTransformMediator(nsITransformMediator* aMediator);
|
NS_IMETHOD SetTransformMediator(nsITransformMediator* aMediator);
|
||||||
#endif
|
|
||||||
|
|
||||||
// nsIContentViewerEdit
|
// nsIContentViewerEdit
|
||||||
NS_DECL_NSICONTENTVIEWEREDIT
|
NS_DECL_NSICONTENTVIEWEREDIT
|
||||||
|
@ -266,11 +262,9 @@ protected:
|
||||||
nsCOMPtr<nsIDeviceContext> mDeviceContext; // ??? can't hurt, but...
|
nsCOMPtr<nsIDeviceContext> mDeviceContext; // ??? can't hurt, but...
|
||||||
nsIView* mView; // [WEAK] cleaned up by view mgr
|
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)
|
// so they will be destroyed in the reverse order (pinkerton, scc)
|
||||||
#ifdef MOZ_XSL
|
|
||||||
nsCOMPtr<nsITransformMediator> mTransformMediator;
|
nsCOMPtr<nsITransformMediator> mTransformMediator;
|
||||||
#endif
|
|
||||||
nsCOMPtr<nsIDocument> mDocument;
|
nsCOMPtr<nsIDocument> mDocument;
|
||||||
nsCOMPtr<nsIWidget> mWindow; // ??? should we really own it?
|
nsCOMPtr<nsIWidget> mWindow; // ??? should we really own it?
|
||||||
nsCOMPtr<nsIViewManager> mViewManager;
|
nsCOMPtr<nsIViewManager> mViewManager;
|
||||||
|
@ -1298,7 +1292,6 @@ void DocumentViewerImpl::DocumentReadyForPrinting()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef MOZ_XSL
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
DocumentViewerImpl::SetTransformMediator(nsITransformMediator* aMediator)
|
DocumentViewerImpl::SetTransformMediator(nsITransformMediator* aMediator)
|
||||||
{
|
{
|
||||||
|
@ -1307,7 +1300,6 @@ DocumentViewerImpl::SetTransformMediator(nsITransformMediator* aMediator)
|
||||||
mTransformMediator = aMediator;
|
mTransformMediator = aMediator;
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef XP_MAC
|
#ifdef XP_MAC
|
||||||
#pragma mark -
|
#pragma mark -
|
||||||
|
|
|
@ -28,9 +28,7 @@ class nsIDocument;
|
||||||
class nsIPresContext;
|
class nsIPresContext;
|
||||||
class nsIPresShell;
|
class nsIPresShell;
|
||||||
class nsIStyleSheet;
|
class nsIStyleSheet;
|
||||||
#ifdef MOZ_XSL
|
|
||||||
class nsITransformMediator;
|
class nsITransformMediator;
|
||||||
#endif
|
|
||||||
|
|
||||||
#define NS_IDOCUMENT_VIEWER_IID \
|
#define NS_IDOCUMENT_VIEWER_IID \
|
||||||
{ 0xa6cf9057, 0x15b3, 0x11d2,{0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32}}
|
{ 0xa6cf9057, 0x15b3, 0x11d2,{0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32}}
|
||||||
|
@ -55,9 +53,7 @@ public:
|
||||||
NS_IMETHOD CreateDocumentViewerUsing(nsIPresContext* aPresContext,
|
NS_IMETHOD CreateDocumentViewerUsing(nsIPresContext* aPresContext,
|
||||||
nsIDocumentViewer*& aResult) = 0;
|
nsIDocumentViewer*& aResult) = 0;
|
||||||
|
|
||||||
#ifdef MOZ_XSL
|
|
||||||
NS_IMETHOD SetTransformMediator(nsITransformMediator* aMediator)=0;
|
NS_IMETHOD SetTransformMediator(nsITransformMediator* aMediator)=0;
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* nsIDocumentViewer_h___ */
|
#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 "nsIDOMFocusListener.h"
|
||||||
#include "nsISelectionController.h"
|
#include "nsISelectionController.h"
|
||||||
|
|
||||||
#ifdef MOZ_XSL
|
|
||||||
#include "nsITransformMediator.h"
|
#include "nsITransformMediator.h"
|
||||||
#endif
|
|
||||||
|
|
||||||
static NS_DEFINE_CID(kEventQueueService, NS_EVENTQUEUESERVICE_CID);
|
static NS_DEFINE_CID(kEventQueueService, NS_EVENTQUEUESERVICE_CID);
|
||||||
|
|
||||||
|
@ -215,9 +213,7 @@ public:
|
||||||
NS_IMETHOD GetPresContext(nsIPresContext*& aResult);
|
NS_IMETHOD GetPresContext(nsIPresContext*& aResult);
|
||||||
NS_IMETHOD CreateDocumentViewerUsing(nsIPresContext* aPresContext,
|
NS_IMETHOD CreateDocumentViewerUsing(nsIPresContext* aPresContext,
|
||||||
nsIDocumentViewer*& aResult);
|
nsIDocumentViewer*& aResult);
|
||||||
#ifdef MOZ_XSL
|
|
||||||
NS_IMETHOD SetTransformMediator(nsITransformMediator* aMediator);
|
NS_IMETHOD SetTransformMediator(nsITransformMediator* aMediator);
|
||||||
#endif
|
|
||||||
|
|
||||||
// nsIContentViewerEdit
|
// nsIContentViewerEdit
|
||||||
NS_DECL_NSICONTENTVIEWEREDIT
|
NS_DECL_NSICONTENTVIEWEREDIT
|
||||||
|
@ -266,11 +262,9 @@ protected:
|
||||||
nsCOMPtr<nsIDeviceContext> mDeviceContext; // ??? can't hurt, but...
|
nsCOMPtr<nsIDeviceContext> mDeviceContext; // ??? can't hurt, but...
|
||||||
nsIView* mView; // [WEAK] cleaned up by view mgr
|
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)
|
// so they will be destroyed in the reverse order (pinkerton, scc)
|
||||||
#ifdef MOZ_XSL
|
|
||||||
nsCOMPtr<nsITransformMediator> mTransformMediator;
|
nsCOMPtr<nsITransformMediator> mTransformMediator;
|
||||||
#endif
|
|
||||||
nsCOMPtr<nsIDocument> mDocument;
|
nsCOMPtr<nsIDocument> mDocument;
|
||||||
nsCOMPtr<nsIWidget> mWindow; // ??? should we really own it?
|
nsCOMPtr<nsIWidget> mWindow; // ??? should we really own it?
|
||||||
nsCOMPtr<nsIViewManager> mViewManager;
|
nsCOMPtr<nsIViewManager> mViewManager;
|
||||||
|
@ -1298,7 +1292,6 @@ void DocumentViewerImpl::DocumentReadyForPrinting()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef MOZ_XSL
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
DocumentViewerImpl::SetTransformMediator(nsITransformMediator* aMediator)
|
DocumentViewerImpl::SetTransformMediator(nsITransformMediator* aMediator)
|
||||||
{
|
{
|
||||||
|
@ -1307,7 +1300,6 @@ DocumentViewerImpl::SetTransformMediator(nsITransformMediator* aMediator)
|
||||||
mTransformMediator = aMediator;
|
mTransformMediator = aMediator;
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef XP_MAC
|
#ifdef XP_MAC
|
||||||
#pragma mark -
|
#pragma mark -
|
||||||
|
|
|
@ -59,6 +59,7 @@ SHARED_LIBRARY_LIBS = \
|
||||||
$(DIST)/lib/libgkhtmltable_s.$(LIB_SUFFIX) \
|
$(DIST)/lib/libgkhtmltable_s.$(LIB_SUFFIX) \
|
||||||
$(DIST)/lib/libgkxmlcon_s.$(LIB_SUFFIX) \
|
$(DIST)/lib/libgkxmlcon_s.$(LIB_SUFFIX) \
|
||||||
$(DIST)/lib/libgkxmldoc_s.$(LIB_SUFFIX) \
|
$(DIST)/lib/libgkxmldoc_s.$(LIB_SUFFIX) \
|
||||||
|
$(DIST)/lib/libgkxsldoc_s.$(LIB_SUFFIX) \
|
||||||
$(DIST)/lib/libgkxulcon_s.$(LIB_SUFFIX) \
|
$(DIST)/lib/libgkxulcon_s.$(LIB_SUFFIX) \
|
||||||
$(DIST)/lib/libgkxulbase_s.$(LIB_SUFFIX) \
|
$(DIST)/lib/libgkxulbase_s.$(LIB_SUFFIX) \
|
||||||
$(DIST)/lib/libgkxbl_s.$(LIB_SUFFIX) \
|
$(DIST)/lib/libgkxbl_s.$(LIB_SUFFIX) \
|
||||||
|
@ -85,12 +86,6 @@ SHARED_LIBRARY_LIBS += \
|
||||||
$(NSNULL)
|
$(NSNULL)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef MOZ_XSL
|
|
||||||
SHARED_LIBRARY_LIBS += \
|
|
||||||
$(DIST)/lib/libgkxsldoc_s.$(LIB_SUFFIX) \
|
|
||||||
$(NSNULL)
|
|
||||||
endif
|
|
||||||
|
|
||||||
EXTRA_DSO_LDOPTS = \
|
EXTRA_DSO_LDOPTS = \
|
||||||
-L$(DIST)/bin \
|
-L$(DIST)/bin \
|
||||||
$(EXTRA_DSO_LIBS) \
|
$(EXTRA_DSO_LIBS) \
|
||||||
|
|
|
@ -72,9 +72,7 @@ LLIBS= \
|
||||||
$(DIST)\lib\raptorhtmltable_s.lib \
|
$(DIST)\lib\raptorhtmltable_s.lib \
|
||||||
$(DIST)\lib\raptorxmlcontent_s.lib \
|
$(DIST)\lib\raptorxmlcontent_s.lib \
|
||||||
$(DIST)\lib\raptorxmldoc_s.lib \
|
$(DIST)\lib\raptorxmldoc_s.lib \
|
||||||
!if defined(MOZ_XSL)
|
|
||||||
$(DIST)\lib\raptorxsldoc_s.lib \
|
$(DIST)\lib\raptorxsldoc_s.lib \
|
||||||
!endif
|
|
||||||
$(DIST)\lib\raptorxulbase_s.lib \
|
$(DIST)\lib\raptorxulbase_s.lib \
|
||||||
$(DIST)\lib\raptorxulcontent_s.lib \
|
$(DIST)\lib\raptorxulcontent_s.lib \
|
||||||
$(DIST)\lib\raptorxbl_s.lib \
|
$(DIST)\lib\raptorxbl_s.lib \
|
||||||
|
|
|
@ -70,9 +70,7 @@ LLIBS= \
|
||||||
$(DIST)\lib\raptorsvgbase_s.lib \
|
$(DIST)\lib\raptorsvgbase_s.lib \
|
||||||
$(DIST)\lib\raptorsvgcontent_s.lib \
|
$(DIST)\lib\raptorsvgcontent_s.lib \
|
||||||
!endif
|
!endif
|
||||||
!ifdef MOZ_XSL
|
|
||||||
$(DIST)\lib\raptorxsldoc_s.lib \
|
$(DIST)\lib\raptorxsldoc_s.lib \
|
||||||
!endif
|
|
||||||
$(DIST)\lib\img32$(VERSION_NUMBER).lib \
|
$(DIST)\lib\img32$(VERSION_NUMBER).lib \
|
||||||
$(DIST)\lib\util.lib \
|
$(DIST)\lib\util.lib \
|
||||||
$(DIST)\lib\xpcom.lib \
|
$(DIST)\lib\xpcom.lib \
|
||||||
|
|
Двоичные данные
layout/macbuild/layoutIDL.mcp
Двоичные данные
layout/macbuild/layoutIDL.mcp
Двоичный файл не отображается.
|
@ -27,9 +27,7 @@ DIRS= \
|
||||||
xml \
|
xml \
|
||||||
xul \
|
xul \
|
||||||
xbl \
|
xbl \
|
||||||
!if defined(MOZ_XSL)
|
|
||||||
xsl \
|
xsl \
|
||||||
!endif
|
|
||||||
!ifdef MOZ_MATHML
|
!ifdef MOZ_MATHML
|
||||||
mathml \
|
mathml \
|
||||||
!endif
|
!endif
|
||||||
|
|
|
@ -28,9 +28,6 @@
|
||||||
|
|
||||||
class nsIAtom;
|
class nsIAtom;
|
||||||
class nsICSSLoader;
|
class nsICSSLoader;
|
||||||
#ifdef MOZ_XSL
|
|
||||||
class nsITransformMediator;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define NS_IXMLDOCUMENT_IID \
|
#define NS_IXMLDOCUMENT_IID \
|
||||||
{ 0xa6cf90ca, 0x15b3, 0x11d2, \
|
{ 0xa6cf90ca, 0x15b3, 0x11d2, \
|
||||||
|
|
|
@ -43,13 +43,9 @@ include $(topsrcdir)/config/rules.mk
|
||||||
|
|
||||||
DEFINES += -D_IMPL_NS_HTML
|
DEFINES += -D_IMPL_NS_HTML
|
||||||
|
|
||||||
ifdef MOZ_XSL
|
|
||||||
INCLUDES += -I$(srcdir)
|
|
||||||
INCLUDES += -I$(srcdir)/../../../xsl/document/src
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
||||||
INCLUDES += \
|
INCLUDES += \
|
||||||
|
-I$(srcdir) \
|
||||||
|
-I$(srcdir)/../../../xsl/document/src \
|
||||||
-I$(srcdir)/../../../html/base/src \
|
-I$(srcdir)/../../../html/base/src \
|
||||||
-I$(srcdir)/../../../html/document/src \
|
-I$(srcdir)/../../../html/document/src \
|
||||||
-I$(srcdir)/../../../html/content/src \
|
-I$(srcdir)/../../../html/content/src \
|
||||||
|
|
|
@ -25,9 +25,6 @@ LIBRARY_NAME=raptorxmldoc_s
|
||||||
MODULE=raptor
|
MODULE=raptor
|
||||||
|
|
||||||
DEFINES=-D_IMPL_NS_HTML -DWIN32_LEAN_AND_MEAN
|
DEFINES=-D_IMPL_NS_HTML -DWIN32_LEAN_AND_MEAN
|
||||||
!if defined(MOZ_XSL)
|
|
||||||
DEFINES=$(DEFINES) -DMOZ_XSL
|
|
||||||
!endif
|
|
||||||
|
|
||||||
CPPSRCS= \
|
CPPSRCS= \
|
||||||
nsXMLContentSink.cpp \
|
nsXMLContentSink.cpp \
|
||||||
|
|
|
@ -68,11 +68,9 @@
|
||||||
#include "prtime.h"
|
#include "prtime.h"
|
||||||
#include "prlog.h"
|
#include "prlog.h"
|
||||||
#include "prmem.h"
|
#include "prmem.h"
|
||||||
#ifdef MOZ_XSL
|
|
||||||
#include "nsXSLContentSink.h"
|
#include "nsXSLContentSink.h"
|
||||||
#include "nsParserCIID.h"
|
#include "nsParserCIID.h"
|
||||||
#include "nsIDocumentViewer.h"
|
#include "nsIDocumentViewer.h"
|
||||||
#endif
|
|
||||||
|
|
||||||
// XXX misnamed header file, but oh well
|
// XXX misnamed header file, but oh well
|
||||||
#include "nsHTMLTokens.h"
|
#include "nsHTMLTokens.h"
|
||||||
|
@ -80,16 +78,10 @@
|
||||||
static char kNameSpaceSeparator = ':';
|
static char kNameSpaceSeparator = ':';
|
||||||
static char kNameSpaceDef[] = "xmlns";
|
static char kNameSpaceDef[] = "xmlns";
|
||||||
static char kStyleSheetPI[] = "xml-stylesheet";
|
static char kStyleSheetPI[] = "xml-stylesheet";
|
||||||
|
|
||||||
#ifdef MOZ_XSL
|
|
||||||
static char kXSLType[] = "text/xsl";
|
static char kXSLType[] = "text/xsl";
|
||||||
#endif
|
|
||||||
|
|
||||||
static NS_DEFINE_CID(kNameSpaceManagerCID, NS_NAMESPACEMANAGER_CID);
|
static NS_DEFINE_CID(kNameSpaceManagerCID, NS_NAMESPACEMANAGER_CID);
|
||||||
|
|
||||||
#ifdef MOZ_XSL
|
|
||||||
static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID);
|
static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID);
|
||||||
#endif
|
|
||||||
|
|
||||||
nsINameSpaceManager* nsXMLContentSink::gNameSpaceManager = nsnull;
|
nsINameSpaceManager* nsXMLContentSink::gNameSpaceManager = nsnull;
|
||||||
PRUint32 nsXMLContentSink::gRefCnt = 0;
|
PRUint32 nsXMLContentSink::gRefCnt = 0;
|
||||||
|
@ -158,9 +150,7 @@ nsXMLContentSink::nsXMLContentSink()
|
||||||
mInScript = PR_FALSE;
|
mInScript = PR_FALSE;
|
||||||
mStyleSheetCount = 0;
|
mStyleSheetCount = 0;
|
||||||
mCSSLoader = nsnull;
|
mCSSLoader = nsnull;
|
||||||
#ifdef MOZ_XSL
|
|
||||||
mXSLTransformMediator = nsnull;
|
mXSLTransformMediator = nsnull;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nsXMLContentSink::~nsXMLContentSink()
|
nsXMLContentSink::~nsXMLContentSink()
|
||||||
|
@ -229,25 +219,14 @@ nsXMLContentSink::Init(nsIDocument* aDoc,
|
||||||
return aDoc->GetNodeInfoManager(*getter_AddRefs(mNodeInfoManager));
|
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_ADDREF(nsXMLContentSink)
|
||||||
NS_IMPL_THREADSAFE_RELEASE(nsXMLContentSink)
|
NS_IMPL_THREADSAFE_RELEASE(nsXMLContentSink)
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
NS_INTERFACE_MAP_BEGIN(nsXMLContentSink)
|
NS_INTERFACE_MAP_BEGIN(nsXMLContentSink)
|
||||||
NS_INTERFACE_MAP_ENTRY(nsIXMLContentSink)
|
NS_INTERFACE_MAP_ENTRY(nsIXMLContentSink)
|
||||||
NS_INTERFACE_MAP_ENTRY(nsIContentSink)
|
NS_INTERFACE_MAP_ENTRY(nsIContentSink)
|
||||||
#ifdef MOZ_XSL
|
|
||||||
NS_INTERFACE_MAP_ENTRY(nsIObserver)
|
NS_INTERFACE_MAP_ENTRY(nsIObserver)
|
||||||
NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference)
|
NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference)
|
||||||
#endif
|
|
||||||
NS_INTERFACE_MAP_ENTRY(nsIStreamLoaderObserver)
|
NS_INTERFACE_MAP_ENTRY(nsIStreamLoaderObserver)
|
||||||
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIXMLContentSink)
|
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIXMLContentSink)
|
||||||
NS_INTERFACE_MAP_END
|
NS_INTERFACE_MAP_END
|
||||||
|
@ -279,10 +258,6 @@ nsXMLContentSink::DidBuildModel(PRInt32 aQualityLevel)
|
||||||
|
|
||||||
mDocument->SetRootContent(mDocElement);
|
mDocument->SetRootContent(mDocElement);
|
||||||
|
|
||||||
#ifndef MOZ_XSL
|
|
||||||
StartLayout();
|
|
||||||
mDocument->EndLoad();
|
|
||||||
#else
|
|
||||||
nsresult rv;
|
nsresult rv;
|
||||||
if (mXSLTransformMediator) {
|
if (mXSLTransformMediator) {
|
||||||
rv = SetupTransformMediator();
|
rv = SetupTransformMediator();
|
||||||
|
@ -292,7 +267,6 @@ nsXMLContentSink::DidBuildModel(PRInt32 aQualityLevel)
|
||||||
StartLayout();
|
StartLayout();
|
||||||
mDocument->EndLoad();
|
mDocument->EndLoad();
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
// Drop our reference to the parser to get rid of a circular
|
// Drop our reference to the parser to get rid of a circular
|
||||||
// reference.
|
// reference.
|
||||||
|
@ -301,7 +275,6 @@ nsXMLContentSink::DidBuildModel(PRInt32 aQualityLevel)
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef MOZ_XSL
|
|
||||||
// The observe method is called on completion of the transform. The nsISupports argument is an
|
// 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.
|
// nsIDOMElement interface to the root node of the output content model.
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
|
@ -320,7 +293,7 @@ nsXMLContentSink::Observe(nsISupports *aSubject, const PRUnichar *aTopic, const
|
||||||
mXSLTransformMediator->GetResultDocument(getter_AddRefs(resultDOMDoc));
|
mXSLTransformMediator->GetResultDocument(getter_AddRefs(resultDOMDoc));
|
||||||
nsCOMPtr<nsIDocument> resultDoc = do_QueryInterface(resultDOMDoc);
|
nsCOMPtr<nsIDocument> resultDoc = do_QueryInterface(resultDOMDoc);
|
||||||
|
|
||||||
mDocument->EndLoad();
|
nsCOMPtr<nsIDocument> sourceDoc = mDocument;
|
||||||
NS_RELEASE(mDocument);
|
NS_RELEASE(mDocument);
|
||||||
|
|
||||||
mDocument = resultDoc;
|
mDocument = resultDoc;
|
||||||
|
@ -336,6 +309,10 @@ nsXMLContentSink::Observe(nsISupports *aSubject, const PRUnichar *aTopic, const
|
||||||
|
|
||||||
// Reset the observer on the transform mediator
|
// Reset the observer on the transform mediator
|
||||||
mXSLTransformMediator->SetTransformObserver(nsnull);
|
mXSLTransformMediator->SetTransformObserver(nsnull);
|
||||||
|
|
||||||
|
// Start the layout process
|
||||||
|
StartLayout();
|
||||||
|
sourceDoc->EndLoad();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -350,11 +327,11 @@ nsXMLContentSink::Observe(nsISupports *aSubject, const PRUnichar *aTopic, const
|
||||||
|
|
||||||
mXSLTransformMediator = nsnull;
|
mXSLTransformMediator = nsnull;
|
||||||
mDocument->SetRootContent(mDocElement);
|
mDocument->SetRootContent(mDocElement);
|
||||||
}
|
|
||||||
|
|
||||||
// Start the layout process
|
// Start the layout process
|
||||||
StartLayout();
|
StartLayout();
|
||||||
mDocument->EndLoad();
|
mDocument->EndLoad();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
@ -393,7 +370,6 @@ nsXMLContentSink::SetupTransformMediator()
|
||||||
|
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsXMLContentSink::WillInterrupt(void)
|
nsXMLContentSink::WillInterrupt(void)
|
||||||
|
@ -642,12 +618,8 @@ nsXMLContentSink::OpenContainer(const nsIParserNode& aNode)
|
||||||
// For XSL, we need to wait till after the transform
|
// For XSL, we need to wait till after the transform
|
||||||
// to set the root content object. Hence, the following
|
// to set the root content object. Hence, the following
|
||||||
// ifndef.
|
// ifndef.
|
||||||
#ifdef MOZ_XSL
|
|
||||||
if (!mXSLTransformMediator)
|
if (!mXSLTransformMediator)
|
||||||
mDocument->SetRootContent(mDocElement);
|
mDocument->SetRootContent(mDocElement);
|
||||||
#else
|
|
||||||
mDocument->SetRootContent(mDocElement);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
nsCOMPtr<nsIContent> parent = getter_AddRefs(GetCurrentContent());
|
nsCOMPtr<nsIContent> parent = getter_AddRefs(GetCurrentContent());
|
||||||
|
@ -975,7 +947,6 @@ static void SplitMimeType(const nsString& aValue, nsString& aType, nsString& aPa
|
||||||
aType.StripWhitespace();
|
aType.StripWhitespace();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef MOZ_XSL
|
|
||||||
nsresult
|
nsresult
|
||||||
nsXMLContentSink::CreateStyleSheetURL(nsIURI** aUrl,
|
nsXMLContentSink::CreateStyleSheetURL(nsIURI** aUrl,
|
||||||
const nsAReadableString& aHref)
|
const nsAReadableString& aHref)
|
||||||
|
@ -1091,7 +1062,6 @@ nsXMLContentSink::ProcessXSLStyleLink(nsIContent* aElement,
|
||||||
|
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
nsXMLContentSink::ProcessCSSStyleLink(nsIContent* aElement,
|
nsXMLContentSink::ProcessCSSStyleLink(nsIContent* aElement,
|
||||||
|
@ -1188,13 +1158,8 @@ nsXMLContentSink::AddProcessingInstruction(const nsIParserNode& aNode)
|
||||||
media.ToLowerCase();
|
media.ToLowerCase();
|
||||||
}
|
}
|
||||||
result = GetQuotedAttributeValue(text, NS_ConvertASCIItoUCS2("alternate"), alternate);
|
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"),
|
result = ProcessStyleLink(node, href, alternate.EqualsWithConversion("yes"),
|
||||||
title, type, media);
|
title, type, media);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,11 +26,9 @@
|
||||||
#include "nsIXMLContentSink.h"
|
#include "nsIXMLContentSink.h"
|
||||||
#include "nsIViewManager.h"
|
#include "nsIViewManager.h"
|
||||||
#include "nsIScrollableView.h"
|
#include "nsIScrollableView.h"
|
||||||
#ifdef MOZ_XSL
|
|
||||||
#include "nsIObserver.h"
|
#include "nsIObserver.h"
|
||||||
#include "nsWeakReference.h"
|
#include "nsWeakReference.h"
|
||||||
#include "nsITransformMediator.h"
|
#include "nsITransformMediator.h"
|
||||||
#endif
|
|
||||||
#include "nsIUnicharInputStream.h"
|
#include "nsIUnicharInputStream.h"
|
||||||
#include "nsIStreamLoader.h"
|
#include "nsIStreamLoader.h"
|
||||||
#include "nsISupportsArray.h"
|
#include "nsISupportsArray.h"
|
||||||
|
@ -59,10 +57,8 @@ typedef enum {
|
||||||
// XXX Till the parser knows a little bit more about XML,
|
// XXX Till the parser knows a little bit more about XML,
|
||||||
// this is a HTMLContentSink.
|
// this is a HTMLContentSink.
|
||||||
class nsXMLContentSink : public nsIXMLContentSink,
|
class nsXMLContentSink : public nsIXMLContentSink,
|
||||||
#ifdef MOZ_XSL
|
|
||||||
public nsIObserver,
|
public nsIObserver,
|
||||||
public nsSupportsWeakReference,
|
public nsSupportsWeakReference,
|
||||||
#endif
|
|
||||||
public nsIStreamLoaderObserver
|
public nsIStreamLoaderObserver
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -100,12 +96,10 @@ public:
|
||||||
NS_IMETHOD AddNotation(const nsIParserNode& aNode);
|
NS_IMETHOD AddNotation(const nsIParserNode& aNode);
|
||||||
NS_IMETHOD AddEntityReference(const nsIParserNode& aNode);
|
NS_IMETHOD AddEntityReference(const nsIParserNode& aNode);
|
||||||
|
|
||||||
#ifdef MOZ_XSL
|
|
||||||
// nsIObserver
|
// nsIObserver
|
||||||
NS_IMETHOD Observe(nsISupports *aSubject,
|
NS_IMETHOD Observe(nsISupports *aSubject,
|
||||||
const PRUnichar *aTopic,
|
const PRUnichar *aTopic,
|
||||||
const PRUnichar *someData);
|
const PRUnichar *someData);
|
||||||
#endif
|
|
||||||
|
|
||||||
NS_IMETHOD ResumeParsing();
|
NS_IMETHOD ResumeParsing();
|
||||||
NS_IMETHOD EvaluateScript(nsString& aScript, nsIURI *aScriptURI, PRUint32 aLineNo, const char* aVersion);
|
NS_IMETHOD EvaluateScript(nsString& aScript, nsIURI *aScriptURI, PRUint32 aLineNo, const char* aVersion);
|
||||||
|
@ -139,7 +133,6 @@ protected:
|
||||||
const nsString& aHref, PRBool aAlternate,
|
const nsString& aHref, PRBool aAlternate,
|
||||||
const nsString& aTitle, const nsString& aType,
|
const nsString& aTitle, const nsString& aType,
|
||||||
const nsString& aMedia);
|
const nsString& aMedia);
|
||||||
#ifdef MOZ_XSL
|
|
||||||
nsresult ProcessStyleLink(nsIContent* aElement,
|
nsresult ProcessStyleLink(nsIContent* aElement,
|
||||||
const nsString& aHref, PRBool aAlternate,
|
const nsString& aHref, PRBool aAlternate,
|
||||||
const nsString& aTitle, const nsString& aType,
|
const nsString& aTitle, const nsString& aType,
|
||||||
|
@ -152,7 +145,7 @@ protected:
|
||||||
nsresult CreateStyleSheetURL(nsIURI** aUrl, const nsAReadableString& aHref);
|
nsresult CreateStyleSheetURL(nsIURI** aUrl, const nsAReadableString& aHref);
|
||||||
nsresult LoadXSLStyleSheet(nsIURI* aUrl, const nsString& aType);
|
nsresult LoadXSLStyleSheet(nsIURI* aUrl, const nsString& aType);
|
||||||
nsresult SetupTransformMediator();
|
nsresult SetupTransformMediator();
|
||||||
#endif
|
|
||||||
nsresult AddText(const nsString& aString);
|
nsresult AddText(const nsString& aString);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -190,9 +183,7 @@ protected:
|
||||||
PRInt32 mStyleSheetCount;
|
PRInt32 mStyleSheetCount;
|
||||||
nsICSSLoader* mCSSLoader;
|
nsICSSLoader* mCSSLoader;
|
||||||
nsCOMPtr<nsINodeInfoManager> mNodeInfoManager;
|
nsCOMPtr<nsINodeInfoManager> mNodeInfoManager;
|
||||||
#ifdef MOZ_XSL
|
|
||||||
nsCOMPtr<nsITransformMediator> mXSLTransformMediator;
|
nsCOMPtr<nsITransformMediator> mXSLTransformMediator;
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // nsXMLContentSink_h__
|
#endif // nsXMLContentSink_h__
|
||||||
|
|
|
@ -26,9 +26,6 @@
|
||||||
#include "nsMarkupDocument.h"
|
#include "nsMarkupDocument.h"
|
||||||
#include "nsIXMLDocument.h"
|
#include "nsIXMLDocument.h"
|
||||||
#include "nsIHTMLContentContainer.h"
|
#include "nsIHTMLContentContainer.h"
|
||||||
#ifdef MOZ_XSL
|
|
||||||
#include "nsITransformMediator.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
class nsIParser;
|
class nsIParser;
|
||||||
class nsIDOMNode;
|
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
|
LIBRARY_NAME=rdfcontent_s
|
||||||
|
|
||||||
DEFINES=-D_IMPL_NS_DOM
|
DEFINES=-D_IMPL_NS_DOM
|
||||||
!if defined(MOZ_XSL)
|
|
||||||
DEFINES=$(DEFINES) -DMOZ_XSL
|
|
||||||
!endif
|
|
||||||
|
|
||||||
|
|
||||||
LCFLAGS = \
|
LCFLAGS = \
|
||||||
$(LCFLAGS) \
|
$(LCFLAGS) \
|
||||||
|
|
Загрузка…
Ссылка в новой задаче