зеркало из https://github.com/mozilla/pjs.git
Touchdown of MARINER_DOM_BRANCH...
This commit is contained in:
Родитель
ea7e325503
Коммит
11dfd2eaaa
|
@ -743,6 +743,31 @@ ET_HandlePref(JSContext * cx, uint argc, jsval * argv, jsval * rval);
|
|||
extern void
|
||||
ET_SetPluginWindow(MWContext * pContext, void * app);
|
||||
|
||||
#ifdef DOM
|
||||
typedef enum {
|
||||
SP_SetColor,
|
||||
SP_SetBackground,
|
||||
SP_SetFontWeight,
|
||||
SP_SetFontFamily,
|
||||
SP_SetFontSize,
|
||||
SP_SetFontSlant
|
||||
} ETSpanOp;
|
||||
|
||||
extern int
|
||||
ET_TweakSpan(MWContext * context, void *name_rec, void *param_ptr,
|
||||
int32 param_val, ETSpanOp op, int32 doc_id);
|
||||
|
||||
typedef enum {
|
||||
TR_SetHref,
|
||||
TR_SetVisibility,
|
||||
TR_SetData
|
||||
} ETTransclusionOp;
|
||||
|
||||
extern int
|
||||
ET_TweakTransclusion(MWContext * context, void *xmlFile, void *param_ptr,
|
||||
int32 param_val, ETTransclusionOp op, int32 doc_id);
|
||||
#endif
|
||||
|
||||
NSPR_END_EXTERN_C
|
||||
|
||||
#endif /* libevent_h___ */
|
||||
|
|
|
@ -96,6 +96,10 @@ typedef struct MochaDecoder {
|
|||
JSObject *option_prototype;
|
||||
JSObject *rect_prototype;
|
||||
JSObject *url_prototype;
|
||||
#ifdef DOM
|
||||
JSObject *span_prototype;
|
||||
JSObject *transclusion_prototype;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Window sub-objects. These must also follow the CLEAR/HOLD/DROP
|
||||
|
@ -155,6 +159,10 @@ typedef enum {
|
|||
LM_IMAGES,
|
||||
LM_FORMELEMENTS,
|
||||
LM_LAYERS
|
||||
#ifdef DOM
|
||||
, LM_SPANS
|
||||
, LM_TRANSCLUSIONS
|
||||
#endif
|
||||
} ReflectedObject;
|
||||
|
||||
/*
|
||||
|
@ -370,6 +378,22 @@ LO_GetNamedAnchorByIndex(MWContext *context, int32 layer_id, uint index);
|
|||
extern uint
|
||||
LO_EnumerateNamedAnchors(MWContext *context, int32 layer_id);
|
||||
|
||||
#ifdef DOM
|
||||
/*
|
||||
* Layout helper function to find a span by its index in the
|
||||
* document.spans[] array.
|
||||
*/
|
||||
extern struct lo_NameList_struct *
|
||||
LO_GetSpanByIndex(MWContext *context, int32 layer_id, uint index);
|
||||
|
||||
extern uint
|
||||
LO_EnumerateSpans(MWContext *context, int32 layer_id);
|
||||
|
||||
extern JSObject *
|
||||
LO_GetMochaObjectOfParentSpan( LO_Element *ele);
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Layout Mocha helper function to find an HREF Anchor by its index in the
|
||||
* document.links[] array.
|
||||
|
@ -481,6 +505,16 @@ extern JSObject *
|
|||
LM_ReflectImage(MWContext *context, LO_ImageStruct *image_data,
|
||||
PA_Tag * tag, int32 layer_id, uint index);
|
||||
|
||||
#ifdef DOM
|
||||
/* Function prototype to make JS know about <SPAN> elements */
|
||||
extern JSObject *
|
||||
LM_ReflectSpan(MWContext *context, struct lo_NameList_struct *name_rec,
|
||||
PA_Tag *tag, int32 layer_id, uint index);
|
||||
|
||||
extern JSObject *
|
||||
LM_ReflectTransclusion(MWContext *context, void *ele, int32 layer_id, uint index);
|
||||
#endif
|
||||
|
||||
extern JSBool
|
||||
LM_CanDoJS(MWContext *context);
|
||||
|
||||
|
|
|
@ -1178,8 +1178,12 @@ typedef struct LO_Span_struct {
|
|||
LO_Any lo_any;
|
||||
|
||||
Bool is_end;
|
||||
#ifdef DOM
|
||||
/* should probably keep some stuff in here... perhaps
|
||||
the tag, so we can look up the inline style. */
|
||||
void *name_rec; /* Points to lo_NameList * on the named span list */
|
||||
#endif
|
||||
|
||||
} LO_SpanStruct;
|
||||
|
||||
typedef struct LO_Div_struct {
|
||||
|
|
|
@ -128,9 +128,7 @@ typedef enum {
|
|||
} LO_LineStyle;
|
||||
|
||||
|
||||
/*#ifndef NO_TAB_NAVIGATION */
|
||||
typedef struct LO_tabFocus_struct LO_TabFocusData;
|
||||
/* NO_TAB_NAVIGATION */
|
||||
|
||||
/*
|
||||
XLation
|
||||
|
|
|
@ -107,6 +107,16 @@ extern void LO_SetLayerScrollHeight(CL_Layer *layer, uint32 height);
|
|||
|
||||
extern void LO_SetLayerBbox(CL_Layer *layer, XP_Rect *bbox);
|
||||
|
||||
#ifdef DOM
|
||||
/* Setters for span contents */
|
||||
extern void LO_SetSpanColor(MWContext *context, void *span, LO_Color *color);
|
||||
extern void LO_SetSpanBackground(MWContext *context, void *span, LO_Color *color);
|
||||
extern void LO_SetSpanFontFamily(MWContext* context, void *span, char *family);
|
||||
extern void LO_SetSpanFontWeight(MWContext* context, void *span, char *weight);
|
||||
extern void LO_SetSpanFontSize(MWContext* context, void *span, int32 size);
|
||||
extern void LO_SetSpanFontSlant(MWContext* context, void *span, char *slant);
|
||||
#endif
|
||||
|
||||
extern void LO_SetLayerBgColor(CL_Layer *layer, LO_Color *color);
|
||||
extern LO_Color * LO_GetLayerBgColor(CL_Layer *layer);
|
||||
extern void LO_SetLayerBackdropURL(CL_Layer *layer, const char *url);
|
||||
|
|
|
@ -326,6 +326,8 @@ struct MWContext_ {
|
|||
LO_TabFocusData *tab_focus_data;
|
||||
|
||||
void *ncast_channel_context;
|
||||
/* if the window is displaying an XML file, keep a pointer to the XML file structure here */
|
||||
void* xmlfile;
|
||||
};
|
||||
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче