Open Bug 1242829 Opened 10 years ago Updated 3 years ago

Handle linecaps in bounds calculations for SVG circles and ellipses with dashed stroke

Categories

(Core :: SVG, defect)

defect

Tracking

()

Tracking Status
firefox45 --- affected
firefox46 --- affected
firefox47 --- affected

People

(Reporter: twointofive, Unassigned)

Details

Attachments

(1 file)

This will be a followup to bug 1242147. The bounds computation code currently assumes that the stroke of a circle or ellipse doesn't extend more than half a line-width, but that's not necessarily true (or rather won't be once 1242147 lands) if the stroke is dashed and stroke-linecap="square". The too small computed bounds result in invalidation artifacts and a too small return from getBoundingClientRect() (see the attached testcase *with the patch from bug 1242147 applied*). We'll need to consider SVG[Circle|Ellipse]Element::GetGeometryBounds and nsSVGUtils::PathExtentsToMaxStrokeExtents: https://dxr.mozilla.org/mozilla-central/rev/d6d81655dd9e146c300a64c0fcaeb04ca3300a19/layout/svg/nsSVGUtils.cpp#1231
Tracking as this looks like another regression from 42.
Its not a regression, it's always been like this. Do you still want to track it?
Flags: needinfo?(lhenry)
No, we try to track all known (recent) regressions. Thanks! I misunderstood the comments in the parent bug.
Flags: needinfo?(lhenry)
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: