Refactor computation of stroke bounds in LayoutSVGShape

Move all stroke bounds related computations into the
CalculateStrokeBoundingBox() method in LayoutSVGShape. Add a new enum
StrokeGeometryClass, and pass that as an argument to the method.
Currently all callsites use a constant argument value. This will be
modified in a future CL.

Split out computation of the bounds for non-scaling-stroke into a new
method CalculateNonScalingStrokeBoundingBox().

Also fold LayoutSVGShape::CalculateObjectBoundingBox() since it only has
a single caller.

Bug: 435097
Change-Id: I538b31f98dc7f0777e2538ef74b5e3553b435a7f
Commit-Queue: Fredrik Söderquist <>
Reviewed-by: Philip Rogers <>
Cr-Commit-Position: refs/heads/master@{#600733}
5 files changed