зеркало из https://github.com/mozilla/gecko-dev.git
Remove old MOCHA #ifdefs
This commit is contained in:
Родитель
b32c7c1954
Коммит
79abd7d8a7
|
@ -1765,9 +1765,7 @@ lo_begin_layer_internal(MWContext *context,
|
|||
|
||||
/* Push this layer on the layer stack */
|
||||
lo_PushLayerState(state->top_state, layer_state);
|
||||
#ifdef MOCHA
|
||||
ET_SetActiveLayer(context, layer_state->id);
|
||||
#endif /* MOCHA */
|
||||
state->layer_nest_level++;
|
||||
|
||||
if (param->src) {
|
||||
|
@ -2343,10 +2341,8 @@ lo_EndLayer(MWContext *context,
|
|||
|
||||
state->layer_nest_level--;
|
||||
lo_PopLayerState(state);
|
||||
#ifdef MOCHA
|
||||
enclosing_layer_state = lo_CurrentLayerState(state);
|
||||
ET_SetActiveLayer(context, enclosing_layer_state->id);
|
||||
#endif /* MOCHA */
|
||||
|
||||
if (block->is_dynamic) {
|
||||
lo_TopState * top_state;
|
||||
|
@ -2373,11 +2369,9 @@ lo_EndLayer(MWContext *context,
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef MOCHA
|
||||
if (send_load_event)
|
||||
ET_SendLoadEvent(context, EVENT_LOAD, NULL, NULL, layer_state->id,
|
||||
state->top_state->resize_reload);
|
||||
#endif
|
||||
|
||||
lo_DeleteBlock(block);
|
||||
layer_state->temp_block = NULL;
|
||||
|
@ -2721,9 +2715,7 @@ LO_PrepareLayerForWriting(MWContext *context, int32 layer_id,
|
|||
state->layer_nest_level++;
|
||||
/* Push this layer on the layer stack */
|
||||
lo_PushLayerState(state->top_state, layer_state);
|
||||
#ifdef MOCHA
|
||||
ET_SetActiveLayer(context, layer_state->id);
|
||||
#endif /* MOCHA */
|
||||
|
||||
block->clip_expansion_policy = lo_GetLayerClipExpansionPolicy(layer);
|
||||
|
||||
|
|
|
@ -179,9 +179,7 @@ lo_FormatBuiltinInternal (MWContext *context, lo_DocState *state, PA_Tag *tag,
|
|||
#endif
|
||||
|
||||
builtin->nextBuiltin = NULL;
|
||||
#ifdef MOCHA
|
||||
builtin->mocha_object = NULL;
|
||||
#endif
|
||||
|
||||
builtin->FE_Data = NULL;
|
||||
builtin->session_data = NULL;
|
||||
|
|
|
@ -982,11 +982,7 @@ void lo_CreateCellFromSubDoc( MWContext *context, lo_DocState *state,
|
|||
* back up to the top level state, instead of propogating up
|
||||
* like we used to.
|
||||
*/
|
||||
#ifdef MOCHA
|
||||
lo_AddNameList(state->top_state->doc_state, subdoc_state);
|
||||
#else
|
||||
lo_AddNameList(state, subdoc_state);
|
||||
#endif /* MOCHA */
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -332,10 +332,7 @@ lo_FormatEmbedInternal(MWContext *context, lo_DocState *state, PA_Tag *tag,
|
|||
lo_DocLists *doc_lists;
|
||||
|
||||
embed->nextEmbed= NULL;
|
||||
#ifdef MOCHA
|
||||
embed->objTag.mocha_object = NULL;
|
||||
#endif
|
||||
|
||||
embed->objTag.FE_Data = NULL;
|
||||
embed->objTag.session_data = NULL;
|
||||
embed->objTag.line_height = state->line_height;
|
||||
|
|
|
@ -448,10 +448,8 @@ lo_BeginForm(MWContext *context, lo_DocState *state, PA_Tag *tag)
|
|||
form->form_ele_size = 0;
|
||||
form->form_elements = NULL;
|
||||
form->next = NULL;
|
||||
#ifdef MOCHA
|
||||
form->name = lo_FetchParamValue(context, tag, PARAM_NAME);
|
||||
form->mocha_object = NULL;
|
||||
#endif
|
||||
|
||||
buff = lo_FetchParamValue(context, tag, PARAM_ACTION);
|
||||
if (buff != NULL)
|
||||
|
@ -558,12 +556,10 @@ lo_BeginForm(MWContext *context, lo_DocState *state, PA_Tag *tag)
|
|||
form->next = doc_lists->form_list;
|
||||
doc_lists->form_list = form;
|
||||
|
||||
#ifdef MOCHA
|
||||
if (!state->in_relayout)
|
||||
{
|
||||
lo_BeginReflectForm(context, state, tag, form);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -627,12 +623,10 @@ lo_EndForm(MWContext *context, lo_DocState *state)
|
|||
FE_FormTextIsSubmit(context, single_text_ele);
|
||||
}
|
||||
|
||||
#ifdef MOCHA
|
||||
if (!state->in_relayout)
|
||||
{
|
||||
lo_EndReflectForm(context, form_list);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -774,10 +768,8 @@ new_form_element(MWContext *context, lo_DocState *state, int32 type)
|
|||
form_element->layer_id = lo_CurrentLayerId(state);
|
||||
form_element->element_data = NULL;
|
||||
form_element->element_index = 0;
|
||||
#ifdef MOCHA
|
||||
form_element->mocha_object = NULL;
|
||||
form_element->event_handler_present = FALSE;
|
||||
#endif
|
||||
|
||||
/* TEXTATTR HERE */
|
||||
#ifdef DOM
|
||||
|
@ -977,9 +969,9 @@ lo_form_input_text(MWContext *context, lo_DocState *state,
|
|||
LO_FormElementStruct *form_element;
|
||||
lo_FormElementTextData *form_data;
|
||||
PA_Block buff;
|
||||
#if defined(XP_MAC)&&defined(MOCHA)
|
||||
#if defined(XP_MAC)
|
||||
PA_Block keydown, keypress, keyup;
|
||||
#endif /* defined(XP_MAC)&&defined(MOCHA) */
|
||||
#endif /* defined(XP_MAC) */
|
||||
char *str;
|
||||
char *tptr;
|
||||
int16 charset;
|
||||
|
@ -1116,7 +1108,7 @@ lo_form_input_text(MWContext *context, lo_DocState *state,
|
|||
PA_FREE(buff);
|
||||
}
|
||||
|
||||
#if defined(XP_MAC)&&defined(MOCHA)
|
||||
#if defined(XP_MAC)
|
||||
keydown = lo_FetchParamValue(context, tag, PARAM_ONKEYDOWN);
|
||||
keypress = lo_FetchParamValue(context, tag, PARAM_ONKEYPRESS);
|
||||
keyup = lo_FetchParamValue(context, tag, PARAM_ONKEYUP);
|
||||
|
@ -1132,7 +1124,7 @@ lo_form_input_text(MWContext *context, lo_DocState *state,
|
|||
PA_FREE(keypress);
|
||||
if (keyup)
|
||||
PA_FREE(keyup);
|
||||
#endif /* defined(XP_MAC)&&defined(MOCHA) */
|
||||
#endif /* defined(XP_MAC) */
|
||||
|
||||
return(form_element);
|
||||
}
|
||||
|
@ -1145,9 +1137,9 @@ lo_form_textarea(MWContext *context, lo_DocState *state,
|
|||
LO_FormElementStruct *form_element;
|
||||
lo_FormElementTextareaData *form_data;
|
||||
PA_Block buff;
|
||||
#if defined(XP_MAC)&&defined(MOCHA)
|
||||
#if defined(XP_MAC)
|
||||
PA_Block keydown, keypress, keyup;
|
||||
#endif /* defined(XP_MAC)&&defined(MOCHA) */
|
||||
#endif /* defined(XP_MAC) */
|
||||
char *str;
|
||||
|
||||
form_element = new_form_element(context, state, type);
|
||||
|
@ -1254,7 +1246,7 @@ lo_form_textarea(MWContext *context, lo_DocState *state,
|
|||
PA_FREE(buff);
|
||||
}
|
||||
|
||||
#if defined(XP_MAC)&&defined(MOCHA)
|
||||
#if defined(XP_MAC)
|
||||
keydown = lo_FetchParamValue(context, tag, PARAM_ONKEYDOWN);
|
||||
keypress = lo_FetchParamValue(context, tag, PARAM_ONKEYPRESS);
|
||||
keyup = lo_FetchParamValue(context, tag, PARAM_ONKEYUP);
|
||||
|
@ -1270,7 +1262,7 @@ lo_form_textarea(MWContext *context, lo_DocState *state,
|
|||
PA_FREE(keypress);
|
||||
if (keyup)
|
||||
PA_FREE(keyup);
|
||||
#endif /* defined(XP_MAC)&&defined(MOCHA) */
|
||||
#endif /* defined(XP_MAC) */
|
||||
|
||||
return(form_element);
|
||||
}
|
||||
|
@ -1792,10 +1784,8 @@ lo_form_select(MWContext *context, lo_DocState *state, PA_Tag *tag)
|
|||
form_data->saved_tag = PA_CloneMDLTag(tag);
|
||||
}
|
||||
|
||||
#ifdef MOCHA
|
||||
/* needs to be moved */
|
||||
lo_ReflectFormElement(context, state, tag, form_element);
|
||||
#endif
|
||||
|
||||
return(form_element);
|
||||
}
|
||||
|
@ -1884,7 +1874,6 @@ lo_add_element_to_form_list(MWContext *context, lo_DocState *state,
|
|||
(form_list->form_ele_cnt *
|
||||
sizeof(LO_Element *)));
|
||||
}
|
||||
#ifdef MOCHA
|
||||
if (form_list->form_elements != NULL)
|
||||
{
|
||||
int32 i;
|
||||
|
@ -1899,7 +1888,6 @@ lo_add_element_to_form_list(MWContext *context, lo_DocState *state,
|
|||
}
|
||||
PA_UNLOCK(form_list->form_elements);
|
||||
}
|
||||
#endif
|
||||
form_list->form_ele_size = form_list->form_ele_cnt;
|
||||
}
|
||||
if (form_list->form_elements == NULL)
|
||||
|
@ -1910,7 +1898,6 @@ lo_add_element_to_form_list(MWContext *context, lo_DocState *state,
|
|||
return(FALSE);
|
||||
}
|
||||
PA_LOCK(ele_array, LO_Element **, form_list->form_elements);
|
||||
#ifdef MOCHA
|
||||
{
|
||||
LO_FormElementStruct *old_form_ele;
|
||||
|
||||
|
@ -1922,7 +1909,6 @@ lo_add_element_to_form_list(MWContext *context, lo_DocState *state,
|
|||
form_element->mocha_object = old_form_ele->mocha_object;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
ele_array[form_list->form_ele_cnt - 1] = (LO_Element *)form_element;
|
||||
PA_UNLOCK(form_list->form_elements);
|
||||
return(TRUE);
|
||||
|
@ -2568,9 +2554,7 @@ lo_ProcessInputTag(MWContext *context, lo_DocState *state, PA_Tag *tag)
|
|||
lo_add_form_element(context, state, form_element);
|
||||
}
|
||||
|
||||
#ifdef MOCHA
|
||||
lo_ReflectFormElement(context, state, tag, form_element);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -2131,9 +2131,7 @@ lo_BeginGrid(MWContext *context, lo_DocState *state, PA_Tag *tag)
|
|||
return;
|
||||
}
|
||||
|
||||
#ifdef MOCHA
|
||||
(void)lo_ProcessContextEventHandlers(context, state, tag);
|
||||
#endif
|
||||
|
||||
grid->rows = rows;
|
||||
grid->row_percents = row_percents;
|
||||
|
@ -2796,9 +2794,7 @@ lo_BeginSubgrid(MWContext *context, lo_DocState *state, PA_Tag *tag)
|
|||
return;
|
||||
}
|
||||
|
||||
#ifdef MOCHA
|
||||
(void)lo_ProcessContextEventHandlers(context, state, tag);
|
||||
#endif
|
||||
|
||||
subgrid->rows = rows;
|
||||
subgrid->row_percents = row_percents;
|
||||
|
|
|
@ -41,9 +41,7 @@ extern int MK_OUT_OF_MEMORY;
|
|||
#define IL_CLIENT /* Defined by Image Library clients */
|
||||
#include "libimg.h" /* Image Library public API. */
|
||||
|
||||
#ifdef MOCHA
|
||||
#include "libevent.h"
|
||||
#endif /* MOCHA */
|
||||
|
||||
#include "timing.h"
|
||||
|
||||
|
@ -1358,9 +1356,7 @@ lo_PartialFormatImage(MWContext *context, lo_DocState *state, PA_Tag *tag)
|
|||
{
|
||||
LO_ImageStruct *image;
|
||||
int32 layer_id;
|
||||
#ifdef MOCHA
|
||||
LM_ImageEvent mocha_event;
|
||||
#endif /* MOCHA */
|
||||
|
||||
image = (LO_ImageStruct *)tag->lo_data;
|
||||
if (image == NULL)
|
||||
|
@ -1368,7 +1364,6 @@ lo_PartialFormatImage(MWContext *context, lo_DocState *state, PA_Tag *tag)
|
|||
return;
|
||||
}
|
||||
|
||||
#ifdef MOCHA
|
||||
layer_id = lo_CurrentLayerId(state);
|
||||
image->layer_id = layer_id;
|
||||
/* Reflect the image into Javascript */
|
||||
|
@ -1393,7 +1388,6 @@ lo_PartialFormatImage(MWContext *context, lo_DocState *state, PA_Tag *tag)
|
|||
mocha_event = LM_IMGERROR;
|
||||
ET_SendImageEvent(context, image, mocha_event);
|
||||
}
|
||||
#endif
|
||||
|
||||
tag->lo_data = NULL;
|
||||
|
||||
|
@ -2130,13 +2124,11 @@ lo_FormatImage(MWContext *context, lo_DocState *state, PA_Tag *tag)
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef MOCHA
|
||||
layer_id = lo_CurrentLayerId(state);
|
||||
image->layer_id = layer_id;
|
||||
|
||||
/* Reflect the image into Javascript */
|
||||
lo_ReflectImage(context, state, tag, image, FALSE, layer_id);
|
||||
#endif
|
||||
|
||||
if (context->compositor) {
|
||||
image->layer = lo_CreateImageLayer(context, image, NULL);
|
||||
|
@ -2959,11 +2951,9 @@ lo_ImageObserver(XP_Observable observable, XP_ObservableMsg message,
|
|||
{
|
||||
IL_MessageData *data = (IL_MessageData*)message_data;
|
||||
lo_ImageObsClosure *image_obs_closure = (lo_ImageObsClosure *)closure;
|
||||
MWContext *context = NULL;
|
||||
LO_ImageStruct *lo_image = NULL;
|
||||
#ifdef MOCHA
|
||||
MWContext *context=NULL;
|
||||
LO_ImageStruct *lo_image;
|
||||
LM_ImageEvent mocha_event;
|
||||
#endif /* MOCHA */
|
||||
|
||||
if (image_obs_closure) {
|
||||
context = image_obs_closure->context;
|
||||
|
|
|
@ -187,10 +187,7 @@ lo_FormatJavaAppInternal(MWContext *context, lo_DocState *state, PA_Tag *tag, LO
|
|||
lo_DocLists *doc_lists;
|
||||
|
||||
java_app->nextApplet = NULL;
|
||||
#ifdef MOCHA
|
||||
java_app->objTag.mocha_object = NULL;
|
||||
#endif
|
||||
|
||||
java_app->objTag.FE_Data = NULL;
|
||||
java_app->objTag.session_data = NULL;
|
||||
java_app->objTag.line_height = state->line_height;
|
||||
|
|
|
@ -133,11 +133,9 @@ typedef struct lo_NameList_struct {
|
|||
LO_Element *element;
|
||||
PA_Block name; /* really a (char *) */
|
||||
struct lo_NameList_struct *next;
|
||||
#ifdef MOCHA
|
||||
uint32 index; /* Needed because with nested tables, the list
|
||||
is not guaranteed to be ordered. */
|
||||
struct JSObject *mocha_object;
|
||||
#endif
|
||||
} lo_NameList;
|
||||
|
||||
typedef struct lo_SavedFormListData_struct {
|
||||
|
@ -233,10 +231,8 @@ typedef struct lo_FormData_struct {
|
|||
int32 form_ele_size;
|
||||
PA_Block form_elements; /* really a (LO_Element **) */
|
||||
struct lo_FormData_struct *next;
|
||||
#ifdef MOCHA
|
||||
PA_Block name;
|
||||
struct JSObject *mocha_object;
|
||||
#endif
|
||||
} lo_FormData;
|
||||
|
||||
|
||||
|
@ -648,9 +644,7 @@ typedef struct lo_DocState_struct {
|
|||
int edit_current_offset;
|
||||
Bool edit_force_offset;
|
||||
Bool edit_relayout_display_blocked;
|
||||
#ifdef MOCHA
|
||||
Bool in_relayout; /* true if we're in lo_RelayoutSubdoc */
|
||||
#endif
|
||||
|
||||
int32 tab_stop;
|
||||
int32 beginning_tag_count; /* the tag count at the beginning of this state */
|
||||
|
@ -706,7 +700,6 @@ typedef struct lo_SavedData {
|
|||
lo_SavedFormListData* FormList; /* Data for all form elements in doc */
|
||||
lo_SavedEmbedListData* EmbedList; /* session data for all embeds and applets in doc */
|
||||
lo_SavedGridData* Grid; /* saved for grid history. */
|
||||
#ifdef MOCHA
|
||||
PA_Block OnLoad; /* JavaScript onload event handler source */
|
||||
PA_Block OnUnload; /* JavaScript onunload event handler source */
|
||||
PA_Block OnFocus; /* JavaScript onfocus event handler source */
|
||||
|
@ -717,7 +710,6 @@ typedef struct lo_SavedData {
|
|||
PA_Block OnDragDrop; /* JavaScript ondragdrop event handler source */
|
||||
PA_Block OnMove; /* JavaScript onmove event handler source */
|
||||
PA_Block OnResize; /* JavaScript onresize event handler source */
|
||||
#endif
|
||||
} lo_SavedData;
|
||||
|
||||
/*
|
||||
|
@ -809,7 +801,6 @@ struct lo_TopState_struct {
|
|||
lo_DocState *doc_state;
|
||||
|
||||
ED_Buffer *edit_buffer;
|
||||
#ifdef MOCHA
|
||||
uint32 script_tag_count; /* number of script tags processed so far */
|
||||
uint script_lineno; /* parser newline count at last <SCRIPT> tag */
|
||||
int8 in_script; /* script type if in script, see below */
|
||||
|
@ -825,7 +816,6 @@ struct lo_TopState_struct {
|
|||
uint32 mocha_loading_embeds_count;
|
||||
NET_StreamClass *mocha_write_stream;
|
||||
void *scriptData;
|
||||
#endif
|
||||
|
||||
struct pa_DocData_struct *doc_data;
|
||||
PA_Tag **input_write_point[MAX_INPUT_WRITE_LEVEL];
|
||||
|
@ -872,10 +862,8 @@ struct lo_TopState_struct {
|
|||
#ifdef DEBUG_ScriptPlugin
|
||||
#define SCRIPT_TYPE_PLUGIN 5
|
||||
#endif
|
||||
#ifdef MOCHA
|
||||
extern void
|
||||
lo_DestroyScriptData(void *data);
|
||||
#endif
|
||||
|
||||
/* Define to get the reload flag of the current document */
|
||||
#define FORCE_RELOAD_FLAG(top_state) \
|
||||
|
@ -1542,7 +1530,6 @@ lo_BumpEditablePosition(MWContext *context, lo_DocState *state,
|
|||
Bool
|
||||
lo_IsEmptyTag(TagType type);
|
||||
|
||||
#ifdef MOCHA
|
||||
|
||||
extern lo_TopState *
|
||||
lo_GetMochaTopState(MWContext *context);
|
||||
|
@ -1593,7 +1580,6 @@ lo_ProcessStyleTag(MWContext *context, lo_DocState *state, PA_Tag *tag);
|
|||
|
||||
extern void
|
||||
lo_BlockScriptTag(MWContext *context, lo_DocState *state, PA_Tag *tag);
|
||||
#endif /* MOCHA */
|
||||
|
||||
extern lo_DocLists *
|
||||
lo_GetCurrentDocLists(lo_DocState *state);
|
||||
|
|
|
@ -860,9 +860,7 @@ lo_reuse_current_state(MWContext *context, lo_DocState *state,
|
|||
state->edit_current_offset = 0;
|
||||
state->edit_relayout_display_blocked = FALSE;
|
||||
#endif
|
||||
#ifdef MOCHA
|
||||
state->in_relayout = FALSE;
|
||||
#endif
|
||||
|
||||
state->cur_text_block = NULL;
|
||||
|
||||
|
@ -2662,26 +2660,22 @@ lo_merge_form_data(lo_FormData *new_form_list, lo_FormData *hold_form_list)
|
|||
{
|
||||
if (hold_ele_list[i] != new_ele_list[i])
|
||||
{
|
||||
#ifdef MOCHA
|
||||
if (new_ele_list[i]->mocha_object == NULL)
|
||||
{
|
||||
new_ele_list[i]->mocha_object
|
||||
= hold_ele_list[i]->mocha_object;
|
||||
}
|
||||
#endif
|
||||
hold_ele_list[i] = new_ele_list[i];
|
||||
}
|
||||
}
|
||||
PA_UNLOCK(hold_form_list->form_elements);
|
||||
PA_UNLOCK(new_form_list->form_elements);
|
||||
|
||||
#ifdef MOCHA
|
||||
/* XXX sometimes the second pass does not reflect a form object! */
|
||||
if (new_form_list->mocha_object != NULL)
|
||||
{
|
||||
hold_form_list->mocha_object = new_form_list->mocha_object;
|
||||
}
|
||||
#endif
|
||||
return(hold_form_list);
|
||||
}
|
||||
|
||||
|
|
|
@ -7463,9 +7463,6 @@ XP_TRACE(("lo_LayoutTag(%d)\n", tag->type));
|
|||
* this can result in the loss of body data!
|
||||
*/
|
||||
case P_UNKNOWN:
|
||||
#ifndef MOCHA
|
||||
unknown:
|
||||
#endif
|
||||
if (state->top_state->in_head != FALSE)
|
||||
{
|
||||
char *tdata;
|
||||
|
|
|
@ -27,13 +27,11 @@
|
|||
#include "stystruc.h"
|
||||
#include "stystack.h"
|
||||
#include "layers.h"
|
||||
#ifdef NSPR20
|
||||
#ifdef XP_MAC
|
||||
#include "prpriv.h"
|
||||
#else
|
||||
#include "private/prpriv.h" /* for PR_NewNamedMonitor */
|
||||
#endif
|
||||
#endif /* NSPR20 */
|
||||
#include "intl_csi.h"
|
||||
|
||||
#ifdef DOM
|
||||
|
@ -2193,7 +2191,6 @@ lo_SetNamedAnchor(lo_DocState *state, PA_Block name)
|
|||
|
||||
doc_lists = lo_GetCurrentDocLists(state);
|
||||
|
||||
#ifdef MOCHA
|
||||
if (state->in_relayout) {
|
||||
/* Look for the old lo_NameList. Its mocha_object is still valid. */
|
||||
lo_NameList *name_list = doc_lists->name_list;
|
||||
|
@ -2224,7 +2221,6 @@ lo_SetNamedAnchor(lo_DocState *state, PA_Block name)
|
|||
}
|
||||
}
|
||||
if (!name_rec || !state->in_relayout) {
|
||||
#endif /* MOCHA */
|
||||
name_rec = XP_NEW(lo_NameList);
|
||||
if (name_rec == NULL)
|
||||
{
|
||||
|
@ -2232,10 +2228,8 @@ lo_SetNamedAnchor(lo_DocState *state, PA_Block name)
|
|||
PA_FREE(name);
|
||||
return FALSE;
|
||||
}
|
||||
#ifdef MOCHA
|
||||
name_rec->mocha_object = NULL;
|
||||
}
|
||||
#endif /* MOCHA */
|
||||
name_rec->x = 0;
|
||||
name_rec->y = 0;
|
||||
name_rec->name = name;
|
||||
|
@ -2338,7 +2332,6 @@ lo_SetNamedSpan(lo_DocState *state, PA_Block id)
|
|||
|
||||
doc_lists = lo_GetCurrentDocLists(state);
|
||||
|
||||
#ifdef MOCHA
|
||||
if (state->in_relayout) {
|
||||
/* Look for the old lo_NameList. Its mocha_object is still valid. */
|
||||
lo_NameList *span_list = doc_lists->span_list;
|
||||
|
@ -2369,7 +2362,6 @@ lo_SetNamedSpan(lo_DocState *state, PA_Block id)
|
|||
}
|
||||
}
|
||||
if (!name_rec || !state->in_relayout) {
|
||||
#endif /* MOCHA */
|
||||
name_rec = XP_NEW(lo_NameList);
|
||||
if (name_rec == NULL)
|
||||
{
|
||||
|
@ -2377,10 +2369,8 @@ lo_SetNamedSpan(lo_DocState *state, PA_Block id)
|
|||
PA_FREE(id);
|
||||
return FALSE;
|
||||
}
|
||||
#ifdef MOCHA
|
||||
name_rec->mocha_object = NULL;
|
||||
}
|
||||
#endif /* MOCHA */
|
||||
name_rec->x = 0;
|
||||
name_rec->y = 0;
|
||||
name_rec->name = id;
|
||||
|
@ -2653,11 +2643,9 @@ lo_AppendToLineList(MWContext *context, lo_DocState *state,
|
|||
}
|
||||
state->current_named_anchor = NULL;
|
||||
}
|
||||
#ifdef MOCHA
|
||||
else if (state->current_anchor) {
|
||||
state->current_anchor->element = element;
|
||||
}
|
||||
#endif /* MOCHA */
|
||||
|
||||
element->lo_any.next = NULL;
|
||||
element->lo_any.prev = NULL;
|
||||
|
|
Загрузка…
Ссылка в новой задаче