Treat an element as hidden if either offsetWidth or offsetHeight is 0. Fixes #13132, #10406.
Fix failing tests, add support for empty spans in Opera. Supplements #13132, #10406.