CSS: window.getDefaultComputedStyle may return null

Fixes #14736
Closes gh-1501
(cherry picked from commit 51910ba8a5aff4cd1a811f1fdb76a6c62a09a666)