Revert changes to uses of setExtent.

This reverts part of commit 9907c4592ef20bbab05333a21619335427e6253e.