зеркало из https://github.com/mozilla/pjs.git
fixed some shack layout problems
This commit is contained in:
Родитель
5058789b36
Коммит
444d9e89cc
|
@ -404,6 +404,11 @@ lo_FormatBuiltinInternal (MWContext *context, lo_DocState *state, PA_Tag *tag,
|
|||
builtin->border_horiz_space = FEUNITS_X(builtin->border_horiz_space,
|
||||
context);
|
||||
|
||||
/* Create a layer for this builtin */
|
||||
builtin->layer =
|
||||
lo_CreateEmbeddedObjectLayer(context, state, (LO_Element*)builtin);
|
||||
|
||||
|
||||
/* builtin_list for reflection? XXX */
|
||||
|
||||
lo_FinishBuiltin (context, state, builtin);
|
||||
|
@ -439,6 +444,8 @@ lo_FinishBuiltin (MWContext *context, lo_DocState *state, LO_BuiltinStruct *buil
|
|||
builtin->x_offset += (int16)builtin->border_horiz_space;
|
||||
builtin->y_offset += (int32)builtin->border_vert_space;
|
||||
|
||||
lo_LayoutInflowBuiltin(context, state, builtin, FALSE, &line_inc, &baseline_inc);
|
||||
|
||||
lo_AppendToLineList(context, state,
|
||||
(LO_Element *)builtin, baseline_inc);
|
||||
|
||||
|
|
|
@ -322,11 +322,28 @@ lo_DisplayEmbed(MWContext *context, LO_EmbedStruct *embed)
|
|||
void
|
||||
lo_DisplayBuiltin(MWContext *context, LO_BuiltinStruct *builtin)
|
||||
{
|
||||
XP_ASSERT (context->compositor);
|
||||
CL_Layer *layer;
|
||||
|
||||
/* need to deal with layers here XXX */
|
||||
FE_DisplayBuiltin(context, FE_VIEW, builtin);
|
||||
|
||||
if (! context->compositor) {
|
||||
FE_DisplayBuiltin(context, FE_VIEW, builtin);
|
||||
return;
|
||||
}
|
||||
|
||||
layer = builtin->layer;
|
||||
XP_ASSERT(layer);
|
||||
if (! layer) /* Paranoia */
|
||||
return;
|
||||
|
||||
if (!(builtin->ele_attrmask & LO_ELE_DRAWN)) {
|
||||
/* Move layer to new position */
|
||||
CL_MoveLayer(layer,
|
||||
builtin->x + builtin->x_offset,
|
||||
builtin->y + builtin->y_offset);
|
||||
CL_SetLayerHidden(layer, PR_FALSE);
|
||||
builtin->ele_attrmask |= LO_ELE_DRAWN;
|
||||
}
|
||||
}
|
||||
#endif /* SHACK */
|
||||
|
||||
|
|
|
@ -2247,12 +2247,16 @@ lo_CreateEmbeddedObjectLayer(MWContext *context,
|
|||
vspace = tptr->lo_embed.border_vert_space;
|
||||
hspace = tptr->lo_embed.border_horiz_space;
|
||||
is_window = PR_FALSE;
|
||||
#ifdef SHACK
|
||||
if (XP_STRNCASECMP (tptr->lo_embed.value_list[0], "builtin/", 8) == 0) {
|
||||
is_window = PR_TRUE;
|
||||
}
|
||||
#endif /* SHACK */
|
||||
break;
|
||||
#ifdef SHACK
|
||||
case LO_BUILTIN:
|
||||
name = "_BUILTIN";
|
||||
tptr->lo_builtin.ele_attrmask |= LO_ELE_INVISIBLE;
|
||||
vspace = tptr->lo_builtin.border_vert_space;
|
||||
hspace = tptr->lo_builtin.border_horiz_space;
|
||||
is_window = PR_TRUE;
|
||||
break;
|
||||
#endif
|
||||
#ifdef JAVA
|
||||
case LO_JAVA:
|
||||
name = "_JAVA_APPLET";
|
||||
|
|
|
@ -1315,6 +1315,10 @@ extern void lo_UpdateStateAfterJavaAppLayout( lo_DocState *state, LO_JavaAppStru
|
|||
extern void lo_FillInEmbedGeometry(lo_DocState *state, LO_EmbedStruct *embed, Bool relayout);
|
||||
extern void lo_LayoutInflowEmbed(MWContext *context, lo_DocState *state, LO_EmbedStruct *embed,
|
||||
Bool inRelayout, int32 *line_inc, int32 *baseline_inc);
|
||||
#ifdef SHACK
|
||||
void lo_LayoutInflowBuiltin(MWContext *context, lo_DocState *state, LO_BuiltinStruct *builtin,
|
||||
Bool inRelayout, int32 *line_inc, int32 *baseline_inc);
|
||||
#endif
|
||||
extern void lo_LayoutFloatEmbed(MWContext *context, lo_DocState *state, LO_EmbedStruct *embed, Bool updateFE);
|
||||
extern void lo_UpdateStateAfterEmbedLayout( lo_DocState *state, LO_EmbedStruct *embed,
|
||||
int32 line_inc, int32 baseline_inc );
|
||||
|
|
Загрузка…
Ссылка в новой задаче