Simplify replaceWith method. Closes gh-1276
Fix #12723 and simplification and optmization of defaultDisplay helper
No ticket: Improve line-height animation test stability