Refactor "needs layout" check in LayoutImage

Move the conditions used to check if layout is needed when the intrinsic
size changes out into a new function, and call that from
Replace open-coded HasRelativeLogicalWidth() with a call to that method.

Bug: 870599
Change-Id: Iae480326083eb493d58233378d95af8c1dd62f0a
Commit-Queue: Fredrik Söderquist <>
Reviewed-by: Morten Stenshorne <>
Cr-Commit-Position: refs/heads/master@{#616624}
2 files changed