Bug 155229 - [GTK] Artifacts when using web view background color
Summary: [GTK] Artifacts when using web view background color
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
Keywords: Gtk
Depends on:
Reported: 2016-03-09 04:38 PST by Carlos Garcia Campos
Modified: 2016-03-09 23:13 PST (History)
1 user (show)

See Also:

Patch (2.65 KB, patch)
2016-03-09 04:43 PST, Carlos Garcia Campos
no flags Details | Formatted Diff | Diff
Different approach (2.39 KB, patch)
2016-03-09 05:16 PST, Carlos Garcia Campos
mario: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Garcia Campos 2016-03-09 04:38:11 PST
This is easy to reproduce by using the MiniBrowser in editable mode, try something like this:

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

Write someting and move the cursor or select text, you will see that some areas are not repainted at all. This is because when using a web view color, we fill with the color every rectangle updated by the web process, but we should always fill the entire backing store before rendering the actual contents on top.
Comment 1 Carlos Garcia Campos 2016-03-09 04:43:20 PST
Created attachment 273422 [details]
Comment 2 Carlos Garcia Campos 2016-03-09 04:50:59 PST
Comment on attachment 273422 [details]

This doesn't work, sometimes we render the bg color over the contents
Comment 3 Carlos Garcia Campos 2016-03-09 05:16:35 PST
Created attachment 273423 [details]
Different approach

This fixes the problem from the web process side. It's a it more aggressive, because it always sends updates to the Ui process for the whole visible content rectangle, but it's the only way I've managed to fix the problem.
Comment 4 Mario Sanchez Prada 2016-03-09 06:08:01 PST
Comment on attachment 273423 [details]
Different approach

I've been poking at this code recently and this change makes sense to me. r+
Comment 5 Carlos Garcia Campos 2016-03-09 23:13:43 PST
Committed r197927: <http://trac.webkit.org/changeset/197927>