From 591887a3b5b840b87cceb2b2e3b57700103221d7 Mon Sep 17 00:00:00 2001 From: hardts Date: Fri, 5 Jun 1998 01:03:18 +0000 Subject: [PATCH] touching down layout integration branch git-svn-id: svn://10.0.0.236/trunk@3290 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/client.mak | 62 ++-- mozilla/cmd/dialup/as_html/config/Sample1.IAS | 46 +++ mozilla/cmd/dialup/as_html/config/Sample1.NCI | 52 ++++ mozilla/cmd/dialup/as_html/config/Sample2.IAS | 44 +++ mozilla/cmd/dialup/as_html/config/Sample2.NCI | 52 ++++ mozilla/cmd/winfe/button.cpp | 4 + mozilla/cmd/winfe/cfe.cpp | 12 + mozilla/cmd/winfe/cntritem.cpp | 4 + mozilla/cmd/winfe/compfe.cpp | 4 + mozilla/cmd/winfe/compmapi.cpp | 4 + mozilla/cmd/winfe/cxabstra.cpp | 40 ++- mozilla/cmd/winfe/cxabstra.h | 16 ++ mozilla/cmd/winfe/cxdc.cpp | 48 ++++ mozilla/cmd/winfe/cxdc.h | 6 + mozilla/cmd/winfe/cxdc1.cpp | 10 + mozilla/cmd/winfe/cxicon.cpp | 4 + mozilla/cmd/winfe/cxpane.cpp | 36 +++ mozilla/cmd/winfe/cxpane.h | 5 + mozilla/cmd/winfe/cxprint.cpp | 14 + mozilla/cmd/winfe/cxprint.h | 2 + mozilla/cmd/winfe/cxsave.cpp | 8 + mozilla/cmd/winfe/cxstubs.cpp | 10 + mozilla/cmd/winfe/cxwin.cpp | 265 +++++++++++++++--- mozilla/cmd/winfe/cxwin.h | 2 + mozilla/cmd/winfe/dde.cpp | 4 + mozilla/cmd/winfe/drawable.cpp | 2 + mozilla/cmd/winfe/feembed.cpp | 8 + mozilla/cmd/winfe/feembed.h | 2 + mozilla/cmd/winfe/fegrid.cpp | 10 + mozilla/cmd/winfe/fegui.cpp | 10 + mozilla/cmd/winfe/fenet.cpp | 5 + mozilla/cmd/winfe/feorphan.cpp | 4 +- mozilla/cmd/winfe/fmabstra.cpp | 4 + mozilla/cmd/winfe/framinit.cpp | 5 +- mozilla/cmd/winfe/gendoc.cpp | 5 + mozilla/cmd/winfe/gendoc.h | 2 + mozilla/cmd/winfe/genview.cpp | 14 + mozilla/cmd/winfe/intlwin.cpp | 41 +++ mozilla/cmd/winfe/logindg.cpp | 10 +- mozilla/cmd/winfe/mkfiles32/mozilla.mak | 127 ++++++++- mozilla/cmd/winfe/mozilla.cpp | 95 ++++++- mozilla/cmd/winfe/netsvw.cpp | 111 +++++++- mozilla/cmd/winfe/netsvw.h | 16 ++ mozilla/cmd/winfe/nsapp.cpp | 34 +++ mozilla/cmd/winfe/pain.cpp | 3 + mozilla/cmd/winfe/popup.cpp | 36 ++- mozilla/cmd/winfe/prefinfo.cpp | 8 +- mozilla/cmd/winfe/prefs.cpp | 6 +- mozilla/cmd/winfe/presentm.cpp | 2 +- mozilla/cmd/winfe/splash.cpp | 6 +- mozilla/cmd/winfe/stshplug.cpp | 4 + mozilla/cmd/winfe/timer.cpp | 2 + mozilla/cmd/winfe/urlbar.cpp | 10 + mozilla/config/config.mak | 15 + mozilla/config/liteness.mak | 6 + mozilla/include/cvactive.h | 41 +++ mozilla/include/fe_proto.h | 26 ++ mozilla/include/mk_cx_fn.h | 12 + mozilla/include/structs.h | 3 + mozilla/include/xp_sock.h | 208 ++++++++++++++ mozilla/lib/htmldlgs/htmldlgs.c | 13 +- mozilla/lib/libmisc/shist.c | 17 +- mozilla/lib/xp/xp_cntxt.c | 14 + mozilla/modules/xml/glue/xmlglue.c | 8 + 64 files changed, 1615 insertions(+), 84 deletions(-) create mode 100644 mozilla/cmd/dialup/as_html/config/Sample1.IAS create mode 100644 mozilla/cmd/dialup/as_html/config/Sample1.NCI create mode 100644 mozilla/cmd/dialup/as_html/config/Sample2.IAS create mode 100644 mozilla/cmd/dialup/as_html/config/Sample2.NCI create mode 100644 mozilla/include/cvactive.h create mode 100644 mozilla/include/xp_sock.h diff --git a/mozilla/client.mak b/mozilla/client.mak index 0bbf340dd05..668a77e0f08 100644 --- a/mozilla/client.mak +++ b/mozilla/client.mak @@ -28,18 +28,9 @@ MOZ_TOP=mozilla #//------------------------------------------------------------------------ !if defined(MOZ_NGLAYOUT) NGLAYOUT_MAKEFILE=nglayout.mak - +NGLAYOUT_ENV_VARS=STANDALONE_IMAGE_LIB=1 MODULAR_NETLIB=1 NGLAYOUT_BUILD_PREFIX=1 +MOZNGLAYOUT_BRANCH=RAPTOR_INTEGRATION0_BRANCH CVSCO = cvs -q co -P - -# Branch tags we use -NETLIB_BRANCH = MODULAR_NETLIB_BRANCH -MOZNGLAYOUT_BRANCH = RAPTOR_INTEGRATION0_BRANCH - -# CVS commands to pull the appropriate branch versions -CVSCO_NETLIB = $(CVSCO) -r $(NETLIB_BRANCH) - -# If MOZ_BRANCH is set from the user's environment, it will be ignored. -MOZ_BRANCH=$(MOZNGLAYOUT_BRANCH) !endif @@ -89,26 +80,43 @@ clobber_build_all:: clobber_all \ build_all !if defined(MOZ_NGLAYOUT) -# Not very efficient, pull_raptor and pull_netlib will repull -pull_all:: pull_client_source_product pull_raptor pull_netlib +# The MOZ_NGLAYOUT pull is complicated, be very careful choosing which files are on +# the tip and which are on the branches. +pull_all:: pull_client_source_product pull_nglayout pull_netlib repull_ngl_integration pull_imglib repull_include !else pull_all:: pull_client_source_product !endif !if defined(MOZ_NGLAYOUT) -pull_raptor: +pull_nglayout: @cd $(MOZ_SRC) - $(CVSCO) $(MOZ_TOP)/raptor.mak + $(CVSCO) $(MOZ_TOP)/$(NGLAYOUT_MAKEFILE) @cd $(MOZ_SRC)/$(MOZ_TOP) - $(NMAKE) -f $(NGLAYOUT_MAKEFILE) pull_xpcom pull_imglib pull_raptor + $(NMAKE) -f $(NGLAYOUT_MAKEFILE) pull_nglayout $(NGLAYOUT_ENV_VARS) pull_netlib: - @cd $(MOZ_SRC)\. - $(CVSCO_NETLIB) $(MOZ_TOP)/lib/xp - $(CVSCO_NETLIB) $(MOZ_TOP)/lib/libnet - $(CVSCO_NETLIB) $(MOZ_TOP)/include/net.h $(MOZ_TOP)/include/npapi.h + @cd $(MOZ_SRC)/$(MOZ_TOP) + $(NMAKE) -f $(NGLAYOUT_MAKEFILE) pull_netlib $(NGLAYOUT_ENV_VARS) + +# Here is where we pull everything on the layout integration branch +repull_ngl_integration: + @cd $(MOZ_SRC) + $(CVSCO) -r $(MOZNGLAYOUT_BRANCH) $(MOZ_TOP)/include $(MOZ_TOP)/cmd $(MOZ_TOP)/lib $(MOZ_TOP)/modules + @cd $(MOZ_SRC)/$(MOZ_TOP) + +# Careful to put this after repull_ngl_integration, want modules/libutil and +# modules/libimg to be on imglib branch +pull_imglib: + @cd $(MOZ_SRC)/$(MOZ_TOP) + $(NMAKE) -f $(NGLAYOUT_MAKEFILE) pull_imglib $(NGLAYOUT_ENV_VARS) + +# Want certain files in the include directory to be on the tip +repull_include: + @cd $(MOZ_SRC) + $(CVSCO) -A $(MOZ_TOP)/include/net.h !endif + pull_client_source_product: @echo +++ client.mak: checking out the client with "$(CVS_BRANCH)" cd $(MOZ_SRC)\. @@ -116,8 +124,8 @@ pull_client_source_product: !if defined(MOZ_NGLAYOUT) -# Build Raptor first. -build_all: build_raptor \ +# Build NGLayout first. +build_all: build_nglayout \ build_dist \ build_client !else @@ -126,9 +134,9 @@ build_all: build_dist \ !endif !if defined(MOZ_NGLAYOUT) -build_raptor: +build_nglayout: cd $(MOZ_SRC)\$(MOZ_TOP) - $(NMAKE) -f $(NGLAYOUT_MAKEFILE) STANDALONE_IMAGE_LIB=1 MODULAR_NETLIB=1 NGLAYOUT_BUILD_PREFIX=1 + $(NMAKE) -f $(NGLAYOUT_MAKEFILE) $(NGLAYOUT_ENV_VARS) !endif build_dist: @@ -151,7 +159,7 @@ build_client: # remove all source files from the tree and print a report of what was missed # !if defined(MOZ_NGLAYOUT) -clobber_all:: clobber_moz clobber_raptor +clobber_all:: clobber_moz clobber_nglayout !else clobber_all:: clobber_moz !endif @@ -167,9 +175,9 @@ clobber_moz: !endif !if defined(MOZ_NGLAYOUT) -clobber_raptor: +clobber_nglayout: cd $(MOZ_SRC)\$(MOZ_TOP) - $(NMAKE) -f $(NGLAYOUT_MAKEFILE) STANDALONE_IMAGE_LIB=1 NGLAYOUT=1 clobber + $(NMAKE) -f $(NGLAYOUT_MAKEFILE) clobber $(NGLAYOUT_ENV_VARS) !endif depend: diff --git a/mozilla/cmd/dialup/as_html/config/Sample1.IAS b/mozilla/cmd/dialup/as_html/config/Sample1.IAS new file mode 100644 index 00000000000..b456e2890cb --- /dev/null +++ b/mozilla/cmd/dialup/as_html/config/Sample1.IAS @@ -0,0 +1,46 @@ +; Mode: INI; tab-width: 8; indent-tabs-mode: nil -*- +; +; The contents of this file are subject to the Netscape Public License +; Version 1.0 (the "NPL"); you may not use this file except in +; compliance with the NPL. You may obtain a copy of the NPL at +; http://www.mozilla.org/NPL/ +; +; Software distributed under the NPL is distributed on an "AS IS" basis, +; WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL +; for the specific language governing rights and limitations under the +; NPL. +; +; The Initial Developer of this code under the NPL is Netscape +; Communications Corporation. Portions created by Netscape are +; Copyright (C) 1998 Netscape Communications Corporation. All Rights +; Reserved. +; +[Dial-In Configuration] +ScriptFileName= +Phone=+1 (800) 638-8290 +Password=YWg0ZrhvamYLZix1ADRvdWpttnp3 +Name=mozillarama +Description=Internet Account Server (New UI) +SiteName=Internet Account Server (New UI) +LocalMode=yes + +[IP] +RegCGI=https://205.217.225.10/IAS5/docs/reg.cgi +DNSAddress2=205.217.225.20 +DNSAddress=205.217.225.10 +DomainName=netscape.com +IPAddress=0.0.0.0 +Enabled=Yes + +[Configuration] +REG_SCRIPTING= +RegRoot=https://reggie.netscape.com/IAS5/docs/ISP/ + +[Security] +SecurityDevice=No + +; This is a sample registration file that logs into the +; Netscape Internet Account Server. +; New User Interface +; This file should be replaced with registration file(s) +; specific to your registration server. diff --git a/mozilla/cmd/dialup/as_html/config/Sample1.NCI b/mozilla/cmd/dialup/as_html/config/Sample1.NCI new file mode 100644 index 00000000000..a75b7220766 --- /dev/null +++ b/mozilla/cmd/dialup/as_html/config/Sample1.NCI @@ -0,0 +1,52 @@ +; Mode: INI; tab-width: 8; indent-tabs-mode: nil -*- +; +; The contents of this file are subject to the Netscape Public License +; Version 1.0 (the "NPL"); you may not use this file except in +; compliance with the NPL. You may obtain a copy of the NPL at +; http://www.mozilla.org/NPL/ +; +; Software distributed under the NPL is distributed on an "AS IS" basis, +; WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL +; for the specific language governing rights and limitations under the +; NPL. +; +; The Initial Developer of this code under the NPL is Netscape +; Communications Corporation. Portions created by Netscape are +; Copyright (C) 1998 Netscape Communications Corporation. All Rights +; Reserved. +; +[Dial-In Configuration] +SupportPhone=+1 (800) 000-0000 +Phone=+1 (800) 000-0000 +Password= +Name= +Description=Company Name +SiteName=Company Name or Access Location (1) + +[Options] +EnableVJCompression=YES + +[IP] +DNSAddress2=000.000.000.002 +DNSAddress=000.000.000.001 +DomainName=companyname1.com +IPAddress= +Enabled=YES + +[Services] +Default_Mail_Protocol=POP +IMAP_Server=imap.companyname1.net +POP_Server=pop.companyname1.net +NNTP_Server=news.companyname1.net +SMTP_Server=mail.companyname1.net + +[Publishing] +View_URL= +Publish_Password= +Publish_URL= + +[Script] +ScriptFileName= + +[Configuration] +ConfigurationFileName=Sample (1) diff --git a/mozilla/cmd/dialup/as_html/config/Sample2.IAS b/mozilla/cmd/dialup/as_html/config/Sample2.IAS new file mode 100644 index 00000000000..6595585a880 --- /dev/null +++ b/mozilla/cmd/dialup/as_html/config/Sample2.IAS @@ -0,0 +1,44 @@ +; Mode: INI; tab-width: 8; indent-tabs-mode: nil -*- +; +; The contents of this file are subject to the Netscape Public License +; Version 1.0 (the "NPL"); you may not use this file except in +; compliance with the NPL. You may obtain a copy of the NPL at +; http://www.mozilla.org/NPL/ +; +; Software distributed under the NPL is distributed on an "AS IS" basis, +; WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL +; for the specific language governing rights and limitations under the +; NPL. +; +; The Initial Developer of this code under the NPL is Netscape +; Communications Corporation. Portions created by Netscape are +; Copyright (C) 1998 Netscape Communications Corporation. All Rights +; Reserved. +; +[Dial-In Configuration] +ScriptFileName= +Phone=+1 (800) 638-8290 +Password=YWg0ZrhvamYLZix1ADRvdWpttnp3 +Name=mozillarama +Description=Internet Account Server (Old UI) +SiteName=Internet Account Server (Old UI) + +[IP] +RegCGI=https://205.217.225.10/DUK1/reg.cgi +DNSAddress2=205.217.225.20 +DNSAddress=205.217.225.10 +DomainName=netscape.com +IPAddress=0.0.0.0 +Enabled=Yes + +[Configuration] +REG_SCRIPTING= + +[Security] +SecurityDevice=No + +; This is a sample registration file that logs into the +; Netscape Internet Account Server. +; Old User Interface. +; This file should be replaced with registration file(s) +; specific to your registration server. diff --git a/mozilla/cmd/dialup/as_html/config/Sample2.NCI b/mozilla/cmd/dialup/as_html/config/Sample2.NCI new file mode 100644 index 00000000000..276b7e025de --- /dev/null +++ b/mozilla/cmd/dialup/as_html/config/Sample2.NCI @@ -0,0 +1,52 @@ +; Mode: INI; tab-width: 8; indent-tabs-mode: nil -*- +; +; The contents of this file are subject to the Netscape Public License +; Version 1.0 (the "NPL"); you may not use this file except in +; compliance with the NPL. You may obtain a copy of the NPL at +; http://www.mozilla.org/NPL/ +; +; Software distributed under the NPL is distributed on an "AS IS" basis, +; WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL +; for the specific language governing rights and limitations under the +; NPL. +; +; The Initial Developer of this code under the NPL is Netscape +; Communications Corporation. Portions created by Netscape are +; Copyright (C) 1998 Netscape Communications Corporation. All Rights +; Reserved. +; +[Dial-In Configuration] +SupportPhone=+1 (800) 000-0000 +Phone=+1 (800) 000-0000 +Password=PaSsWoRd +Name=ned pepper +Description=Company Name +SiteName=Company Name or Access Location (2) + +[Options] +EnableVJCompression=YES + +[IP] +DNSAddress2=000.000.000.002 +DNSAddress=000.000.000.001 +DomainName=companyname2.com +IPAddress= +Enabled=YES + +[Services] +Default_Mail_Protocol=IMAP +IMAP_Server=imap.companyname2.net +POP_Server=pop.companyname2.net +NNTP_Server=news.companyname2.net +SMTP_Server=mail.companyname2.net + +[Publishing] +View_URL= +Publish_Password= +Publish_URL= + +[Script] +ScriptFileName= + +[Configuration] +ConfigurationFileName=Sample (2) diff --git a/mozilla/cmd/winfe/button.cpp b/mozilla/cmd/winfe/button.cpp index c511e8451e5..f212097aad7 100755 --- a/mozilla/cmd/winfe/button.cpp +++ b/mozilla/cmd/winfe/button.cpp @@ -206,7 +206,11 @@ void CNetscapeButton::Click(UINT nFlags, BOOL bNotify, BOOL &bReturnImmediately) case FORM_TYPE_RADIO: tog_data = (lo_FormElementToggleData *) m_Form->element_data; if(!tog_data->toggled) { +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else m_pLastSelectedRadio = LO_FormRadioSet(ABSTRACTCX(m_Context)->GetDocumentContext(), m_Form); // Turn off everyone else +#endif } if(GetCheck() != tog_data->toggled) { SetCheck(tog_data->toggled); diff --git a/mozilla/cmd/winfe/cfe.cpp b/mozilla/cmd/winfe/cfe.cpp index 4feb7b05069..3be23dd4751 100644 --- a/mozilla/cmd/winfe/cfe.cpp +++ b/mozilla/cmd/winfe/cfe.cpp @@ -384,6 +384,7 @@ void CFE_DisplayBullet(MWContext *pContext, int iLocation, LO_BullettStruct *pBu ABSTRACTCX(pContext)->DisplayBullet(pContext, iLocation, pBullet); } +#ifndef MOZ_NGLAYOUT void CFE_DisplayEdge(MWContext *pContext, int iLocation, LO_EdgeStruct *pEdge) { if(ABSTRACTCX(pContext)->IsDestroyed()) { // Don't allow this to happen if the context has been destroyed... @@ -413,6 +414,7 @@ void CFE_DisplayFormElement(MWContext *pContext, int iLocation, LO_FormElementSt ABSTRACTCX(pContext)->DisplayFormElement(pContext, iLocation, pFormElement); } +#endif void CFE_DisplayBorder(MWContext *pContext, int iLocation, int x, int y, int width, int height, int bw, LO_Color *color, LO_LineStyle style) { if(ABSTRACTCX(pContext)->IsDestroyed()) { @@ -630,6 +632,7 @@ void CFE_FinishedLayout(MWContext *pContext) { } } +#ifndef MOZ_NGLAYOUT void CFE_FormTextIsSubmit(MWContext *pContext, LO_FormElementStruct *pFormElement) { if(ABSTRACTCX(pContext)->IsDestroyed()) { // Don't allow this to happen if the context has been destroyed... @@ -649,6 +652,7 @@ void CFE_FreeEdgeElement(MWContext *pContext, LO_EdgeStruct *pEdge) { ABSTRACTCX(pContext)->FreeEdgeElement(pContext, pEdge); } +#endif void CFE_CreateEmbedWindow(MWContext *pContext, NPEmbeddedApp *pApp) { @@ -694,6 +698,7 @@ CFE_DestroyEmbedWindow(MWContext *pContext, NPEmbeddedApp *pApp) { ABSTRACTCX(pContext)->DestroyEmbedWindow(pContext, pApp); } +#ifndef MOZ_NGLAYOUT void CFE_FreeEmbedElement(MWContext *pContext, LO_EmbedStruct *pEmbed) { if(ABSTRACTCX(pContext)->IsDestroyed()) { // Don't allow this to happen if the context has been destroyed... @@ -712,6 +717,7 @@ FE_FreeFormElement(MWContext *pContext, LO_FormElementData *pFormElement) if(pFormClass != NULL) pFormClass->FreeFormElement(pFormElement); } +#endif extern "C" void FE_ReleaseTextAttrFeData(MWContext * pContext, LO_TextAttr *attr) @@ -740,6 +746,7 @@ void CFE_HideJavaAppElement(MWContext *pContext, LJAppletData *pJava) { WINCX(pContext)->HideJavaAppElement(pContext, pJava); } +#ifndef MOZ_NGLAYOUT void CFE_GetEmbedSize(MWContext *pContext, LO_EmbedStruct *pEmbed, NET_ReloadMethod bReload) { if(ABSTRACTCX(pContext)->IsDestroyed()) { // Don't allow this to happen if the context has been destroyed... @@ -769,6 +776,7 @@ void CFE_GetFormElementValue(MWContext *pContext, LO_FormElementStruct *pFormEle ABSTRACTCX(pContext)->GetFormElementValue(pContext, pFormElement, bHidden); } +#endif void CFE_GetJavaAppSize(MWContext *pContext, LO_JavaAppStruct *pJava, NET_ReloadMethod bReload) { if(ABSTRACTCX(pContext)->IsDestroyed()) { @@ -1023,6 +1031,7 @@ XP_Bool CFE_PromptUsernameAndPassword(MWContext *pContext, const char *pMessage, return(bReturn); } +#ifndef MOZ_NGLAYOUT void CFE_ResetFormElement(MWContext *pContext, LO_FormElementStruct *pFormElement) { if(ABSTRACTCX(pContext)->IsDestroyed()) { // Don't allow this to happen if the context has been destroyed... @@ -1032,6 +1041,7 @@ void CFE_ResetFormElement(MWContext *pContext, LO_FormElementStruct *pFormElemen ABSTRACTCX(pContext)->ResetFormElement(pContext, pFormElement); } +#endif void CFE_SetBackgroundColor(MWContext *pContext, uint8 cRed, uint8 cGreen, uint8 cBlue) { if(ABSTRACTCX(pContext)->IsDestroyed()) { @@ -1087,6 +1097,7 @@ void CFE_SetDocTitle(MWContext *pContext, char *pTitle) { SHIST_SetTitleOfCurrentDoc( pContext ); } +#ifndef MOZ_NGLAYOUT void CFE_SetFormElementToggle(MWContext *pContext, LO_FormElementStruct *pFormElement, XP_Bool bToggle) { if(ABSTRACTCX(pContext)->IsDestroyed()) { // Don't allow this to happen if the context has been destroyed... @@ -1096,6 +1107,7 @@ void CFE_SetFormElementToggle(MWContext *pContext, LO_FormElementStruct *pFormEl ABSTRACTCX(pContext)->SetFormElementToggle(pContext, pFormElement, bToggle); } +#endif void CFE_SetProgressBarPercent(MWContext *pContext, int32 lPercent) { if(ABSTRACTCX(pContext)->IsDestroyed()) { diff --git a/mozilla/cmd/winfe/cntritem.cpp b/mozilla/cmd/winfe/cntritem.cpp index ce9318ea2eb..29d2ea7de3d 100755 --- a/mozilla/cmd/winfe/cntritem.cpp +++ b/mozilla/cmd/winfe/cntritem.cpp @@ -126,6 +126,9 @@ void CNetscapeCntrItem::OnActivate() void CNetscapeCntrItem::OnChange(OLE_NOTIFICATION nCode, DWORD dwParam) { +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else COleClientItem::OnChange(nCode, dwParam); // this is a hack to test if we need to ask user to save the file or not. @@ -153,6 +156,7 @@ void CNetscapeCntrItem::OnChange(OLE_NOTIFICATION nCode, DWORD dwParam) else pContext->funcs->DisplayEmbed(pContext, FE_VIEW, pLayoutData); } +#endif /* MOZ_NGLAYOUT */ } BOOL CNetscapeCntrItem::OnChangeItemPosition(const CRect& rectPos) diff --git a/mozilla/cmd/winfe/compfe.cpp b/mozilla/cmd/winfe/compfe.cpp index efadb17de11..9effbe6bc8a 100644 --- a/mozilla/cmd/winfe/compfe.cpp +++ b/mozilla/cmd/winfe/compfe.cpp @@ -520,6 +520,9 @@ extern "C" void FE_DoneMailTo(PrintSetup * print) extern "C" int FE_LoadExchangeInfo(MWContext * context) { +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else if(!context) return(FALSE); @@ -615,6 +618,7 @@ extern "C" int FE_LoadExchangeInfo(MWContext * context) // leave pCompose window alive until completion routine XL_TranslateText(g_NastyContextSavingHack, URL_s, &print); +#endif /* MOZ_NGLAYOUT */ return(TRUE); } diff --git a/mozilla/cmd/winfe/compmapi.cpp b/mozilla/cmd/winfe/compmapi.cpp index ad22409d33f..a6f9353e39d 100644 --- a/mozilla/cmd/winfe/compmapi.cpp +++ b/mozilla/cmd/winfe/compmapi.cpp @@ -102,6 +102,9 @@ extern "C" int FE_LoadExchangeInfo( char * pszNewsgroups, char * pszSubject) { +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else _temp.pszTo = _temp.pszSubject = _temp.pszOrganization = ""; if(!context) return(FALSE); @@ -195,6 +198,7 @@ extern "C" int FE_LoadExchangeInfo( // leave pCompose window alive until completion routine XL_TranslateText(context, URL_s, &print); +#endif /* MOZ_NGLAYOUT */ return(TRUE); } diff --git a/mozilla/cmd/winfe/cxabstra.cpp b/mozilla/cmd/winfe/cxabstra.cpp index a9332c18ce3..52914462d95 100755 --- a/mozilla/cmd/winfe/cxabstra.cpp +++ b/mozilla/cmd/winfe/cxabstra.cpp @@ -161,8 +161,10 @@ void CAbstractCX::DestroyContext() { // is set. Interrupt(); +#ifndef MOZ_NGLAYOUT // Layout needs to cleanup. LO_DiscardDocument(m_pXPCX); +#endif // End the session history of the context. SHIST_EndSession(m_pXPCX); @@ -191,9 +193,13 @@ void CAbstractCX::DestroyContext() { // unstable state. XP_RemoveContextFromList(m_pXPCX); +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else // Have mocha perform cleanup and continue destruction in the // callback ET_RemoveWindowContext(m_pXPCX, mocha_done_callback, this); +#endif /* MOZ_NGLAYOUT */ } } @@ -751,13 +757,21 @@ void CAbstractCX::NiceReload(int usePassInType, NET_ReloadMethod iReloadType ) { // Comments: Standard stuff. MWContext * context = GetContext(); - if(XP_IsContextBusy(context) == TRUE || LO_LayingOut(context)) { + if(XP_IsContextBusy(context) == TRUE +#ifndef MOZ_NGLAYOUT +|| LO_LayingOut(context) +#endif +) { FEU_RequestIdleProcessing(context); context->reSize = TRUE; } else { context->reSize = FALSE; +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else NPL_SamePage(context); +#endif if( usePassInType ) { Reload( iReloadType ); return; @@ -780,9 +794,13 @@ void CAbstractCX::Back() { History_entry *pHist = SHIST_GetPrevious(GetContext()); if (GetContext()->grid_children) { +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else if (LO_BackInGrid(GetDocumentContext())) { return; } +#endif } if(pHist) { GetUrl(SHIST_CreateURLStructFromHistoryEntry(GetContext(), pHist), FO_CACHE_AND_PRESENT); @@ -797,15 +815,20 @@ void CAbstractCX::Forward() { History_entry *pHist = SHIST_GetNext(GetContext()); if (GetContext()->grid_children) { +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else if (LO_ForwardInGrid(GetDocumentContext())) { return; } +#endif } if(pHist) { GetUrl(SHIST_CreateURLStructFromHistoryEntry(GetContext(), pHist), FO_CACHE_AND_PRESENT); } } +#ifndef MOZ_NGLAYOUT XL_TextTranslation CAbstractCX::TranslateText(URL_Struct *pUrl, const char *pFileName, const char *pPrefix, int iWidth) { // Purpose: Translate a url into text. // Arguments: pUrl The URL to translate. @@ -840,6 +863,7 @@ XL_TextTranslation CAbstractCX::TranslateText(URL_Struct *pUrl, const char *pFil // Do it. return(XL_TranslateText(GetContext(), pUrl, pTextFE)); } +#endif /* MOZ_NGLAYOUT */ void CAbstractCX::Interrupt() { // Purpose: Interrupt any loads in a context. @@ -1187,6 +1211,9 @@ void CAbstractCX::AddToBookmarks() } void CAbstractCX::CopySelection() { +#ifdef MOZ_NGLAYOUT + ASSERT(0); +#else if(CanCopySelection() == FALSE) { return; } @@ -1240,6 +1267,7 @@ void CAbstractCX::CopySelection() { ::CloseClipboard(); XP_FREE(text); +#endif } BOOL CAbstractCX::CanCopySelection() { @@ -1252,8 +1280,13 @@ BOOL CAbstractCX::CanCopySelection() { bRetval = FALSE; } else { +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); + bRetval = FALSE; +#else // Is there anything selected to be copied? bRetval = LO_HaveSelection(GetDocumentContext()); +#endif } return(bRetval); @@ -1291,6 +1324,10 @@ CAbstractCX *CAbstractCX::FindContextByID(DWORD dwID) // It's off by default, so be careful out there. URL_Struct *CAbstractCX::CreateUrlFromHist(BOOL bClearStateData, SHIST_SavedData *pSavedData, BOOL bWysiwyg) { +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); + return NULL; +#else TRACE("Creating URL from the current history entry.\n"); // Make sure that we're not destroyed. @@ -1336,6 +1373,7 @@ URL_Struct *CAbstractCX::CreateUrlFromHist(BOOL bClearStateData, SHIST_SavedData } return(pUrl); +#endif /* MOZ_NGLAYOUT */ } // Used mainly in cmdui enablers to determine if we could load from diff --git a/mozilla/cmd/winfe/cxabstra.h b/mozilla/cmd/winfe/cxabstra.h index 323e653bb06..6674dcfcaf2 100755 --- a/mozilla/cmd/winfe/cxabstra.h +++ b/mozilla/cmd/winfe/cxabstra.h @@ -71,6 +71,10 @@ typedef enum ContextType { MaxContextTypes // Leave as last entry please } ContextType; +#ifdef MOZ_NGLAYOUT +class nsIWebWidget; +#endif + // The abstract windows context class CAbstractCX: public IMWContext { private: @@ -88,7 +92,9 @@ public: // Function to load a URL with this context, with the custom exit routing handler. // Use this to NET_GetURL instead or XL_TranslateText instead. virtual int GetUrl(URL_Struct *pUrl, FO_Present_Types iFormatOut, BOOL bReallyLoad = TRUE, BOOL bForceNew = FALSE); +#ifndef MOZ_NGLAYOUT virtual XL_TextTranslation TranslateText(URL_Struct *pUrl, const char *pFileName, const char *pPrefix = NULL, int iWidth = 75); +#endif /* MOZ_NGLAYOUT */ virtual void UpdateStopState(MWContext *pContext) = 0; @@ -202,6 +208,16 @@ public: // Override to allow XP Context->Frame matching virtual CFrameGlue *GetFrame() const { return NULL; } +#ifdef MOZ_NGLAYOUT + // Convenience to get/set WebWidget from MWContext. + nsIWebWidget *GetWebWidget() const { + return((nsIWebWidget*)m_pXPCX->fe.webWidget); + } + void SetWebWidget(nsIWebWidget *pWW) { + m_pXPCX->fe.webWidget = pWW; + } +#endif + // Named contexts and grid stuff. void SetContextName(const char *pName); void SetParentContext(MWContext *pParentContext); diff --git a/mozilla/cmd/winfe/cxdc.cpp b/mozilla/cmd/winfe/cxdc.cpp index a2dd99263f7..44df2d71bb5 100644 --- a/mozilla/cmd/winfe/cxdc.cpp +++ b/mozilla/cmd/winfe/cxdc.cpp @@ -517,9 +517,13 @@ void CDCCX::ClearFontCache() { } +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else // Tell layout to get rid of all of it's cached FE font data // in the LO_TextAttr. LO_InvalidateFontData(GetDocumentContext()); +#endif // Go through our context list of cached fonts and get rid of them all. @@ -688,6 +692,10 @@ int CDCCX::SelectNetscapeFontWithCache( HDC hdc, LO_TextAttr *pAttr, CyaFont *& // link-list the font, so it can be deleted when destroy document. int CDCCX::SelectNetscapeFont( HDC hdc, LO_TextAttr *pAttr, CyaFont *& pMyFont ) { +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); + return 0; +#else // create font for the text and cache it in pAttr->FE_Data. EncodingInfo *pEncoding = theApp.m_pIntlFont->GetEncodingInfo(GetContext()); BOOL bItalic = FALSE; @@ -929,6 +937,7 @@ int CDCCX::SelectNetscapeFont( HDC hdc, LO_TextAttr *pAttr, CyaFont *& pMyFont ) m_cplCachedFontList.AddTail((void *)pMyFont); // pSelectThis return( returnCode ); +#endif /* MOZ_NGLAYOUT */ } // HFONT CDCCX::SelectNetscapeFont() void CDCCX::ReleaseNetscapeFontWithCache(HDC hdc, CyaFont * pNetscapeFont) @@ -945,7 +954,11 @@ void CDCCX::ReleaseNetscapeFontWithCache(HDC hdc, CyaFont * pNetscapeFont) void CDCCX::ReleaseNetscapeFont(HDC hdc, CyaFont * pNetscapeFont) { +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else pNetscapeFont->EndDrawText( hdc ); // restore the old font. +#endif /* MOZ_NGLAYOUT */ } // m_iOffset can be at most 8 or at least -8 based on the values in @@ -964,7 +977,11 @@ void CDCCX::ChangeFontOffset(int iIncrementor) m_iOffset += iIncrementor; if(GetContext()){ +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else GetContext()->fontScalingPercentage = LO_GetScalingFactor(m_iOffset); +#endif } NiceReload(); @@ -1005,6 +1022,10 @@ BOOL CDCCX::ResolveElement(LTRB& Rect, int32 x, int32 y, int32 x_offset, int32 y return bRetval; } BOOL CDCCX::ResolveElement(LTRB& Rect, LO_TextStruct *pText, int iLocation, int32 lStartPos, int32 lEndPos, int iClear) { +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); + return FALSE; +#else BOOL bRetval = TRUE; // Subtext, in order to be considered at all, must first pass the text resolution. @@ -1042,6 +1063,7 @@ BOOL CDCCX::ResolveElement(LTRB& Rect, LO_TextStruct *pText, int iLocation, int3 } return(bRetval); +#endif /* MOZ_NGLAYOUT */ } /* @@ -2246,9 +2268,13 @@ void CDCCX::DisplayIcon(int32 x0, int32 y0, int icon_number) if (cxLoadBitmap(MAKEINTRESOURCE(bitmapID), image_bits, &imageInfo)) { if(maskID) { BOOL fillBack = TRUE; +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else #ifdef XP_WIN32 CPrintCX* pPrintCx = (CPrintCX*)this; fillBack = pPrintCx->IsPrintingBackground() ? FALSE : TRUE; +#endif #endif cxLoadBitmap(MAKEINTRESOURCE(maskID), mask_bits, &maskInfo); WFE_StretchDIBitsWithMask(hdc,TRUE, m_pImageDC, @@ -2303,6 +2329,10 @@ int CDCCX::GetUrl(URL_Struct *pUrl, FO_Present_Types iFormatOut, BOOL bReallyLoa // Save the location of the current document, if not at the very top. // Reset to top, then see if we need to change more.... SHIST_SetPositionOfCurrentDoc(&(GetContext()->hist), 0); + +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else if(GetOriginX() || GetOriginY()) { #ifdef LAYERS LO_Any *pAny = (LO_Any *)LO_XYToNearestElement(GetDocumentContext(), GetOriginX(), GetOriginY(), NULL); @@ -2314,6 +2344,7 @@ int CDCCX::GetUrl(URL_Struct *pUrl, FO_Present_Types iFormatOut, BOOL bReallyLoa SHIST_SetPositionOfCurrentDoc(&(GetContext()->hist), pAny->ele_id); } } +#endif /* MOZ_NGLAYOUT */ // Handle forced image loading. m_csForceLoadImage = m_csNexttimeForceLoadImage; @@ -2626,7 +2657,11 @@ void CDCCX::DisplayWindowlessPlugin(MWContext *pContext, pAppWin->height = rect.bottom - rect.top; pAppWin->type = NPWindowTypeDrawable; +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else NPL_EmbedSize(pEmbeddedApp); +#endif } #ifdef LAYERS @@ -2647,7 +2682,11 @@ void CDCCX::DisplayWindowlessPlugin(MWContext *pContext, event.wParam = (uint32)hDC; event.lParam = (uint32)▭ +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else NPL_HandleEvent(pEmbeddedApp, (void *)&event, pAppWin->window); +#endif ReleaseContextDC(hDC); } @@ -2704,6 +2743,7 @@ void CDCCX::DisplayPlugin(MWContext *pContext, LO_EmbedStruct *pEmbed, } +#ifndef MOZ_NGLAYOUT void CDCCX::DisplayEmbed(MWContext *pContext, int iLocation, LO_EmbedStruct *pEmbed) { NPEmbeddedApp* pEmbeddedApp = (NPEmbeddedApp*)pEmbed->objTag.FE_Data; @@ -2789,6 +2829,7 @@ void CDCCX::DisplayEmbed(MWContext *pContext, int iLocation, LO_EmbedStruct *pEm ReleaseContextDC(hdc); } } +#endif /* MOZ_NGLAYOUT */ void CDCCX::DisplayHR(MWContext *pContext, int iLocation, LO_HorizRuleStruct *pHorizRule) { @@ -3714,6 +3755,7 @@ moved into DrawTextPostDecoration() } } // void CDCCX::DisplayText() +#ifndef MOZ_NGLAYOUT void CDCCX::FreeEmbedElement(MWContext *pContext, LO_EmbedStruct *pEmbed) { // We have our OLE document handle this. GetDocument()->FreeEmbedElement(pContext, pEmbed); @@ -3724,6 +3766,7 @@ void CDCCX::GetEmbedSize(MWContext *pContext, LO_EmbedStruct *pEmbed, NET_Reload // We have our OLE document handle this. GetDocument()->GetEmbedSize(pContext, pEmbed, bReload); } +#endif /* MOZ_NGLAYOUT */ #ifdef LAYERS void CDCCX::GetTextFrame(MWContext *pContext, LO_TextStruct *pText, @@ -3751,6 +3794,10 @@ void CDCCX::GetTextFrame(MWContext *pContext, LO_TextStruct *pText, #endif /* LAYERS */ int CDCCX::GetTextInfo(MWContext *pContext, LO_TextStruct *pText, LO_TextInfo *pTextInfo) { +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); + return FALSE; +#else HDC hdc = GetAttribDC(); // Determine and select the font. @@ -3772,6 +3819,7 @@ int CDCCX::GetTextInfo(MWContext *pContext, LO_TextStruct *pText, LO_TextInfo *p ReleaseNetscapeFontWithCache( hdc, pMyFont ); ReleaseContextDC(hdc); return(TRUE); +#endif /* MOZ_NGLAYOUT */ } BOOL CDCCX::ResolveTextExtent(int16 wincsid, HDC pDC, LPCTSTR pString, int iLength, LPSIZE pSize, CyaFont *pMyFont) diff --git a/mozilla/cmd/winfe/cxdc.h b/mozilla/cmd/winfe/cxdc.h index 85a2d36a1e7..f4771ed7a0e 100644 --- a/mozilla/cmd/winfe/cxdc.h +++ b/mozilla/cmd/winfe/cxdc.h @@ -682,7 +682,9 @@ public: // Context Overrides virtual void DisplayBullet(MWContext *pContext, int iLocation, LO_BullettStruct *pBullet); +#ifndef MOZ_NGLAYOUT virtual void DisplayEmbed(MWContext *pContext, int iLocation, LO_EmbedStruct *pEmbed); +#endif virtual void DisplayBorder(MWContext *pContext, int iLocation, int x, int y, int width, int height, int bw, LO_Color *color, LO_LineStyle style); virtual void DisplayHR(MWContext *pContext, int iLocation, LO_HorizRuleStruct *pHorizRule); virtual BITMAPINFO* NewPixmap(NI_Pixmap* pImage, BOOL mask = FALSE); @@ -707,8 +709,10 @@ public: #ifdef LAYERS virtual void EraseBackground(MWContext *pContext, int iLocation, int32 x, int32 y, uint32 width, uint32 height, LO_Color *pColor); #endif +#ifndef MOZ_NGLAYOUT virtual void FreeEmbedElement(MWContext *pContext, LO_EmbedStruct *pEmbed); virtual void GetEmbedSize(MWContext *pContext, LO_EmbedStruct *pEmbed, NET_ReloadMethod bReload); +#endif /* MOZ_NGLAYOUT */ #ifdef LAYERS virtual void GetTextFrame(MWContext *pContext, LO_TextStruct *pText, int32 start, int32 end, XP_Rect *frame); @@ -724,12 +728,14 @@ public: static void SetColormap(HDC hdc, NI_ColorMap *pMap, IL_IRGB& transparentColor, HPALETTE hPal); virtual void SetDocDimension(MWContext *pContext, int iLocation, int32 lWidth, int32 lLength); virtual void GetDocPosition(MWContext *pContext, int iLocation, int32 *lX_p, int32 *lY_p); +#ifndef MOZ_NGLAYOUT virtual void DisplayFormElement(MWContext *pContext, int iLocation, LO_FormElementStruct *pFormElement); virtual void FormTextIsSubmit(MWContext *pContext, LO_FormElementStruct *pFormElement); virtual void GetFormElementInfo(MWContext *pContext, LO_FormElementStruct *pFormElement); virtual void GetFormElementValue(MWContext *pContext, LO_FormElementStruct *pFormElement, XP_Bool bTurnOff); virtual void ResetFormElement(MWContext *pContext, LO_FormElementStruct *pFormElement); virtual void SetFormElementToggle(MWContext *pContext, LO_FormElementStruct *pFormElement, XP_Bool iState); +#endif #ifdef TRANSPARENT_APPLET virtual void DrawJavaApp(MWContext *pContext, int iLocation, LO_JavaAppStruct *pJava); diff --git a/mozilla/cmd/winfe/cxdc1.cpp b/mozilla/cmd/winfe/cxdc1.cpp index 2cb75147c32..6ef83acbf38 100644 --- a/mozilla/cmd/winfe/cxdc1.cpp +++ b/mozilla/cmd/winfe/cxdc1.cpp @@ -967,12 +967,16 @@ BOOL CDCCX::OnOpenDocumentCX(const char *pPathName) { } void CDCCX::ViewImages() { +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else if(IsDestroyed() == FALSE) { // Tell layout that all images are to be force loaded. LO_SetForceLoadImage(NULL, TRUE); ExplicitlyLoadAllImages(); } +#endif /* MOZ_NGLAYOUT */ } BOOL CDCCX::CanViewImages() { @@ -1014,6 +1018,9 @@ URL_Struct *CDCCX::CreateUrlFromHist(BOOL bClearStateData, SHIST_SavedData *pSav // that is needed to perform the next load (such as position).... // Other's not dealing with history, save their data in the GetUrl call. SHIST_SetPositionOfCurrentDoc(&(GetContext()->hist), 0); +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else if(GetOriginX() || GetOriginY()) { #ifdef LAYERS LO_Any *pAny = (LO_Any *)LO_XYToNearestElement(GetDocumentContext(), GetOriginX(), GetOriginY(), NULL); @@ -1025,12 +1032,14 @@ URL_Struct *CDCCX::CreateUrlFromHist(BOOL bClearStateData, SHIST_SavedData *pSav SHIST_SetPositionOfCurrentDoc(&(GetContext()->hist), pAny->ele_id); } } +#endif /* MOZ_NGLAYOUT */ // Call/return the base. URL_Struct *pUrl = CStubsCX::CreateUrlFromHist(bClearStateData, pSavedData, bWysiwyg); return(pUrl); } +#ifndef MOZ_NGLAYOUT // // Make the given form element visible on the screen // @@ -1123,6 +1132,7 @@ void CDCCX::SetFormElementToggle(MWContext *pContext, LO_FormElementStruct *pFor pFormClass->SetFormElementToggle(iState); } } +#endif // Do a fill rect type operation. void CDCCX::FloodRect(LTRB& Rect, HBRUSH hColor) diff --git a/mozilla/cmd/winfe/cxicon.cpp b/mozilla/cmd/winfe/cxicon.cpp index fe4f12b0f0a..9407c76f23e 100644 --- a/mozilla/cmd/winfe/cxicon.cpp +++ b/mozilla/cmd/winfe/cxicon.cpp @@ -236,11 +236,15 @@ void CRDFImage::ProcessIcon() iconContext->SetUseDibPalColors(FALSE); } +// Temporary hack to disable loading RDF images for the layout integration +// build. +#ifndef MOZ_NGLAYOUT // Ask for this via client pull. // We may be in the call stack of the image lib, and doing // lots of fast small get urls causes it to barf due // to list management not being reentrant. FEU_ClientPull(iconContext->GetContext(), 0, NET_CreateURLStruct(pUrl, NET_DONT_RELOAD), FO_CACHE_AND_PRESENT, FALSE); +#endif } else { // handle window internal format BMP diff --git a/mozilla/cmd/winfe/cxpane.cpp b/mozilla/cmd/winfe/cxpane.cpp index 8bad1f594e3..9f51fe1203b 100644 --- a/mozilla/cmd/winfe/cxpane.cpp +++ b/mozilla/cmd/winfe/cxpane.cpp @@ -86,6 +86,9 @@ CPaneCX::CPaneCX(HWND hPane, BOOL bDestroyOnWMDestroy) CPaneCX::~CPaneCX() { +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else SetPane(NULL); // Destroy the compositor associated with the context @@ -112,6 +115,7 @@ CPaneCX::~CPaneCX() m_lpTextElementHeap = NULL; } #endif +#endif /* MOZ_NGLAYOUT */ } // Set current pane for context. @@ -305,6 +309,7 @@ void CPaneCX::DestroyContext() void CPaneCX::Initialize(BOOL bOwnDC, RECT *pRect, BOOL bInitialPalette, BOOL bNewMemDC) { +#ifndef MOZ_NGLAYOUT MWContext *pContext = GetContext(); // Top of the document. @@ -358,10 +363,14 @@ void CPaneCX::Initialize(BOOL bOwnDC, RECT *pRect, BOOL bInitialPalette, BOOL bN ReleaseContextDC(hDC); hDC = NULL; +#endif /* MOZ_NGLAYOUT */ } void CPaneCX::SetDrawable(MWContext *pContext, CL_Drawable *pDrawable) { +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else if(pDrawable) { CDrawable *pFEDrawable = (CDrawable *)CL_GetDrawableClientData(pDrawable); m_pDrawable = pFEDrawable; @@ -369,6 +378,7 @@ void CPaneCX::SetDrawable(MWContext *pContext, CL_Drawable *pDrawable) else { m_pDrawable = m_pOnscreenDrawable; } +#endif /* MOZ_NGLAYOUT */ } FE_Region CPaneCX::GetDrawingClip() @@ -383,16 +393,23 @@ FE_Region CPaneCX::GetDrawingClip() void CPaneCX::GetDrawingOrigin(int32 *plOrgX, int32 *plOrgY) { +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else if(m_pDrawable) { m_pDrawable->GetOrigin(plOrgX, plOrgY); } else { *plOrgX = *plOrgY = 0; } +#endif /* MOZ_NGLAYOUT */ } void CPaneCX::RefreshArea(int32 lLeft, int32 lTop, uint32 ulWidth, uint32 ulHeight) { +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else MWContext *pContext = GetContext(); // Simple validation, can pass in 0 for all. @@ -420,6 +437,7 @@ void CPaneCX::RefreshArea(int32 lLeft, int32 lTop, uint32 ulWidth, uint32 ulHeig tempRect.bottom += GetWindowsYPos(); BltToScreen(tempRect, NULL); #endif +#endif /* MOZ_NGLAYOUT */ } // Window handle is about to go away; let go of it. @@ -435,6 +453,9 @@ void CPaneCX::AftWMDestroy(PaneMessage *pMessage) void CPaneCX::PreWMErasebkgnd(PaneMessage *pMessage) { +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else HDC hEraseDC = (HDC)pMessage->wParam; HDC hOldSubst = NULL; if(hEraseDC != m_hClassDC && hEraseDC != m_hOwnDC) { @@ -459,6 +480,7 @@ void CPaneCX::PreWMErasebkgnd(PaneMessage *pMessage) // Someone forget to unsubst their DC? ASSERT(hUnSubst == hEraseDC); } +#endif /* MOZ_NGLAYOUT */ } void CPaneCX::PreWMPaint(PaneMessage *pMessage) @@ -499,6 +521,9 @@ void CPaneCX::PreWMPaint(PaneMessage *pMessage) void CPaneCX::AftWMSize(PaneMessage *pMessage) { +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else UINT uSizeType = (UINT)pMessage->wParam; int iWidth = LOWORD(pMessage->lParam); int iHeight = HIWORD(pMessage->lParam); @@ -580,6 +605,7 @@ void CPaneCX::AftWMSize(PaneMessage *pMessage) #endif } } +#endif /* MOZ_NGLAYOUT */ } static void resize_reload_timeout(void *closure) @@ -739,6 +765,9 @@ void CPaneCX::ShowScrollBars(int iBars, BOOL bShow) { void CPaneCX::RealizeScrollBars(int32 *pX, int32 *pY) { +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else if(m_lDocHeight && m_lDocWidth) { if(AlwaysShowScrollBars()) { ShowScrollBars(SB_BOTH, TRUE); @@ -904,6 +933,7 @@ void CPaneCX::RealizeScrollBars(int32 *pX, int32 *pY) CL_ScrollCompositorWindow(pContext->compositor, m_lOrgX, m_lOrgY); } } +#endif /* MOZ_NGLAYOUT */ } void CPaneCX::SetDocDimension(MWContext *pContext, int iLocation, int32 lWidth, int32 lLength) { @@ -1420,6 +1450,11 @@ PaneProc(HWND hPane, UINT uMsg, WPARAM wParam, LPARAM lParam) // Subclass or unsubclass a window. BOOL CPaneCX::SubClass(HWND hWnd, BOOL bSubClass) { +#ifdef MOZ_NGLAYOUT + // We want all events to go to the WebWidget window embedded in this + // one and not here at all. + return TRUE; +#else BOOL bRetval = FALSE; #ifdef XP_WIN32 const char *pPropName = STR_CPANECX; // Not a UI string. @@ -1490,5 +1525,6 @@ BOOL CPaneCX::SubClass(HWND hWnd, BOOL bSubClass) } return(bRetval); +#endif } diff --git a/mozilla/cmd/winfe/cxpane.h b/mozilla/cmd/winfe/cxpane.h index 9d65e35ce1d..f6c78c0ac91 100644 --- a/mozilla/cmd/winfe/cxpane.h +++ b/mozilla/cmd/winfe/cxpane.h @@ -242,7 +242,12 @@ inline void CPaneCX::ResolvePoint(XY& xy, POINT& point) } inline LO_Element *CPaneCX::GetLayoutElement(XY& Point, CL_Layer *layer) const { +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); + return NULL; +#else return(LO_XYToElement(GetContext(), Point.x, Point.y, layer)); +#endif } inline BOOL CPaneCX::IsNavCenterHTMLPane() const { diff --git a/mozilla/cmd/winfe/cxprint.cpp b/mozilla/cmd/winfe/cxprint.cpp index 0b0cd65bb7f..46e871fec74 100644 --- a/mozilla/cmd/winfe/cxprint.cpp +++ b/mozilla/cmd/winfe/cxprint.cpp @@ -409,7 +409,11 @@ CPrintCX::CPrintCX(URL_Struct *pUrl, SHIST_SavedData *pSavedData, char *pDisplay // Finally, copy the form data if present. if(pSavedData && pSavedData->FormList) { TRACE("Cloning form data for print job.\n"); +#ifdef MOZ_NGLAYOUT + ASSERT(0); +#else LO_CloneFormData(pSavedData, GetDocumentContext(), pUrl); +#endif } } @@ -1839,6 +1843,7 @@ void CPrintCX::DisplayBullet(MWContext *pContext, int iLocation, LO_BullettStruc CDCCX::DisplayBullet(pContext, iLocation, pBullet); } +#ifndef MOZ_NGLAYOUT void CPrintCX::DisplayEmbed(MWContext *pContext, int iLocation, LO_EmbedStruct *pEmbed) { if (GetDisplayMode() == BLOCK_DISPLAY) return; @@ -1881,6 +1886,7 @@ void CPrintCX::DisplayFormElement(MWContext *pContext, int iLocation, LO_FormEle #endif CDCCX::DisplayFormElement(pContext, iLocation, pFormElement); } +#endif void CPrintCX::DisplayHR(MWContext *pContext, int iLocation, LO_HorizRuleStruct *pHorizRule) { if (GetDisplayMode() == BLOCK_DISPLAY) @@ -2307,7 +2313,11 @@ void CPrintCX::DisplayPlugin(MWContext *pContext, LO_EmbedStruct *pEmbed, { // get the print area and clamp it LTRB Rect; +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else ResolveElement(Rect, pEmbed, iLocation, NPL_IsEmbedWindowed(pEmbeddedApp)); +#endif SafeSixteen(Rect); // set the print area rect @@ -2333,7 +2343,11 @@ void CPrintCX::DisplayPlugin(MWContext *pContext, LO_EmbedStruct *pEmbed, npPrint.print.embedPrint.platformPrint = (void*)hdc; +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else (void)NPL_Print(pEmbeddedApp, &npPrint); +#endif // Restore the DC's state. if(iSaveDC) { diff --git a/mozilla/cmd/winfe/cxprint.h b/mozilla/cmd/winfe/cxprint.h index b1f1b47827a..31e1c0eed9d 100644 --- a/mozilla/cmd/winfe/cxprint.h +++ b/mozilla/cmd/winfe/cxprint.h @@ -251,8 +251,10 @@ public: virtual void FinishedLayout(MWContext *pContext); // Display routines virtual void DisplayBullet(MWContext *pContext, int iLocation, LO_BullettStruct *pBullet); +#ifndef MOZ_NGLAYOUT virtual void DisplayEmbed(MWContext *pContext, int iLocation, LO_EmbedStruct *pEmbed); virtual void DisplayFormElement(MWContext *pContext, int iLocation, LO_FormElementStruct *pFormElement); +#endif virtual void DisplayHR(MWContext *pContext, int iLocation, LO_HorizRuleStruct *pHorizRule); virtual int DisplayPixmap(NI_Pixmap* image, NI_Pixmap* mask, int32 x, int32 y, int32 x_offset, int32 y_offset, int32 width, int32 height, int32 lScaleWidth, int32 lScaleHeight, LTRB& Rect); virtual void DisplayLineFeed(MWContext *pContext, int iLocation, LO_LinefeedStruct *pLineFeed, XP_Bool clear); diff --git a/mozilla/cmd/winfe/cxsave.cpp b/mozilla/cmd/winfe/cxsave.cpp index 3268a0aba81..a8e8188c2c9 100644 --- a/mozilla/cmd/winfe/cxsave.cpp +++ b/mozilla/cmd/winfe/cxsave.cpp @@ -581,14 +581,22 @@ BOOL CSaveCX::CanCreate(URL_Struct* pUrl) memcpy(&savedData, &m_pUrl->savedData, sizeof(SHIST_SavedData)); memset(&m_pUrl->savedData, 0, sizeof(SHIST_SavedData)); +#ifdef MOZ_NGLAYOUT + ASSERT(0); +#else LO_CloneFormData(&savedData, GetDocumentContext(), m_pUrl); +#endif } } switch(m_iFileType) { case TXT: +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else // We need to ask the text front end to handle. TranslateText(m_pUrl, m_csFileName); +#endif /* MOZ_NGLAYOUT */ break; default: diff --git a/mozilla/cmd/winfe/cxstubs.cpp b/mozilla/cmd/winfe/cxstubs.cpp index b3dd3e39764..97fee2fa391 100755 --- a/mozilla/cmd/winfe/cxstubs.cpp +++ b/mozilla/cmd/winfe/cxstubs.cpp @@ -280,6 +280,7 @@ MWContext *CStubsCX::CreateNewDocWindow(MWContext *pContext, URL_Struct *pURL) { void CStubsCX::DisplayBullet(MWContext *pContext, int iLocation, LO_BullettStruct *pBullet) { } +#ifndef MOZ_NGLAYOUT void CStubsCX::DisplayEdge(MWContext *pContext, int iLocation, LO_EdgeStruct *pEdge) { } @@ -288,6 +289,7 @@ void CStubsCX::DisplayEmbed(MWContext *pContext, int iLocation, LO_EmbedStruct * void CStubsCX::DisplayFormElement(MWContext *pContext, int iLocation, LO_FormElementStruct *pFormElement) { } +#endif void CStubsCX::DisplayBorder(MWContext *pContext, int iLocation, int x, int y, int width, int height, int bw, LO_Color *color, LO_LineStyle style) { } @@ -336,11 +338,13 @@ int CStubsCX::FileSortMethod(MWContext *pContext) { void CStubsCX::FinishedLayout(MWContext *pContext) { } +#ifndef MOZ_NGLAYOUT void CStubsCX::FormTextIsSubmit(MWContext *pContext, LO_FormElementStruct *pFormElement) { } void CStubsCX::FreeEdgeElement(MWContext *pContext, LO_EdgeStruct *pEdge) { } +#endif void CStubsCX::CreateEmbedWindow(MWContext *pContext, NPEmbeddedApp *pApp) { } @@ -354,6 +358,7 @@ void CStubsCX::RestoreEmbedWindow(MWContext *pContext, NPEmbeddedApp *pApp) { void CStubsCX::DestroyEmbedWindow(MWContext *pContext, NPEmbeddedApp *pApp) { } +#ifndef MOZ_NGLAYOUT void CStubsCX::FreeEmbedElement(MWContext *pContext, LO_EmbedStruct *pEmbed) { } @@ -365,6 +370,7 @@ void CStubsCX::GetFormElementInfo(MWContext *pContext, LO_FormElementStruct *pFo void CStubsCX::GetFormElementValue(MWContext *pContext, LO_FormElementStruct *pFormElement, XP_Bool bHidden) { } +#endif void CStubsCX::GetTextFrame(MWContext *pContext, LO_TextStruct *pText, int32 start, int32 end, XP_Rect *frame) { @@ -454,8 +460,10 @@ XP_Bool CStubsCX::PromptUsernameAndPassword(MWContext *pContext, const char *pMe return(iStatus == IDOK); } +#ifndef MOZ_NGLAYOUT void CStubsCX::ResetFormElement(MWContext *pContext, LO_FormElementStruct *pFormElement) { } +#endif void CStubsCX::SetBackgroundColor(MWContext *pContext, uint8 cRed, uint8 cGreen, uint8 cBlue) { } @@ -472,8 +480,10 @@ void CStubsCX::SetDocPosition(MWContext *pContext, int iLocation, int32 lX, int3 void CStubsCX::SetDocTitle(MWContext *pContext, char *pTitle) { } +#ifndef MOZ_NGLAYOUT void CStubsCX::SetFormElementToggle(MWContext *pContext, LO_FormElementStruct *pFormElement, XP_Bool bToggle) { } +#endif void CStubsCX::SetProgressBarPercent(MWContext *pContext, int32 lPercent) { } diff --git a/mozilla/cmd/winfe/cxwin.cpp b/mozilla/cmd/winfe/cxwin.cpp index 2b2b1a3c21a..1be36b31321 100644 --- a/mozilla/cmd/winfe/cxwin.cpp +++ b/mozilla/cmd/winfe/cxwin.cpp @@ -51,6 +51,13 @@ extern char * EDT_NEW_DOC_NAME; #define EDT_IS_SIZING ( EDT_IS_EDITOR(GetContext()) && EDT_IsSizing(GetContext()) ) +#ifdef MOZ_NGLAYOUT +#include "nsString.h" +#include "nsIURL.h" +#include "nsIWebWidget.h" +#include "nsIDocument.h" +#endif + #if defined(OJI) #include "jvmmgr.h" #elif defined(JAVA) @@ -58,7 +65,6 @@ extern char * EDT_NEW_DOC_NAME; #endif #if defined(JAVA) || defined(OJI) - #include "np.h" #include "prlog.h" @@ -632,6 +638,9 @@ void CWinCX::DestroyContext() { void CWinCX::OnDeactivateEmbedCX() { +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else CGenericView *pView = GetView(); if(pView != NULL && m_pSelected != NULL) { // Obtain the plugin structure. @@ -655,6 +664,7 @@ void CWinCX::OnDeactivateEmbedCX() { // Clear that nothing is currently selected. m_pSelected = NULL; } +#endif /* MOZ_NGLAYOUT */ } #ifdef EDITOR @@ -773,6 +783,7 @@ void CWinCX::ScrollWindow(int x, int y) #endif // This function get's called when the window moves around. void CWinCX::OnMoveCX() { +#ifndef MOZ_NGLAYOUT // WARNING:m_crWindowRect will be invalid until next AftWMSize! // Go through all our immediate children, telling them their screen location @@ -801,6 +812,7 @@ void CWinCX::OnMoveCX() { #ifdef DDRAW CalcWinPos(); #endif +#endif /* MOZ_NGLAYOUT */ } static void @@ -820,7 +832,11 @@ wfe_ResizeFullPagePlugin(MWContext* pContext, int32 lWidth, int32 lHeight) (int)npWindow->width, (int)npWindow->height, SWP_NOZORDER | SWP_NOMOVE | SWP_NOACTIVATE); +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else NPL_EmbedSize(pContext->pluginList); +#endif } } @@ -863,6 +879,9 @@ LPDIRECTDRAWSURFACE CWinCX::CreateOffscreenSurface(RECT& rect) void CWinCX::AftWMSize(PaneMessage *pMessage) { +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else // Purpose: Informs the context that the size of the displayable area has changed. // Arguments: As OnSize in MFC // Returns: void @@ -1062,6 +1081,7 @@ void CWinCX::AftWMSize(PaneMessage *pMessage) NiceResizeReload(); */ } +#endif /* MOZ_NGLAYOUT */ } #ifdef EDITOR @@ -1087,9 +1107,12 @@ BOOL CWinCX::EraseTextBkgnd(HDC pDC, RECT& cRect, LO_TextStruct* pText) pText->text_attr->no_background ? NULL : &pText->text_attr->bg); } -#ifdef LAYERS BOOL CWinCX::HandleLayerEvent(CL_Layer * pLayer, CL_Event * pEvent) { +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); + return FALSE; +#else XY point(pEvent->x, pEvent->y); // Event location, in layer coordinates BOOL bReturn = TRUE; fe_EventStruct *pFEEvent = (fe_EventStruct *)pEvent->fe_event; @@ -1252,10 +1275,15 @@ BOOL CWinCX::HandleLayerEvent(CL_Layer * pLayer, CL_Event * pEvent) } return bReturn; +#endif /* MOZ_NGLAYOUT */ } BOOL CWinCX::HandleEmbedEvent(LO_EmbedStruct *embed, CL_Event *pEvent) { +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); + return FALSE; +#else NPEvent npEvent; fe_EventStruct *pFEEvent = (fe_EventStruct *)pEvent->fe_event; NPEmbeddedApp *pEmbeddedApp = (NPEmbeddedApp *)embed->objTag.FE_Data; @@ -1330,11 +1358,15 @@ BOOL CWinCX::HandleEmbedEvent(LO_EmbedStruct *embed, CL_Event *pEvent) } return (BOOL)NPL_HandleEvent(pEmbeddedApp, &npEvent, (void*)npEvent.wParam); +#endif /* MOZ_NGLAYOUT */ } -#endif /* LAYERS */ BOOL CWinCX::OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags) { +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); + return FALSE; +#else BOOL bReturn = FALSE; // Don't continue if this context is destroyed. @@ -1397,10 +1429,15 @@ BOOL CWinCX::OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags) #endif /* LAYERS */ return bReturn; +#endif /* MOZ_NGLAYOUT */ } BOOL CWinCX::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags) { +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); + return FALSE; +#else BOOL bReturn = FALSE; // Don't continue if this context is destroyed. @@ -1466,9 +1503,13 @@ BOOL CWinCX::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags) #endif /* LAYERS */ return bReturn; +#endif /* MOZ_NGLAYOUT */ } void CWinCX::OnLButtonDblClkCX(UINT uFlags, CPoint cpPoint) { +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else // Only do this if clicking is enabled. if(IsClickingEnabled() == FALSE) { return; @@ -1488,7 +1529,6 @@ void CWinCX::OnLButtonDblClkCX(UINT uFlags, CPoint cpPoint) { XY Point; ResolvePoint(Point, cpPoint); -#ifdef LAYERS if (GetContext()->compositor) { CL_Event event; fe_EventStruct fe_event; @@ -1518,16 +1558,19 @@ void CWinCX::OnLButtonDblClkCX(UINT uFlags, CPoint cpPoint) { MouseTimerData mt(GetContext()); FEU_MouseTimer(&mt); return; +#endif /* MOZ_NGLAYOUT */ } void CWinCX::OnLButtonDblClkForLayerCX(UINT uFlags, CPoint& cpPoint, XY& Point, CL_Layer *layer) { +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else // With LAYERS turned on, the orginal method // OnLButtonDblClkCX is separated into two methods, // one of which is a per-layer method. -#endif /* LAYERS */ // Process any embed activation. #ifdef LAYERS @@ -1650,6 +1693,7 @@ CWinCX::OnLButtonDblClkForLayerCX(UINT uFlags, CPoint& cpPoint, // in all cases with the state of the buttons set correctly. MouseTimerData mt(GetContext()); FEU_MouseTimer(&mt); +#endif /* MOZ_NGLAYOUT */ } BOOL CWinCX::PtInSelectedCell(CPoint &DocPoint, LO_CellStruct *cell, @@ -1730,6 +1774,10 @@ BOOL CWinCX::PtInSelectedCell(CPoint &DocPoint, LO_CellStruct *cell, BOOL CWinCX::PtInSelectedRegion(CPoint cPoint, BOOL bConvertToDocCoordinates, CL_Layer *layer) { +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); + return FALSE; +#else BOOL bPtInRegion = FALSE; BOOL bContinue = TRUE; @@ -1743,12 +1791,12 @@ BOOL CWinCX::PtInSelectedRegion(CPoint cPoint, BOOL bConvertToDocCoordinates, DocPoint = cPoint; } - int32 start_selection, end_selection; LO_Element * start_element = NULL; LO_Element * end_element = NULL; CL_Layer *sel_layer = NULL; int32 x_origin, y_origin, old_x_origin, old_y_origin; + int32 start_selection, end_selection; // Start the search from the current selection location LO_GetSelectionEndpoints(GetDocumentContext(), &start_element, @@ -1861,10 +1909,14 @@ BOOL CWinCX::PtInSelectedRegion(CPoint cPoint, BOOL bConvertToDocCoordinates, } return bPtInRegion; +#endif /* MOZ_NGLAYOUT */ } void CWinCX::OnLButtonDownCX(UINT uFlags, CPoint cpPoint) { +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else RelayToolTipEvent(cpPoint, WM_LBUTTONDOWN); // Only do this if clicking is enabled. @@ -1885,7 +1937,6 @@ void CWinCX::OnLButtonDownCX(UINT uFlags, CPoint cpPoint) XY Point; ResolvePoint(Point, cpPoint); -#ifdef LAYERS if (GetContext()->compositor) { CL_Event event; @@ -1915,6 +1966,7 @@ void CWinCX::OnLButtonDownCX(UINT uFlags, CPoint cpPoint) MouseTimerData mt(GetContext()); FEU_MouseTimer(&mt); return; +#endif /* MOZ_NGLAYOUT */ } void CWinCX::ResetToolTipImg() { @@ -1944,6 +1996,9 @@ void CWinCX::OnLButtonDownForLayerCX(UINT uFlags, CPoint &cpPoint, XY& Point, CL_Layer *layer) { +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else MWContext *pMWContext = GetContext(); XP_ASSERT(pMWContext); @@ -1952,7 +2007,6 @@ CWinCX::OnLButtonDownForLayerCX(UINT uFlags, CPoint &cpPoint, XY& Point, // one of which is a per-layer method. if (pMWContext->compositor) CL_GrabMouseEvents(pMWContext->compositor, layer); -#endif /* LAYERS */ #ifdef LAYERS LO_Element *pElement = GetLayoutElement(Point, layer); @@ -1967,6 +2021,9 @@ CWinCX::OnLButtonDownForLayerCX(UINT uFlags, CPoint &cpPoint, XY& Point, (Point.y - pElement->lo_form.y - pElement->lo_form.y_offset < pElement->lo_form.height) && (Point.y - pElement->lo_form.y - pElement->lo_form.y_offset > 0)) { +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else CFormElement * pFormElement; CNetscapeButton * pButton; switch (pElement->lo_form.element_data->type) { @@ -1988,6 +2045,7 @@ CWinCX::OnLButtonDownForLayerCX(UINT uFlags, CPoint &cpPoint, XY& Point, default: break; } +#endif return; } @@ -2103,7 +2161,11 @@ CWinCX::OnLButtonDownForLayerCX(UINT uFlags, CPoint &cpPoint, XY& Point, else #endif // EDITOR { +#ifdef MOZ_NGLAYOUT + ASSERT(0); +#else LO_ExtendSelection(GetDocumentContext(), Point.x, Point.y); +#endif } } else { // Start a normal selection @@ -2136,12 +2198,15 @@ CWinCX::OnLButtonDownForLayerCX(UINT uFlags, CPoint &cpPoint, XY& Point, LO_HighlightAnchor(GetDocumentContext(), pElement, TRUE); } +#ifdef EDITOR MOUSE_TIMER: +#endif // Have the mouse timer handler do some dirty work. // Please don't return in the above code, I'd like this to get called // in all cases with the state of the buttons set correctly. MouseTimerData mt(pMWContext); FEU_MouseTimer(&mt); +#endif /* MOZ_NGLAYOUT */ } typedef struct click_closure { @@ -2156,7 +2221,9 @@ static void MapToAnchorAndTarget(MWContext * context, LO_Element * pElement, int x, int y, CString& csAnchor, CString& csTarget) { - +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else switch(pElement->type) { case LO_TEXT: @@ -2201,7 +2268,7 @@ MapToAnchorAndTarget(MWContext * context, LO_Element * pElement, int x, int y, default: break; } - +#endif /* MOZ_NGLAYOUT */ } @@ -2258,7 +2325,9 @@ win_click_callback(MWContext * pContext, LO_Element * pEle, int32 event, FE_DestroyWindow(pContext); } +#ifdef EDITOR done: +#endif if(pClose->szRefer) XP_FREE(pClose->szRefer); XP_FREE(pClose); @@ -2273,6 +2342,9 @@ static void image_form_click_callback(MWContext * pContext, LO_Element * pElement, int32 event, void * pObj, ETEventStatus status) { +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else // only continue if OK if(status != EVENT_OK) { @@ -2308,12 +2380,15 @@ image_form_click_callback(MWContext * pContext, LO_Element * pElement, int32 eve // Release. LO_FreeSubmitData(pSubmit); - +#endif /* MOZ_NGLAYOUT */ } void CWinCX::OnLButtonUpCX(UINT uFlags, CPoint cpPoint, BOOL &bReturnImmediately) { +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else RelayToolTipEvent(cpPoint, WM_LBUTTONUP); // Only do this if clicking is enabled. @@ -2333,9 +2408,7 @@ void CWinCX::OnLButtonUpCX(UINT uFlags, CPoint cpPoint, BOOL &bReturnImmediately XY Point; ResolvePoint(Point, cpPoint); - -#ifdef LAYERS - + if (GetContext()->compositor) { CL_Event event; fe_EventStruct fe_event; @@ -2367,6 +2440,7 @@ void CWinCX::OnLButtonUpCX(UINT uFlags, CPoint cpPoint, BOOL &bReturnImmediately MouseTimerData mt(GetContext()); FEU_MouseTimer(&mt); return; +#endif /* MOZ_NGLAYOUT */ } @@ -2374,6 +2448,9 @@ void CWinCX::OnLButtonUpForLayerCX(UINT uFlags, CPoint& cpPoint, XY& Point, CL_Layer *layer, BOOL &bReturnImmediately) { +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else History_entry *pHist = NULL; click_closure * pClosure = NULL; @@ -2383,7 +2460,6 @@ CWinCX::OnLButtonUpForLayerCX(UINT uFlags, CPoint& cpPoint, XY& Point, // one of which is a per-layer method. if (GetContext()->compositor) CL_GrabMouseEvents(GetContext()->compositor, NULL); -#endif /* LAYERS */ #ifdef LAYERS LO_Element *pElement = GetLayoutElement(Point, layer); @@ -2766,12 +2842,16 @@ CWinCX::OnLButtonUpForLayerCX(UINT uFlags, CPoint& cpPoint, XY& Point, break; } +#ifdef EDITOR MOUSE_TIMER: +#endif // Have the mouse timer handler do some dirty work. // Please don't return in the above code, I'd like this to get called // in all cases with the state of the buttons set correctly. MouseTimerData mt(GetContext()); FEU_MouseTimer(&mt); + +#endif /* MOZ_NGLAYOUT */ } @@ -2808,6 +2888,9 @@ wfe_textObjectToBookmarkHandle(LO_TextStruct * text, char * title) // Creates OLE drag data source for selected text void CWinCX::DragSelection() { +#ifdef MOZ_NGLAYOUT + ASSERT(0); +#else // Begin the drag and drop operation // REMEMBER: OnDrop: Check if end pt is withing selection, // if yes, ignore drop @@ -2834,11 +2917,11 @@ void CWinCX::DragSelection() char* pText = NULL; XP_HUGE_CHAR_PTR pGlobal; - XP_HUGE_CHAR_PTR pHTML; int32 textLen = 0; - int32 htmlLen; m_bDragging = FALSE; #ifdef EDITOR + XP_HUGE_CHAR_PTR pHTML; + int32 htmlLen; if( EDT_IS_EDITOR(pMWContext) ){ if( EDT_COP_OK == EDT_CanCopy(pMWContext, TRUE) && EDT_COP_OK == EDT_CopySelection(pMWContext, &pText, &textLen, &pHTML, &htmlLen) ){ @@ -2921,6 +3004,7 @@ void CWinCX::DragSelection() pDataSource->Empty(); delete pDataSource; delete pDropSource; +#endif #endif /* MOZ_NGLAYOUT */ } // Triggered on button up on our bitmap on the menu @@ -3048,6 +3132,9 @@ void wfe_Progress(MWContext *pContext, const char *pMessage); void CWinCX::OnMouseMoveCX(UINT uFlags, CPoint cpPoint, BOOL &bReturnImmediately) { +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else // Must have a view to continue. if(GetPane() == NULL) { return; @@ -3073,7 +3160,6 @@ void CWinCX::OnMouseMoveCX(UINT uFlags, CPoint cpPoint, BOOL &bReturnImmediately XY xyPoint; ResolvePoint(xyPoint, cpPoint); -#ifdef LAYERS MWContext * context = GetContext(); if (context->compositor) { CL_Event event; @@ -3101,6 +3187,7 @@ void CWinCX::OnMouseMoveCX(UINT uFlags, CPoint cpPoint, BOOL &bReturnImmediately MouseTimerData mt(GetContext()); FEU_MouseTimer(&mt); return; +#endif /* MOZ_NGLAYOUT */ } void @@ -3110,7 +3197,10 @@ CWinCX::OnMouseMoveForLayerCX(UINT uFlags, CPoint& cpPoint, // With LAYERS turned on, the orginal method // OnMouseMoveCX is separated into two methods, // one of which is a per-layer method. -#endif /* LAYERS */ + +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else MWContext * context = GetContext(); @@ -3349,7 +3439,6 @@ CWinCX::OnMouseMoveForLayerCX(UINT uFlags, CPoint& cpPoint, } } else { - char *pFullLink = (char *) LO_GetSelectionText(GetDocumentContext()); HGLOBAL hBookmark = wfe_textObjectToBookmarkHandle(text, pFullLink); @@ -3493,10 +3582,13 @@ MOUSE_TIMER: // in all cases with the state of the buttons set correctly. MouseTimerData mt(context); FEU_MouseTimer(&mt); - +#endif /* MOZ_NGLAYOUT */ } void CWinCX::OnRButtonDblClkCX(UINT uFlags, CPoint cpPoint) { +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else // Only do this if clicking is enabled. if(IsClickingEnabled() == FALSE) { return; @@ -3540,6 +3632,7 @@ void CWinCX::OnRButtonDblClkCX(UINT uFlags, CPoint cpPoint) { // in all cases with the state of the buttons set correctly. MouseTimerData mt(GetContext()); FEU_MouseTimer(&mt); +#endif /* MOZ_NGLAYOUT */ } void @@ -3558,6 +3651,9 @@ CWinCX::OnRButtonDblClkForLayerCX(UINT uFlags, CPoint& cpPoint, void CWinCX::OnRButtonDownCX(UINT uFlags, CPoint cpPoint) { +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else RelayToolTipEvent(cpPoint, WM_RBUTTONDOWN); MWContext * pMWContext = GetContext(); @@ -3573,7 +3669,6 @@ void CWinCX::OnRButtonDownCX(UINT uFlags, CPoint cpPoint) XY xyPoint; ResolvePoint(xyPoint, cpPoint); -#ifdef LAYERS if (pMWContext->compositor) { CL_Event event; fe_EventStruct fe_event; @@ -3601,6 +3696,7 @@ void CWinCX::OnRButtonDownCX(UINT uFlags, CPoint cpPoint) MouseTimerData mt(pMWContext); FEU_MouseTimer(&mt); return; +#endif /* MOZ_NGLAYOUT */ } BOOL @@ -3610,7 +3706,6 @@ CWinCX::OnRButtonDownForLayerCX(UINT uFlags, CPoint& cpPoint, // With LAYERS turned on, the orginal method // OnRButtonDownCX is separated into two methods, // one of which is a per-layer method. -#endif /* LAYERS */ // Remember.... m_LastMouseEvent = m_RBDown; m_cpRBDown = cpPoint; @@ -3621,6 +3716,9 @@ CWinCX::OnRButtonDownForLayerCX(UINT uFlags, CPoint& cpPoint, void CWinCX::OnRButtonUpCX(UINT uFlags, CPoint cpPoint) { +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else RelayToolTipEvent(cpPoint, WM_RBUTTONUP); // Only do this if clicking is enabled. @@ -3664,6 +3762,7 @@ void CWinCX::OnRButtonUpCX(UINT uFlags, CPoint cpPoint) // in all cases with the state of the buttons set correctly. MouseTimerData mt(GetContext()); FEU_MouseTimer(&mt); +#endif /* MOZ_NGLAYOUT */ } void @@ -3709,6 +3808,19 @@ CWnd *CWinCX::GetDialogOwner() const { int CWinCX::GetUrl(URL_Struct *pUrl, FO_Present_Types iFormatOut, BOOL bReallyLoading, BOOL bForceNew) { +#ifdef MOZ_NGLAYOUT + // Ask WebWidget to load the URL. + nsIWebWidget* ww = GetWebWidget(); + if (!ww) { + return MK_NO_ACTION; + } + nsAutoString str(pUrl->address); + ww->LoadURL(str); + return MK_DATA_LOADED; // some success code + + // Do we need to free pUrl +#else + // If we are POSTing data (publishing), or forcing a new page, don't ask user to save current page first // If user cancels when being prompted to save current document, return without action #ifdef EDITOR @@ -3781,13 +3893,17 @@ int CWinCX::GetUrl(URL_Struct *pUrl, FO_Present_Types iFormatOut, BOOL bReallyLo } } - // Call the base. return(CPaneCX::GetUrl(pUrl, iFormatOut, bReallyLoading, bForceNew)); +#endif #endif /* MOZ_NGLAYOUT */ } CNSToolTip* CWinCX::CreateToolTip(LO_ImageStruct* pImage, CPoint& cpPoint, CL_Layer *layer) { +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); + return NULL; +#else // Added tool tip to the image. if ((!pImage || !pImage->image_attr) ) return NULL; // image is not ready yet. @@ -3881,6 +3997,7 @@ CNSToolTip* CWinCX::CreateToolTip(LO_ImageStruct* pImage, CPoint& cpPoint, CL_La else PA_UNLOCK(pImage->alt); return m_ToolTip; +#endif /* MOZ_NGLAYOUT */ } void CWinCX::ClipChildren(CWnd *pWnd, BOOL bSet) @@ -4137,9 +4254,13 @@ void CWinCX::DestroyEmbedWindow(MWContext *pContext, NPEmbeddedApp *pApp) } XP_FREE(pAppWin); +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else // turn scrollbars back on if(pApp->pagePluginType == NP_FullPage) FE_ShowScrollBars(pContext, TRUE); +#endif } @@ -4534,6 +4655,9 @@ void CWinCX::AllConnectionsComplete(MWContext *pContext) } } +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else if( theGlobalNSFont.WebfontsNeedReload( pContext ) ) { // need to remove all font cache before reload. @@ -4541,6 +4665,7 @@ void CWinCX::AllConnectionsComplete(MWContext *pContext) int usePassInType = 1; NiceReload(usePassInType, NET_RESIZE_RELOAD ); } +#endif /* MOZ_NGLAYOUT */ } void CWinCX::UpdateStopState(MWContext *pContext) @@ -4583,7 +4708,23 @@ void CWinCX::SetDocTitle(MWContext *pContext, char *pTitle) CString csUrlTitle = pTitle; // This should be set at end of GetUrl so we // don't have to depend on history +#ifdef MOZ_NGLAYOUT + // Ask WebWidget for the curent URL. + CString csBaseURL; + MWContext *pDocContext = GetDocumentContext(); + nsIWebWidget *ww = (nsIWebWidget*)pDocContext->fe.webWidget; + if (ww != nsnull) { + nsIDocument *pDoc = ww->GetDocument(); + if (pDoc != nsnull) { + nsIURL *pURL = pDoc->GetDocumentURL(); + if (pURL != nsnull) { + csBaseURL = pURL->GetSpec(); + } + } + } +#else CString csBaseURL = LO_GetBaseURL( GetDocumentContext() ); +#endif BOOL bTitleIsSameAsUrl = (csBaseURL == csUrlTitle); @@ -4675,9 +4816,13 @@ void CWinCX::SetDocDimension(MWContext *pContext, int iLocation, int32 lWidth, i // height shrinks, which currently only happens when editing.) m_lOrgY = max(0, min(m_lOrgY, lLength - m_lHeight)); +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else // Anytime we change the scrolling origin, we have to tell the compositor. if ( GetContext()->compositor) CL_ScrollCompositorWindow(GetContext()->compositor, m_lOrgX, m_lOrgY); +#endif /* MOZ_NGLAYOUT */ // Call the base. CPaneCX::SetDocDimension(pContext, iLocation, lWidth, lLength); @@ -4811,6 +4956,7 @@ void CWinCX::Progress(MWContext *pContext, const char *pMessage) { } } +#ifndef MOZ_NGLAYOUT void CWinCX::DisplayEdge(MWContext *pContext, int iLocation, LO_EdgeStruct *pEdge) { // Create an edge window if none currently exists. if(pEdge->FE_Data == NULL) { @@ -4831,6 +4977,7 @@ void CWinCX::FreeEdgeElement(MWContext *pContext, LO_EdgeStruct *pEdge) { pEdge->FE_Data = NULL; } } +#endif /* MOZ_NGLAYOUT */ CWinCX *CWinCX::DetermineTarget(const char *pTargetName) { // This function decides what target will load a URL. @@ -5065,6 +5212,9 @@ void CWinCX::PrintContext() { } void CWinCX::Print() { +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else if(IsDestroyed() == TRUE || CanPrint() == FALSE) { return; } @@ -5108,6 +5258,7 @@ void CWinCX::Print() { CPrintCX::PrintAnchorObject(pUrl, pView, &SavedData, pDisplayUrl); } XP_FREEIF(pDisplayUrl); +#endif } BOOL CWinCX::CanPrint(BOOL bPreview) { @@ -5140,12 +5291,16 @@ BOOL CWinCX::CanPrint(BOOL bPreview) { if(pTraverseContext != NULL && ABSTRACTCX(pTraverseContext) != NULL) { pTraverseCX = ABSTRACTCX(pTraverseContext); if(pTraverseCX->IsPrintContext() == TRUE) { +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else CPrintCX *pPrintCX = VOID2CX(pTraverseCX, CPrintCX); if(pPrintCX->IsPrintPreview() == FALSE) { // Already a print job in progress. bRetval = FALSE; break; } +#endif } } } @@ -5251,6 +5406,9 @@ void CWinCX::FindAgain() BOOL CWinCX::DoFind(CWnd * pWnd, const char * pFindString, BOOL bMatchCase, BOOL bSearchDown, BOOL bAlertOnNotFound) { +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else int32 start_position, end_position; LO_Element * start_ele_loc = NULL; @@ -5353,6 +5511,7 @@ BOOL CWinCX::DoFind(CWnd * pWnd, const char * pFindString, BOOL bMatchCase, ::MessageBox(hBox, szLoadString(IDS_FIND_NOT_FOUND), szLoadString(AFX_IDS_APP_TITLE), MB_ICONEXCLAMATION | MB_OK); } +#endif /* MOZ_NGLAYOUT */ return FALSE; } @@ -5362,6 +5521,9 @@ BOOL CWinCX::DoFind(CWnd * pWnd, const char * pFindString, BOOL bMatchCase, // void FE_SubmitInputElement(MWContext * pContext, LO_Element * pElement) { +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else LO_FormSubmitData * submit; URL_Struct * URL_s; @@ -5398,7 +5560,7 @@ void FE_SubmitInputElement(MWContext * pContext, LO_Element * pElement) ABSTRACTCX(pContext)->GetUrl(URL_s, FO_CACHE_AND_PRESENT); LO_FreeSubmitData(submit); - +#endif /* MOZ_NGLAYOUT */ } // Say wether or not view source is allowed. @@ -5995,6 +6157,9 @@ static void mouse_over_callback(MWContext * context, LO_Element * lo_element, int32 event, void * pObj, ETEventStatus status) { +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else // keep track of what we have done already so that we // don't thrash BOOL bTextSet = FALSE; @@ -6319,7 +6484,7 @@ FINISH_MOUSE_OVER: // in all cases with the state of the buttons set correctly. MouseTimerData mt(context); FEU_MouseTimer(&mt); - +#endif /* MOZ_NGLAYOUT */ } // Function to handle the details of the cursor being over an element @@ -6328,6 +6493,9 @@ FINISH_MOUSE_OVER: void CWinCX::FireMouseOverEvent(LO_Element *pElement, int32 xVal, int32 yVal, CL_Layer *layer) { +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else mouse_over_closure * pClose = NULL; LO_Element * pDummy; BOOL bEventSent = FALSE; @@ -6555,13 +6723,16 @@ void CWinCX::FireMouseOverEvent(LO_Element *pElement, int32 xVal, int32 yVal, return; #undef CREATE_CLOSURE +#endif /* MOZ_NGLAYOUT */ } // Retrieve anchor data out of areas only (usemaps) // Use last known mouse move coordinates to do so. LO_AnchorData *CWinCX::GetAreaAnchorData(LO_Element *pElement) { LO_AnchorData *pRetval = NULL; - +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else // Make sure this is an image element. if(pElement && pElement->lo_any.type == LO_IMAGE) { // Determine coordinates in pixels with image as origin and @@ -6595,7 +6766,7 @@ LO_AnchorData *CWinCX::GetAreaAnchorData(LO_Element *pElement) { pRetval = LO_MapXYToAreaAnchor(GetDocumentContext(), pLOImage, m_cpMMove.x - Rect.left, m_cpMMove.y - Rect.top); } - +#endif /* MOZ_NGLAYOUT */ return(pRetval); } @@ -6610,6 +6781,9 @@ free_this_callback(MWContext * context, LO_Element * lo_element, int32 event, void CWinCX::FireMouseOutEvent(BOOL bClearElement, BOOL bClearAnchor, int32 xVal, int32 yVal, CL_Layer *layer) { +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else // JS needs screen coords for click events. CPoint cpScreenPoint(xVal, yVal); ClientToScreen(GetPane(), &cpScreenPoint); @@ -6685,6 +6859,7 @@ void CWinCX::FireMouseOutEvent(BOOL bClearElement, BOOL bClearAnchor, int32 xVal // Clean up, these can now be empty. m_bLastOverTextSet = FALSE; +#endif /* MOZ_NGLAYOUT */ } CFrameGlue *CWinCX::GetFrame() const @@ -6766,6 +6941,9 @@ char *CWinCX::getLastFocusAnchorStr() // check if(GetPane() && CanBlockDisplay() ) before calling invalidateElement(). void CWinCX::invalidateElement( LO_Element *pElement ) { +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else if( pElement == NULL ) return; @@ -6816,7 +6994,7 @@ void CWinCX::invalidateElement( LO_Element *pElement ) // no background erase ::InvalidateRect(GetPane(), CRect(CASTINT(Rect.left), CASTINT(Rect.top), CASTINT(Rect.right), CASTINT(Rect.bottom)), FALSE); - +#endif /* MOZ_NGLAYOUT */ } void CWinCX::SetActiveWindow() @@ -6841,6 +7019,9 @@ void CWinCX::SetActiveWindow() // for clicking on link, we don't need to call Windows' setFocus(). void CWinCX::setFormElementTabFocus( LO_Element * pFormElement ) { +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else LO_TabFocusData newTabFocus; if(pFormElement == getLastTabFocusElement() ) // clicking on the focused element. @@ -6858,7 +7039,7 @@ void CWinCX::setFormElementTabFocus( LO_Element * pFormElement ) setLastTabFocusElement( &newTabFocus, 0 ); // clicked, 0 means don't needSetFocus SetMainFrmTabFocusFlag(CMainFrame::TAB_FOCUS_IN_GRID); // I have tab focus. } - +#endif /* MOZ_NGLAYOUT */ } // text element may be fragmented in multiple lines, for Tab_focus, they @@ -6898,6 +7079,9 @@ int CWinCX::invalidateSegmentedTextElement(LO_TabFocusData *pNextTabFocus, int f // the form element is visible and has the fucos already. void CWinCX::setLastTabFocusElement( LO_TabFocusData *pNextTabFocus, int needSetFocus ) { +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else LO_Element *pElement; // both old and new element can be NULL. @@ -6987,6 +7171,7 @@ void CWinCX::setLastTabFocusElement( LO_TabFocusData *pNextTabFocus, int needSet m_isReEntry_setLastTabFocusElement = 0; return; +#endif /* MOZ_NGLAYOUT */ } // CWinCX::setLastTabFocusElement() // try to set Tab Focus in this CWinCX only. @@ -6999,7 +7184,11 @@ BOOL CWinCX::setNextTabFocusInWin( int forward ) newTabFocus.mapAreaIndex = m_lastTabFocus.mapAreaIndex; // 0 means no area newTabFocus.pAnchor = m_lastTabFocus.pAnchor ; +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else found = LO_getNextTabableElement( GetContext(), &newTabFocus, forward ); +#endif /* MOZ_NGLAYOUT */ // even new element is NULL, need to clear the old focus setLastTabFocusElement( &newTabFocus, 1 ); // key, not click, needSetFocus @@ -7083,6 +7272,9 @@ BOOL CWinCX::setTabFocusNextChild( MWContext *currentChildContext, int forward ) BOOL CWinCX::fireTabFocusElement( UINT nChar) { +#ifdef MOZ_NGLAYOUT + ASSERT(0); +#else int32 mapAreaIndex, xx, yy; lo_MapAreaRec *theArea; @@ -7118,11 +7310,15 @@ BOOL CWinCX::fireTabFocusElement( UINT nChar) return( TRUE ); } - return( FALSE ); +#endif /* MOZ_NGLAYOUT */ + return( FALSE ); } int CWinCX::getImageDrawFlag( MWContext *pContext, LO_ImageStruct *pImage, lo_MapAreaRec **ppArea, uint32 *pFlag ) { +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else LO_Element *pFocusElement; int32 lastAreaIndex; lo_MapAreaRec *theArea; @@ -7161,13 +7357,17 @@ int CWinCX::getImageDrawFlag( MWContext *pContext, LO_ImageStruct *pImage, lo_Ma *ppArea = theArea; // only the area is focused. return( 1 ); } - + +#endif /* MOZ_NGLAYOUT */ return( 0 ); } int CWinCX::setTextTabFocusDrawFlag( LO_TextStruct *pText, uint32 *pFlag ) { +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else // Visual feedback for Tab Focus is a dotted box around text or image. // For 2 Form elements, check box and radio button, the box is on // the text following the button. @@ -7233,6 +7433,7 @@ int CWinCX::setTextTabFocusDrawFlag( LO_TextStruct *pText, uint32 *pFlag ) } } +#endif /* MOZ_NGLAYOUT */ return(0); } // isTabFocusText() diff --git a/mozilla/cmd/winfe/cxwin.h b/mozilla/cmd/winfe/cxwin.h index 04daa486e79..010245d840d 100644 --- a/mozilla/cmd/winfe/cxwin.h +++ b/mozilla/cmd/winfe/cxwin.h @@ -457,8 +457,10 @@ public: virtual void DisplaySubtext(MWContext *pContext, int iLocation, LO_TextStruct *pText, int32 lStartPos, int32 lEndPos, XP_Bool clear); virtual void SetProgressBarPercent(MWContext *pContext, int32 lPercent); virtual void Progress(MWContext *pContext, const char *pMessage); +#ifndef MOZ_NGLAYOUT virtual void DisplayEdge(MWContext *pContext, int iLocation, LO_EdgeStruct *pEdge); virtual void FreeEdgeElement(MWContext *pContext, LO_EdgeStruct *pEdge); +#endif virtual void EnableClicking(MWContext *pContext); // Misc draw helpers diff --git a/mozilla/cmd/winfe/dde.cpp b/mozilla/cmd/winfe/dde.cpp index b3df5427b71..e40307b14f0 100755 --- a/mozilla/cmd/winfe/dde.cpp +++ b/mozilla/cmd/winfe/dde.cpp @@ -4342,7 +4342,11 @@ HDDEDATA CDDEWrapper::PrintURL(HSZ& hszItem) if (!port.IsEmpty()) pt = (char*)(const char*)port; +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else CPrintCX::AutomatedPrint((char*)(const char*)url, pr, dr, pt); +#endif return MakeArgs("BL", &retVal); diff --git a/mozilla/cmd/winfe/drawable.cpp b/mozilla/cmd/winfe/drawable.cpp index acfee862993..08d8ff26a1d 100644 --- a/mozilla/cmd/winfe/drawable.cpp +++ b/mozilla/cmd/winfe/drawable.cpp @@ -168,6 +168,7 @@ COnscreenDrawable::COnscreenDrawable(HDC hDC, CAbstractCX* parentContext) m_hDC = hDC; } +#ifndef MOZ_NGLAYOUT CPrinterDrawable::CPrinterDrawable(HDC hDC, int32 lLeftMargin, int32 lRightMargin, @@ -241,6 +242,7 @@ CPrinterDrawable::SetClip(FE_Region hClipRgn) else CDrawable::SetClip(FE_NULL_REGION); } +#endif /* MOZ_NGLAYOUT */ // We should get rid of this function, since it does nothing diff --git a/mozilla/cmd/winfe/feembed.cpp b/mozilla/cmd/winfe/feembed.cpp index 7b3cc7f4665..09c1d69d9b6 100755 --- a/mozilla/cmd/winfe/feembed.cpp +++ b/mozilla/cmd/winfe/feembed.cpp @@ -74,9 +74,16 @@ NPError FE_PluginGetValue(MWContext *pContext, NPEmbeddedApp *pApp, // wrapper for plugin-related FE entry point invented after EmbedUrlExit() void FE_EmbedURLExit(URL_Struct *urls, int status, MWContext *cx) { +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else EmbedUrlExit(urls, status, cx); +#endif } +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else void EmbedUrlExit(URL_Struct *pUrl, int iStatus, MWContext *pContext) { // The embedded item is finished downloading, and possibly has an error and stuff. @@ -212,6 +219,7 @@ void EmbedUrlExit(URL_Struct *pUrl, int iStatus, MWContext *pContext) // And well, hey, get rid of the url. NET_FreeURLStruct(pUrl); } +#endif /* MOZ_NGLAYOUT */ static void wfe_PluginStream(URL_Struct *pUrlData, MWContext *pContext) { diff --git a/mozilla/cmd/winfe/feembed.h b/mozilla/cmd/winfe/feembed.h index 553edf3fdde..e6b6dc35b2a 100755 --- a/mozilla/cmd/winfe/feembed.h +++ b/mozilla/cmd/winfe/feembed.h @@ -45,7 +45,9 @@ // Function declarations // extern "C" { +#ifndef MOZ_NGLAYOUT void EmbedUrlExit(URL_Struct *pUrl, int iStatus, MWContext *pContext); +#endif NET_StreamClass *EmbedStream(int iFormatOut, void *pDataObj, URL_Struct *pUrlData, MWContext *pContext); int EmbedWrite(NET_StreamClass *stream, const char *pWriteData, int32 lLength); diff --git a/mozilla/cmd/winfe/fegrid.cpp b/mozilla/cmd/winfe/fegrid.cpp index 64d32382223..429433fa8ea 100644 --- a/mozilla/cmd/winfe/fegrid.cpp +++ b/mozilla/cmd/winfe/fegrid.cpp @@ -24,6 +24,7 @@ #define VIEW_SOURCE_TARGET_WINDOW_NAME "%ViewSourceWindow" /* from ns/lib/libnet/cvcolor.c */ +#ifndef MOZ_NGLAYOUT MWContext *FE_MakeGridWindow(MWContext *pOldContext, void *hist_list, void *pHistory, int32 lX, int32 lY, int32 lWidth, int32 lHeight, char *pUrlStr, char *pWindowName, int8 iScrollType, @@ -215,7 +216,11 @@ void *FE_FreeGridWindow(MWContext *pContext, XP_Bool bSaveHistory) { } } +#ifdef MOZ_NGLAYOUT + ASSERT(0); +#else LO_DiscardDocument(pWinCX->GetContext()); +#endif XP_List *hist_list = pWinCX->GetContext()->hist.list_ptr; pWinCX->GetContext()->hist.list_ptr = NULL; @@ -246,6 +251,7 @@ void *FE_FreeGridWindow(MWContext *pContext, XP_Bool bSaveHistory) { return(pRetval); } +#endif /* MOZ_NGLAYOUT */ void FE_GetFullWindowSize(MWContext *pContext, int32 *plWidth, int32 *plHeight) { @@ -281,6 +287,7 @@ void FE_GetFullWindowSize(MWContext *pContext, int32 *plWidth, int32 *plHeight) } } +#ifndef MOZ_NGLAYOUT void FE_RestructureGridWindow(MWContext *pContext, int32 lX, int32 lY, int32 lWidth, int32 lHeight) { TRACE("FE_RestructureGridWindow(%p, %ld, %ld, %ld, %ld)\n", pContext, lX, lY, lWidth, lHeight); @@ -304,6 +311,7 @@ void FE_RestructureGridWindow(MWContext *pContext, int32 lX, int32 lY, int32 lWi // Dynamic scroll bars are handled internally, as is resize. } +#endif /* MOZ_NGLAYOUT */ void FE_SetWindowLoading(MWContext *pContext, URL_Struct *pUrl, Net_GetUrlExitFunc **ppExitRoutine) { @@ -317,6 +325,7 @@ void FE_SetWindowLoading(MWContext *pContext, URL_Struct *pUrl, Net_GetUrlExitFu ABSTRACTCX(pContext)->GetUrl(pUrl, FO_CACHE_AND_PRESENT, FALSE); } +#ifndef MOZ_NGLAYOUT void FE_GetEdgeMinSize(MWContext *pContext, int32 *pSize, Bool no_edge) { TRACE("FE_GetEdgeMinSize(%p, %p)\n", pContext, pSize); @@ -327,6 +336,7 @@ void FE_GetEdgeMinSize(MWContext *pContext, int32 *pSize, Bool no_edge) { *pSize = 5; } } +#endif /* MOZ_NGLAYOUT */ MWContext *FE_MakeBlankWindow(MWContext *pOldContext, URL_Struct *pUrl, char *pContextName) { // TRACE("FE_MakeBlankWindow(%p, %p, %s)\n", pOldContext, pUrl, pContextName); diff --git a/mozilla/cmd/winfe/fegui.cpp b/mozilla/cmd/winfe/fegui.cpp index d6e6319478c..f4a4d82cd66 100755 --- a/mozilla/cmd/winfe/fegui.cpp +++ b/mozilla/cmd/winfe/fegui.cpp @@ -3649,6 +3649,10 @@ void WFE_SetLO_ColorPtr( COLORREF crColor, LO_Color **ppLoColor ) // default document colors COLORREF WFE_LO2COLORREF( LO_Color * pLoColor, int iColorIndex ) { +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); + return 0; +#else COLORREF crColor = 0; if ( pLoColor ) { crColor = RGB( pLoColor->red, pLoColor->green, pLoColor->blue); @@ -3659,17 +3663,23 @@ COLORREF WFE_LO2COLORREF( LO_Color * pLoColor, int iColorIndex ) lo_master_colors[iColorIndex].blue); } return crColor; +#endif /* MOZ_NGLAYOUT */ } // Parse a "#FFEEAA" style color string into colors make a COLORREF BOOL WFE_ParseColor(char *pRGB, COLORREF * pCRef ) { +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); + return FALSE; +#else uint8 red, green, blue; BOOL bColorsFound = LO_ParseRGB(pRGB, &red, &green, &blue); if ( bColorsFound ) { *pCRef = RGB( red, green, blue); } return bColorsFound; +#endif /* MOZ_NGLAYOUT */ } // Helper to clear data diff --git a/mozilla/cmd/winfe/fenet.cpp b/mozilla/cmd/winfe/fenet.cpp index 3cc21817fdb..51d30a6f945 100755 --- a/mozilla/cmd/winfe/fenet.cpp +++ b/mozilla/cmd/winfe/fenet.cpp @@ -868,6 +868,10 @@ IsNullPlugin(NPFileTypeAssoc* pAssociation) // char* wfe_ConstructFilterString(int type) { +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); + return NULL; +#else NPFileTypeAssoc* pAssociation = NULL; if (type != HTM_ONLY){ // get the list of associations for all plugin MIME types @@ -997,6 +1001,7 @@ char* wfe_ConstructFilterString(int type) } return pFilterString; +#endif } #ifdef XP_WIN16 diff --git a/mozilla/cmd/winfe/feorphan.cpp b/mozilla/cmd/winfe/feorphan.cpp index 6e81c04b831..0d7d875cbf7 100644 --- a/mozilla/cmd/winfe/feorphan.cpp +++ b/mozilla/cmd/winfe/feorphan.cpp @@ -102,13 +102,13 @@ PRThread *mozilla_thread; MODULE_PRIVATE void wfe_SetLayoutColor(int type, COLORREF color) { - +#ifndef MOZ_NGLAYOUT uint8 red = GetRValue(color); uint8 green = GetGValue(color); uint8 blue = GetBValue(color); LO_SetDefaultColor(type, red, green, blue); - +#endif /* MOZ_NGLAYOUT */ } void OpenDraftExit (URL_Struct *url_struct, int/*status*/,MWContext *pContext) diff --git a/mozilla/cmd/winfe/fmabstra.cpp b/mozilla/cmd/winfe/fmabstra.cpp index 2541e23bcc1..dba23aae6ff 100755 --- a/mozilla/cmd/winfe/fmabstra.cpp +++ b/mozilla/cmd/winfe/fmabstra.cpp @@ -480,7 +480,11 @@ void CFormElement::ChangeInputElement() tog_data = (lo_FormElementToggleData *) GetElement()->element_data; if(tog_data->toggled) { // If we are supposed to be on, turn off everyone else +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else LO_FormRadioSet(GetContext()->GetDocumentContext(), GetElement()); +#endif } } } diff --git a/mozilla/cmd/winfe/framinit.cpp b/mozilla/cmd/winfe/framinit.cpp index 8953b995513..0861b154e5b 100755 --- a/mozilla/cmd/winfe/framinit.cpp +++ b/mozilla/cmd/winfe/framinit.cpp @@ -801,6 +801,9 @@ clean_up: void CMainFrame::OnDropFiles(HDROP hDropInfo) { +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else // TODO: Add your message handler code here and/or call default // @@ -869,5 +872,5 @@ void CMainFrame::OnDropFiles(HDROP hDropInfo) return; //Mocha will handle cleanup and DragFinish when it calls back in. - +#endif /* MOZ_NGLAYOUT */ } diff --git a/mozilla/cmd/winfe/gendoc.cpp b/mozilla/cmd/winfe/gendoc.cpp index 49e5e95ead7..3270511e06d 100644 --- a/mozilla/cmd/winfe/gendoc.cpp +++ b/mozilla/cmd/winfe/gendoc.cpp @@ -330,6 +330,7 @@ UINT GetChildID() return s_uChildID++; } +#ifndef MOZ_NGLAYOUT // Get the size of an embedded item. void CGenericDoc::GetEmbedSize(MWContext *pContext, LO_EmbedStruct *pLayoutData, NET_ReloadMethod Reload) { // First, see if we've already got what Layout is asking for. @@ -606,7 +607,10 @@ void CGenericDoc::GetEmbedSize(MWContext *pContext, LO_EmbedStruct *pLayoutData, } } +#endif /* MOZ_NGLAYOUT */ + +#ifndef MOZ_NGLAYOUT void CGenericDoc::FreeEmbedElement(MWContext *pContext, LO_EmbedStruct *pLayoutData) { NPEmbeddedApp* pEmbeddedApp = (NPEmbeddedApp*)pLayoutData->objTag.FE_Data; @@ -751,6 +755,7 @@ void CGenericDoc::FreeEmbedElement(MWContext *pContext, LO_EmbedStruct *pLayoutD } } +#endif /* MOZ_NGLAYOUT */ ///////////////////////////////////////////////////////////////////////////// diff --git a/mozilla/cmd/winfe/gendoc.h b/mozilla/cmd/winfe/gendoc.h index 0f5e9a9939a..eb0f3cdcbc9 100644 --- a/mozilla/cmd/winfe/gendoc.h +++ b/mozilla/cmd/winfe/gendoc.h @@ -58,8 +58,10 @@ public: // Embed handling public: +#ifndef MOZ_NGLAYOUT virtual void GetEmbedSize(MWContext *pContext, LO_EmbedStruct *pLayoutData, NET_ReloadMethod bReload); virtual void FreeEmbedElement(MWContext *pContext, LO_EmbedStruct *pLayoutData); +#endif /* MOZ_NGLAYOUT */ // OLE server handling public: diff --git a/mozilla/cmd/winfe/genview.cpp b/mozilla/cmd/winfe/genview.cpp index a294c3a7878..ee8d769cb9b 100644 --- a/mozilla/cmd/winfe/genview.cpp +++ b/mozilla/cmd/winfe/genview.cpp @@ -427,6 +427,7 @@ HBRUSH CGenericView::OnCtlColor( CDC* pDC, CWnd* pWnd, UINT nCtlColor ) // Assume the document background color COLORREF rgbCurrentColor = GetContext()->m_rgbBackgroundColor; +#ifndef MOZ_NGLAYOUT // We need to use the background associated with the form element if there is one // (e.g. a form element in a table cell with a specified background color) if (pWnd->IsKindOf(RUNTIME_CLASS(CNetscapeButton))) { @@ -435,6 +436,7 @@ HBRUSH CGenericView::OnCtlColor( CDC* pDC, CWnd* pWnd, UINT nCtlColor ) if (pElement && pElement->text_attr && pElement->text_attr->no_background == FALSE) rgbCurrentColor = RGB(pElement->text_attr->bg.red, pElement->text_attr->bg.green, pElement->text_attr->bg.blue); } +#endif if(m_hCtlBrush == NULL) { // was no brush, just make a new one @@ -664,7 +666,11 @@ void CGenericView::OnFilePrint() // future, we should pass in at least the printer chosen by the user. if(GetFrame()->GetActiveWinContext()->ContainsFullPagePlugin()) { // there can be only one plugin if it is full page +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else NPL_Print(GetFrame()->GetActiveWinContext()->GetContext()->pluginList, NULL); +#endif return; } @@ -902,7 +908,11 @@ void CGenericView::OnUpdateEditPaste(CCmdUI* pCmdUI) void CGenericView::OnSelectAll() { +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else LO_SelectAll(GetContext()->GetDocumentContext()); +#endif } //#ifndef NO_TAB_NAVIGATION @@ -1151,6 +1161,7 @@ void CGenericView::OnUpdateViewFrameSource(CCmdUI* pCmdUI) void CGenericView::OnSetFocus(CWnd* pOldWnd) { +#ifndef MOZ_NGLAYOUT CView::OnSetFocus(pOldWnd); if(GetContext() && !GetContext()->IsDestroyed() && GetContext()->GetContext()) { // send the event to libmocha --- do any further processing @@ -1162,10 +1173,12 @@ void CGenericView::OnSetFocus(CWnd* pOldWnd) ET_SendEvent(GetContext()->GetContext(), NULL, event, NULL, this); } +#endif /* MOZ_NGLAYOUT */ } void CGenericView::OnKillFocus(CWnd* pNewWnd) { +#ifndef MOZ_NGLAYOUT CView::OnKillFocus(pNewWnd); if(GetContext() && !GetContext()->IsDestroyed() && GetContext()->GetContext()) { // send the event to libmocha --- do any further processing @@ -1177,5 +1190,6 @@ void CGenericView::OnKillFocus(CWnd* pNewWnd) ET_SendEvent(GetContext()->GetContext(), NULL, event, NULL, this); } +#endif /* MOZ_NGLAYOUT */ } diff --git a/mozilla/cmd/winfe/intlwin.cpp b/mozilla/cmd/winfe/intlwin.cpp index 32315126b42..a2eecf7e13e 100755 --- a/mozilla/cmd/winfe/intlwin.cpp +++ b/mozilla/cmd/winfe/intlwin.cpp @@ -553,8 +553,10 @@ int INTL_DocCharSetID(MWContext *context) return theApp.m_iCSID; else if (doccsid = INTL_GetCSIDocCSID(LO_GetDocumentCharacterSetInfo(context))) return doccsid; +#ifndef MOZ_NGLAYOUT else if (context->type == MWContextPrint && ((CPrintCX *)((context)->fe.cx))->m_iCSID) return ((CPrintCX *)((context)->fe.cx))->m_iCSID; +#endif else if (GetFrame(context) && GetFrame(context)->m_iCSID) return GetFrame(context)->m_iCSID; else @@ -572,8 +574,10 @@ extern int16 INTL_DefaultDocCharSetID(MWContext * context) return theApp.m_iCSID; else if (doccsid = INTL_GetCSIDocCSID(LO_GetDocumentCharacterSetInfo(context))) return doccsid; +#ifndef MOZ_NGLAYOUT else if (context->type == MWContextPrint && ((CPrintCX *)((context)->fe.cx))->m_iCSID) return ((CPrintCX *)((context)->fe.cx))->m_iCSID; +#endif else if (context->type == MWContextSaveToDisk && ((CSaveCX*)((context)->fe.cx))->m_iCSID) return ((CSaveCX *)((context)->fe.cx))->m_iCSID; else if (GetFrame(context) && ((CMainFrame *)GetFrame(context))->m_iCSID) @@ -586,8 +590,10 @@ extern "C" uint16 FE_DefaultDocCharSetID(MWContext * context) { if (context == NULL) return theApp.m_iCSID; +#ifndef MOZ_NGLAYOUT else if (context->type == MWContextPrint && ((CPrintCX *)((context)->fe.cx))->m_iCSID) return ((CPrintCX *)((context)->fe.cx))->m_iCSID; +#endif else if (context->type == MWContextSaveToDisk && ((CSaveCX*)((context)->fe.cx))->m_iCSID) return ((CSaveCX *)((context)->fe.cx))->m_iCSID; else if (GetFrame(context) && ((CMainFrame *)GetFrame(context))->m_iCSID) @@ -812,6 +818,10 @@ BOOL CIntlWin::UseVirtualFont() } BOOL CIntlWin::GetTextExtentPoint(int wincsid, HDC hDC, LPCSTR pString, int iLength, LPSIZE lpSize) { +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); + return FALSE; +#else if(0 == iLength) { lpSize->cx = 0; @@ -846,10 +856,15 @@ BOOL CIntlWin::GetTextExtentPoint(int wincsid, HDC hDC, LPCSTR pString, int iLen #else return::GetTextExtentPoint(hDC, pString, iLength, lpSize); #endif +#endif /* MOZ_NGLAYOUT */ } BOOL CIntlWin::GetTextExtentPointWithCyaFont(CyaFont *theNSFont,int wincsid, HDC hDC, LPCSTR pString, int iLength, LPSIZE lpSize) { +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); + return FALSE; +#else if(0 == iLength) { lpSize->cx = 0; @@ -886,6 +901,7 @@ BOOL CIntlWin::GetTextExtentPointWithCyaFont(CyaFont *theNSFont,int wincsid, HDC // #else // return::GetTextExtentPoint(hDC, pString, iLength, lpSize); // #endif +#endif /* MOZ_NGLAYOUT */ } CSize CIntlWin::GetTextExtent(int16 wincsid, HDC pDC, LPCTSTR pString, int iLength) @@ -898,6 +914,10 @@ CSize CIntlWin::GetTextExtent(int16 wincsid, HDC pDC, LPCTSTR pString, int iLeng BOOL CIntlWin::TextOut(int16 wincsid, HDC hDC, int nXStart, int nYStart, LPCSTR lpString,int iLength) { +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); + return FALSE; +#else if(0 == iLength) return TRUE; wincsid = INTL_DocToWinCharSetID(wincsid) & ~ CS_AUTO; @@ -922,12 +942,17 @@ BOOL CIntlWin::TextOut(int16 wincsid, HDC hDC, int nXStart, int nYStart, LPCSTR return CIntlUnicodeVirtualFontStrategy::TextOut(hDC, nXStart, nYStart, lpString, iLength); } return ::TextOut(hDC, nXStart, nYStart, lpString, iLength); // The final fallback +#endif /* MOZ_NGLAYOUT */ } //based on BOOL CIntlWin::TextOut(int16 wincsid, HDC hDC, int nXStart, int nYStart, LPCSTR lpString,int iLength) BOOL CIntlWin::TextOutWithCyaFont(CyaFont *theNSFont, int16 wincsid, HDC hDC, int nXStart, int nYStart, LPCSTR lpString,int iLength) { +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); + return FALSE; +#else if(0 == iLength) return TRUE; #ifdef XP_WIN32 @@ -960,11 +985,16 @@ BOOL CIntlWin::TextOutWithCyaFont(CyaFont *theNSFont, int16 wincsid, HDC hDC, return(TRUE); else return(FALSE); +#endif /* MOZ_NGLAYOUT */ } // *** Fix Me: Need to change to support UTF8 BOOL CIntlWin::ExtTextOut(int16 wincsid, HDC pDC, int x, int y, UINT nOptions, LPCRECT lpRect, LPCSTR lpszString, UINT nCount, LPINT lpDxWidths) { +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); + return FALSE; +#else if(0 == nCount) return TRUE; wincsid = INTL_DocToWinCharSetID(wincsid) & ~ CS_AUTO; @@ -994,11 +1024,16 @@ BOOL CIntlWin::ExtTextOut(int16 wincsid, HDC pDC, int x, int y, UINT nOptions, L pDC, x, y, lpszString, nCount); } return ::ExtTextOut(pDC, x, y, nOptions, lpRect, lpszString, nCount, lpDxWidths); +#endif /* MOZ_NGLAYOUT */ } #ifdef XP_WIN32 int CIntlWin::DrawTextEx(int16 wincsid, HDC hdc, LPSTR lpchText, int cchText,LPRECT lprc,UINT dwDTFormat,LPDRAWTEXTPARAMS lpDTParams) { +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); + return 0; +#else wincsid = INTL_DocToWinCharSetID(wincsid) & ~ CS_AUTO; int iRetval; @@ -1050,11 +1085,16 @@ int CIntlWin::DrawTextEx(int16 wincsid, HDC hdc, LPSTR lpchText, int cchText,LPR iRetval = ::DrawTextEx(hdc, lpchText, cchText, lprc, dwDTFormat, lpDTParams); } return iRetval; +#endif /* MOZ_NGLAYOUT */ } #endif int CIntlWin::DrawText(int16 wincsid, HDC hdc, LPSTR lpchText, int cchText,LPRECT lprc,UINT dwDTFormat) { +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); + return 0; +#else #ifdef _WIN32 return CIntlWin::DrawTextEx( wincsid, hdc, lpchText, cchText, lprc, dwDTFormat, NULL); #else @@ -1091,6 +1131,7 @@ int CIntlWin::DrawText(int16 wincsid, HDC hdc, LPSTR lpchText, int cchText,LPREC } return ::DrawText(hdc, lpchText, cchText, lprc, dwDTFormat ); #endif +#endif /* MOZ_NGLAYOUT */ } extern "C" void *FE_GetSingleByteTable(int16 from_csid, int16 to_csid, int resourceid) diff --git a/mozilla/cmd/winfe/logindg.cpp b/mozilla/cmd/winfe/logindg.cpp index d2908e2d8e6..1da6e7a2e99 100644 --- a/mozilla/cmd/winfe/logindg.cpp +++ b/mozilla/cmd/winfe/logindg.cpp @@ -1198,10 +1198,12 @@ Bool login_ProfileSelectedCompleteTheLogin(const char * szProfileName, const cha csTmp += "\\user.js"; PREF_ReadUserJSFile((char *)(const char *)csTmp); - // read in the users optional JS HTML Hook file - csTmp = theApp.m_UserDirectory; - csTmp += "\\hook.js"; - HK_ReadHookFile((char *)(const char *)csTmp); +#ifndef MOZ_NGLAYOUT + // read in the users optional JS HTML Hook file + csTmp = theApp.m_UserDirectory; + csTmp += "\\hook.js"; + HK_ReadHookFile((char *)(const char *)csTmp); +#endif /* MOZ_NGLAYOUT */ char aPath[_MAX_PATH]; ::GetModuleFileName(theApp.m_hInstance, aPath, _MAX_PATH); diff --git a/mozilla/cmd/winfe/mkfiles32/mozilla.mak b/mozilla/cmd/winfe/mkfiles32/mozilla.mak index 652087f2fe6..a3923cc3d44 100644 --- a/mozilla/cmd/winfe/mkfiles32/mozilla.mak +++ b/mozilla/cmd/winfe/mkfiles32/mozilla.mak @@ -360,7 +360,9 @@ LINK_LIBS= \ !ifdef MOZ_OJI $(DIST)\lib\oji32.lib \ !endif +!ifndef MOZ_NGLAYOUT $(DIST)\lib\hook.lib \ +!endif #!if defined(EDITOR) !ifdef JAVA_OR_OJI $(DIST)\lib\edtplug.lib \ @@ -393,11 +395,15 @@ LINK_LIBS= \ !ifdef JAVA_OR_OJI # XXX remove later $(DIST)\lib\jmc.lib \ !endif +!ifndef MOZ_NGLAYOUT $(DIST)\lib\font.lib \ +!endif $(DIST)\lib\rdf32.lib \ $(DIST)\lib\xml.lib \ $(OUTDIR)\appicon.res \ +!ifndef MOZ_NGLAYOUT $(DIST)\lib\winfont.lib \ +!endif $(DIST)\lib\abouturl.lib \ $(DIST)\lib\dataurl.lib \ $(DIST)\lib\fileurl.lib \ @@ -439,6 +445,12 @@ LINK_LIBS= \ $(DIST)\lib\jpeg$(MOZ_BITS)$(VERSION_NUMBER).lib \ $(DIST)\lib\dbm$(MOZ_BITS).lib \ !endif +!if defined(MOZ_NGLAYOUT) + $(NGLAYOUT_DIST)\lib\raptorbase.lib \ + $(NGLAYOUT_DIST)\lib\raptorgfx.lib \ + $(NGLAYOUT_DIST)\lib\raptorhtml.lib \ + $(NGLAYOUT_DIST)\lib\raptorweb.lib \ +!endif !if "$(WINOS)" == "WIN95" $(DIST)\lib\xpcom$(MOZ_BITS).lib !else @@ -587,6 +599,7 @@ CDISTINCLUDES2= \ /I$(XPDIST)\public\zlib \ /I$(XPDIST)\public\httpurl \ /I$(XPDIST)\public\netcache \ + /I$(XPDIST)\public\netlib \ /I$(XPDIST)\public\network \ /I$(XPDIST)\public\netcnvts\ /I$(XPDIST)\public\util @@ -614,12 +627,14 @@ CDISTINCLUDES3= \ /I$(DIST)\include \ /I$(XPDIST)\public\img \ /I$(XPDIST)\public\jtools \ -!else !endif /I$(XPDIST)\public \ /I$(XPDIST)\public\coreincl \ !ifndef NO_SECURITY /I$(XPDIST)\public\jar \ +!endif +!if defined(MOZ_NGLAYOUT) + /I$(XPDIST)\public\raptor \ !endif /I$(XPDIST)\public\util @@ -710,6 +725,7 @@ $(OUTDIR)\mozilla.dep: $(DEPTH)\cmd\winfe\mkfiles32\mozilla.mak !ENDIF << $(DEPTH)\cmd\winfe\mkfiles32\makedep.exe @$(PROD)$(VERSTR).dep -F << +!ifndef MOZ_NGLAYOUT $(DEPTH)\lib\liblayer\src\cl_comp.c $(DEPTH)\lib\liblayer\src\cl_drwbl.c $(DEPTH)\lib\liblayer\src\cl_layer.c @@ -766,6 +782,7 @@ $(OUTDIR)\mozilla.dep: $(DEPTH)\cmd\winfe\mkfiles32\mozilla.mak $(DEPTH)\lib\layout\ptinpoly.c $(DEPTH)\lib\layout\layrelay.c $(DEPTH)\lib\layout\laytrav.c +!endif !ifdef MOZ_MAIL_NEWS $(DEPTH)\lib\libaddr\line64.c @@ -883,6 +900,7 @@ $(OUTDIR)\mozilla.dep: $(DEPTH)\cmd\winfe\mkfiles32\mozilla.mak $(DEPTH)\lib\libmisc\shist.c $(DEPTH)\lib\libmisc\undo.c +!ifndef MOZ_NGLAYOUT $(DEPTH)\lib\libmocha\et_mocha.c $(DEPTH)\lib\libmocha\et_moz.c $(DEPTH)\lib\libmocha\lm_applt.c @@ -912,6 +930,7 @@ $(OUTDIR)\mozilla.dep: $(DEPTH)\cmd\winfe\mkfiles32\mozilla.mak $(DEPTH)\lib\libmocha\lm_jsd.c !endif !endif +!endif !ifdef MOZ_MAIL_NEWS $(DEPTH)\lib\libmsg\ad_strm.c @@ -1049,6 +1068,7 @@ $(OUTDIR)\mozilla.dep: $(DEPTH)\cmd\winfe\mkfiles32\mozilla.mak $(DEPTH)\lib\libneo\thrnspr.cpp !endif +!ifndef MOZ_NGLAYOUT $(DEPTH)\lib\libparse\pa_amp.c $(DEPTH)\lib\libparse\pa_hash.c $(DEPTH)\lib\libparse\pa_hook.c @@ -1062,6 +1082,7 @@ $(OUTDIR)\mozilla.dep: $(DEPTH)\cmd\winfe\mkfiles32\mozilla.mak $(DEPTH)\lib\libstyle\jssrules.c $(DEPTH)\lib\libstyle\stystack.c $(DEPTH)\lib\libstyle\stystruc.c +!endif $(DEPTH)\modules\libutil\src\obs.c !if "$(MOZ_BITS)"=="16" @@ -1085,6 +1106,7 @@ $(OUTDIR)\mozilla.dep: $(DEPTH)\cmd\winfe\mkfiles32\mozilla.mak !endif !endif +!ifndef MOZ_NGLAYOUT $(DEPTH)\lib\plugin\npassoc.c $(DEPTH)\lib\plugin\npglue.cpp $(DEPTH)\lib\plugin\npwplat.cpp @@ -1094,6 +1116,7 @@ $(OUTDIR)\mozilla.dep: $(DEPTH)\cmd\winfe\mkfiles32\mozilla.mak $(DEPTH)\lib\xlate\stubs.c $(DEPTH)\lib\xlate\tblprint.c $(DEPTH)\lib\xlate\text.c +!endif $(DEPTH)\lib\xp\allxpstr.c $(DEPTH)\lib\xp\xp_alloc.c @@ -1202,16 +1225,20 @@ $(OUTDIR)\mozilla.dep: $(DEPTH)\cmd\winfe\mkfiles32\mozilla.mak $(DEPTH)\cmd\winfe\animecho.cpp $(DEPTH)\cmd\winfe\askmedlg.cpp $(DEPTH)\cmd\winfe\authdll.cpp +!ifndef MOZ_NGLAYOUT $(DEPTH)\cmd\winfe\button.cpp +!endif $(DEPTH)\cmd\winfe\cfe.cpp $(DEPTH)\cmd\winfe\cmdparse.cpp $(DEPTH)\cmd\winfe\cntritem.cpp $(DEPTH)\cmd\winfe\confhook.cpp $(DEPTH)\cmd\winfe\csttlbr2.cpp $(DEPTH)\cmd\winfe\custom.cpp +!ifndef MOZ_NGLAYOUT $(DEPTH)\cmd\winfe\cuvfm.cpp $(DEPTH)\cmd\winfe\cuvfs.cpp $(DEPTH)\cmd\winfe\cvffc.cpp +!endif $(DEPTH)\cmd\winfe\cxabstra.cpp $(DEPTH)\cmd\winfe\cxdc.cpp $(DEPTH)\cmd\winfe\cxdc1.cpp @@ -1220,8 +1247,10 @@ $(OUTDIR)\mozilla.dep: $(DEPTH)\cmd\winfe\mkfiles32\mozilla.mak $(DEPTH)\cmd\winfe\cxmeta.cpp $(DEPTH)\cmd\winfe\cxnet1.cpp $(DEPTH)\cmd\winfe\cxpane.cpp +!ifndef MOZ_NGLAYOUT $(DEPTH)\cmd\winfe\cxprint.cpp $(DEPTH)\cmd\winfe\cxprndlg.cpp +!endif $(DEPTH)\cmd\winfe\cxsave.cpp $(DEPTH)\cmd\winfe\cxstubs.cpp $(DEPTH)\cmd\winfe\cxwin.cpp @@ -1233,12 +1262,16 @@ $(OUTDIR)\mozilla.dep: $(DEPTH)\cmd\winfe\mkfiles32\mozilla.mak $(DEPTH)\cmd\winfe\dialog.cpp $(DEPTH)\cmd\winfe\display.cpp $(DEPTH)\cmd\winfe\dragbar.cpp +!ifndef MOZ_NGLAYOUT $(DEPTH)\cmd\winfe\drawable.cpp +!endif $(DEPTH)\cmd\winfe\dropmenu.cpp $(DEPTH)\cmd\winfe\edcombtb.cpp $(DEPTH)\cmd\winfe\extgen.cpp $(DEPTH)\cmd\winfe\extview.cpp +!ifndef MOZ_NGLAYOUT $(DEPTH)\cmd\winfe\feembed.cpp +!endif $(DEPTH)\cmd\winfe\fegrid.cpp $(DEPTH)\cmd\winfe\fegui.cpp $(DEPTH)\cmd\winfe\feimage.cpp @@ -1250,6 +1283,7 @@ $(OUTDIR)\mozilla.dep: $(DEPTH)\cmd\winfe\mkfiles32\mozilla.mak $(DEPTH)\cmd\winfe\feselect.cpp $(DEPTH)\cmd\winfe\feutil.cpp $(DEPTH)\cmd\winfe\findrepl.cpp +!ifndef MOZ_NGLAYOUT $(DEPTH)\cmd\winfe\fmabstra.cpp $(DEPTH)\cmd\winfe\fmbutton.cpp $(DEPTH)\cmd\winfe\fmfile.cpp @@ -1259,6 +1293,7 @@ $(OUTDIR)\mozilla.dep: $(DEPTH)\cmd\winfe\mkfiles32\mozilla.mak $(DEPTH)\cmd\winfe\fmselone.cpp $(DEPTH)\cmd\winfe\fmtext.cpp $(DEPTH)\cmd\winfe\fmtxarea.cpp +!endif $(DEPTH)\cmd\winfe\frameglu.cpp $(DEPTH)\cmd\winfe\framinit.cpp $(DEPTH)\cmd\winfe\genchrom.cpp @@ -1268,7 +1303,9 @@ $(OUTDIR)\mozilla.dep: $(DEPTH)\cmd\winfe\mkfiles32\mozilla.mak $(DEPTH)\cmd\winfe\genfram2.cpp $(DEPTH)\cmd\winfe\prefs.cpp $(DEPTH)\cmd\winfe\genview.cpp +!ifndef MOZ_NGLAYOUT $(DEPTH)\cmd\winfe\gridedge.cpp +!endif $(DEPTH)\cmd\winfe\helpers.cpp $(DEPTH)\cmd\winfe\hiddenfr.cpp $(DEPTH)\cmd\winfe\histbld.cpp @@ -1281,7 +1318,9 @@ $(OUTDIR)\mozilla.dep: $(DEPTH)\cmd\winfe\mkfiles32\mozilla.mak $(DEPTH)\cmd\winfe\lastacti.cpp $(DEPTH)\cmd\winfe\logindg.cpp $(DEPTH)\cmd\winfe\mainfrm.cpp +!ifndef MOZ_NGLAYOUT $(DEPTH)\cmd\winfe\medit.cpp +!endif $(DEPTH)\cmd\winfe\mozock.cpp $(DEPTH)\cmd\winfe\mucwiz.cpp $(DEPTH)\cmd\winfe\mucproc.cpp @@ -1292,14 +1331,19 @@ $(OUTDIR)\mozilla.dep: $(DEPTH)\cmd\winfe\mkfiles32\mozilla.mak $(DEPTH)\cmd\winfe\navigate.cpp $(DEPTH)\cmd\winfe\ncapiurl.cpp $(DEPTH)\cmd\winfe\nethelp.cpp + $(DEPTH)\cmd\winfe\nglglue.cpp $(DEPTH)\cmd\winfe\mozilla.cpp $(DEPTH)\cmd\winfe\nsapp.cpp $(DEPTH)\cmd\winfe\netsdoc.cpp +!ifndef MOZ_NGLAYOUT $(DEPTH)\cmd\winfe\nsfont.cpp $(DEPTH)\cmd\winfe\netsprnt.cpp +!endif $(DEPTH)\cmd\winfe\netsvw.cpp $(DEPTH)\cmd\winfe\nsshell.cpp +!ifndef MOZ_NGLAYOUT $(DEPTH)\cmd\winfe\odctrl.cpp +!endif $(DEPTH)\cmd\winfe\olectc.cpp $(DEPTH)\cmd\winfe\olehelp.cpp $(DEPTH)\cmd\winfe\oleprot1.cpp @@ -1329,7 +1373,9 @@ $(OUTDIR)\mozilla.dep: $(DEPTH)\cmd\winfe\mkfiles32\mozilla.mak $(DEPTH)\cmd\winfe\spiwrap.c $(DEPTH)\cmd\winfe\srvritem.cpp $(DEPTH)\cmd\winfe\statbar.cpp +!ifndef MOZ_NGLAYOUT $(DEPTH)\cmd\winfe\stshfont.cpp +!endif !ifdef MOZ_LOC_INDEP $(DEPTH)\cmd\winfe\stshli.cpp !endif @@ -1808,6 +1854,51 @@ install: \ $(OUTDIR)\spellchk\$(SPELLCHK_DLL) \ !ENDIF !endif +### Copy NGLayout DLLs and resources +!ifdef MOZ_NGLAYOUT +!IF EXIST($(NGLAYOUT_DIST)\bin\raptorbase.dll) + $(OUTDIR)\raptorbase.dll \ +!ENDIF +!IF EXIST($(NGLAYOUT_DIST)\bin\raptorhtml.dll) + $(OUTDIR)\raptorhtml.dll \ +!ENDIF +!IF EXIST($(NGLAYOUT_DIST)\bin\raptorgfx.dll) + $(OUTDIR)\raptorgfx.dll \ +!ENDIF +!IF EXIST($(NGLAYOUT_DIST)\bin\raptorweb.dll) + $(OUTDIR)\raptorweb.dll \ +!ENDIF +!IF EXIST($(NGLAYOUT_DIST)\bin\raptorhtmlpars.dll) + $(OUTDIR)\raptorhtmlpars.dll \ +!ENDIF +!IF EXIST($(NGLAYOUT_DIST)\bin\raptorhtmlpars.dll) + $(OUTDIR)\raptorwidget.dll \ +!ENDIF +!IF EXIST($(NGLAYOUT_DIST)\bin\raptorhtmlpars.dll) + $(OUTDIR)\raptorgfxwin.dll \ +!ENDIF +!IF EXIST($(NGLAYOUT_DIST)\bin\raptorhtmlpars.dll) + $(OUTDIR)\raptorview.dll \ +!ENDIF +!IF EXIST($(NGLAYOUT_DIST)\bin\jsdom.dll) + $(OUTDIR)\jsdom.dll \ +!ENDIF +!IF EXIST($(NGLAYOUT_DIST)\bin\img$(MOZ_BITS)$(VERSION_NUMBER).dll) + $(OUTDIR)\img$(MOZ_BITS)$(VERSION_NUMBER).dll \ +!ENDIF +!IF EXIST($(NGLAYOUT_DIST)\bin\netlib.dll) + $(OUTDIR)\netlib.dll \ +!ENDIF +!IF EXIST($(NGLAYOUT_DIST)\bin\res) + $(OUTDIR)\res \ +!ENDIF +!else +### Need image lib dll for non-NGLayout build +!IF EXIST($(DIST)\bin\img$(MOZ_BITS)$(VERSION_NUMBER).dll) + $(OUTDIR)\img$(MOZ_BITS)$(VERSION_NUMBER).dll \ +!ENDIF +!endif +### End NGLayout DLLs !ifdef EDITOR !IF EXIST($(SPELLCHK_DATA)\pen4s324.dat) $(OUTDIR)\spellchk\pen4s324.dat \ @@ -2129,6 +2220,36 @@ $(OUTDIR)\mnrc$(MOZ_BITS).dll: $(DIST)\bin\mnrc$(MOZ_BITS).dll $(OUTDIR)\xpstrdll.dll: $(DIST)\bin\xpstrdll.dll @IF EXIST $(DIST)\bin\$(@F) copy $(DIST)\bin\$(@F) $@ +### Copy NGLayout dlls and resources +!ifdef MOZ_NGLAYOUT +$(OUTDIR)\raptorbase.dll: $(NGLAYOUT_DIST)\bin\raptorbase.dll + @IF EXIST $(NGLAYOUT_DIST)\bin\$(@F) copy $(NGLAYOUT_DIST)\bin\$(@F) $@ +$(OUTDIR)\raptorhtml.dll: $(NGLAYOUT_DIST)\bin\raptorhtml.dll + @IF EXIST $(NGLAYOUT_DIST)\bin\$(@F) copy $(NGLAYOUT_DIST)\bin\$(@F) $@ +$(OUTDIR)\raptorgfx.dll: $(NGLAYOUT_DIST)\bin\raptorgfx.dll + @IF EXIST $(NGLAYOUT_DIST)\bin\$(@F) copy $(NGLAYOUT_DIST)\bin\$(@F) $@ +$(OUTDIR)\raptorweb.dll: $(NGLAYOUT_DIST)\bin\raptorweb.dll + @IF EXIST $(NGLAYOUT_DIST)\bin\$(@F) copy $(NGLAYOUT_DIST)\bin\$(@F) $@ +$(OUTDIR)\raptorhtmlpars.dll: $(NGLAYOUT_DIST)\bin\raptorhtmlpars.dll + @IF EXIST $(NGLAYOUT_DIST)\bin\$(@F) copy $(NGLAYOUT_DIST)\bin\$(@F) $@ +$(OUTDIR)\raptorwidget.dll: $(NGLAYOUT_DIST)\bin\raptorwidget.dll + @IF EXIST $(NGLAYOUT_DIST)\bin\$(@F) copy $(NGLAYOUT_DIST)\bin\$(@F) $@ +$(OUTDIR)\raptorgfxwin.dll: $(NGLAYOUT_DIST)\bin\raptorgfxwin.dll + @IF EXIST $(NGLAYOUT_DIST)\bin\$(@F) copy $(NGLAYOUT_DIST)\bin\$(@F) $@ +$(OUTDIR)\raptorview.dll: $(NGLAYOUT_DIST)\bin\raptorview.dll + @IF EXIST $(NGLAYOUT_DIST)\bin\$(@F) copy $(NGLAYOUT_DIST)\bin\$(@F) $@ +$(OUTDIR)\jsdom.dll: $(NGLAYOUT_DIST)\bin\jsdom.dll + @IF EXIST $(NGLAYOUT_DIST)\bin\$(@F) copy $(NGLAYOUT_DIST)\bin\$(@F) $@ +$(OUTDIR)\img$(MOZ_BITS)$(VERSION_NUMBER).dll: $(NGLAYOUT_DIST)\bin\img$(MOZ_BITS)$(VERSION_NUMBER).dll + @IF EXIST $(NGLAYOUT_DIST)\bin\$(@F) copy $(NGLAYOUT_DIST)\bin\$(@F) $@ +$(OUTDIR)\netlib.dll: $(NGLAYOUT_DIST)\bin\netlib.dll + @IF EXIST $(NGLAYOUT_DIST)\bin\$(@F) copy $(NGLAYOUT_DIST)\bin\$(@F) $@ +$(OUTDIR)\res: $(NGLAYOUT_DIST)\bin\res + -mkdir $(OUTDIR)\res + -xcopy /s $(NGLAYOUT_DIST)\bin\res $(OUTDIR)\res + @IF EXIST $(NGLAYOUT_DIST)\bin\$(@F) copy $(NGLAYOUT_DIST)\bin\$(@F) $@ +!endif + $(OUTDIR)\spellchk\$(SPELLCHK_DLL): $(DIST)\bin\$(SPELLCHK_DLL) @IF NOT EXIST "$(OUTDIR)\spellchk/$(NULL)" mkdir "$(OUTDIR)\spellchk" @IF EXIST $(DIST)\bin\$(SPELLCHK_DLL) copy $(DIST)\bin\$(SPELLCHK_DLL) $(OUTDIR)\spellchk\$(SPELLCHK_DLL) @@ -2331,11 +2452,15 @@ BUILD_SOURCE: $(OBJ_FILES) $(DIST)\lib\crypto.lib + $(DIST)\lib\secutil.lib + $(DIST)\lib\hash.lib + +!ifndef MOZ_NGLAYOUT $(DIST)\lib\font.lib + $(DIST)\lib\winfont.lib + +!endif $(DIST)\lib\prefuuid.lib + $(DIST)\lib\htmldg16.lib + +!ifndef MOZ_NGLAYOUT $(DIST)\lib\hook.lib + +!endif $(DIST)\lib\png.lib + $(DIST)\lib\sched16.lib + $(DIST)\lib\libreg16.lib + diff --git a/mozilla/cmd/winfe/mozilla.cpp b/mozilla/cmd/winfe/mozilla.cpp index ee7a842214c..fb2cf26062a 100644 --- a/mozilla/cmd/winfe/mozilla.cpp +++ b/mozilla/cmd/winfe/mozilla.cpp @@ -91,6 +91,15 @@ BOOL bIsGold = FALSE; // Full Circle stuff - see http://www.fullsoft.com for more info #include "fullsoft.h" +#ifdef MOZ_NGLAYOUT +#include "nsISupports.h" +#include "nsRepository.h" +#include "nsWidgetsCID.h" +#include "nsGfxCIID.h" +#include "nsViewsCID.h" +#endif + + #if defined(OJI) || defined(JAVA) // don't include java.h here because the Win16 compiler won't be able to handle this file void WFE_LJ_StartupJava(void); @@ -207,10 +216,10 @@ static const CLSID BASED_CODE clsid = CNetscapeApp NEAR theApp; -//#ifdef MOZ_NETSCAPE_FONT_MODULE +#ifndef MOZ_NGLAYOUT // the only one object of CNetscapeFontModule CNetscapeFontModule theGlobalNSFont; -//#endif // MOZ_NETSCAPE_FONT_MODULE +#endif /* MOZ_NGLAYOUT */ NET_StreamClass *null_stream(FO_Present_Types format_out, void *newshack, URL_Struct *urls, MWContext *cx) { // Stream which does nothing. @@ -242,6 +251,61 @@ BOOL CNetscapeApp::InitApplication() return TRUE; } +#ifdef MOZ_NGLAYOUT +#define WIDGET_DLL "raptorwidget.dll" +#define GFXWIN_DLL "raptorgfxwin.dll" +#define VIEW_DLL "raptorview.dll" + +static void InitializeNGLayout() { + NS_DEFINE_IID(kCWindowIID, NS_WINDOW_CID); + NS_DEFINE_IID(kCScrollbarIID, NS_VERTSCROLLBAR_CID); + NS_DEFINE_IID(kCHScrollbarIID, NS_HORZSCROLLBAR_CID); + NS_DEFINE_IID(kCButtonIID, NS_BUTTON_CID); + NS_DEFINE_IID(kCComboBoxCID, NS_COMBOBOX_CID); + NS_DEFINE_IID(kCFileWidgetCID, NS_FILEWIDGET_CID); + NS_DEFINE_IID(kCListBoxCID, NS_LISTBOX_CID); + NS_DEFINE_IID(kCRadioButtonCID, NS_RADIOBUTTON_CID); + NS_DEFINE_IID(kCTextAreaCID, NS_TEXTAREA_CID); + NS_DEFINE_IID(kCTextFieldCID, NS_TEXTFIELD_CID); + NS_DEFINE_IID(kCCheckButtonIID, NS_CHECKBUTTON_CID); + NS_DEFINE_IID(kCChildIID, NS_CHILD_CID); + + NSRepository::RegisterFactory(kCWindowIID, WIDGET_DLL, PR_FALSE, PR_FALSE); + NSRepository::RegisterFactory(kCScrollbarIID, WIDGET_DLL, PR_FALSE, PR_FALSE); + NSRepository::RegisterFactory(kCHScrollbarIID, WIDGET_DLL, PR_FALSE, PR_FALSE); + NSRepository::RegisterFactory(kCButtonIID, WIDGET_DLL, PR_FALSE, PR_FALSE); + NSRepository::RegisterFactory(kCComboBoxCID, WIDGET_DLL, PR_FALSE, PR_FALSE); + NSRepository::RegisterFactory(kCFileWidgetCID, WIDGET_DLL, PR_FALSE, PR_FALSE); + NSRepository::RegisterFactory(kCListBoxCID, WIDGET_DLL, PR_FALSE, PR_FALSE); + NSRepository::RegisterFactory(kCRadioButtonCID, WIDGET_DLL, PR_FALSE, PR_FALSE); + NSRepository::RegisterFactory(kCTextAreaCID, WIDGET_DLL, PR_FALSE, PR_FALSE); + NSRepository::RegisterFactory(kCTextFieldCID, WIDGET_DLL, PR_FALSE, PR_FALSE); + NSRepository::RegisterFactory(kCCheckButtonIID, WIDGET_DLL, PR_FALSE, PR_FALSE); + NSRepository::RegisterFactory(kCChildIID, WIDGET_DLL, PR_FALSE, PR_FALSE); + + NS_DEFINE_IID(kCRenderingContextIID, NS_RENDERING_CONTEXT_CID); + NS_DEFINE_IID(kCDeviceContextIID, NS_DEVICE_CONTEXT_CID); + NS_DEFINE_IID(kCFontMetricsIID, NS_FONT_METRICS_CID); + NS_DEFINE_IID(kCImageIID, NS_IMAGE_CID); + NS_DEFINE_IID(kCRegionIID, NS_REGION_CID); + + NSRepository::RegisterFactory(kCRenderingContextIID, GFXWIN_DLL, PR_FALSE, PR_FALSE); + NSRepository::RegisterFactory(kCDeviceContextIID, GFXWIN_DLL, PR_FALSE, PR_FALSE); + NSRepository::RegisterFactory(kCFontMetricsIID, GFXWIN_DLL, PR_FALSE, PR_FALSE); + NSRepository::RegisterFactory(kCImageIID, GFXWIN_DLL, PR_FALSE, PR_FALSE); + NSRepository::RegisterFactory(kCRegionIID, GFXWIN_DLL, PR_FALSE, PR_FALSE); + + NS_DEFINE_IID(kCViewManagerCID, NS_VIEW_MANAGER_CID); + NS_DEFINE_IID(kCViewCID, NS_VIEW_CID); + NS_DEFINE_IID(kCScrollingViewCID, NS_SCROLLING_VIEW_CID); + + NSRepository::RegisterFactory(kCViewManagerCID, VIEW_DLL, PR_FALSE, PR_FALSE); + NSRepository::RegisterFactory(kCViewCID, VIEW_DLL, PR_FALSE, PR_FALSE); + NSRepository::RegisterFactory(kCScrollingViewCID, VIEW_DLL, PR_FALSE, PR_FALSE); +} +#endif /* MOZ_NGLAYOUT */ + + typedef FARPROC (*WSASetBlockingHook_t) (FARPROC); ///////////////////////////////////////////////////////////////////////////// // CNetscapeApp initialization @@ -268,7 +332,7 @@ BOOL CNetscapeApp::InitInstance() char *prefStr; // temporary storage space for preferences int32 prefInt; - XP_Bool prefBool; + PRBool prefBool; // Determine whether this is a PE product ASAP! m_hPEInst = LoadLibrary("muc.dll"); @@ -741,7 +805,9 @@ BOOL CNetscapeApp::InitInstance() // Get the main NSPR event queue mozilla_event_queue = PR_GetMainEventQueue(); +#ifndef MOZ_NGLAYOUT LM_InitMocha(); +#endif /* MOZ_NGLAYOUT */ // Initialize the XP file extension mapping NET_InitFileFormatTypes(NULL, NULL); @@ -772,11 +838,11 @@ BOOL CNetscapeApp::InitInstance() m_iCSID = (int16)csid; INTL_ChangeDefaultCharSetID((int16)csid); +#ifndef MOZ_NGLAYOUT STARTUP_cvffc(); -//#ifdef MOZ_NETSCAPE_FONT_MODULE VERIFY( FONTERR_OK == theGlobalNSFont.InitFontModule() ); -//#endif MOZ_NETSCAPE_FONT_MODULE +#endif /* MOZ_NGLAYOUT */ // Initialize RDF m_pRDFCX = new CRDFCX(::RDFSlave, MWContextRDFSlave); @@ -856,10 +922,12 @@ BOOL CNetscapeApp::InitInstance() else m_bUseLockedPrefs = FALSE; +#ifdef MOZ_NGLAYOUT // Frame creation may cause the loading of the home page so register // all of the parser and network functions first static PA_InitData parser_data; parser_data.output_func = LO_ProcessTag; +#endif /* MOZ_NGLAYOUT */ PREF_GetIntPref("network.max_connections",&prefInt); int nMaxConnect = CASTINT(prefInt); @@ -1056,7 +1124,9 @@ BOOL CNetscapeApp::InitInstance() NET_RegisterContentTypeConverter(cp_wild, FO_OUT_TO_PROXY_CLIENT, NULL, external_viewer_disk_stream); NET_RegisterContentTypeConverter(cp_wild, FO_SAVE_AS, NULL, ContextSaveStream); NET_RegisterContentTypeConverter(cp_wild, FO_OLE_NETWORK, NULL, nfe_OleStream); +#ifndef MOZ_NGLAYOUT NET_RegisterContentTypeConverter(cp_wild, FO_EMBED, NULL, EmbedStream); +#endif // added by ftang & jliu, just remap it from memory_stream->net_ColorHTMLStream NET_RegisterContentTypeConverter(INTERNAL_PARSER, FO_VIEW_SOURCE, TEXT_HTML, net_ColorHTMLStream); @@ -1068,7 +1138,9 @@ BOOL CNetscapeApp::InitInstance() NET_RegisterContentTypeConverter(TEXT_MDL, FO_PRINT, NULL, INTL_ConvCharCode); NET_RegisterContentTypeConverter(TEXT_PLAIN, FO_PRINT, NULL, NET_PlainTextConverter); NET_RegisterContentTypeConverter(UNKNOWN_CONTENT_TYPE, FO_PRINT, NULL, NET_PlainTextConverter); +#ifdef MOZ_NGLAYOUT NET_RegisterContentTypeConverter(INTERNAL_PARSER, FO_PRINT, (void *)&parser_data, PA_BeginParseMDL); +#endif /* MOZ_NGLAYOUT */ NET_RegisterContentTypeConverter(IMAGE_GIF, FO_PRINT, NULL, IL_ViewStream); NET_RegisterContentTypeConverter(IMAGE_XBM, FO_PRINT, NULL, IL_ViewStream); NET_RegisterContentTypeConverter(IMAGE_JPG, FO_PRINT, NULL, IL_ViewStream); @@ -1083,6 +1155,10 @@ BOOL CNetscapeApp::InitInstance() //END STREAM VODOO +#ifdef MOZ_NGLAYOUT + InitializeNGLayout(); +#endif + CString strStatus; // rhp - Added flag for MAPI startup... @@ -1430,7 +1506,7 @@ BOOL CNetscapeApp::InitInstance() if(m_bAutomated == FALSE && m_bEmbedded == FALSE && csPrintCommand.IsEmpty()) { int iStartupMode=0; - BOOL bStartMode = FALSE; + PRBool bStartMode = FALSE; PREF_GetBoolPref("general.startup.browser", &bStartMode); if (bStartMode) @@ -1979,9 +2055,12 @@ int CNetscapeApp::ExitInstance() // Save certs and keys early, since if they are lost the user is screwed SECNAV_Shutdown(); +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else // Shut down mocha. ET_FinishMocha(); - +#endif /* MOZ_NGLAYOUT */ BOOL javaShutdownSuccessful = fe_ShutdownJava(); @@ -2046,7 +2125,9 @@ int CNetscapeApp::ExitInstance() Ctl3dUnregister(m_hInstance); #endif +#ifndef MOZ_NGLAYOUT SHUTDOWN_cvffc(); +#endif /* MOZ_NGLAYOUT */ // Free off various allocated memory. if(XP_AppName) { XP_FREE(XP_AppName); diff --git a/mozilla/cmd/winfe/netsvw.cpp b/mozilla/cmd/winfe/netsvw.cpp index adfac308dbc..970aebb306e 100644 --- a/mozilla/cmd/winfe/netsvw.cpp +++ b/mozilla/cmd/winfe/netsvw.cpp @@ -53,6 +53,12 @@ #include "compbar.h" #endif +#ifdef MOZ_NGLAYOUT +#include "nsString.h" +#define SAMPLES_BASE_URL "resource:/res/samples" +#define START_URL SAMPLES_BASE_URL "/test0.html" +#endif + #ifdef _DEBUG #undef THIS_FILE static char BASED_CODE THIS_FILE[] = __FILE__; @@ -71,6 +77,7 @@ extern char *EDT_NEW_DOC_NAME; #endif // CNetscapeView + #ifndef _AFXDLL #undef new #endif @@ -82,6 +89,7 @@ IMPLEMENT_DYNCREATE(CNetscapeView, CGenericView) BEGIN_MESSAGE_MAP(CNetscapeView, CGenericView) //{{AFX_MSG_MAP(CNetscapeView) ON_WM_RBUTTONDOWN() +#ifndef MOZ_NGLAYOUT ON_UPDATE_COMMAND_UI(ID_NAVIGATE_REPAINT, OnUpdateNavigateRepaint) ON_WM_CREATE() ON_COMMAND(ID_NAVIGATE_REPAINT, OnNavigateRepaint) @@ -103,13 +111,16 @@ BEGIN_MESSAGE_MAP(CNetscapeView, CGenericView) ON_COMMAND(ID_CANCEL_EDIT, OnDeactivateEmbed) ON_COMMAND(ID_POPUP_INTERNETSHORTCUT, OnPopupInternetShortcut) ON_COMMAND(ID_POPUP_MAILTO, OnPopupMailTo) +#endif /* MOZ_NGLAYOUT */ //}}AFX_MSG_MAP // Standard printing commands ON_WM_SIZE() ON_COMMAND(ID_FILE_PRINT_PREVIEW, OnFilePrintPreview) ON_WM_KEYDOWN() ON_WM_KEYUP() +#ifndef MOZ_NGLAYOUT ON_COMMAND(ID_DRAG_THIS_URL, OnCopyCurrentURL) +#endif /* MOZ_NGLAYOUT */ #ifdef EDITOR ON_UPDATE_COMMAND_UI(ID_DRAG_THIS_URL, OnCanInteract) ON_COMMAND(ID_POPUP_EDIT_IMAGE, OnPopupEditImage ) //Implemented in popup.cpp @@ -134,6 +145,11 @@ CNetscapeView::CNetscapeView() m_pContext = NULL; m_pSaveFileDlg = NULL; + +#ifdef MOZ_NGLAYOUT + m_bNoWebWidgetHack = FALSE; +#endif + #ifdef EDITOR // This is set to TRUE by derived class CEditView // if we are actually an editor @@ -210,6 +226,14 @@ CNetscapeView::~CNetscapeView() m_pDropTarget = NULL; } +#ifdef MOZ_NGLAYOUT + nsIWebWidget *ww = GetContext()->GetWebWidget(); + if (nsnull != ww) { + NS_RELEASE(ww); + GetContext()->SetWebWidget(nsnull); + } +#endif + #ifdef EDITOR if ( m_pClipboardFormats ) delete [] m_pClipboardFormats; @@ -240,6 +264,7 @@ BOOL CNetscapeView::PreCreateWindow(CREATESTRUCT & cs) return (CGenericView::PreCreateWindow(cs)); } +#ifndef MOZ_NGLAYOUT ///////////////////////////////////////////////////////////////////////////// // CNetscapeView drawing @@ -255,6 +280,7 @@ void CNetscapeView::OnPrepareDC(CDC *pDC, CPrintInfo * pInfo /* = NULL */) #endif } +#endif /* MOZ_NGLAYOUT */ ///////////////////////////////////////////////////////////////////////////// // CNetscapeView printing @@ -340,6 +366,9 @@ void CNetscapeView::OnFilePrintPreview() #endif #endif //MOZ_MAIL_NEWS +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else // Must outlive this function. CPrintPreviewState *pState = new CPrintPreviewState; @@ -354,9 +383,13 @@ void CNetscapeView::OnFilePrintPreview() // Do this last. m_bInPrintPreview = FALSE; } +#endif /* MOZ_NGLAYOUT */ } void CNetscapeView::OnEndPrintPreview(CDC *pDC, CPrintInfo *pInfo, POINT pXY, CPreviewView *pPreView) { +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else CNetscapePreviewView *pView = (CNetscapePreviewView *)pPreView; if (pView->m_pPrintView != NULL) @@ -442,6 +475,7 @@ void CNetscapeView::OnEndPrintPreview(CDC *pDC, CPrintInfo *pInfo, POINT pXY, CP // Do this last. m_bInPrintPreview = FALSE; +#endif /* MOZ_NGLAYOUT */ } BOOL CNetscapeView::OnPreparePrinting(CPrintInfo *pInfo) { @@ -451,6 +485,9 @@ BOOL CNetscapeView::OnPreparePrinting(CPrintInfo *pInfo) { } void CNetscapeView::OnPrint(CDC *pDC, CPrintInfo *pInfo) { +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else // This only gets called in print preview mode. // Never in print only mode. if(m_pPreviewContext == NULL) { @@ -498,11 +535,15 @@ void CNetscapeView::OnPrint(CDC *pDC, CPrintInfo *pInfo) { // Either the page is loading in the print context, or it's done loading. // In any event, attempt to have it print the page. m_pPreviewContext->PrintPage(pInfo->m_nCurPage, pDC->GetSafeHdc(), pInfo); +#endif /* MOZ_NGLAYOUT */ } BOOL CNetscapeView::DoPrintPreview(UINT nIDResource, CView* pPrintView, CRuntimeClass* pPreviewViewClass, CPrintPreviewState* pState) { +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else ASSERT_VALID_IDR(nIDResource); ASSERT_VALID(pPrintView); ASSERT(pPreviewViewClass != NULL); @@ -586,6 +627,7 @@ BOOL CNetscapeView::DoPrintPreview(UINT nIDResource, CView* pPrintView, pParent->RecalcLayout(); // position and size everything pParent->UpdateWindow(); +#endif /* MOZ_NGLAYOUT */ return TRUE; } @@ -617,6 +659,7 @@ CGenericDoc* CNetscapeView::GetDocument() { ///////////////////////////////////////////////////////////////////////////// // CNetscapeView message handlers +#ifndef MOZ_NGLAYOUT int CNetscapeView::OnCreate(LPCREATESTRUCT lpCreateStruct) { if (CGenericView::OnCreate(lpCreateStruct) == -1) @@ -636,9 +679,50 @@ int CNetscapeView::OnCreate(LPCREATESTRUCT lpCreateStruct) // Leaving it out also enables it, so lets do that // // DragAcceptFiles(FALSE); + return 0; } +#endif /* MOZ_NGLAYOUT */ +#ifdef MOZ_NGLAYOUT +void CNetscapeView::checkCreateWebWidget() { + if (m_bNoWebWidgetHack) { + return; + } + + // Dont' create if our CAbstractCX hasn't been created yet, + // or if we already have a web widget. + if (!GetContext() || GetContext()->GetWebWidget()) { + return; + } + + nsresult rv; + RECT r; + ::GetClientRect(m_hWnd, &r); + nsRect rr(r.left,r.top,PRInt32(r.right - r.left),PRInt32(r.bottom - r.top)); + nsIWebWidget* ww = nsnull; + if (rr.IsEmpty()) { + goto chCrFail; + } + rv = NS_NewWebWidget(&ww); + if (!NS_SUCCEEDED(rv)) { + goto chCrFail; + } + rv = ww->Init(m_hWnd, rr); + if (!NS_SUCCEEDED(rv)) { + goto chCrFail; + } + ww->Show(); + GetContext()->SetWebWidget(ww); + GetContext()->NormalGetUrl(START_URL); + return; + + chCrFail: + NS_IF_RELEASE(ww); +} +#endif /* MOZ_NGLAYOUT */ + +#ifndef MOZ_NGLAYOUT // Force a window repaint // Don't do this by hand (i.e. by calling LO_RefreshArea()) or we will be // unable to cache the pDC @@ -653,6 +737,7 @@ void CNetscapeView::OnUpdateNavigateRepaint(CCmdUI* pCmdUI) { pCmdUI->Enable(TRUE); } +#endif /* MOZ_NGLAYOUT */ // Block of Editor functions removed from here // Following are formerly editor functions that are useful in Browser @@ -795,6 +880,7 @@ void CNetscapeView::EditImage(char *pImage) // *** end of "formerly editor functions" #endif /* EDITOR */ +#ifndef MOZ_NGLAYOUT void CNetscapeView::OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags) { // Pass it off to the context to handle if it can. @@ -862,6 +948,7 @@ void CNetscapeView::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags) CWnd::OnKeyDown(nChar, nRepCnt, nFlags); } } +#endif /* MOZ_NGLAYOUT */ void CNetscapeView::OnInitialUpdate() { @@ -874,11 +961,13 @@ void CNetscapeView::OnInitialUpdate() } +#ifndef MOZ_NGLAYOUT void CNetscapeView::OnDeactivateEmbed() { if(m_pContext != NULL) { m_pContext->OnDeactivateEmbedCX(); } } +#endif /* MOZ_NGLAYOUT */ // // Focus management to support international forms @@ -922,6 +1011,7 @@ void CNetscapeView::OnActivateFrame(UINT nState, CFrameWnd* /*pFrameWnd*/) FILE * fpSeriousHackery = NULL; +#ifndef MOZ_NGLAYOUT // We just got focus // See who wants it // @@ -963,6 +1053,7 @@ void CNetscapeView::OnCopyCurrentURL() GetContext()->CopyCurrentURL(); } } +#endif /* MOZ_NGLAYOUT */ ///////////////////////////////////////////////////////////////////////// CViewDropSource::CViewDropSource(UINT nDragType) @@ -1007,6 +1098,9 @@ SCODE CViewDropSource::GiveFeedback(DROPEFFECT dropEffect) void CNetscapeView::OnSize ( UINT nType, int cx, int cy ) { +#ifdef MOZ_NGLAYOUT + checkCreateWebWidget(); +#endif CGenericView::OnSize ( nType, cx, cy ); if ( m_pChild ) { @@ -1015,6 +1109,17 @@ void CNetscapeView::OnSize ( UINT nType, int cx, int cy ) GetClientRect(rect); m_pChild->MoveWindow ( rect ); } + // Actually update the size. +#ifdef MOZ_NGLAYOUT + if (GetContext() && GetContext()->GetWebWidget()) { + RECT r; + ::GetClientRect(m_hWnd, &r); + nsRect rr(r.left,r.top,PRInt32(r.right - r.left),PRInt32(r.bottom - r.top)); + if (!rr.IsEmpty()) { + GetContext()->GetWebWidget()->SetBounds(rr); + } + } +#endif } ////////////////////////////////////////////////////////////////////////////// @@ -1066,7 +1171,10 @@ win_on_drop_callback(MWContext * pContext, LO_Element * pEle, int32 event, BOOL CViewDropTarget::OnDrop(CWnd* pWnd, COleDataObject* pDataObject, DROPEFFECT dropEffect, CPoint point) { - +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); + return FALSE; +#else if(!pDataObject || !pWnd) return(FALSE); @@ -1171,6 +1279,7 @@ BOOL CViewDropTarget::OnDrop(CWnd* pWnd, return(TRUE); //Mocha will handle cleanup and free tmpUrl when it calls back in. +#endif /* MOZ_NGLAYOUT */ } diff --git a/mozilla/cmd/winfe/netsvw.h b/mozilla/cmd/winfe/netsvw.h index c87f8e1db0d..7dd7746c4a5 100644 --- a/mozilla/cmd/winfe/netsvw.h +++ b/mozilla/cmd/winfe/netsvw.h @@ -51,6 +51,10 @@ enum FEDragType { // Add more as we dream them up! }; +#ifdef MOZ_NGLAYOUT +#include "nsIWebWidget.h" +#endif + ///////////////////////////////////////////////////////////////////////////// // Mostly default behavior, but override the type of cursor used // during drag and drop @@ -248,6 +252,7 @@ protected: protected: //{{AFX_MSG(CNetscapeView) afx_msg void OnSize ( UINT nType, int cx, int cy ); +#ifndef MOZ_NGLAYOUT afx_msg void OnSetFocus(CWnd *); afx_msg void OnPrepareDC(CDC *pDC, CPrintInfo * pInfo /* = NULL */); afx_msg void OnDeactivateEmbed(); @@ -281,6 +286,7 @@ protected: afx_msg void OnPopupMailTo(); // afx_msg void OnDropFiles( HDROP hDropInfo ); +#endif /* MOZ_NGLAYOUT */ //}}AFX_MSG #ifdef EDITOR afx_msg void OnCanInteract(CCmdUI* pCmdUI); @@ -289,6 +295,16 @@ protected: afx_msg void OnPopupLoadLinkInEditor(); #endif DECLARE_MESSAGE_MAP() + +#ifdef MOZ_NGLAYOUT +private: + void checkCreateWebWidget(); + BOOL m_bNoWebWidgetHack; + +public: + void NoWebWidgetHack() {m_bNoWebWidgetHack = TRUE;} + // Hack to disable it for the RDF window. +#endif /* MOZ_NGLAYOUT */ }; #ifdef _DEBUG_HUH_JEM // debug version in netsvw.cpp diff --git a/mozilla/cmd/winfe/nsapp.cpp b/mozilla/cmd/winfe/nsapp.cpp index bfb030af58e..1a76e02637c 100644 --- a/mozilla/cmd/winfe/nsapp.cpp +++ b/mozilla/cmd/winfe/nsapp.cpp @@ -65,6 +65,12 @@ extern "C" { #include "li_public.h" #endif /* MOZ_LOC_INDEP */ +#ifdef MOZ_NGLAYOUT +#include "nscore.h" +#include "nsDebug.h" +#include "prlink.h" +#endif + #ifdef _DEBUG #undef THIS_FILE static char BASED_CODE THIS_FILE[] = __FILE__; @@ -1712,6 +1718,13 @@ BOOL CNetscapeApp::IsIdleMessage(MSG *pMsg) return(pMsg->message != WM_PAINT && pMsg->message != 0x0118); } +// This is just so we can call NET_PollSockets, will go away when +// both NGLayout and Mozilla are using the same netlib. +#ifdef MOZ_NGLAYOUT +typedef void (*NET_PollSocketsType)(); +static NET_PollSocketsType NGL_NET_PollSockets = nsnull; +#endif + BOOL CNetscapeApp::OnIdle(LONG lCount) { // call base class idle first @@ -1757,6 +1770,23 @@ BOOL CNetscapeApp::OnIdle(LONG lCount) if(NET_PollSockets()) bResult = TRUE; +// This is just so we can call NET_PollSockets in the DLL, +// this will go away when +// both NGLayout and Mozilla are using the same netlib. +#ifdef MOZ_NGLAYOUT + if (nsnull == NGL_NET_PollSockets) { + PRLibrary *netlib = PR_LoadLibrary("netlib"); + NS_ASSERTION(netlib,"Could not load netlib dll."); + NGL_NET_PollSockets = (NET_PollSocketsType)PR_FindSymbol(netlib,"NET_PollSockets"); + NS_ASSERTION(NGL_NET_PollSockets,"Could not find NET_PollSockets in netlib.dll"); + + // This is a hack, we never release netlib.dll. + } + TRACE("Calling NGL_NET_PollSockets\n"); + NGL_NET_PollSockets(); +#endif + + #ifdef MOZ_MAIL_NEWS // currently just to give NeoAccess a chance to do some chores // If we become a real CNeoApp, this won't be neccesary. @@ -1821,8 +1851,12 @@ BOOL CNetscapeApp::OnDDECommand(char *pszCommand) char *pArg3 = FEU_ExtractCommaDilimetedQuotedString(pszCommand, 3); char *pArg4 = FEU_ExtractCommaDilimetedQuotedString(pszCommand, 4); +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else // Do it. CPrintCX::AutomatedPrint(pArg1, pArg2, pArg3, pArg4); +#endif // Get rid of any allocations that FEU did for us. if(pArg1) { diff --git a/mozilla/cmd/winfe/pain.cpp b/mozilla/cmd/winfe/pain.cpp index d84019af2d4..0ad43d21b0e 100644 --- a/mozilla/cmd/winfe/pain.cpp +++ b/mozilla/cmd/winfe/pain.cpp @@ -31,6 +31,9 @@ CPaneCX *wfe_CreateNavCenterHTMLPain(HT_View htView, HWND hParent) cccGrid.m_pCurrentDoc = new CGenericDoc(); if(cccGrid.m_pCurrentDoc) { CNetscapeView *pNewView = new CNetscapeView(); +#ifdef MOZ_NGLAYOUT + pNewView->NoWebWidgetHack(); +#endif if(pNewView) { CRect crClient(0, 0, 50, 50); BOOL bCreated = pNewView->Create(NULL, diff --git a/mozilla/cmd/winfe/popup.cpp b/mozilla/cmd/winfe/popup.cpp index 5eed9f4c982..945db9aa181 100755 --- a/mozilla/cmd/winfe/popup.cpp +++ b/mozilla/cmd/winfe/popup.cpp @@ -188,7 +188,10 @@ BOOL CNetscapeView::AddLinkToPopup(CMenu * pMenu, LO_Element * pElement, BOOL bB // BOOL CNetscapeView::AddEmbedToPopup(CMenu * pMenu, LO_Element * pElement, CL_Layer *layer, BOOL bAddSeparator) { - +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); + return FALSE; +#else UINT uState, uInlineState, uSaveAsState; CString csAppend, csEntry; @@ -262,6 +265,7 @@ BOOL CNetscapeView::AddEmbedToPopup(CMenu * pMenu, LO_Element * pElement, CL_Lay } return bAddSeparator; +#endif /* MOZ_NGLAYOUT */ } BOOL CNetscapeView::AddSaveItemsToPopup(CMenu * pMenu, LO_Element * pElement, CL_Layer *layer, BOOL bAddSeparator) @@ -309,6 +313,9 @@ BOOL CNetscapeView::AddSaveItemsToPopup(CMenu * pMenu, LO_Element * pElement, CL } } else { +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else LO_ImageStruct *pLOImage; CL_Layer *parent_layer; char *layer_name; @@ -331,6 +338,7 @@ BOOL CNetscapeView::AddSaveItemsToPopup(CMenu * pMenu, LO_Element * pElement, CL PA_UNLOCK(pLOImage->image_url); // Do your stuff here. } +#endif } return (bLink || bImage || bAddSeparator); @@ -363,6 +371,9 @@ void CNetscapeView::AddBrowserItemsToPopup(CMenu * pMenu, LO_Element * pElement, } } else { +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else // this is the case for saving backdrop image. LO_ImageStruct *pLOImage; CL_Layer *parent_layer; @@ -385,6 +396,7 @@ void CNetscapeView::AddBrowserItemsToPopup(CMenu * pMenu, LO_Element * pElement, PA_UNLOCK(pLOImage->image_url); // Do your stuff here. } +#endif /* MOZ_NGLAYOUT */ } MWContext *pContext = GetContext()->GetContext(); @@ -597,6 +609,7 @@ void CNetscapeView::CreateMessagePopup(CMenu * pMenu, LO_Element * pElement, CL_ #endif /* MOZ_MAIL_NEWS */ } +#ifndef MOZ_NGLAYOUT void CNetscapeView::OnRButtonDown(UINT uFlags, CPoint cpPoint) { // Purpose: Bring up the popup menu. // Arguments: uFlags What meta keys are currently pressed, ignored. @@ -617,9 +630,13 @@ void CNetscapeView::OnRButtonDown(UINT uFlags, CPoint cpPoint) { (long)cpPoint.x, (long)cpPoint.y, NULL); } +#endif /* MOZ_NGLAYOUT */ BOOL CNetscapeView::OnRButtonDownForLayer(UINT uFlags, CPoint& cpPoint, long lX, long lY, CL_Layer *layer) { +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else LO_Element *pElement; HDC pDC = GetContextDC(); MWContext *pContext = GetContext()->GetContext(); @@ -672,6 +689,7 @@ BOOL CNetscapeView::OnRButtonDownForLayer(UINT uFlags, CPoint& cpPoint, GetParentFrame(), NULL); } +#endif /* MOZ_NGLAYOUT */ return TRUE; } @@ -696,6 +714,10 @@ void CNetscapeView::GetLogicalPoint(CPoint cpPoint, long *pLX, long *pLY) } LO_Element *CNetscapeView::GetLayoutElement(CPoint cpPoint, CL_Layer *layer) { +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); + return NULL; +#else // Purpose: Return the layout element under the device point. // Arguments: cpPoint The device point. // Returns: LO_Element * The layout element under the point, or NULL if over nothing. @@ -724,6 +746,7 @@ LO_Element *CNetscapeView::GetLayoutElement(CPoint cpPoint, CL_Layer *layer) { else { return(NULL); } +#endif /* MOZ_NGLAYOUT */ } CString CNetscapeView::GetAnchorHref(LO_Element *pElement) { @@ -736,6 +759,9 @@ CString CNetscapeView::GetAnchorHref(LO_Element *pElement) { // CString csRetval; +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else if(pElement != NULL) { switch(pElement->type) { @@ -791,7 +817,7 @@ CString CNetscapeView::GetAnchorHref(LO_Element *pElement) { } } } - +#endif /* MOZ_NGLAYOUT */ return(csRetval); } @@ -942,6 +968,7 @@ void WFE_CondenseURL(CString& csURL, UINT uLength, BOOL bParens) { } +#ifndef MOZ_NGLAYOUT void CNetscapeView::OnPopupLoadLink() { // Purpose: Load the link // Arguments: void @@ -1071,6 +1098,7 @@ void CNetscapeView::OnPopupCopyLinkToClipboard() { CopyLinkToClipboard(m_hWnd, m_csRBLink); } +#endif /* MOZ_NGLAYOUT */ void CNetscapeView::CopyLinkToClipboard(HWND hWnd, CString url) { @@ -1099,6 +1127,7 @@ void CNetscapeView::CopyLinkToClipboard(HWND hWnd, CString url) ::CloseClipboard(); } +#ifndef MOZ_NGLAYOUT void CNetscapeView::OnPopupLoadImage() { // Purpose: Load an image inline that was delayed. // Arguments: void @@ -1337,6 +1366,7 @@ void CNetscapeView::OnPopupCopyEmbedToClipboard() { } } } +#endif /* MOZ_NGLAYOUT */ void CNetscapeView::CreateTextAndAnchor(CString &csText, CString &csAnchor) { @@ -1386,6 +1416,7 @@ void CNetscapeView::CreateTextAndAnchor(CString &csText, CString &csAnchor) } } +#ifndef MOZ_NGLAYOUT void CNetscapeView::OnPopupAddLinkToBookmarks() { // Purpose: Add the link we're under to the bookmarks. @@ -1428,3 +1459,4 @@ void CNetscapeView::OnPopupMailTo() { GetContext()->MailDocument(); } } +#endif /* MOZ_NGLAYOUT */ diff --git a/mozilla/cmd/winfe/prefinfo.cpp b/mozilla/cmd/winfe/prefinfo.cpp index 729ac0302cf..60916e9aa0d 100644 --- a/mozilla/cmd/winfe/prefinfo.cpp +++ b/mozilla/cmd/winfe/prefinfo.cpp @@ -69,9 +69,13 @@ int PR_CALLBACK prefWatcher(const char *pPrefName, void *pData) break; case 7: +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else PREF_GetBoolPref("browser.use_document_colors", &prefInfo.m_bUseDocumentColors); LO_SetUserOverride(!prefInfo.m_bUseDocumentColors); bReload = TRUE; +#endif /* MOZ_NGLAYOUT */ break; case 8: @@ -226,11 +230,13 @@ void CPrefInfo::Initialize() wfe_SetLayoutColor(LO_COLOR_BG, m_rgbBackgroundColor); PREF_RegisterCallback("browser.background_color", prefWatcher, (void *)6); +#ifndef MOZ_NGLAYOUT // See if the user's choices override the document PREF_GetBoolPref("browser.use_document_colors", &m_bUseDocumentColors); LO_SetUserOverride(!m_bUseDocumentColors); PREF_RegisterCallback("browser.use_document_colors", prefWatcher, (void *)7); - +#endif + // Always Load Images PREF_GetBoolPref("general.always_load_images", &m_bAutoLoadImages); PREF_RegisterCallback("general.always_load_images", prefWatcher, (void *)8); diff --git a/mozilla/cmd/winfe/prefs.cpp b/mozilla/cmd/winfe/prefs.cpp index dff080a4a68..e792f07c062 100644 --- a/mozilla/cmd/winfe/prefs.cpp +++ b/mozilla/cmd/winfe/prefs.cpp @@ -190,7 +190,7 @@ CEnumHelpers::Next(NET_cdataStruct **ppcdata) { CHelperApp *pHelperApp; - while ((*ppcdata = (NET_cdataStruct *)XP_ListNextObject(m_pInfoList))) { + while ((*ppcdata = (NET_cdataStruct *)XP_ListNextObject(m_pInfoList))) { // Ignore items that don't have a MIME type if (!(*ppcdata)->ci.type) continue; @@ -826,7 +826,11 @@ CAppearancePrefs::SetEncodingFonts(DWORD dwCharsetNum, LPENCODINGINFO lpInfo) // Reset the assorted font caches... CDCCX::ClearAllFontCaches(); +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else CVirtualFontFontCache::Reset(); +#endif /* MOZ_NGLAYOUT */ theApp.m_pIntlFont->WriteToIniFile(); // Indicate we need to reload all of the windows diff --git a/mozilla/cmd/winfe/presentm.cpp b/mozilla/cmd/winfe/presentm.cpp index b9ab76aed65..3ef55f81d38 100755 --- a/mozilla/cmd/winfe/presentm.cpp +++ b/mozilla/cmd/winfe/presentm.cpp @@ -31,7 +31,7 @@ extern "C" BOOL WPM_RegisterContentTypeConverter(char *pFormatIn, NET_Converter *pConverterFunc, BOOL bAutomated) { NET_RegContentTypeConverter (pFormatIn,iFormatOut,vpDataObject, pConverterFunc, - bAutomated); + (PRBool)bAutomated); return(TRUE); } diff --git a/mozilla/cmd/winfe/splash.cpp b/mozilla/cmd/winfe/splash.cpp index 7873623dad6..07b5a943cd2 100644 --- a/mozilla/cmd/winfe/splash.cpp +++ b/mozilla/cmd/winfe/splash.cpp @@ -303,10 +303,14 @@ void CBigIcon::CenterText(CClientDC &dc, LPCSTR lpszStatus, int top) // We need to compute where to draw the text so it is centered // horizontally int x = rect.left; +#ifdef MOZ_NGLAYOUT + // Maybe we should put CIntlWin back in the NGLayout build + // Right now, splash screen won't center text. +#else CSize extent = CIntlWin::GetTextExtent(0, dc.m_hDC, lpszStatus, XP_STRLEN(lpszStatus)); - if (extent.cx < rect.Width()) x += (rect.Width() - extent.cx) / 2; +#endif // Draw opaquely so we can avoid erasing the old text dc.ExtTextOut(x, rect.top, ETO_OPAQUE, &rect, lpszStatus, strlen(lpszStatus), NULL); diff --git a/mozilla/cmd/winfe/stshplug.cpp b/mozilla/cmd/winfe/stshplug.cpp index 6cc1e35e05d..5ab9cc21810 100644 --- a/mozilla/cmd/winfe/stshplug.cpp +++ b/mozilla/cmd/winfe/stshplug.cpp @@ -22,15 +22,19 @@ void STARTUP_np(void) { +#ifndef MOZ_NGLAYOUT // Be Mac-like. If the user is holding down the shift key // don't load any of the plugin stuff if(::GetKeyState(VK_SHIFT) >= 0) { NPL_Init(); } +#endif } void SHUTDOWN_np(void) { +#ifndef MOZ_NGLAYOUT // unload any remaining plugins NPL_Shutdown(); +#endif } diff --git a/mozilla/cmd/winfe/timer.cpp b/mozilla/cmd/winfe/timer.cpp index dc2aa93244c..07c385a92a2 100755 --- a/mozilla/cmd/winfe/timer.cpp +++ b/mozilla/cmd/winfe/timer.cpp @@ -273,6 +273,7 @@ void wfe_ProcessTimeouts(DWORD dwNow) BOOL bCalledSync = FALSE; +#ifndef MOZ_NGLAYOUT // Don't fire timeouts while in the PrintAbortProc, or we will go // reentrant into the GDI code of the print driver if // someone is doing drawing via timeouts. @@ -284,6 +285,7 @@ void wfe_ProcessTimeouts(DWORD dwNow) // Get Out return; } +#endif /* MOZ_NGLAYOUT */ // Set the hack, such that when FE_ClearTimeout // calls SyncTimeoutPeriod, that GetTickCount() diff --git a/mozilla/cmd/winfe/urlbar.cpp b/mozilla/cmd/winfe/urlbar.cpp index 08250c777b0..3c3cb5bcc70 100755 --- a/mozilla/cmd/winfe/urlbar.cpp +++ b/mozilla/cmd/winfe/urlbar.cpp @@ -446,6 +446,9 @@ void CURLBar::ProcessEnterKey() id = 0; } +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else if (HK_CallHook(HK_LOCATION, NULL, id, text, &new_text)) { // Nothing, new_text is already set. @@ -454,6 +457,7 @@ void CURLBar::ProcessEnterKey() { new_text = NULL; } +#endif /* MOZ_NGLAYOUT */ } if (new_text) @@ -479,8 +483,12 @@ void CURLBar::UpdateFields( const char * msg ) { CWnd *pText = GetDlgItem( IDC_URLTEXT ); +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else // strip random backend crap out of the url msg = LM_StripWysiwygURLPrefix(msg); +#endif /* MOZ_NGLAYOUT */ CString cs(msg); m_pBox->SetWindowText(cs); @@ -684,6 +692,7 @@ BOOL CEditWnd::PreTranslateMessage ( MSG * msg ) const char *c_url = (const char *)url; url_str = (char *)c_url; +#ifndef MOZ_NGLAYOUT if (HK_CallHook(HK_LOCATION, NULL, id, url_str, &new_url)) { // Nothing, new_url is already set. @@ -692,6 +701,7 @@ BOOL CEditWnd::PreTranslateMessage ( MSG * msg ) { new_url = NULL; } +#endif /* MOZ_NGLAYOUT */ } if (new_url) diff --git a/mozilla/config/config.mak b/mozilla/config/config.mak index ae33702260a..eac7701756a 100644 --- a/mozilla/config/config.mak +++ b/mozilla/config/config.mak @@ -71,11 +71,16 @@ PUBLIC=$(XPDIST)\public #// has the same name no matter what #//----------------------------------------------------------------------- + +!ifdef NGLAYOUT_BUILD_PREFIX +DIST_PREFIX=NGL +!else !ifdef MOZ_NAV_BUILD_PREFIX DIST_PREFIX=NAV !else DIST_PREFIX=WIN !endif +!endif !ifndef MOZ_DEBUG OBJDIR=$(DIST_PREFIX)$(MOZ_BITS)$(OBJTYPE)_O.OBJ @@ -101,6 +106,16 @@ DIST=$(XPDIST)\$(DIST_PREFIX)$(MOZ_BITS)_O.OBJ DIST=$(XPDIST)\$(DIST_PREFIX)$(MOZ_BITS)_D.OBJ !endif +# This will always give the location of NGLayout's dist, even if "NGLAYOUT_BUILD_PREFIX" is not defined. +!if defined(MOZ_NGLAYOUT) +!ifndef MOZ_DEBUG +NGLAYOUT_DIST=$(XPDIST)\NGL$(MOZ_BITS)_O.OBJ +!else +NGLAYOUT_DIST=$(XPDIST)\NGL$(MOZ_BITS)_D.OBJ +!endif +!endif + + CFGFILE=$(OBJDIR)\cmd.cfg !if "$(MOZ_BITS)" == "16" diff --git a/mozilla/config/liteness.mak b/mozilla/config/liteness.mak index 815d14ef7a5..c4ba85658de 100644 --- a/mozilla/config/liteness.mak +++ b/mozilla/config/liteness.mak @@ -152,3 +152,9 @@ MOZ_COMMUNICATOR_CONFIG_JS=1 MOZ_COPY_ALL_JARS=1 MOZ_SPELLCHK=1 !endif + + +### This probably isn't the best place to put this. +!if defined(MOZ_NGLAYOUT) +MOZ_LITENESS_FLAGS=$(MOZ_LITENESS_FLAGS) -DMOZ_NGLAYOUT +!endif diff --git a/mozilla/include/cvactive.h b/mozilla/include/cvactive.h new file mode 100644 index 00000000000..9e34fd90ea5 --- /dev/null +++ b/mozilla/include/cvactive.h @@ -0,0 +1,41 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * The contents of this file are subject to the Netscape Public License + * Version 1.0 (the "NPL"); you may not use this file except in + * compliance with the NPL. You may obtain a copy of the NPL at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the NPL is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL + * for the specific language governing rights and limitations under the + * NPL. + * + * The Initial Developer of this code under the NPL is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All Rights + * Reserved. + */ + +#ifndef CV_ACTIVE +#define CV_ACTIVE + +#include "net.h" + +/* define a constant to be passed to CV_MakeMultipleDocumentStream + * as the data_object to signify that it should return + * MK_END_OF_MULTIPART_MESSAGE when it gets to the end + * of the multipart instead of waiting for the complete + * function to be called + */ +#define CVACTIVE_SIGNAL_AT_END_OF_MULTIPART 999 + +XP_BEGIN_PROTOS + +extern NET_StreamClass * +CV_MakeMultipleDocumentStream (int format_out, + void *data_object, + URL_Struct *URL_s, + MWContext *window_id); +XP_END_PROTOS + +#endif /* CV_ACTIVE */ diff --git a/mozilla/include/fe_proto.h b/mozilla/include/fe_proto.h index 30eb089f849..d61fddd9799 100644 --- a/mozilla/include/fe_proto.h +++ b/mozilla/include/fe_proto.h @@ -519,10 +519,13 @@ BOOL FE_FileType(char * path, #define FE_GetTextFrame(context, element, start, end, frame) \ (*context->funcs->GetTextFrame)(context, element, start, end, frame) #endif +#ifndef MOZ_NGLAYOUT #define FE_GetEmbedSize(context, embed_struct, force_reload) \ (*context->funcs->GetEmbedSize)(context, embed_struct, force_reload) +#endif #define FE_GetJavaAppSize(context, java_struct, force_reload) \ (*context->funcs->GetJavaAppSize)(context, java_struct, force_reload) +#ifndef MOZ_NGLAYOUT #define FE_GetFormElementInfo(context, form_element) \ (*context->funcs->GetFormElementInfo)(context, form_element) #define FE_GetFormElementValue(context, form_element,hide) \ @@ -537,6 +540,7 @@ BOOL FE_FileType(char * path, #define FE_FreeBuiltinElement(context, data) \ (*context->funcs->FreeBuiltinElement)(context, data) #endif +#endif /* MOZ_NGLAYOUT */ #define FE_CreateEmbedWindow(context, data) \ (*context->funcs->CreateEmbedWindow)(context, data) #define FE_SaveEmbedWindow(context, data) \ @@ -549,10 +553,12 @@ BOOL FE_FileType(char * path, (*context->funcs->FreeJavaAppElement)(context, data) #define FE_HideJavaAppElement(context, data) \ (*context->funcs->HideJavaAppElement)(context, data) +#ifndef MOZ_NGLAYOUT #define FE_FreeEdgeElement(context, data) \ (*context->funcs->FreeEdgeElement)(context, data) #define FE_FormTextIsSubmit(context, form_element) \ (*context->funcs->FormTextIsSubmit)(context, form_element) +#endif /* --------------------------------------------------------------------------- @@ -568,16 +574,20 @@ BOOL FE_FileType(char * path, (*context->funcs->DisplaySubtext)(context, iLocation, text, start_pos, end_pos, need_bg) #define FE_DisplayText(context, iLocation, text, need_bg) \ (*context->funcs->DisplayText)(context, iLocation, text, need_bg) +#ifndef MOZ_NGLAYOUT #define FE_DisplayEmbed(context, iLocation , embed_struct) \ (*context->funcs->DisplayEmbed)(context, iLocation ,embed_struct) #ifdef SHACK #define FE_DisplayBuiltin(context, iLocation , builtin_struct) \ (*context->funcs->DisplayBuiltin)(context, iLocation ,builtin_struct) #endif +#endif /* MOZ_NGLAYOUT */ #define FE_DisplayJavaApp(context, iLocation , java_struct) \ (*context->funcs->DisplayJavaApp)(context, iLocation ,java_struct) +#ifndef MOZ_NGLAYOUT #define FE_DisplayEdge(context, iLocation ,edge_struct) \ (*context->funcs->DisplayEdge)(context, iLocation ,edge_struct) +#endif /* MOZ_NGLAYOUT */ #define FE_DisplayTable(context, iLocation ,table_struct) \ (*context->funcs->DisplayTable)(context, iLocation ,table_struct) #define FE_DisplayCell(context, iLocation ,cell_struct) \ @@ -602,8 +612,10 @@ BOOL FE_FileType(char * path, (*context->funcs->DisplayHR)(context, iLocation , HR_struct) #define FE_DisplayBullet(context, iLocation, bullet) \ (*context->funcs->DisplayBullet)(context, iLocation, bullet) +#ifndef MOZ_NGLAYOUT #define FE_DisplayFormElement(context, iLocation, form_element) \ (*context->funcs->DisplayFormElement)(context, iLocation, form_element) +#endif #define FE_DisplayBorder(context, iLocation, x, y, width, height, bw, color, style) \ (*context->funcs->DisplayBorder)(context, iLocation, x, y, width, height, bw, color, style) #define FE_DisplayFeedback(context, iLocation, element) \ @@ -711,20 +723,26 @@ extern int FE_GetMaxWidth(MWContext *pContext, LO_TextStruct *pText); /* pe #ifdef LAYERS void FE_GetTextFrame(MWContext * context, LO_TextStruct *text, int32 start, int32 end, XP_Rect *frame); #endif +#ifndef MOZ_NGLAYOUT void FE_GetEmbedSize(MWContext * context, LO_EmbedStruct *embed_struct, NET_ReloadMethod force_reload); +#endif void FE_GetJavaAppSize(MWContext * context, LO_JavaAppStruct *java_struct, NET_ReloadMethod force_reload); void FE_GetFormElementInfo(MWContext * context, LO_FormElementStruct * form_element); void FE_GetFormElementValue(MWContext * context, LO_FormElementStruct * form_element, Bool hide); void FE_ResetFormElement(MWContext * context, LO_FormElementStruct * form_element); void FE_SetFormElementToggle(MWContext * context, LO_FormElementStruct * form_element, Bool toggle); +#ifndef MOZ_NGLAYOUT void FE_FreeEmbedElement(MWContext *context, LO_EmbedStruct *); #ifdef SHACK void FE_FreeBuiltinElement(MWContext *context, LO_BuiltinStruct *); #endif +#endif /* MOZ_NGLAYOUT */ void FE_FreeJavaAppElement(MWContext *context, struct LJAppletData *appletData); void FE_HideJavaAppElement(MWContext *context, void*); +#ifndef MOZ_NGLAYOUT void FE_FreeEdgeElement(MWContext *context, LO_EdgeStruct *); void FE_FormTextIsSubmit(MWContext * context, LO_FormElementStruct * form_element); +#endif /* MOZ_NGLAYOUT */ void FE_SetProgressBarPercent(MWContext *context, int32 percent); void FE_SetBackgroundColor(MWContext *context, uint8 red, uint8 green, uint8 blue); @@ -740,12 +758,16 @@ void FE_SetBackgroundColor(MWContext *context, uint8 red, uint8 green extern void FE_DisplaySubtext(MWContext * context, int iLocation, LO_TextStruct *text, int32 start_pos, int32 end_pos, Bool need_bg); extern void FE_DisplayText(MWContext * context, int iLocation, LO_TextStruct *text, Bool need_bg); +#ifndef MOZ_NGLAYOUT void FE_DisplayEmbed(MWContext * context, int iLocation ,LO_EmbedStruct *embed_struct); #ifdef SHACK void FE_DisplayBuiltin(MWContext * context, int iLocation ,LO_BuiltinStruct *builtin_struct); #endif +#endif /* MOZ_NGLAYOUT */ void FE_DisplayJavaApp(MWContext * context, int iLocation ,LO_JavaAppStruct *java_struct); +#ifndef MOZ_NGLAYOUT void FE_DisplayEdge(MWContext * context, int iLocation ,LO_EdgeStruct *edge_struct); +#endif /* MOZ_NGLAYOUT */ void FE_DisplayTable(MWContext * context, int iLocation ,LO_TableStruct *table_struct); void FE_DisplayCell(MWContext * context, int iLocation ,LO_CellStruct *cell_struct); void FE_DisplaySubDoc(MWContext * context, int iLocation ,LO_SubDocStruct *subdoc_struct); @@ -791,10 +813,12 @@ extern void FE_AllConnectionsComplete(MWContext * context); */ extern void FE_ReleaseTextAttrFeData(MWContext * context, LO_TextAttr *attr); +#ifndef MOZ_NGLAYOUT /* * Liberated from context function table */ void FE_FreeFormElement(MWContext * context, LO_FormElementData *); +#endif /* -------------------------------------------------------------------------- * Front end history stuff @@ -819,6 +843,7 @@ extern void FE_SaveAs(MWContext * context, char * source); */ extern void FE_UpdateStopState(MWContext * context); +#ifndef MOZ_NGLAYOUT /* ------------------------------------------------------------------------- * Grid stuff (where should this go?) */ @@ -842,6 +867,7 @@ extern void FE_GetEdgeMinSize(MWContext *context, int32 *size ); extern void FE_LoadGridCellFromHistory(MWContext *context, void *hist, NET_ReloadMethod force_reload); +#endif /* MOZ_NGLAYOUT */ /* * Ugh for scrolling chat window. And now for JavaScript diff --git a/mozilla/include/mk_cx_fn.h b/mozilla/include/mk_cx_fn.h index 087e4306ff2..46e4ef9b605 100644 --- a/mozilla/include/mk_cx_fn.h +++ b/mozilla/include/mk_cx_fn.h @@ -65,8 +65,11 @@ FE_DEFINE(GetTextInfo,int, (MWContext * context, LO_TextStruct *text, LO_TextInf #ifdef XP_MAC FE_DEFINE(MeasureText,int, (MWContext * context, LO_TextStruct *text, short *charLocs)) #endif +#ifndef MOZ_NGLAYOUT FE_DEFINE(GetEmbedSize,void, (MWContext * context, LO_EmbedStruct *embed_struct, NET_ReloadMethod force_reload)) +#endif FE_DEFINE(GetJavaAppSize,void, (MWContext * context, LO_JavaAppStruct *java_struct, NET_ReloadMethod force_reload)) +#ifndef MOZ_NGLAYOUT FE_DEFINE(GetFormElementInfo,void, (MWContext * context, LO_FormElementStruct * form_element)) FE_DEFINE(GetFormElementValue,void, (MWContext * context, LO_FormElementStruct * form_element, XP_Bool hide)) FE_DEFINE(ResetFormElement,void, (MWContext * context, LO_FormElementStruct * form_element)) @@ -75,22 +78,29 @@ FE_DEFINE(FreeEmbedElement,void, (MWContext *context, LO_EmbedStruct *)) #ifdef SHACK FE_DEFINE(FreeBuiltinElement,void, (MWContext *context, LO_BuiltinStruct *)) #endif +#endif /* MOZ_NGLAYOUT */ FE_DEFINE(CreateEmbedWindow, void, (MWContext *context, NPEmbeddedApp *app)) FE_DEFINE(SaveEmbedWindow, void, (MWContext *context, NPEmbeddedApp *app)) FE_DEFINE(RestoreEmbedWindow, void, (MWContext *context, NPEmbeddedApp *app)) FE_DEFINE(DestroyEmbedWindow, void, (MWContext *context, NPEmbeddedApp *app)) FE_DEFINE(FreeJavaAppElement,void, (MWContext *context, struct LJAppletData *appletData)) FE_DEFINE(HideJavaAppElement,void, (MWContext *context, struct LJAppletData *)) +#ifndef MOZ_NGLAYOUT FE_DEFINE(FreeEdgeElement,void, (MWContext *context, LO_EdgeStruct *)) FE_DEFINE(FormTextIsSubmit,void, (MWContext * context, LO_FormElementStruct * form_element)) +#endif /* MOZ_NGLAYOUT */ FE_DEFINE(DisplaySubtext,void, (MWContext * context, int iLocation, LO_TextStruct *text, int32 start_pos, int32 end_pos, XP_Bool need_bg)) FE_DEFINE(DisplayText,void, (MWContext * context, int iLocation, LO_TextStruct *text, XP_Bool need_bg)) +#ifndef MOZ_NGLAYOUT FE_DEFINE(DisplayEmbed,void, (MWContext * context, int iLocation ,LO_EmbedStruct *embed_struct)) #ifdef SHACK FE_DEFINE(DisplayBuiltin,void, (MWContext * context, int iLocation ,LO_BuiltinStruct *builtin_struct)) #endif +#endif /* MOZ_NGLAYOUT */ FE_DEFINE(DisplayJavaApp,void, (MWContext * context, int iLocation ,LO_JavaAppStruct *java_struct)) +#ifndef MOZ_NGLAYOUT FE_DEFINE(DisplayEdge,void, (MWContext * context, int iLocation ,LO_EdgeStruct *edge_struct)) +#endif FE_DEFINE(DisplayTable,void, (MWContext * context, int iLocation ,LO_TableStruct *table_struct)) FE_DEFINE(DisplayCell,void, (MWContext * context, int iLocation ,LO_CellStruct *cell_struct)) #ifdef XP_MAC @@ -101,7 +111,9 @@ FE_DEFINE(DisplaySubDoc,void, (MWContext * context, int iLocation ,LO_SubDocStru FE_DEFINE(DisplayLineFeed,void, (MWContext * context, int iLocation , LO_LinefeedStruct *line_feed, XP_Bool need_bg)) FE_DEFINE(DisplayHR,void, (MWContext * context, int iLocation , LO_HorizRuleStruct *HR_struct)) FE_DEFINE(DisplayBullet,void, (MWContext *context, int iLocation, LO_BullettStruct *bullet)) +#ifndef MOZ_NGLAYOUT FE_DEFINE(DisplayFormElement,void, (MWContext * context, int iLocation, LO_FormElementStruct * form_element)) +#endif FE_DEFINE(DisplayBorder,void, (MWContext *context, int iLocation, int x, int y, int width, int height, int bw, LO_Color *color, LO_LineStyle style)) #ifdef XP_MAC FE_DEFINE(UpdateEnableStates,void, (MWContext *context)) diff --git a/mozilla/include/structs.h b/mozilla/include/structs.h index ac5845570b3..e32a3af4701 100644 --- a/mozilla/include/structs.h +++ b/mozilla/include/structs.h @@ -114,6 +114,9 @@ typedef struct FEstruct_ { void* savedialog; #endif +#endif +#ifdef MOZILLA_CLIENT + void* webWidget; /* Really a nsIWebWidget */ #endif } FEstruct; diff --git a/mozilla/include/xp_sock.h b/mozilla/include/xp_sock.h new file mode 100644 index 00000000000..cc2a0d0a10b --- /dev/null +++ b/mozilla/include/xp_sock.h @@ -0,0 +1,208 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * The contents of this file are subject to the Netscape Public License + * Version 1.0 (the "NPL"); you may not use this file except in + * compliance with the NPL. You may obtain a copy of the NPL at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the NPL is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL + * for the specific language governing rights and limitations under the + * NPL. + * + * The Initial Developer of this code under the NPL is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All Rights + * Reserved. + */ + +#ifndef __XP_SOCK_h_ +#define __XP_SOCK_h_ + +#include "xp_core.h" +#include "xp_error.h" + +#ifdef XP_UNIX + +#ifdef AIXV3 +#include +#include +#endif /* AIXV3 */ + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifndef __hpux +#include +#endif /* __hpux */ +#include +#endif /* XP_UNIX */ + +#ifdef XP_MAC +#include "macsocket.h" +#define SOCKET_BUFFER_SIZE 4096 +#endif /* XP_MAC */ + +#ifdef XP_OS2 /* IBM-VPB050196 */ +# include "os2sock.h" +# ifdef XP_OS2_DOUGSOCK +# include "dsfunc.h" +# endif +# define SOCKET_BUFFER_SIZE 4096 +#endif + +#ifdef XP_WIN +#include "winsock.h" +#define SOCKET_BUFFER_SIZE 4096 + +#ifdef __cplusplus +extern "C" { +#endif + +extern int dupsocket(int foo); /* always fails */ + +#ifdef __cplusplus +} +#endif + +#ifndef EPIPE +#define EPIPE ECONNRESET +#endif + +#undef BOOLEAN +#define BOOLEAN char +#endif /* XP_WIN */ + +#define SOCKET_ERRNO XP_GetError() + +/************************************************************************/ + +#ifdef XP_UNIX + +/* Network i/o wrappers */ +#define XP_SOCKET int +#define XP_SOCK_ERRNO errno +#define XP_SOCK_SOCKET socket +#define XP_SOCK_CONNECT connect +#define XP_SOCK_ACCEPT accept +#define XP_SOCK_BIND bind +#define XP_SOCK_LISTEN listen +#define XP_SOCK_SHUTDOWN shutdown +#define XP_SOCK_IOCTL ioctl +#define XP_SOCK_RECV recv +#define XP_SOCK_RECVFROM recvfrom +#define XP_SOCK_RECVMSG recvmsg +#define XP_SOCK_SEND send +#define XP_SOCK_SENDTO sendto +#define XP_SOCK_SENDMSG sendmsg +#define XP_SOCK_READ read +#define XP_SOCK_WRITE write +#define XP_SOCK_READV readv +#define XP_SOCK_WRITEV writev +#define XP_SOCK_GETPEERNAME getpeername +#define XP_SOCK_GETSOCKNAME getsockname +#define XP_SOCK_GETSOCKOPT getsockopt +#define XP_SOCK_SETSOCKOPT setsockopt +#define XP_SOCK_CLOSE close +#define XP_SOCK_DUP dup + +#endif /* XP_UNIX */ + +/*IBM-DSR072296 - now using WinSock 1.1 support in OS/2 Merlin instead of DOUGSOCK...*/ +#if defined(XP_WIN) || ( defined(XP_OS2) && !defined(XP_OS2_DOUGSOCK) ) +#define XP_SOCKET SOCKET +#define XP_SOCK_ERRNO WSAGetLastError() + +#define XP_SOCK_SOCKET socket +#define XP_SOCK_CONNECT connect +#define XP_SOCK_ACCEPT accept +#define XP_SOCK_BIND bind +#define XP_SOCK_LISTEN listen +#define XP_SOCK_SHUTDOWN shutdown +#define XP_SOCK_IOCTL ioctlsocket +#define XP_SOCK_RECV recv +#define XP_SOCK_RECVFROM recvfrom +#define XP_SOCK_RECVMSG recvmsg +#define XP_SOCK_SEND send +#define XP_SOCK_SENDTO sendto +#define XP_SOCK_SENDMSG sendmsg +#define XP_SOCK_READ(s,b,l) recv(s,b,l,0) +#define XP_SOCK_WRITE(s,b,l) send(s,b,l,0) +#define XP_SOCK_READV readv +#define XP_SOCK_WRITEV writev +#define XP_SOCK_GETPEERNAME getpeername +#define XP_SOCK_GETSOCKNAME getsockname +#define XP_SOCK_GETSOCKOPT getsockopt +#define XP_SOCK_SETSOCKOPT setsockopt +#define XP_SOCK_CLOSE closesocket +#define XP_SOCK_DUP dupsocket + +#endif /* XP_WIN/ XP_OS2 && not DOUGSOCK */ + +#if defined(XP_OS2) && defined(XP_OS2_DOUGSOCK) + +/* Network i/o wrappers */ +#define XP_SOCKET int +#define XP_SOCK_ERRNO sock_errno() +#define XP_SOCK_SOCKET socket +#define XP_SOCK_CONNECT connect +#define XP_SOCK_ACCEPT accept +#define XP_SOCK_BIND bind +#define XP_SOCK_LISTEN listen +#define XP_SOCK_SHUTDOWN shutdown +#define XP_SOCK_IOCTL ioctl +#define XP_SOCK_RECV receiveAndMakeReadSocketActive +#define XP_SOCK_RECVFROM recvfrom +#define XP_SOCK_RECVMSG recvmsg +#define XP_SOCK_SEND send +#define XP_SOCK_SENDTO sendto +#define XP_SOCK_SENDMSG sendmsg +#define XP_SOCK_READ(s,b,l) receiveAndMakeReadSocketActive(s,b,l,0) +#define XP_SOCK_WRITE(s,b,l) send(s,b,l,0) +#define XP_SOCK_READV readv +#define XP_SOCK_WRITEV writev +#define XP_SOCK_GETPEERNAME getpeername +#define XP_SOCK_GETSOCKNAME getsockname +#define XP_SOCK_GETSOCKOPT getsockopt +#define XP_SOCK_SETSOCKOPT setsockopt +#define XP_SOCK_CLOSE closeAndRemoveSocketFromPostList +#define XP_SOCK_DUP dupsocket + +#endif /*XP_OS2 with DOUGSOCK*/ + +#ifdef XP_MAC +/* + Remap unix sockets into GUSI +*/ +#define XP_SOCKET int +#define XP_SOCK_ERRNO errno +#define XP_SOCK_SOCKET macsock_socket +#define XP_SOCK_CONNECT macsock_connect +#define XP_SOCK_ACCEPT macsock_accept +#define XP_SOCK_BIND macsock_bind +#define XP_SOCK_LISTEN macsock_listen +#define XP_SOCK_SHUTDOWN macsock_shutdown +#define XP_SOCK_IOCTL macsock_ioctl +#define XP_SOCK_RECV(s,b,l,f) XP_SOCK_READ(s,b,l) +#define XP_SOCK_SEND(s,b,l,f) XP_SOCK_WRITE(s,b,l) +#define XP_SOCK_READ macsock_read +#define XP_SOCK_WRITE macsock_write +#define XP_SOCK_GETPEERNAME macsock_getpeername +#define XP_SOCK_GETSOCKNAME macsock_getsockname +#define XP_SOCK_GETSOCKOPT macsock_getsockopt +#define XP_SOCK_SETSOCKOPT macsock_setsockopt +#define XP_SOCK_CLOSE macsock_close +#define XP_SOCK_DUP macsock_dup + +#endif /* XP_MAC */ + +#endif /* __XP_SOCK_h_ */ diff --git a/mozilla/lib/htmldlgs/htmldlgs.c b/mozilla/lib/htmldlgs/htmldlgs.c index c323bb06ddb..64c4c2c5634 100644 --- a/mozilla/lib/htmldlgs/htmldlgs.c +++ b/mozilla/lib/htmldlgs/htmldlgs.c @@ -19,7 +19,6 @@ * Cross platform html dialogs * * - * $Id: htmldlgs.c,v 3.2 1998-06-01 22:10:21 raman Exp $ */ #include "xp.h" @@ -1061,7 +1060,11 @@ xp_MakeHTMLDialogWindow(void *proto_win, Chrome *chrome) goto done; } +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else LM_ForceJSEnabled(cx); +#endif /* MOZ_NGLAYOUT */ /* XXX - get rid of session history */ SHIST_EndSession(cx); @@ -1435,7 +1438,11 @@ XP_MakeRawHTMLDialog(void *proto_win, XPDialogInfo *dialogInfo, if ( cx == NULL ) { goto loser; } +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else LM_ForceJSEnabled(cx); +#endif /* MOZ_NGLAYOUT */ state->window = (void *)cx; state->proto_win = proto_win; @@ -1648,7 +1655,11 @@ XP_MakeHTMLPanel(void *proto_win, XPPanelInfo *panelInfo, PORT_FreeArena(arena, PR_FALSE); return; } +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else LM_ForceJSEnabled(cx); +#endif /* MOZ_NGLAYOUT */ /* XXX - get rid of session history */ SHIST_EndSession(cx); diff --git a/mozilla/lib/libmisc/shist.c b/mozilla/lib/libmisc/shist.c index 460d51a9141..d5f8db01dca 100644 --- a/mozilla/lib/libmisc/shist.c +++ b/mozilla/lib/libmisc/shist.c @@ -96,6 +96,9 @@ SHIST_FreeHistoryEntry (MWContext * ctxt, History_entry * entry) if(entry->page_services_url) XP_FREE(entry->page_services_url); +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else if(entry->savedData.FormList) LO_FreeDocumentFormListData(ctxt, entry->savedData.FormList); @@ -107,6 +110,7 @@ SHIST_FreeHistoryEntry (MWContext * ctxt, History_entry * entry) if(entry->savedData.Window) LM_DropSavedWindow(ctxt, entry->savedData.Window); +#endif /* MOZ_NGLAYOUT */ if(entry->savedData.OnLoad) PA_FREE(entry->savedData.OnLoad); if(entry->savedData.OnUnload) @@ -736,11 +740,15 @@ SHIST_AddDocument(MWContext * ctxt, History_entry * new_entry) ctxt->hist.cur_doc_ptr = (History_entry *) XP_ListGetObjectNum(ctxt->hist.list_ptr, ctxt->hist.cur_doc); +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else LO_CleanupGridHistory(ctxt); if (ctxt->is_grid_cell) { LO_UpdateGridHistory(ctxt); } +#endif /* MOZ_NGLAYOUT */ shist_update_FE(ctxt); @@ -955,6 +963,9 @@ SHIST_GetNext(MWContext * ctxt) PUBLIC int SHIST_CanGoBack(MWContext * ctxt) { +#ifdef MOZ_NGLAYOUT + return FALSE; +#else History *hist; hist = &ctxt->hist; @@ -968,8 +979,8 @@ SHIST_CanGoBack(MWContext * ctxt) } return FALSE; } - return TRUE; +#endif /* MOZ_NGLAYOUT */ } /* --- @@ -981,6 +992,9 @@ SHIST_CanGoBack(MWContext * ctxt) PUBLIC int SHIST_CanGoForward(MWContext * ctxt) { +#ifdef MOZ_NGLAYOUT + return FALSE; +#else History *hist; hist = &ctxt->hist; @@ -996,6 +1010,7 @@ SHIST_CanGoForward(MWContext * ctxt) } return TRUE; +#endif /* MOZ_NGLAYOUT */ } diff --git a/mozilla/lib/xp/xp_cntxt.c b/mozilla/lib/xp/xp_cntxt.c index 2bd19b5cc9b..1f841d7da6b 100644 --- a/mozilla/lib/xp/xp_cntxt.c +++ b/mozilla/lib/xp/xp_cntxt.c @@ -433,6 +433,9 @@ XP_GetNonGridContext(MWContext *context) Bool XP_FindNamedAnchor(MWContext * context, URL_Struct * url, int32 *xpos, int32 *ypos) { +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else History_entry *he; if (!context) @@ -454,6 +457,7 @@ Bool XP_FindNamedAnchor(MWContext * context, URL_Struct * url, /* NET_FreeURLStruct( url ); */ return TRUE; } +#endif /* MOZ_NGLAYOUT */ return FALSE; } @@ -462,12 +466,16 @@ Bool XP_FindNamedAnchor(MWContext * context, URL_Struct * url, */ void XP_RefreshAnchors() { +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else int i; for (i=1; i<= XP_ListCount(xp_GlobalContextList); i++) { MWContext * compContext = (MWContext *)XP_ListGetObjectNum(xp_GlobalContextList, i); LO_RefreshAnchors(compContext); } +#endif /* MOZ_NGLAYOUT */ } /* XP_InterruptContext @@ -496,7 +504,11 @@ void XP_InterruptContext(MWContext * context) NET_InterruptWindow(context); if (context->img_cx) IL_InterruptContext(context->img_cx); +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else ET_InterruptContext(context); +#endif /* MOZ_NGLAYOUT */ } Bool XP_IsContextBusy(MWContext * context) @@ -529,8 +541,10 @@ Bool XP_IsContextStoppable(MWContext * context) if (NET_AreThereActiveConnectionsForWindow(context)) return TRUE; +#ifndef MOZ_NGLAYOUT if (LM_IsActive(context)) return TRUE; +#endif /* MOZ_NGLAYOUT */ while ((child = (MWContext*)XP_ListGetObjectNum (context->grid_children, i++))) diff --git a/mozilla/modules/xml/glue/xmlglue.c b/mozilla/modules/xml/glue/xmlglue.c index 23a0aa8cbb8..11207559cac 100644 --- a/mozilla/modules/xml/glue/xmlglue.c +++ b/mozilla/modules/xml/glue/xmlglue.c @@ -122,6 +122,9 @@ xml_complete (NET_StreamClass *stream) void outputToStream (XMLFile f, char* s) { +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else int ans = 0; NET_StreamClass *stream = (NET_StreamClass*) f->stream; if (s == NULL) { @@ -160,6 +163,7 @@ outputToStream (XMLFile f, char* s) } else { strcat(f->outputBuffer, s); } +#endif /* MOZ_NGLAYOUT */ } @@ -328,6 +332,9 @@ xmlhtml_abort(NET_StreamClass *stream, int status) void xmlhtml_complete_int (XMLFile xml) { +#ifdef MOZ_NGLAYOUT + XP_ASSERT(0); +#else MWContext *cx = (MWContext *)xml->mwcontext; int16 save_offscreen_mode; @@ -357,6 +364,7 @@ void xmlhtml_complete_int (XMLFile xml) { newstream->complete(newstream); NET_FreeURLStruct(nurls); } +#endif /* MOZ_NGLAYOUT */ } void