Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 313038 Details for
Bug 456432
(Windowless Crash) Flash 10 w/ Firefox 3
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
xulrunner-1.9.0.1-windowless-plugins-crash-moz435764.patch
xulrunner-1.9.0.1-windowless-plugins-crash-moz435764.patch (text/x-patch), 21.04 KB, created by
Warren Togami
on 2008-07-30 20:44:08 UTC
(
hide
)
Description:
xulrunner-1.9.0.1-windowless-plugins-crash-moz435764.patch
Filename:
MIME Type:
Creator:
Warren Togami
Created:
2008-07-30 20:44:08 UTC
Size:
21.04 KB
patch
obsolete
>diff -urN firefox-3.0.1.orig/mozilla/config/system-headers firefox-3.0.1/mozilla/config/system-headers >--- firefox-3.0.1.orig/mozilla/config/system-headers 2008-03-17 14:02:08.000000000 -0400 >+++ firefox-3.0.1/mozilla/config/system-headers 2008-07-30 15:22:59.000000000 -0400 >@@ -221,6 +221,7 @@ > gdk/gdkkeysyms.h > gdk/gdkpango.h > gdk/gdkprivate.h >+gdk/gdkscreen.h > gdk/gdkregion.h > gdk/gdkwindow.h > gdk/gdkx.h >diff -urN firefox-3.0.1.orig/mozilla/gfx/thebes/public/gfxXlibNativeRenderer.h firefox-3.0.1/mozilla/gfx/thebes/public/gfxXlibNativeRenderer.h >--- firefox-3.0.1.orig/mozilla/gfx/thebes/public/gfxXlibNativeRenderer.h 2007-06-19 00:19:01.000000000 -0400 >+++ firefox-3.0.1/mozilla/gfx/thebes/public/gfxXlibNativeRenderer.h 2008-07-30 14:40:45.000000000 -0400 >@@ -60,7 +60,8 @@ > * @param numClipRects the number of rects in the array, or zero if > * no clipping is required > */ >- virtual nsresult NativeDraw(Display* dpy, Drawable drawable, Visual* visual, >+ virtual nsresult NativeDraw(Screen* screen, Drawable drawable, >+ Visual* visual, Colormap colormap, > short offsetX, short offsetY, > XRectangle* clipRects, PRUint32 numClipRects) = 0; > >@@ -79,11 +80,12 @@ > // nor CLIP_RECT are set, then numClipRects will be zero > DRAW_SUPPORTS_CLIP_LIST = 0x08, > // If set, then the visual passed in can be any visual, otherwise the >- // visual passed in must be the default visual for dpy's default screen >+ // visual passed in must be the default visual for 'screen' > DRAW_SUPPORTS_NONDEFAULT_VISUAL = 0x10, >- // If set, then the display 'dpy' in the callback can be different from >- // the display passed to 'Draw' >- DRAW_SUPPORTS_ALTERNATE_DISPLAY = 0x20 >+ // If set, then the Screen 'screen' in the callback can be different >+ // from the default Screen of the display passed to 'Draw' and can be >+ // on a different display. >+ DRAW_SUPPORTS_ALTERNATE_SCREEN = 0x20, > }; > > struct DrawOutput { >diff -urN firefox-3.0.1.orig/mozilla/gfx/thebes/src/cairo-xlib-utils.c firefox-3.0.1/mozilla/gfx/thebes/src/cairo-xlib-utils.c >--- firefox-3.0.1.orig/mozilla/gfx/thebes/src/cairo-xlib-utils.c 2007-09-27 19:04:14.000000000 -0400 >+++ firefox-3.0.1/mozilla/gfx/thebes/src/cairo-xlib-utils.c 2008-07-30 15:21:06.000000000 -0400 >@@ -214,7 +214,7 @@ > int rect_count; > double device_offset_x, device_offset_y; > int max_rectangles; >- Display *dpy; >+ Screen *screen; > Visual *visual; > cairo_bool_t have_rectangular_clip; > >@@ -291,9 +291,9 @@ > } > > /* Check that the display is supported */ >- dpy = cairo_xlib_surface_get_display (target); >- if (!(capabilities & CAIRO_XLIB_DRAWING_SUPPORTS_ALTERNATE_DISPLAY) && >- dpy != default_display) { >+ screen = cairo_xlib_surface_get_screen (target); >+ if (!(capabilities & CAIRO_XLIB_DRAWING_SUPPORTS_ALTERNATE_SCREEN) && >+ screen != DefaultScreenOfDisplay (default_display)) { > CAIRO_XLIB_DRAWING_NOTE("TAKING SLOW PATH: non-default display\n"); > return False; > } >@@ -301,7 +301,7 @@ > /* Check that the visual is supported */ > visual = cairo_xlib_surface_get_visual (target); > if (!(capabilities & CAIRO_XLIB_DRAWING_SUPPORTS_NONDEFAULT_VISUAL) && >- DefaultVisual (dpy, DefaultScreen (dpy)) != visual) { >+ DefaultVisualOfScreen (screen) != visual) { > CAIRO_XLIB_DRAWING_NOTE("TAKING SLOW PATH: non-default visual\n"); > return False; > } >@@ -309,7 +309,7 @@ > /* we're good to go! */ > CAIRO_XLIB_DRAWING_NOTE("TAKING FAST PATH\n"); > cairo_surface_flush (target); >- callback (closure, dpy, d, visual, offset_x, offset_y, rectangles, >+ callback (closure, screen, d, visual, offset_x, offset_y, rectangles, > needs_clip ? rect_count : 0); > cairo_surface_mark_dirty (target); > return True; >@@ -338,16 +338,15 @@ > /* make the temporary surface match target_drawable to the extent supported > by the native rendering code */ > if (target_drawable) { >- Display *target_display = cairo_xlib_surface_get_display (target); >+ Screen *target_screen = cairo_xlib_surface_get_screen (target); > Visual *target_visual = cairo_xlib_surface_get_visual (target); >- if ((target_display == dpy || >- (capabilities & CAIRO_XLIB_DRAWING_SUPPORTS_ALTERNATE_DISPLAY)) && >- (target_visual == visual || >+ if ((target_screen == screen || >+ (capabilities & CAIRO_XLIB_DRAWING_SUPPORTS_ALTERNATE_SCREEN)) && >+ (target_visual == DefaultVisualOfScreen (target_screen) || > (capabilities & CAIRO_XLIB_DRAWING_SUPPORTS_NONDEFAULT_VISUAL))) { > drawable = target_drawable; >- dpy = target_display; >+ dpy = cairo_xlib_surface_get_display (target); > visual = target_visual; >- screen = cairo_xlib_surface_get_screen (target); > depth = cairo_xlib_surface_get_depth (target); > } > } >@@ -381,7 +380,7 @@ > double background_gray_value) > { > Drawable d = cairo_xlib_surface_get_drawable (temp_xlib_surface); >- Display *dpy = cairo_xlib_surface_get_display (temp_xlib_surface); >+ Screen *screen = cairo_xlib_surface_get_screen (temp_xlib_surface); > Visual *visual = cairo_xlib_surface_get_visual (temp_xlib_surface); > cairo_bool_t result; > cairo_t *cr = cairo_create (temp_xlib_surface); >@@ -394,7 +393,7 @@ > cairo_surface_flush (temp_xlib_surface); > /* no clipping is needed because the callback can't draw outside the native > surface anyway */ >- result = callback (closure, dpy, d, visual, 0, 0, NULL, 0); >+ result = callback (closure, screen, d, visual, 0, 0, NULL, 0); > cairo_surface_mark_dirty (temp_xlib_surface); > return result; > } >diff -urN firefox-3.0.1.orig/mozilla/gfx/thebes/src/cairo-xlib-utils.h firefox-3.0.1/mozilla/gfx/thebes/src/cairo-xlib-utils.h >--- firefox-3.0.1.orig/mozilla/gfx/thebes/src/cairo-xlib-utils.h 2006-02-22 20:01:29.000000000 -0500 >+++ firefox-3.0.1/mozilla/gfx/thebes/src/cairo-xlib-utils.h 2008-07-30 15:13:45.000000000 -0400 >@@ -56,7 +56,7 @@ > */ > typedef cairo_bool_t (* cairo_xlib_drawing_callback) > (void *closure, >- Display *dpy, >+ Screen *screen, > Drawable drawable, > Visual *visual, > short offset_x, short offset_y, >@@ -97,19 +97,19 @@ > * anything in the call to the callback. Otherwise 'num_rects' will be zero. > * Do not set both of these values. > * >- * If CAIRO_XLIB_DRAWING_SUPPORTS_ALTERNATE_DISPLAY is set, then 'dpy' can be >- * any display, otherwise it will be the display passed into >- * cairo_draw_with_xlib. >+ * If CAIRO_XLIB_DRAWING_SUPPORTS_ALTERNATE_SCREEN is set, then 'screen' can >+ * be any screen on any display, otherwise it will be the default screen of >+ * the display passed into cairo_draw_with_xlib. > * > * If CAIRO_XLIB_DRAWING_SUPPORTS_NONDEFAULT_VISUAL is set, then 'visual' can be > * any visual, otherwise it will be equal to >- * DefaultVisual (dpy, DefaultScreen (dpy)). >+ * DefaultVisualOfScreen (screen). > */ > typedef enum { > CAIRO_XLIB_DRAWING_SUPPORTS_OFFSET = 0x01, > CAIRO_XLIB_DRAWING_SUPPORTS_CLIP_RECT = 0x02, > CAIRO_XLIB_DRAWING_SUPPORTS_CLIP_LIST = 0x04, >- CAIRO_XLIB_DRAWING_SUPPORTS_ALTERNATE_DISPLAY = 0x08, >+ CAIRO_XLIB_DRAWING_SUPPORTS_ALTERNATE_SCREEN = 0x08, > CAIRO_XLIB_DRAWING_SUPPORTS_NONDEFAULT_VISUAL = 0x10 > } cairo_xlib_drawing_support_t; > >diff -urN firefox-3.0.1.orig/mozilla/gfx/thebes/src/gfxXlibNativeRenderer.cpp firefox-3.0.1/mozilla/gfx/thebes/src/gfxXlibNativeRenderer.cpp >--- firefox-3.0.1.orig/mozilla/gfx/thebes/src/gfxXlibNativeRenderer.cpp 2007-06-18 10:58:29.000000000 -0400 >+++ firefox-3.0.1/mozilla/gfx/thebes/src/gfxXlibNativeRenderer.cpp 2008-07-30 15:08:23.000000000 -0400 >@@ -40,6 +40,61 @@ > > #include "cairo-xlib-utils.h" > >+#ifdef MOZ_WIDGET_GTK2 >+#include <gdk/gdkscreen.h> >+#include <gdk/gdkx.h> >+#endif >+ >+// Look for an existing Colormap that known to be associated with visual. >+static Colormap >+LookupColormapForVisual(const Screen* screen, const Visual* visual) >+{ >+ // common case >+ if (visual == DefaultVisualOfScreen(screen)) >+ return DefaultColormapOfScreen(screen); >+ >+#ifdef MOZ_WIDGET_GTK2 >+ // I wish there were a gdk_x11_display_lookup_screen. >+ Display* dpy = DisplayOfScreen(screen); >+ GdkDisplay* gdkDpy = gdk_x11_lookup_xdisplay(dpy); >+ if (gdkDpy) { >+ gint screen_num = 0; >+ for (int s = 0; s < ScreenCount(dpy); ++s) { >+ if (ScreenOfDisplay(dpy, s) == screen) { >+ screen_num = s; >+ break; >+ } >+ } >+ GdkScreen* gdkScreen = gdk_display_get_screen(gdkDpy, screen_num); >+ >+ GdkColormap* gdkColormap = NULL; >+ if (visual == >+ GDK_VISUAL_XVISUAL(gdk_screen_get_rgb_visual(gdkScreen))) { >+ // widget/src/gtk2/mozcontainer.c uses gdk_rgb_get_colormap() >+ // which is inherited by child widgets, so this is the visual >+ // expected when drawing directly to widget surfaces or surfaces >+ // created using cairo_surface_create_similar with >+ // CAIRO_CONTENT_COLOR. >+ // gdk_screen_get_rgb_colormap is the generalization of >+ // gdk_rgb_get_colormap for any screen. >+ gdkColormap = gdk_screen_get_rgb_colormap(gdkScreen); >+ } >+ else if (visual == >+ GDK_VISUAL_XVISUAL(gdk_screen_get_rgba_visual(gdkScreen))) { >+ // This is the visual expected on displays with the Composite >+ // extension enabled when the surface has been created using >+ // cairo_surface_create_similar with CAIRO_CONTENT_COLOR_ALPHA, >+ // as happens with non-unit opacity. >+ gdkColormap = gdk_screen_get_rgba_colormap(gdkScreen); >+ } >+ if (gdkColormap != NULL) >+ return GDK_COLORMAP_XCOLORMAP(gdkColormap); >+ } >+#endif >+ >+ return None; >+} >+ > typedef struct { > gfxXlibNativeRenderer* mRenderer; > nsresult mRV; >@@ -47,17 +102,46 @@ > > static cairo_bool_t > NativeRendering(void *closure, >- Display *dpy, >+ Screen *screen, > Drawable drawable, > Visual *visual, > short offset_x, short offset_y, > XRectangle* rectangles, unsigned int num_rects) > { >+ // Cairo doesn't provide a Colormap. >+ // See if a suitable existing Colormap is known. >+ Colormap colormap = LookupColormapForVisual(screen, visual); >+ PRBool allocColormap = colormap == None; >+ if (allocColormap) { >+ // No existing colormap found. >+ // This case is not expected with MOZ_WIDGET_GTK2. >+ // Create a Colormap for the Visual. >+ // This is only really useful for Visual classes with predefined >+ // Colormap entries, but cairo would be all confused with >+ // non-default non-TrueColor colormaps anyway. >+ NS_ASSERTION(visual->c_class == TrueColor || >+ visual->c_class == StaticColor || >+ visual->c_class == StaticGray, >+ "Creating empty colormap"); >+ // If this case were expected then it might be worth considering >+ // using a service that maintains a set of Colormaps for associated >+ // Visuals so as to avoid repeating the LockDisplay required in >+ // XCreateColormap, but then it's no worse than the XCreatePixmap >+ // that produced the Drawable here. >+ colormap = XCreateColormap(DisplayOfScreen(screen), >+ RootWindowOfScreen(screen), >+ visual, AllocNone); >+ } >+ > NativeRenderingClosure* cl = (NativeRenderingClosure*)closure; > nsresult rv = cl->mRenderer-> >- NativeDraw(dpy, drawable, visual, offset_x, offset_y, >+ NativeDraw(screen, drawable, visual, colormap, offset_x, offset_y, > rectangles, num_rects); > cl->mRV = rv; >+ >+ if (allocColormap) { >+ XFreeColormap(DisplayOfScreen(screen), colormap); >+ } > return NS_SUCCEEDED(rv); > } > >@@ -87,8 +171,8 @@ > if (flags & DRAW_SUPPORTS_CLIP_LIST) { > cairoFlags |= CAIRO_XLIB_DRAWING_SUPPORTS_CLIP_LIST; > } >- if (flags & DRAW_SUPPORTS_ALTERNATE_DISPLAY) { >- cairoFlags |= CAIRO_XLIB_DRAWING_SUPPORTS_ALTERNATE_DISPLAY; >+ if (flags & DRAW_SUPPORTS_ALTERNATE_SCREEN) { >+ cairoFlags |= CAIRO_XLIB_DRAWING_SUPPORTS_ALTERNATE_SCREEN; > } > if (flags & DRAW_SUPPORTS_NONDEFAULT_VISUAL) { > cairoFlags |= CAIRO_XLIB_DRAWING_SUPPORTS_NONDEFAULT_VISUAL; >diff -urN firefox-3.0.1.orig/mozilla/layout/generic/nsObjectFrame.cpp firefox-3.0.1/mozilla/layout/generic/nsObjectFrame.cpp >--- firefox-3.0.1.orig/mozilla/layout/generic/nsObjectFrame.cpp 2008-05-06 16:49:30.000000000 -0400 >+++ firefox-3.0.1/mozilla/layout/generic/nsObjectFrame.cpp 2008-07-30 14:29:49.000000000 -0400 >@@ -483,7 +483,8 @@ > const nsIntRect& aDirtyRect) > : mWindow(aWindow), mInstance(aInstance), mDirtyRect(aDirtyRect) > {} >- virtual nsresult NativeDraw(Display* dpy, Drawable drawable, Visual* visual, >+ virtual nsresult NativeDraw(Screen* screen, Drawable drawable, >+ Visual* visual, Colormap colormap, > short offsetX, short offsetY, > XRectangle* clipRects, PRUint32 numClipRects); > private: >@@ -939,32 +940,7 @@ > window->y = origin.y; > > // refresh the plugin port as well >-#ifdef MOZ_X11 >- if(windowless) { >- // There is no plugin port window but there are some extra fields to >- // fill in. >- nsIWidget* widget = GetWindow(); >- if (widget) { >- NPSetWindowCallbackStruct* ws_info = >- static_cast<NPSetWindowCallbackStruct*>(window->ws_info); >- ws_info->display = >- static_cast<Display*>(widget->GetNativeData(NS_NATIVE_DISPLAY)); >-#ifdef MOZ_WIDGET_GTK2 >- GdkWindow* gdkWindow = >- static_cast<GdkWindow*>(widget->GetNativeData(NS_NATIVE_WINDOW)); >- GdkColormap* gdkColormap = gdk_drawable_get_colormap(gdkWindow); >- ws_info->colormap = gdk_x11_colormap_get_xcolormap(gdkColormap); >- GdkVisual* gdkVisual = gdk_colormap_get_visual(gdkColormap); >- ws_info->visual = gdk_x11_visual_get_xvisual(gdkVisual); >- ws_info->depth = gdkVisual->depth; >-#endif >- } >- } >- else >-#endif >- { >- window->window = mInstanceOwner->GetPluginPort(); >- } >+ window->window = mInstanceOwner->GetPluginPort(); > > // this will call pi->SetWindow and take care of window subclassing > // if needed, see bug 132759. >@@ -4054,7 +4030,7 @@ > Renderer::DRAW_SUPPORTS_OFFSET | > Renderer::DRAW_SUPPORTS_CLIP_RECT | > Renderer::DRAW_SUPPORTS_NONDEFAULT_VISUAL | >- Renderer::DRAW_SUPPORTS_ALTERNATE_DISPLAY; >+ Renderer::DRAW_SUPPORTS_ALTERNATE_SCREEN; > > PRBool transparent = PR_TRUE; > mInstance->GetValue(nsPluginInstanceVariable_TransparentBool, >@@ -4076,9 +4052,24 @@ > rendererFlags, nsnull); > } > >+static int >+DepthOfVisual(const Screen* screen, const Visual* visual) >+{ >+ for (int d = 0; d < screen->ndepths; d++) { >+ Depth *d_info = &screen->depths[d]; >+ for (int v = 0; v < d_info->nvisuals; v++) { >+ if (&d_info->visuals[v] == visual) >+ return d_info->depth; >+ } >+ } >+ >+ NS_ERROR("Visual not on Screen."); >+ return 0; >+} >+ > nsresult >-nsPluginInstanceOwner::Renderer::NativeDraw(Display* dpy, Drawable drawable, >- Visual* visual, >+nsPluginInstanceOwner::Renderer::NativeDraw(Screen* screen, Drawable drawable, >+ Visual* visual, Colormap colormap, > short offsetX, short offsetY, > XRectangle* clipRects, > PRUint32 numClipRects) >@@ -4120,14 +4111,10 @@ > > NPSetWindowCallbackStruct* ws_info = > static_cast<NPSetWindowCallbackStruct*>(mWindow->ws_info); >- if ( ws_info->visual != visual) { >- // NPAPI needs a colormap but the surface doesn't provide a colormap. If >- // gfxContent::CurrentSurface is a gfxXlibSurface then the visual here >- // should be derived from that of the window and so the colormap of the >- // window should be fine. For other surfaces I don't know what to use. >- NS_ASSERTION(ws_info->visual == visual, >- "Visual changed: colormap may not match"); >+ if (ws_info->visual != visual || ws_info->colormap != colormap) { > ws_info->visual = visual; >+ ws_info->colormap = colormap; >+ ws_info->depth = DepthOfVisual(screen, visual); > doupdatewindow = PR_TRUE; > } > >@@ -4138,7 +4125,7 @@ > XGraphicsExposeEvent& exposeEvent = pluginEvent.event.xgraphicsexpose; > // set the drawing info > exposeEvent.type = GraphicsExpose; >- exposeEvent.display = dpy; >+ exposeEvent.display = DisplayOfScreen(screen); > exposeEvent.drawable = drawable; > exposeEvent.x = mDirtyRect.x + offsetX; > exposeEvent.y = mDirtyRect.y + offsetY; >@@ -4367,6 +4354,21 @@ > // passing HDC till paint event when it is really > // needed. Change spec? > mPluginWindow->window = nsnull; >+#ifdef MOZ_X11 >+ // Fill in the display field. >+ nsIWidget* win = mOwner->GetWindow(); >+ NPSetWindowCallbackStruct* ws_info = >+ static_cast<NPSetWindowCallbackStruct*>(mPluginWindow->ws_info); >+ if (win) { >+ ws_info->display = >+ static_cast<Display*>(win->GetNativeData(NS_NATIVE_DISPLAY)); >+ } >+#ifdef MOZ_WIDGET_GTK2 >+ else { >+ ws_info->display = GDK_DISPLAY(); >+ } >+#endif >+#endif > } else if (mWidget) { > mWidget->Resize(mPluginWindow->width, mPluginWindow->height, > PR_FALSE); >diff -urN firefox-3.0.1.orig/mozilla/widget/src/gtk2/nsNativeThemeGTK.cpp firefox-3.0.1/mozilla/widget/src/gtk2/nsNativeThemeGTK.cpp >--- firefox-3.0.1.orig/mozilla/widget/src/gtk2/nsNativeThemeGTK.cpp 2008-04-01 19:34:20.000000000 -0400 >+++ firefox-3.0.1/mozilla/widget/src/gtk2/nsNativeThemeGTK.cpp 2008-07-30 14:38:20.000000000 -0400 >@@ -625,8 +625,8 @@ > const GdkRectangle& aGDKRect, const GdkRectangle& aGDKClip) > : mState(aState), mGTKWidgetType(aGTKWidgetType), mFlags(aFlags), > mDirection(aDirection), mGDKRect(aGDKRect), mGDKClip(aGDKClip) {} >- nsresult NativeDraw(Display* dpy, Drawable drawable, Visual* visual, >- short offsetX, short offsetY, >+ nsresult NativeDraw(Screen* screen, Drawable drawable, Visual* visual, >+ Colormap colormap, short offsetX, short offsetY, > XRectangle* clipRects, PRUint32 numClipRects); > private: > GtkWidgetState mState; >@@ -639,8 +639,8 @@ > }; > > nsresult >-ThemeRenderer::NativeDraw(Display* dpy, Drawable drawable, Visual* visual, >- short offsetX, short offsetY, >+ThemeRenderer::NativeDraw(Screen* screen, Drawable drawable, Visual* visual, >+ Colormap colormap, short offsetX, short offsetY, > XRectangle* clipRects, PRUint32 numClipRects) > { > GdkRectangle gdk_rect = mGDKRect; >@@ -651,7 +651,7 @@ > gdk_clip.x += offsetX; > gdk_clip.y += offsetY; > >- GdkDisplay* gdkDpy = gdk_x11_lookup_xdisplay(dpy); >+ GdkDisplay* gdkDpy = gdk_x11_lookup_xdisplay(DisplayOfScreen(screen)); > if (!gdkDpy) > return NS_ERROR_FAILURE; > >@@ -659,17 +659,23 @@ > if (gdkPixmap) { > g_object_ref(G_OBJECT(gdkPixmap)); > } else { >+ // XXX gtk+2.10 has gdk_pixmap_foreign_new_for_screen which would not >+ // use XGetGeometry. > gdkPixmap = gdk_pixmap_foreign_new_for_display(gdkDpy, drawable); > if (!gdkPixmap) > return NS_ERROR_FAILURE; > if (visual) { >+ // We requested that gfxXlibNativeRenderer give us the default screen > GdkScreen* gdkScreen = gdk_display_get_default_screen(gdkDpy); >- GdkVisual* gdkVisual = gdk_x11_screen_lookup_visual(gdkScreen, visual->visualid); >- Colormap cmap = DefaultScreenOfDisplay(dpy)->cmap; >- GdkColormap* colormap = >- gdk_x11_colormap_foreign_new(gdkVisual, cmap); >- >- gdk_drawable_set_colormap(gdkPixmap, colormap); >+ NS_ASSERTION(screen == GDK_SCREEN_XSCREEN(gdkScreen), >+ "'screen' should be the default Screen"); >+ // GDK requires a GdkColormap to be set on the GdkPixmap. >+ GdkVisual* gdkVisual = >+ gdk_x11_screen_lookup_visual(gdkScreen, visual->visualid); >+ GdkColormap* gdkColormap = >+ gdk_x11_colormap_foreign_new(gdkVisual, colormap); >+ gdk_drawable_set_colormap(gdkPixmap, gdkColormap); >+ g_object_unref(G_OBJECT(gdkColormap)); > } > } > >@@ -800,7 +806,7 @@ > gfxContext* ctx = aContext->ThebesContext(); > gfxMatrix current = ctx->CurrentMatrix(); > >- // We require the use of the default display and visual >+ // We require the use of the default screen and visual > // because I'm afraid that otherwise the GTK theme may explode. > // Some themes (e.g. Clearlooks) just don't clip properly to any > // clip rect we provide, so we cannot advertise support for clipping within the
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 456432
: 313038 |
313222