What's new in Opera development snapshots: 28 February edition
By Divya Maniannimbupani. Tuesday, February 28, 2012 11:46:19 PM
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.
- Setting
cursorproperty on input elements now works. - The spec allows
border-radiusto inherit. Previously this used to fail in Opera, now it no longer does. - There used to be random artifacts on linear gradients used with
position: absolute, but this has been fixed. - Inset Box Shadow's offsets were calculated incorrectly if border-top-width is 0 or border-left-width is 0. This has been fixed.
- Opera's
::first-letterCSS selector used to select even punctuation characters. But this is no longer the case.
HTML
- For some reason, entering 5210000010001001 into a field that is of type number caused validation error. This is no longer the case.
- Setting
bgcolor=transparenton a table element seems to not make the underlying background color show but rather render table blue.
SVG
- Hiding an element using JavaScript seems to prevent hover on the underlying element. This has now been fixed.
- Previously, animated SVG with
display: nonewould trigger repaints of the whole view. This was one of the primary reasons why Dabblet was slow in Opera. This has now been fixed.
XML
- XML document had no
document.elementFromPointbut this has now been fixed. - XML namespaces were also not output correctly when XML was serialised for
innerHTML. This has now been fixed.
ECMAScript
- Regex matching failed to match BOM for
\s. This has now been fixed. -
Array.prototype.joinandArray.prototype.concathave been made faster.
- Improved
parseIntperformance. - The incorrect cache resolution over string values has now been fixed.
- 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!
APIs
WebRTC
- The
getUserMediaimplementation has been updated to acceptMediaStreamOptions. - If you had allowed a camera to be accessed from multiple domains, it used to crash on reload, it does not now.
Canvas
- Applying a shadow previously prevented subsequent fill of a canvas area.
DOM
- If you had previously set the charset of a
scriptelement from within JavaScript, you would have noticed that it gets ignored (e.g.script.charset = "ISO-8859-1". But we no longer do so. - selectionStart/selectionEnd were working incorrectly in a text field. This has been fixed.
- Constants on DOMException Interface and Node interface had
writableandconfigurableset to true. This has now been fixed. - Read-only properties like
event.targetif set in your script would previously throw an exception. This has been updated to only throw when in ECMAScript strict mode and not otherwise. -
initEventon a dispatched event previously threw an error, this has been rectified to have no effect at all. - Calling
preventDefault()on a non-cancelable event previously returned true and was executed but has now been fixed to have no effect. Thanks for the report Romuald Quantin! - Previously
scrollevent did not fire when scrolling within atextarea. 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
httpresponses are anything but 200. In this snapshot, Opera will transparently pass through the right HTTP response codes. - You can now set the
responseTypefor aXMLHTttpRequestto bejson. 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 byinnerHeight - (innerHeight * 10%).This snapshot aligns our page scroll on page down/space key to match WebKit/Trident's behaviour. Here is a fun screenshot of this behaviour across current Opera/IE/Firefox.
- 32-bit builds running on 64-bit OS now include "WOW64" in the User-Agent String.

Martin KadlecBS-Harou # Wednesday, February 29, 2012 3:48:41 PM
The evil number
There is not getUserMedia method on navigator object.
netwolf # Thursday, March 1, 2012 8:47:26 PM
Originally posted by BS-Harou:
I'd really like to know why it's exactly this number. It's not a power of 2, might be a prime,... what is so special about it that it's the only number that's causing issues in this context?Chairul Adli Muhammaddown2down # Saturday, March 3, 2012 4:28:39 AM
rseiler # Friday, March 9, 2012 6:44:08 AM
Samee Ullahsame2cool # Sunday, March 11, 2012 5:40:58 PM
Hanvordhanvord # Monday, March 12, 2012 5:34:39 AM
Vlad Paulvlad74paul # Wednesday, March 14, 2012 7:55:46 PM
Mimis Mum (MM)mimi_s_mum # Thursday, March 15, 2012 6:59:58 PM
Originally posted by rseiler:
But not in this case.I think Opera's original page-down behaviour is superior and should be retained, because:
Opera developers would do well to ask users opinions first when changing something not for better functionality, but only for the same of being in line with other browsers, especially if the change means an altered or lost functionality to long time users. Isn't it what the user forums are for?
Kate Joanhealthlife # Monday, March 19, 2012 2:16:02 AM