[webkit-gtk] WebKit1, Gtk2 and black squares around widgets
Martin Schlemmer
Martin.Schlemmer at nwu.ac.za
Fri Aug 10 09:14:08 PDT 2012
>>> On 2012/08/10 at 01:57 PM, Martin Schlemmer <Martin.Schlemmer at nwu.ac.za>
wrote:
> Hi,
>
> Since 1.6.[23] I have been seeing black boxes around widgets like attached
> screenshot, and it is still present in 1.8.[12] and 1.9.[56]. This is on
> Win32 for me, but from #79680 it seems its not limited to Win32.
>
> I have searched as best I could, but the only references I could find is:
>
> https://bugs.webkit.org/show_bug.cgi?id=79680
> https://bugs.webkit.org/show_bug.cgi?id=90350
>
> With Gtk3 this is a not a problem. Also as 1.2.x is fine (and I think
> 1.4.x), but as we need Introspection support for DOM, earlier versions are
> not an option.
>
> As I am not largely familiar with the WebKit codebase, any pointers where to
> start looking will be appreciated.
>
After fiddling a bit with WidgetRenderingContext due to comments from bug #90350, I came up with below, but it obviously is not the correct fix, as scrolling or sites like Novell Web-Mail (scroll window embedded below images) draw the above images as background for the virtical scrollbar.
As said, not that much of an expert on WebKit/Gdk/Cairo internals, pointers would be appreciated.
-----
diff -uprN webkit-1.9.6/Source/WebCore/platform/gtk/WidgetRenderingContext.cpp webkit-1.9.6.az/Source/WebCore/platform/gtk/WidgetRenderingContext.cpp
--- webkit-1.9.6/Source/WebCore/platform/gtk/WidgetRenderingContext.cpp 2011-12-13 10:52:16 +0200
+++ webkit-1.9.6.az/Source/WebCore/platform/gtk/WidgetRenderingContext.cpp 2012-08-10 17:35:10 +0200
@@ -120,8 +120,17 @@ WidgetRenderingContext::WidgetRenderingC
// Clear the scratch buffer.
RefPtr<cairo_t> scratchBufferContext = adoptRef(gdk_cairo_create(gScratchBuffer));
+#if 0
cairo_set_operator(scratchBufferContext.get(), CAIRO_OPERATOR_CLEAR);
cairo_paint(scratchBufferContext.get());
+#else
+ // FIXME: Seems to work, except in scrolling cases where the widget is
+ // hidden at the time when a redraw is requested just before it
+ // is visible again ...
+ cairo_t* cairoContext = m_graphicsContext->platformContext()->cr();
+ cairo_set_source_surface(scratchBufferContext.get(), cairo_get_target(cairoContext), -m_targetRect.x(), -m_targetRect.y());
+ cairo_paint(scratchBufferContext.get());
+#endif
}
WidgetRenderingContext::~WidgetRenderingContext()
-----
Vrywaringsklousule / Disclaimer: http://www.nwu.ac.za/it/gov-man/disclaimer.html
More information about the webkit-gtk
mailing list