diff --git a/mozilla/lib/layout/laylayer.c b/mozilla/lib/layout/laylayer.c index 18ccf744e40..665a52691e8 100644 --- a/mozilla/lib/layout/laylayer.c +++ b/mozilla/lib/layout/laylayer.c @@ -2103,6 +2103,11 @@ lo_update_embedded_object_window(CL_Layer *layer) case LO_EMBED: FE_DisplayEmbed(context, FE_VIEW, &tptr->lo_embed); break; +#ifdef SHACK + case LO_BUILTIN: + FE_DisplayBuiltin(context, FE_VIEW, &tptr->lo_builtin); + break; +#endif /* SHACK */ #ifdef JAVA case LO_JAVA: FE_DisplayJavaApp(context, FE_VIEW, &tptr->lo_java); @@ -2155,6 +2160,12 @@ lo_window_layer_visibility_changed(CL_Layer *layer, tptr->lo_embed.ele_attrmask &= ~LO_ELE_INVISIBLE; tptr->lo_embed.ele_attrmask |= LO_ELE_INVISIBLE * !visible; break; +#ifdef SHACK + case LO_BUILTIN: + tptr->lo_builtin.ele_attrmask &= ~LO_ELE_INVISIBLE; + tptr->lo_builtin.ele_attrmask |= LO_ELE_INVISIBLE * !visible; + break; +#endif /* SHACK */ #ifdef JAVA case LO_JAVA: tptr->lo_java.ele_attrmask &= ~LO_ELE_INVISIBLE; diff --git a/mozilla/lib/layout/layobj.c b/mozilla/lib/layout/layobj.c index 6b50c6c5729..d4e703bf3b3 100644 --- a/mozilla/lib/layout/layobj.c +++ b/mozilla/lib/layout/layobj.c @@ -277,8 +277,8 @@ lo_FormatObject(MWContext* context, lo_DocState* state, PA_Tag* tag) if (XP_STRNCASECMP(str, "builtin", 7) == 0) { if (type == LO_NONE) - type = LO_EMBED; - else if (type != LO_EMBED) + type = LO_BUILTIN; + else if (type != LO_BUILTIN) type = LO_UNKNOWN; } #endif /* SHACK */ @@ -322,6 +322,12 @@ lo_FormatObject(MWContext* context, lo_DocState* state, PA_Tag* tag) { object->lo_element.type = LO_EMBED; } +#ifdef SHACK + else if (type == LO_BUILTIN) + { + object->lo_element.type = LO_BUILTIN; + } +#endif #ifdef JAVA else if (type == LO_JAVA) { @@ -857,6 +863,23 @@ lo_ProcessObjectTag(MWContext* context, lo_DocState* state, PA_Tag* tag, XP_Bool top->param_names = NULL; top->param_values = NULL; } +#ifdef SHACK + else if (object->lo_element.type == LO_BUILTIN) + { + lo_FormatBuiltinObject(context, + state, + top->clone_tag, + (LO_BuiltinStruct*) object, + FALSE, /* Stream not started */ + top->param_count, + top->param_names, + top->param_values); + top->formatted_object = TRUE; + top->param_count = 0; + top->param_names = NULL; + top->param_values = NULL; + } +#endif #ifdef JAVA else if (object->lo_element.type == LO_JAVA) { diff --git a/mozilla/lib/layout/layout.c b/mozilla/lib/layout/layout.c index a594e1c444f..0a443c5318e 100644 --- a/mozilla/lib/layout/layout.c +++ b/mozilla/lib/layout/layout.c @@ -163,6 +163,10 @@ lo_InitDocLists(MWContext *context, lo_DocLists *doc_lists) doc_lists->embed_list = NULL; doc_lists->embed_list_count = 0; +#ifdef notyet /* SHACK */ + doc_lists->builtin_list = NULL; + doc_lists->builtin_list_count = 0; +#endif /* SHACK */ doc_lists->applet_list = NULL; doc_lists->applet_list_count = 0; @@ -7583,6 +7587,10 @@ void lo_UpdateStateWhileFlushingLine( MWContext *context, lo_DocState *state ) layer = tptr->lo_java.layer; border_width = tptr->lo_java.border_width; break; + case LO_BUILTIN: + layer = tptr->lo_builtin.layer; + border_width = tptr->lo_builtin.border_width; + break; #endif case LO_EMBED: layer = tptr->lo_embed.layer; diff --git a/mozilla/lib/layout/layout.h b/mozilla/lib/layout/layout.h index a5c0847c482..1064ff47c37 100644 --- a/mozilla/lib/layout/layout.h +++ b/mozilla/lib/layout/layout.h @@ -1171,6 +1171,9 @@ extern Bool lo_SetNamedSpan(lo_DocState *, PA_Block); #endif extern void lo_AddNameList(lo_DocState *, lo_DocState *); +#ifdef SHACK +extern void lo_DisplayBuiltin(MWContext *, LO_BuiltinStruct *); +#endif extern void lo_CheckNameList(MWContext *, lo_DocState *, int32); extern int32 lo_StripTextWhitespace(char *, int32); extern int32 lo_StripTextNewlines(char *, int32); @@ -1226,6 +1229,10 @@ extern void lo_RegionToLines (MWContext *, lo_DocState *, int32 x, int32 y, uint32 width, uint32 height, Bool dontCrop, int32* topLine, int32* bottomLine); extern int32 lo_PointToLine (MWContext *, lo_DocState *, int32 x, int32 y); +#ifdef SHACK +extern void lo_FormatBuiltinObject(MWContext*, lo_DocState*, PA_Tag*, LO_BuiltinStruct*, Bool, + uint32 count, char** names, char** values); +#endif extern void lo_GetLineEnds(MWContext *, lo_DocState *, int32 line, LO_Element** retBegin, LO_Element** retEnd); extern void lo_CalcAlignOffsets(lo_DocState *, LO_TextInfo *, intn, diff --git a/mozilla/lib/layout/layutil.c b/mozilla/lib/layout/layutil.c index 18e30af389a..d4840668c35 100644 --- a/mozilla/lib/layout/layutil.c +++ b/mozilla/lib/layout/layutil.c @@ -104,6 +104,16 @@ lo_GetElementBbox(LO_Element *element, XP_Rect *rect) } break; +#ifdef SHACK + case LO_BUILTIN: + { + LO_BuiltinStruct *builtin = &element->lo_builtin; + rect->right += 2 * (builtin->border_width + builtin->border_horiz_space); + rect->bottom += 2 * (builtin->border_width + builtin->border_vert_space); + } + break; +#endif /* SHACK */ + #ifdef JAVA case LO_JAVA: { @@ -1982,6 +1992,11 @@ lo_NewElement(MWContext *context, lo_DocState *state, intn type, case LO_TABLE: size = sizeof(LO_TableStruct); break; +#ifdef SHACK + case LO_BUILTIN: + size = sizeof(LO_BuiltinStruct); + break; +#endif case LO_CELL: size = sizeof(LO_CellStruct); break; @@ -3754,6 +3769,11 @@ Bool LO_IsWithinSpan( LO_Element *ele ) case LO_JAVA: isInSpan = ele->lo_java.ele_attrmask & LO_ELE_IN_SPAN ? TRUE : FALSE; break; +#ifdef SHACK + case LO_BUILTIN: + isInSpan = ele->lo_builtin.ele_attrmask & LO_ELE_IN_SPAN ? TRUE : FALSE; + break; +#endif } } return isInSpan; diff --git a/mozilla/lib/layout/lo_funcs.h b/mozilla/lib/layout/lo_funcs.h index ef9be7ba040..ddadbcaf99a 100644 --- a/mozilla/lib/layout/lo_funcs.h +++ b/mozilla/lib/layout/lo_funcs.h @@ -59,6 +59,10 @@ typedef struct fe_functions { int32 start_pos, int32 end_pos, XP_Bool need_bg); void (*DisplayEmbed)(void *fe_context, int iLocation, LO_EmbedStruct *embed); +#ifdef SHACK + void (*DisplayBuiltin)(void *fe_context, + int iLocation, LO_BuiltinStruct *builtin); +#endif void (*DisplayJavaApp)(void *fe_context, int iLocation, LO_JavaAppStruct *java_app); void (*DisplayImage)(void *fe_context, @@ -100,6 +104,10 @@ typedef struct fe_functions { LO_EdgeStruct *edge); void (*FreeEmbedElement)(void *fe_context, LO_EmbedStruct *embed); +#ifdef SHACK + void (*FreeBuiltinElement)(void *fe_context, + LO_BuiltlinStruct *builtin); +#endif void (*HideJavaAppElement)(void *fe_context, void *session_data); void (*FreeImageElement)(void *fe_context, diff --git a/mozilla/lib/layout/shim.h b/mozilla/lib/layout/shim.h index 3b17ac2a182..d0e3eb3b87c 100644 --- a/mozilla/lib/layout/shim.h +++ b/mozilla/lib/layout/shim.h @@ -50,6 +50,10 @@ extern void shim_FE_DisplaySubtext(DocumentContext context, int32 start_pos, int32 end_pos, XP_Bool need_bg); extern void shim_FE_DisplayEmbed(DocumentContext context, int iLocation, LO_EmbedStruct *embed); +#ifdef SHACK +extern void shim_FE_DisplayBuiltin(DocumentContext context, + int iLocation, LO_BuiltinStruct *builtin); +#endif extern void shim_FE_DisplayJavaApp(DocumentContext context, int iLocation, LO_JavaAppStruct *java_app); extern void shim_FE_DisplayImage(DocumentContext context, @@ -91,6 +95,10 @@ extern void shim_FE_FreeEdgeElement(DocumentContext context, LO_EdgeStruct *edge); extern void shim_FE_FreeEmbedElement(DocumentContext context, LO_EmbedStruct *embed); +#ifdef SHACK +extern void shim_FE_FreeBuiltinElement(DocumentContext context, + LO_BuiltinStruct *builtin); +#endif extern void shim_FE_HideJavaAppElement(DocumentContext context, void *session_data); extern void shim_FE_FreeImageElement(DocumentContext context,