зеркало из https://github.com/mozilla/pjs.git
- Need JS_THREADSAFE in mozilla.mak and config.mak (and because of the latter,
don't need it in js/src/makefile.win). - Added DOM support. - Break up really long lines in mozilla.mak using backslashes. - Added /I../../lib/libdom to several places (ugh). - factor some mime.lib stuff better, but still not consistent in how SMART_MAIL and MOZ_MAIL_NEWS select it. - Include spans and transclusion stuff, shaver and toshok to clean up later. - Use ?: instead of if/else in layout.c to minimize source and generated code. - Use strong typing for struct DOM_foo * types without including domstyle.h, by using mighty struct tags. - Fix doc_id signedness in lm_dom.h (also eliminate tabs, but use 8 for tab-width).
This commit is contained in:
Родитель
f07b0314db
Коммит
7f2ef26145
|
@ -176,7 +176,7 @@ _MSC_VER=1020
|
|||
#
|
||||
!if "$(MOZ_BITS)"=="32"
|
||||
#CFLAGS_RELEASE=/DNDEBUG \
|
||||
CFLAGS_RELEASE=/DNDEBUG /DCookieManagement /DSingleSignon \
|
||||
CFLAGS_RELEASE=/DNDEBUG /DCookieManagement /DSingleSignon /DJS_THREADSAFE \
|
||||
!ifdef MOZ_TRANSACTION_RECEIPTS
|
||||
/DTRANSACTION_RECEIPTS \
|
||||
!endif
|
||||
|
@ -221,7 +221,7 @@ MOZ_STACK=33679
|
|||
!if defined(MOZ_DEBUG)
|
||||
VERSTR=Dbg
|
||||
!if "$(MOZ_BITS)"=="32"
|
||||
CFLAGS_DEBUG=$(MOZ_DEBUG_FLAG) /Bd /DDEBUG /D_DEBUG $(MOZ_USERDEBUG) /DCookieManagement /DSingleSignon \
|
||||
CFLAGS_DEBUG=$(MOZ_DEBUG_FLAG) /Bd /DDEBUG /D_DEBUG $(MOZ_USERDEBUG) /DCookieManagement /DSingleSignon /DJS_THREADSAFE \
|
||||
!ifdef MOZ_TRANSACTION_RECEIPTS
|
||||
/DTRANSACTION_RECEIPTS \
|
||||
!endif
|
||||
|
@ -281,7 +281,15 @@ LINKFLAGS_DEBUG= \
|
|||
CFLAGS_DEFAULT=\
|
||||
!if "$(MOZ_BITS)"=="32"
|
||||
$(CFLAGS_DEBUG) \
|
||||
/I$(DEPTH)\dist\public\js /I$(DEPTH)\dist\public\security /I$(DEPTH)\dist\public\network /I$(DEPTH)\dist\public\htmldlgs /I$(DEPTH)\dist\public\libfont /I$(DEPTH)\dist\public\httpurl /I$(DEPTH)\dist\public\netcache /I$(DEPTH)\dist\public\jsdebug /I$(DEPTH)\dist\public\winfont
|
||||
/I$(DEPTH)\dist\public\js \
|
||||
/I$(DEPTH)\dist\public\security \
|
||||
/I$(DEPTH)\dist\public\network \
|
||||
/I$(DEPTH)\dist\public\htmldlgs \
|
||||
/I$(DEPTH)\dist\public\libfont \
|
||||
/I$(DEPTH)\dist\public\httpurl \
|
||||
/I$(DEPTH)\dist\public\netcache \
|
||||
/I$(DEPTH)\dist\public\jsdebug \
|
||||
/I$(DEPTH)\dist\public\winfont
|
||||
!else
|
||||
$(CFLAGS_RELEASE) -DFORCE_PR_LOG
|
||||
!endif
|
||||
|
@ -294,6 +302,9 @@ POLICY = moz40p3
|
|||
#
|
||||
# If you add a file in a new directory, you must add flags for that directory
|
||||
#
|
||||
!ifdef DOM
|
||||
CFLAGS_LIBDOM_C= $(CFLAGS_DEFAULT) /Fp"$(OUTDIR)/dom_priv.pch" /YX"dom_priv.h"
|
||||
!endif
|
||||
!ifdef SMART_MAIL
|
||||
CFLAGS_LIBMIME_C= $(CFLAGS_DEFAULT) /DMOZILLA_30 /I$(DEPTH)\dist\public\mime /I$(DEPTH)\lib\xp
|
||||
!else
|
||||
|
@ -304,7 +315,7 @@ CFLAGS_LIBIMG_C= $(CFLAGS_DEFAULT) /I$(DEPTH)\jpeg /Fp"$(OUTDIR)/xp.pch"
|
|||
CFLAGS_JTOOLS_C= $(CFLAGS_DEFAULT)
|
||||
CFLAGS_LIBCNV_C= $(CFLAGS_DEFAULT) /I$(DEPTH)\jpeg /Fp"$(OUTDIR)/xp.pch" /YX"xp.h"
|
||||
CFLAGS_JPEG_C= $(CFLAGS_DEFAULT)
|
||||
CFLAGS_LAYOUT_C= $(CFLAGS_DEFAULT) /Fp"$(OUTDIR)/layoutc.pch" /YX"xp.h"
|
||||
CFLAGS_LAYOUT_C= $(CFLAGS_DEFAULT) /I$(DEPTH)\lib\libdom /I$(DEPTH)\lib\libmocha /Fp"$(OUTDIR)/layoutc.pch" /YX"xp.h"
|
||||
CFLAGS_LIBSTYLE_C= $(CFLAGS_DEFAULT) /Fp"$(OUTDIR)/stylec.pch" /YX"xp.h"
|
||||
CFLAGS_LIBJAR_C= $(CFLAGS_DEFAULT)
|
||||
CFLAGS_LIBLAYER_C= $(CFLAGS_DEFAULT)
|
||||
|
@ -323,8 +334,8 @@ CFLAGS_LIBDBM_C= $(CFLAGS_DEFAULT)
|
|||
CFLAGS_PLUGIN_C= $(CFLAGS_DEFAULT)
|
||||
CFLAGS_APPLET_C= $(CFLAGS_DEFAULT) /Fp"$(OUTDIR)/lj.pch" /YX"lj.h"
|
||||
CFLAGS_EDTPLUG_C= $(CFLAGS_DEFAULT) /Fp"$(OUTDIR)/le.pch" /YX"le.h"
|
||||
CFLAGS_LIBMOCHA_C= $(CFLAGS_DEFAULT) /Fp"$(OUTDIR)/lm.pch" /YX"lm.h"
|
||||
CFLAGS_LAYOUT_CPP= $(CFLAGS_DEFAULT) /Fp"$(OUTDIR)/editor.pch" /YX"editor.h"
|
||||
CFLAGS_LIBMOCHA_C= $(CFLAGS_DEFAULT) /I$(DEPTH)\lib\libdom /Fp"$(OUTDIR)/lm.pch" /YX"lm.h"
|
||||
CFLAGS_LAYOUT_CPP= $(CFLAGS_DEFAULT) /I$(DEPTH)\lib\libdom /Fp"$(OUTDIR)/editor.pch" /YX"editor.h"
|
||||
CFLAGS_PLUGIN_CPP= $(CFLAGS_DEFAULT) /I$(DEPTH)\cmd\winfe /Fp"$(OUTDIR)/stdafx.pch" /YX"stdafx.h"
|
||||
CFLAGS_LIBPREF_C= $(CFLAGS_DEBUG)
|
||||
CFLAGS_WINFE_C= $(CFLAGS_DEFAULT)
|
||||
|
@ -489,11 +500,10 @@ LINK_LIBS= \
|
|||
!ifdef MOZ_LOC_INDEP
|
||||
$(DIST)\lib\li32.lib \
|
||||
!endif
|
||||
#!ifdef SMART_MAIL
|
||||
#!if defined(MOZ_MAIL_NEWS) || defined(SMART_MAIL)
|
||||
# $(DIST)\lib\mime.lib \
|
||||
#!endif
|
||||
!ifdef MOZ_MAIL_NEWS
|
||||
$(DIST)\lib\mime.lib \
|
||||
$(DIST)\lib\msg.lib \
|
||||
$(DIST)\lib\addr.lib \
|
||||
$(DIST)\lib\neo.lib \
|
||||
|
@ -763,6 +773,9 @@ CDEFINES=/DXP_PC /Dx386 /D_WINDOWS /D_X86_ \
|
|||
!if defined(EDITOR)
|
||||
/DENDER \
|
||||
!endif
|
||||
!if defined(DOM)
|
||||
/DDOM \
|
||||
!endif
|
||||
!if defined(MOZ_LIBTEST)
|
||||
/DLAYPROBE_API \
|
||||
!endif
|
||||
|
@ -873,6 +886,7 @@ $(OUTDIR)\mozilla.dep: $(DEPTH)\cmd\winfe\mkfiles32\mozilla.mak
|
|||
$(DEPTH)\lib\layout\laystyle.c
|
||||
$(DEPTH)\lib\layout\laysel.c
|
||||
$(DEPTH)\lib\layout\layspace.c
|
||||
$(DEPTH)\lib\layout\layspan.c
|
||||
$(DEPTH)\lib\layout\laysub.c
|
||||
$(DEPTH)\lib\layout\laytable.c
|
||||
$(DEPTH)\lib\layout\laytags.c
|
||||
|
@ -976,12 +990,22 @@ $(OUTDIR)\mozilla.dep: $(DEPTH)\cmd\winfe\mkfiles32\mozilla.mak
|
|||
$(DEPTH)\lib\libmisc\undo.c
|
||||
|
||||
!ifndef MOZ_NGLAYOUT
|
||||
!ifdef DOM
|
||||
$(DEPTH)\lib\libdom\domattr.c
|
||||
$(DEPTH)\lib\libdom\domcore.c
|
||||
$(DEPTH)\lib\libdom\domdoc.c
|
||||
$(DEPTH)\lib\libdom\domelement.c
|
||||
$(DEPTH)\lib\libdom\domnode.c
|
||||
$(DEPTH)\lib\libdom\domstyle.c
|
||||
$(DEPTH)\lib\libdom\domtext.c
|
||||
!endif
|
||||
$(DEPTH)\lib\libmocha\et_mocha.c
|
||||
$(DEPTH)\lib\libmocha\et_moz.c
|
||||
$(DEPTH)\lib\libmocha\lm_applt.c
|
||||
$(DEPTH)\lib\libmocha\lm_bars.c
|
||||
$(DEPTH)\lib\libmocha\lm_cmpnt.c
|
||||
$(DEPTH)\lib\libmocha\lm_doc.c
|
||||
$(DEPTH)\lib\libmocha\lm_dom.c
|
||||
$(DEPTH)\lib\libmocha\lm_embed.c
|
||||
$(DEPTH)\lib\libmocha\lm_event.c
|
||||
$(DEPTH)\lib\libmocha\lm_form.c
|
||||
|
@ -995,8 +1019,10 @@ $(OUTDIR)\mozilla.dep: $(DEPTH)\cmd\winfe\mkfiles32\mozilla.mak
|
|||
$(DEPTH)\lib\libmocha\lm_nav.c
|
||||
$(DEPTH)\lib\libmocha\lm_plgin.c
|
||||
$(DEPTH)\lib\libmocha\lm_screen.c
|
||||
$(DEPTH)\lib\libmocha\lm_span.c
|
||||
$(DEPTH)\lib\libmocha\lm_supdt.c
|
||||
$(DEPTH)\lib\libmocha\lm_taint.c
|
||||
$(DEPTH)\lib\libmocha\lm_trans.c
|
||||
$(DEPTH)\lib\libmocha\lm_tree.c
|
||||
$(DEPTH)\lib\libmocha\lm_trggr.c
|
||||
$(DEPTH)\lib\libmocha\lm_url.c
|
||||
|
@ -2619,6 +2645,9 @@ LINK_CL:
|
|||
!ifdef MOZ_LDAP
|
||||
$(DIST)\lib\ldapurl.lib +
|
||||
!endif
|
||||
!ifdef SMART_MAIL
|
||||
$(DIST)\lib\mime.lib +
|
||||
!endif
|
||||
!ifdef MOZ_CALENDAR
|
||||
$(DIST)\lib\cal3240.lib +
|
||||
$(DIST)\lib\nsfmt3230.lib +
|
||||
|
|
|
@ -47,6 +47,9 @@ WINOS=$(WINOS: =)^
|
|||
!if [del osuname.inc]
|
||||
!endif
|
||||
|
||||
# need this everywhere jsapi.h might be included
|
||||
LCFLAGS=$(LCFLAGS) -DJS_THREADSAFE
|
||||
|
||||
!if "$(STAND_ALONE_JAVA)" == "1"
|
||||
LCFLAGS=$(LCFLAGS) -DSTAND_ALONE_JAVA
|
||||
!endif
|
||||
|
@ -226,7 +229,7 @@ CFLAGS = $(CFLAGS) -DLIVEWIRE
|
|||
CFLAGS = $(CFLAGS) -DMOZILLA_CLIENT
|
||||
!endif
|
||||
|
||||
PERL= $(MOZ_TOOLS)\perl5\perl.exe
|
||||
PERL= $(MOZ_TOOLS)\perl5\bin\perl.exe
|
||||
MASM = $(MOZ_TOOLS)\bin\ml.exe
|
||||
|
||||
!if "$(WINOS)" == "WIN95"
|
||||
|
|
|
@ -55,7 +55,7 @@ DEFFILE = $(DLLNAME).def
|
|||
!endif
|
||||
|
||||
LLIBS=$(LIBNSPR)
|
||||
LCFLAGS= $(LCFLAGS) -DEXPORT_JS_API -DJS_THREADSAFE
|
||||
LCFLAGS= $(LCFLAGS) -DEXPORT_JS_API
|
||||
!if "$(MOZ_BITS)"=="32" && defined(MOZ_DEBUG) && defined(GLOWCODE)
|
||||
LLIBS=$(LLIBS) $(GLOWDIR)\glowcode.lib
|
||||
!endif
|
||||
|
|
|
@ -358,6 +358,7 @@ lo_NewTopState(MWContext *context, char *url)
|
|||
top_state->savedData.OnMove = NULL;
|
||||
top_state->savedData.OnResize = NULL;
|
||||
top_state->embed_count = 0;
|
||||
top_state->builtin_count = 0;
|
||||
|
||||
top_state->total_bytes = 0;
|
||||
top_state->current_bytes = 0;
|
||||
|
@ -3749,13 +3750,11 @@ lo_FinishLayout(MWContext *context, lo_DocState *state, int32 mocha_event)
|
|||
}
|
||||
#endif /* LAYPROBE_API */
|
||||
|
||||
if (state && state->top_state)
|
||||
ET_SendLoadEvent(context, mocha_event, NULL, NULL,
|
||||
LO_DOCUMENT_LAYER_ID,
|
||||
state->top_state->resize_reload);
|
||||
else
|
||||
ET_SendLoadEvent(context, mocha_event, NULL, NULL,
|
||||
LO_DOCUMENT_LAYER_ID, FALSE);
|
||||
(state && state->top_state)
|
||||
? state->top_state->resize_reload
|
||||
: FALSE);
|
||||
|
||||
/* Reset state for force loading images. */
|
||||
LO_SetForceLoadImage(NULL, FALSE);
|
||||
|
|
|
@ -34,9 +34,6 @@
|
|||
#include "stystack.h"
|
||||
|
||||
#include "libmocha.h"
|
||||
#ifdef DOM
|
||||
#include "domstyle.h"
|
||||
#endif
|
||||
|
||||
#define MEMORY_ARENAS 1
|
||||
|
||||
|
@ -849,9 +846,9 @@ struct lo_TopState_struct {
|
|||
char * mimetype;
|
||||
#endif
|
||||
#ifdef DOM
|
||||
void /*DOM_Node*/ *top_node; /* top of the DOM_Node tree */
|
||||
void /*DOM_Node*/ *current_node; /* active node (only during tree gen) */
|
||||
void /*DOM_StyleDatabase */ *style_db;
|
||||
struct DOM_Node *top_node; /* top of the DOM_Node tree */
|
||||
struct DOM_Node *current_node; /* active node (only during tree gen) */
|
||||
struct DOM_StyleDatabase *style_db;
|
||||
#endif
|
||||
void* LAPIprobe;
|
||||
};
|
||||
|
@ -1221,8 +1218,11 @@ extern intn lo_EvalAlignParam(char *str, Bool *floating);
|
|||
extern intn lo_EvalVAlignParam(char *str);
|
||||
extern void lo_EvalStyleSheetAlignment(StyleStruct *, intn *, Bool *floating);
|
||||
#ifdef DOM
|
||||
struct DOM_StyleDatabase;
|
||||
struct DOM_Node;
|
||||
void lo_SetStyleSheetLayerProperties(MWContext *context, lo_DocState *state,
|
||||
DOM_StyleDatabase *db, DOM_Node *node,
|
||||
struct DOM_StyleDatabase *db,
|
||||
struct DOM_Node *node,
|
||||
PA_Tag *tag);
|
||||
#else
|
||||
void lo_SetStyleSheetLayerProperties(MWContext *context,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* 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
|
||||
|
@ -30,7 +30,7 @@ typedef struct DOM_HTMLElementPrivate {
|
|||
TagType tagtype;
|
||||
LO_Element * ele_start;
|
||||
LO_Element * ele_end;
|
||||
uint32 doc_id;
|
||||
int32 doc_id;
|
||||
} DOM_HTMLElementPrivate;
|
||||
|
||||
#define ELEMENT_PRIV(e) ((DOM_HTMLElementPrivate *)(((DOM_Node *)(e))->data))
|
||||
|
|
Загрузка…
Ссылка в новой задаче