GUVNOR-2122: Add support for dynamically resizable Canvas.

(cherry picked from commit 51eb8b06c331467be47a727d8d22d1059f59da7e)