Bug 159455

Summary: [GTK] Web view background colors don't work in accelerated compositing mode
Product: WebKit Reporter: Carlos Garcia Campos <cgarcia>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: amit.kachroo, berto, bugs-noreply, commit-queue, gustavo, mcatanzaro, mrobinson, yoon, zan
Priority: P2 Keywords: Gtk
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 159463    
Bug Blocks: 154066, 159465, 159512    
Attachments:
Description Flags
Patch mcatanzaro: review+

Description Carlos Garcia Campos 2016-07-06 00:44:40 PDT
This can be easily tested with MiniBrowser, for example:

$ WEBKIT_FORCE_COMPOSITING_MODE=1 MiniBrowser --bg-color="rgba(255, 0, 0, 0.70)" -e

The background is opaque white, and there are artifacts when resizing the window (because the web process is not rendering backgrounds when setting a web view bg color). This needs changes in the UI process when using the redirected window, but also in the web process. And of course it always happens with the threaded compositor when ACC mode is always enabled.
Comment 1 Carlos Garcia Campos 2016-07-06 05:27:28 PDT
Created attachment 282882 [details]
Patch

This needs patch attached to bug #159463
Comment 2 WebKit Commit Bot 2016-07-06 05:29:42 PDT
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Comment 3 Michael Catanzaro 2016-07-20 17:25:04 PDT
Comment on attachment 282882 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=282882&action=review

The compatibility issue should be mentioned when you prepare release notes for 2.14.

> Source/WebKit2/ChangeLog:12
> +        window has an RGBA visual, even when setting a fully opaque brakcground, because we still need the web process

background

> Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp:3519
> + * #GtkWidget:app-paintable property set to %TRUE, for backgrounds colors to work.

Get rid of this comma.

> Source/WebKit2/UIProcess/gtk/RedirectedXCompositeWindow.cpp:192
> +    xDamageNotifier().add(m_window.get(), [this, damageNotify = WTFMove(damageNotify)] {

Is it normal WebKit style to put spaces around the assignment operator here? I think it's easier to read without spaces.
Comment 4 Carlos Garcia Campos 2016-07-21 00:13:17 PDT
(In reply to comment #3)
> Comment on attachment 282882 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=282882&action=review
> 
> The compatibility issue should be mentioned when you prepare release notes
> for 2.14.
> 
> > Source/WebKit2/ChangeLog:12
> > +        window has an RGBA visual, even when setting a fully opaque brakcground, because we still need the web process
> 
> background
> 
> > Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp:3519
> > + * #GtkWidget:app-paintable property set to %TRUE, for backgrounds colors to work.
> 
> Get rid of this comma.
> 
> > Source/WebKit2/UIProcess/gtk/RedirectedXCompositeWindow.cpp:192
> > +    xDamageNotifier().add(m_window.get(), [this, damageNotify = WTFMove(damageNotify)] {
> 
> Is it normal WebKit style to put spaces around the assignment operator here?
> I think it's easier to read without spaces.

Yes.
Comment 5 Carlos Garcia Campos 2016-07-21 00:14:18 PDT
(In reply to comment #4)
> (In reply to comment #3)
> > Comment on attachment 282882 [details]
> > Patch
> > 
> > View in context:
> > https://bugs.webkit.org/attachment.cgi?id=282882&action=review
> > 
> > The compatibility issue should be mentioned when you prepare release notes
> > for 2.14.
> > 
> > > Source/WebKit2/ChangeLog:12
> > > +        window has an RGBA visual, even when setting a fully opaque brakcground, because we still need the web process
> > 
> > background
> > 
> > > Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp:3519
> > > + * #GtkWidget:app-paintable property set to %TRUE, for backgrounds colors to work.
> > 
> > Get rid of this comma.
> > 
> > > Source/WebKit2/UIProcess/gtk/RedirectedXCompositeWindow.cpp:192
> > > +    xDamageNotifier().add(m_window.get(), [this, damageNotify = WTFMove(damageNotify)] {
> > 
> > Is it normal WebKit style to put spaces around the assignment operator here?
> > I think it's easier to read without spaces.
> 
> Yes.

Yes, that it's normal webkit style, I don't think removing the spaces makes it easier to read ta all.
Comment 6 Carlos Garcia Campos 2016-07-21 00:19:09 PDT
Committed r203496: <http://trac.webkit.org/changeset/203496>
Comment 7 amit.kachroo 2016-08-15 06:49:10 PDT
*** Bug 158153 has been marked as a duplicate of this bug. ***