Bug 841547 - Only set the 'decoded' class on top-level image documents. r=jaws, r=Ms2ger