WebKit weekly report #21

Blog post by PulkoMandy on Fri, 2014-02-28 07:48

Hello there.

Well, the good news first: for some time I had a bug with GMail, where the top part of the interface (with the search bar, trash button, identity and GMail logo would disappear after the page loaded. This is why I didn’t do any release in a while. Well, this bug is now mostly fixed. There is some flickering of the same area, but at least it doesn’t completely disappear. I’ll be researching the flickering, however it isn’t an usability problem anymore, so I can package a release with all the improvements done over the last weeks.

For those interested, the problem was introduced when WebKit made support for “accelerated compositing” mandatory. This used to be an optional feature in WebKit. What it does is rendering parts of the page separately, then mixing (compositing) them together. On other ports, the final compositing step can be hardware accelerated, because it’s simple enough (just blending 2D bitmaps over each other, with alpha). For us, the acceleration doesn’t exist (we’d need OpenGL or OpenVG or something to make use of the GPU), so this isn’t as interesting. However, it’s still possible to do the blending in software, which is what WebKit now requires us to do. Anyway, when merging this change, I made a mistake and partially enabled another feature, which we didn’t actually implement. This led to some drawing being made off-screen, and never composited in, so it wouldn’t be visible. Well, this part is now disabled again, and things seems to work like they did before. We probably still need to implement at least some of the compositing code, but this will come with the transform matrix support, so I’m pushing it to a later time.

Locating this bug wasn’t easy, the GMail page is quite complex and not a good place to identify what’s triggering the problem. So, I spent most of the week working on the testsuite again. I made some changes to the testsuite engine, for example to dump the scroll position, handle keyboard events (making it possible to test the “editing” features), zooming the page, dumping frame title changes. The testsuite also helped squash some bugs. Synchronous XmlHttpRequests didn’t work, because a method override prototype was mismatched (override keyword added, so it won’t happen again for this class). Clipping to an empty rectangle would disable all clipping, instead of completely preventing any drawing. Finally, the handling of httpOnly cookies was reversed (they would be visible from javascript, but not from XmlHttpRequests), and Cookies with a max-age didn’t properly work if your computer was set for a timezone other than GMT.

With all these small issues fixed, our testsuite results are only slightly better, with 21000 passing tests out of 32000. However, about half of the failing ones are because we don’t have a reference of what the test should look like. So, we can easily make those pass by generating a reference rendering. I didn’t do this yet, because having a broken reference means the test is “failed” when you finally fix the issue and the (good) result doesn’t match the (broken) reference anymore. I’m trying to get all the tests with existing references working first. The remaining issues are a dozen crashes, some of them reproductible, about 1500 tests that time out (either they test some feature we don’t implement, or there is some other kind of javascript glitch). The remaining ones are a mix of Js parsing errors (I have no idea how those are passing on other platforms), SVG problems mainly because we don’t implement transforms, and some differences in the testing tool (different numbering of frames, for example). And of course, in the middle of this there are some tests failing because of an actual bug in our WebKit port.

I’ll continue reviewing these tests. With the GMail bug fixed, I can package a release (expect it today or early next week). I’ll then start adding features again. Next up is use of transform matrices to get our SVG drawing in a better shape, Web Notifications (this should be easy and has little potential for causing regressions), and then start looking at HTML5 audio and video (I’m waiting to see if one of our GSoC students wants to handle the media kit side of things for streaming, but I can start working on this with file:// sources). and of course, I expect you to continue opening bugs about non-working websites so I can continue improving the rendering.