fixes #17028. Take the constraint attribute into account when content is smaller than viewport. Patch by Nick Maynard (IBM, CCLA). !strict