Last two weeks in WebKit:
better events and new APIs
A lot happened in two weeks. So much that I had to skip the performance improvements and bug fixes to keep the length of this post reasonable… Let’s get to it:
- Chris Fleizach started building the infrastructure to support IndieUI events. IndieUI is a new specification providing abstractions for actions resulting from user input.
For example, with IndieUI, to act on the user scrolling, you can directly listen to the “scrollrequest” event, instead of listening to wheel events and key events (for page-up, page-down, arrows, etc). - Benjamin Poulain (me!) changed the way event timestamps are generated to make them more accurate.
Historically, WebKit has been lying about the timestamp of touch/mouse/keyboard events. The time exposed to JavaScript was the time when the event was dispatched inside WebKit, not the time when the event was emitted by the platform. This is now fixed, and WebKit exposes real, precise, timing of incoming events. - Santosh Mahto changed the relations between media loading and the load event of a page. Before the patch, any <video> and <audio> elements would delay the load event until the media started loading or 3 seconds without progress. For media elements with preload=”none”, the code would be hitting the 3 seconds delay before firing the page’s load event. After the change, <video> and <audio> do not delay a page’s load event.
- Simon Fraser changed the APIs screen.availWidth and screen.availHeight to report the size of the display of the current window, instead of the size of the primary display.
- Chris Rogers renamed the API WaveTable to PeriodicWave, following the latest changes in the WebAudio specification. If you were using WaveTable, it’s time to update your code.
- Christophe Dumez did some refactoring and exposed WorkerGlobalScope to the runtime, following the latest Web Workers specification. The new object exposes useful global event handlers, and lets you close a worker’s event loop.
- Matthew Holden added a nice little feature to the Web Inspector; colors can be modified in place with the dedicated color picker.
Engine engineering
There were a lot of changes in the engine. I’ll keep it short with some changes affecting everyone:
- Renáta Hodován (officially) announced Fuzzinator, a new fuzzer for web engines. Renáta has been reporting bugs found by Fuzzinator for a while, and promises a blog post explaining the new fuzzer.
- Alex Christensen is working on a code coverage tool for WebKit.
- Anders Carlsson got rid of the concept of null-terminated WTF::String. The code using those type of strings has been updated to use either CString or a nul- terminated Vector of UChar (conveniently created with String::charactersWithNullTermination()).
- Alex Christensen (with support from Brent Fulgham for reviews) also worked on supporting WebGL on the Windows port.
- Mikhail Pozdnyakov did some long overdue refactoring on HashSet and HashMap. The order of the template arguments of find, contains and add is now “<translator, type>”, which means the type can now be implicit, and that is awesome.