[webkit-gtk] Public API to allow setting AC mode on a permanent basis for a WebView

Mario Sanchez Prada mario at webkit.org
Fri Oct 23 08:41:28 PDT 2015


Hi,

I recently spent some time debugging a few weird issues ([1],[2] and [3]) I
was seeing in a local application and, after some digging, realized that
some of them started happening in 2.8.x because of two main factors:

 * Before 2.8, PageClient's callbacks to enter/exit AC mode were no-ops

 * Because of the heavy usage of CSS animations in my local app, WebKit
   was very often exitting & re-entering AC mode, which caused some rough
   animations along the way (and even really bad graphics corruption [1])

Now those main problems are gone (thanks Carlos for your patch!) but
smoothness in that app is not as good as it could be if AC mode was not
continuously exitting/leaving, as I could check by simply putting this at
the beginning of my main HTML file and keeping it there all the time:

    <div style="transform: rotateX(0deg);"></div>

This dummy CSS 3D animation ensures that WebKit is always in a state that
requires AC mode on, preventing it from leaving that mode when the result of
an animation would suggest so, resulting in a much smoother experience.

And that smoother experience, while noticeable in the device I was testing
(and Intel Celeron N2807), it's even much more noticeable when I try it in a
less powerful ARM box, so I think it's worth considering doing something.

So, my PROPOSAL would be to create a **new public API** in WebKit2GTK+ that
would allow, through a WebKitSetting property, to tell WebKit to keep AC
mode ON all the time to prevent this crazy dance of exitting & re-entering
AC mode for cases (normally in controlled environments) where we know in
advance it's going to happen.

So, what do you think? Any comment?

Thanks,
Mario

[1] https://bugs.webkit.org/show_bug.cgi?id=150323
[2] https://bugs.webkit.org/show_bug.cgi?id=150344
[3] https://bugs.webkit.org/show_bug.cgi?id=150365


More information about the webkit-gtk mailing list