Title: [196924] releases/WebKitGTK/webkit-2.10/Source/WebKit2
Revision
196924
Author
[email protected]
Date
2016-02-22 02:22:50 -0800 (Mon, 22 Feb 2016)

Log Message

Merge r196475 - [GTK] HTTP auth dialog incorrectly rendered with Accelerated Compositing enabled
https://bugs.webkit.org/show_bug.cgi?id=154159

Reviewed by Michael Catanzaro.

There are two problems here, first we are changing the cairo
operator when rendering the xcomposite window pixmap without a
proper save/restore, so it affects the drawing that happens after
that, and second problem is that we are not rendering the gray
background in AC mode because we are returning earlier.

* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewRenderAcceleratedCompositingResults):
(webkitWebViewBaseDraw):

Modified Paths

Diff

Modified: releases/WebKitGTK/webkit-2.10/Source/WebKit2/ChangeLog (196923 => 196924)


--- releases/WebKitGTK/webkit-2.10/Source/WebKit2/ChangeLog	2016-02-22 10:21:55 UTC (rev 196923)
+++ releases/WebKitGTK/webkit-2.10/Source/WebKit2/ChangeLog	2016-02-22 10:22:50 UTC (rev 196924)
@@ -1,3 +1,20 @@
+2016-02-12  Carlos Garcia Campos  <[email protected]>
+
+        [GTK] HTTP auth dialog incorrectly rendered with Accelerated Compositing enabled
+        https://bugs.webkit.org/show_bug.cgi?id=154159
+
+        Reviewed by Michael Catanzaro.
+
+        There are two problems here, first we are changing the cairo
+        operator when rendering the xcomposite window pixmap without a
+        proper save/restore, so it affects the drawing that happens after
+        that, and second problem is that we are not rendering the gray
+        background in AC mode because we are returning earlier.
+
+        * UIProcess/API/gtk/WebKitWebViewBase.cpp:
+        (webkitWebViewRenderAcceleratedCompositingResults):
+        (webkitWebViewBaseDraw):
+
 2016-02-09  Fujii Hironori  <[email protected]>
 
         possible buffer overrun in Connection::processMessage of Source/WebKit2/Platform/IPC/unix/ConnectionUnix.cpp

Modified: releases/WebKitGTK/webkit-2.10/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp (196923 => 196924)


--- releases/WebKitGTK/webkit-2.10/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp	2016-02-22 10:21:55 UTC (rev 196923)
+++ releases/WebKitGTK/webkit-2.10/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp	2016-02-22 10:22:50 UTC (rev 196924)
@@ -484,15 +484,14 @@
     priv->authenticationDialog = 0;
 }
 
-#if USE(TEXTURE_MAPPER)
 static bool webkitWebViewRenderAcceleratedCompositingResults(WebKitWebViewBase* webViewBase, DrawingAreaProxyImpl* drawingArea, cairo_t* cr, GdkRectangle* clipRect)
 {
+#if USE(TEXTURE_MAPPER) && USE(REDIRECTED_XCOMPOSITE_WINDOW)
     ASSERT(drawingArea);
 
     if (!drawingArea->isInAcceleratedCompositingMode())
         return false;
 
-#if USE(REDIRECTED_XCOMPOSITE_WINDOW)
     // To avoid flashes when initializing accelerated compositing for the first
     // time, we wait until we know there's a frame ready before rendering.
     WebKitWebViewBasePrivate* priv = webViewBase->priv;
@@ -503,10 +502,12 @@
     priv->redirectedWindow->resize(drawingArea->size());
 
     if (cairo_surface_t* surface = priv->redirectedWindow->surface()) {
+        cairo_save(cr);
         cairo_rectangle(cr, clipRect->x, clipRect->y, clipRect->width, clipRect->height);
         cairo_set_source_surface(cr, surface, 0, 0);
         cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
         cairo_fill(cr);
+        cairo_restore(cr);
     }
 
     return true;
@@ -517,7 +518,6 @@
     return false;
 #endif
 }
-#endif
 
 static gboolean webkitWebViewBaseDraw(GtkWidget* widget, cairo_t* cr)
 {
@@ -530,14 +530,11 @@
     if (!gdk_cairo_get_clip_rectangle(cr, &clipRect))
         return FALSE;
 
-#if USE(TEXTURE_MAPPER)
-    if (webkitWebViewRenderAcceleratedCompositingResults(webViewBase, drawingArea, cr, &clipRect))
-        return GTK_WIDGET_CLASS(webkit_web_view_base_parent_class)->draw(widget, cr);
-#endif
+    if (!webkitWebViewRenderAcceleratedCompositingResults(webViewBase, drawingArea, cr, &clipRect)) {
+        WebCore::Region unpaintedRegion; // This is simply unused.
+        drawingArea->paint(cr, clipRect, unpaintedRegion);
+    }
 
-    WebCore::Region unpaintedRegion; // This is simply unused.
-    drawingArea->paint(cr, clipRect, unpaintedRegion);
-
     if (webViewBase->priv->authenticationDialog) {
         cairo_set_operator(cr, CAIRO_OPERATOR_OVER);
         cairo_set_source_rgba(cr, 0, 0, 0, 0.5);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to