angular/angular.js — pull request #2405 by ksperling (2013-04-15 05:27:33+00:00)
Title: Don't call $window.getComputedStyle on non-element

This throws an exception at least in some versions of FF, and is declared
as taking only an Element and not an arbitrary Node in the W3C spec.

One place where this can happen easily is with ng-view if the template
contains more than just a single top-level node (even just a trailing
newline can trigger the problem).

Also short-circuit the case where getComputedStyle doesn't return anything.