What’s New in Opera Development Snapshots: 28 February Edition

There is a new Opera Next out! Download it from the links in the Desktop team's blog post or wait a while for it to show up on your Opera Next updates (Browser Identification section should show Presto/2.10.269 in opera:about).

Major Updates

We now have better precision handling of fixed point values used for lengths and font-sizes. This has been a significant issue with Opera as many units were rounded off. Vadim has a neat demo of how this works in reality. Check it in Opera Next and marvel at the precision!

Updating media query implementation to match the latest drafts of the specs, and to pass all the W3C Media Queries tests. Now you can use dpi, dpcm and dppx as unit values for the resolution media query feature. Here is an example. This also fixes issues with Opera applying rules that are within invalid/incorrect media queries.

CSS

Not quite CSS, but malformed fonts never stopped loading, but now they do.

Not quite ECMAScript, but relevant nonetheless. The line numbers were previously reported relative to the script tag in stack traces (when you do try {} catch (e) {}). This has been fixed. Thanks to fearphage for the bug report!

Number.prototype.toString() was not returning accurate values accurate values for large non-base 10 numbers. This has now been fixed (seems like Chrome suffers from this bug).

Fixes for JSON.stringify(). A bunch of tests from JSON-test-suite were imported and used to fix our JSON.stringify() implementation. Thanks Luke Smith for this test suite!

Previously scroll event did not fire when scrolling within a textarea. This has now been fixed.

By now you must be sensing a theme to all the DOM fixes - prevent unwanted errors from throwing. In this vein, we also have stopped XHR from firing error events and returning status code as 0 when http responses are anything but 200. In this snapshot, Opera will transparently pass through the right HTTP response codes.

You can now set the responseType for a XMLHTttpRequest to be json. This means the data returned would be a JavaScript object parsed from the JSON returned by the server as a response to this request.

Misc

How do browsers do page scroll when you press the "page down"/"space" button? How do they know how much to scroll by?

There is no standard way of doing this, but we had an interesting issue where Opera was doing this significantly differently from other browsers. From our investigation, it seems like Chrome 15+, Safari 5+, IE9+ scroll by innerHeight - (innerHeight * 12.5%) while Gecko does so by innerHeight - (innerHeight * 10%).