Closed Bug 932091 Opened 8 years ago Closed 8 years ago

Convert SVGBBox.mBBox to Moz2D

Categories

(Core :: SVG, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla28

People

(Reporter: jwatt, Assigned: jwatt)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

No description provided.
Summary: Convert SVGBBox.mRect to Moz2D → Convert SVGBBox.mBBox to Moz2D
Attached patch patchSplinter Review
Attachment #823652 - Flags: review?(dholbert)
Attachment #823652 - Flags: review?(dholbert) → review+
Blocks: 703159
https://hg.mozilla.org/integration/mozilla-inbound/rev/0777ab1c31a7

I tweaked a test. The patch caused a single test failure on Android because of a small rounding difference:

ERROR TEST-UNEXPECTED-FAIL | /tests/content/svg/content/test/test_bbox.xhtml | b.getBBox().width - got 9.166666984558105, expected 9.166667938232422

In other words the width (only) of the bbox for these two <text> elements is slightly different:

  <text id="b" x="20" y="20">b</text>
  <text id="tspan">
    <tspan x="20" y="20">b</tspan>
  </text>

This is due to extra switching between double and float (by using Rect, SVGBBox is now using float) as GetBBoxContribution works its way up the tree.

This should go away once we've finished the conversion to Moz2D and eliminated the gfx* classes from the SVG code. For now I've added a fuzz factor for that one test and I'll file a bug on removing that once the the Moz2D conversion is done.
(In reply to Jonathan Watt [:jwatt] from comment #2)
> I'll file a bug on removing that once the the Moz2D conversion is done.

Bug 933707.
https://hg.mozilla.org/mozilla-central/rev/0777ab1c31a7
Status: NEW → RESOLVED
Closed: 8 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
You need to log in before you can comment on or make changes to this bug.