Fix issue with document fragments.

Fixes #1681

getComputedStyle return null for this kind of element, which causes an error.