Set autoWidth/autoHeight if width=0/height=0 when created.