add option to clip to document bounds and turn it on by default

cherry pick into 15.2.2