Adds methods for setting only width or height undefined #13546

Change-Id: Ieebe48c75370c0744a2a2619e1ed81dbd090a544