test: Fix some reftests.
layout: Fix percentages in relatively positioned elements
layout: Address some more review comments