Added back in clearRect for navigator.isCocoonJS

* Added back in clearRect line.
* Fixed trailing whitespace error.