CONTEXT_DATA(context)->is_resizing = FALSE;
fe_scroller_resize (Widget widget, XtPointer closure){#endif  MWContext *context = (MWContext *) closure;  fe_ContextData *fep = CONTEXT_DATA(context);  MWContextType type = context->type;  /* I question the wisdom of having to do a reload every time the window     size changes... */  Dimension w = 0, h = 0;  Boolean relayout_p = False;  XtVaGetValues (widget, XmNwidth, &w, XmNheight, &h, 0);  relayout_p = ((Dimension) fep->scrolled_width) != w;/* * Inside FRAMES (and eventually elsewhere?) we DO want to reload, even if * just the height has changed. */  if ((!relayout_p)&&(context->is_grid_cell ||		    (context->grid_children &&		    XP_ListTopObject (context->grid_children))))    {      relayout_p = ((Dimension) fep->scrolled_height) != h;    }  /* Well this is kinda bogus; don't do a relayout if we're displaying one     of the magic internal-external images, since we know no wrapping can     occur. */  if (relayout_p)    {      History_entry *h = SHIST_GetCurrent (&context->hist);      if (h && h->is_binary)	relayout_p = False;    }  /* If we have just an image and we resize such that either the width   * or the height of the window is bigger than the image, and we had   * scrolled off from the left,top edge, then we will need to refresh   * the entire image. If this doesn't happen, then in the exposed parts   * the image that is repainted is off the document_x, document_y.   */  if (      /* If there is a real resize going on */      (fep->scrolled_height != h || fep->scrolled_width != w) &&      /* and if either of width or height spans the full document */      (h >= fep->document_height || w >= fep->document_width) &&      /* and if the document is not at its (0,0) origin */      (fep->document_x != 0 || fep->document_y != 0)) {    relayout_p = True;  }  /* Fullpage plugins need be told about size changes. */  if (CONTEXT_DATA(context)->is_fullpage_plugin)    {        fe_RefreshArea (context,                        CONTEXT_DATA (context)->document_x,                        CONTEXT_DATA (context)->document_y,                        1, 1);	relayout_p = False;    }  if (! XtIsRealized (widget))    /* I'm not sure this is right, but otherwise layout happens while a       new window is still getting created... */    relayout_p = False;  if (relayout_p)    {      /* If a document is currently being laid out, just update the	 scrollbars and flag it as needing to be re-figured at the end.	 Otherwise, re-lay out the document with the new width.	 Note: don't use CONTEXT_DATA (context)->active_url_count	 here, that only counts foreground transfers, not images.       */      if (XP_IsContextBusy (context)) {	CONTEXT_DATA (context)->relayout_required = True;      } else {	  /* This is unset in XFE_LayoutNewDocument. */	  CONTEXT_DATA (context)->is_resizing = TRUE;          /*	   *    Need to update these before calling relayout, because the BE	   *    is going to ask us this stuff in FE_GetDocAndWindowPosition().	   *    Seems obvious I guess. Bug #27455.	   *	   *	I moved this out of the next EDT_IS_EDITOR if, since	   *	for the new relayout stuff, grid edges don't get moved	   *	if their x or y is greater than the window width and	   *	height.  I honestly can't imagine why you wouldn't	   *	want the size change reflected as early as possible	   *	anyway -- toshok	   */	  CONTEXT_DATA(context)->scrolled_width  = (unsigned long)w;	  CONTEXT_DATA(context)->scrolled_height = (unsigned long)h;      }    }  /* We just need to update the scrollbars and scrolled_height and width;     the other expose events which are coming will take care of     repainting the text.     Moved this up here because fe_EditorRefresh needs the width     *inside* the scrollbars: bug 94115. ...Akkana   */  fe_SetDocPosition (context,		     CONTEXT_DATA (context)->document_x,		     CONTEXT_DATA (context)->document_y);#ifdef EDITOR  /*   *    This edit_view_source_hack is so completely bogus,   *    but it seems to only be edit for the editor view   *    source window. Do this for bug #23375. djw 96/06/15.   */  if (EDT_IS_EDITOR(context) || context->edit_view_source_hack) {      fe_EditorRefresh(context);  }  else#endif /*EDITOR*/#ifdef ENABLE_MARINER	  {	    int32 margin_w, margin_h;	                LO_GetDocumentMargins(context, &margin_w, &margin_h);	    	    LO_RelayoutOnResize(context, w, h, margin_w, margin_h);	  }#else	/*  As vidur suggested in Bug 59214: because JS generated content	was not put into wysiwyg, hence this source was not be shown on a resize.  	The fix was to make the reload policy for Mail/News contexts NET_NORMAL_RELOAD */        if ( (type == MWContextNews) || (type == MWContextMail) 	     || (type == MWContextNewsMsg) || (type == MWContextMailMsg) )	  fe_ReLayout (context, NET_NORMAL_RELOAD);	else	  fe_ReLayout (context, NET_RESIZE_RELOAD);#endif  /*   ** this is wretched and gross.  the assignments below are exactly the same as the ones  ** about 20 lines above.  Why do I duplicate them here, you may ask.  Well, for some  ** reason someplace in between the assignments above and the ones here (probably in  ** fe_SetDocPosition), something happens to set the scrolled_width and scrolled_height  ** to smaller values.  ** this results in a band along the bottom and right hand sides of the document, where the  ** scrollbars would normally be.  **  ** I am thoroughly disgusted.  **  ** - toshok  */  /* It's being set to the size of the drawing area (not counting   * the scrollbars) by fe_find_scrollbar_sizes, inside the    * fe_SetDocPosition call.   ...Akkana   */  CONTEXT_DATA(context)->scrolled_width  = (unsigned long)w;  CONTEXT_DATA(context)->scrolled_height = (unsigned long)h;  /* We only need the composited area without the scrollbars.  However,     since the scrollbars can become managed and then unmanaged during     layout, it is not worth the effort of keeping track of when they     are visible.  Instead we make the compositor the size of the drawing     area and just let the scrollbars clip the background layer. */  if (context->compositor)      CL_ResizeCompositorWindow(context->compositor, w, h);}