Clamp contents visual overflow for LayoutSVGRoot

If the contents overflow rect for the SVG root is too large, it could
end up shifting the overflow rect such that it is culled and thus never

To avoid this, clip the content overflow rect with
LayoutRect::InfiniteIntRect(). This gives reasonable enough leeway, and
also matches the rect that is commonly used to represent infinity for
culling and clipping etc.

Bug: 911186
Change-Id: I22d505ac0582f4d1fe6ac3ead9041c4a87176994
Reviewed-by: Stephen Chenney <>
Commit-Queue: Fredrik Söderquist <>
Cr-Commit-Position: refs/heads/master@{#613692}
4 files changed