mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-17 07:15:46 +00:00
Bug 1728411 - Stop special casing bounds calculation on Windows. r=dholbert
As of bug 1728401, D2D is no longer used as content backend on Windows, which makes this special casing unnecessary. Differential Revision: https://phabricator.services.mozilla.com/D124110
This commit is contained in:
parent
b68bc8bbb9
commit
8c1459490b
@ -479,18 +479,7 @@ SVGBBox SVGGeometryFrame::GetBBoxContribution(const Matrix& aToBBoxUserspace,
|
||||
} else {
|
||||
// Get the bounds using a Moz2D Path object (more expensive):
|
||||
RefPtr<DrawTarget> tmpDT;
|
||||
#ifdef XP_WIN
|
||||
// Unfortunately D2D backed DrawTarget produces bounds with rounding errors
|
||||
// when whole number results are expected, even in the case of trivial
|
||||
// calculations. To avoid that and meet the expectations of web content we
|
||||
// have to use a CAIRO DrawTarget. The most efficient way to do that is to
|
||||
// wrap the cached cairo_surface_t from ScreenReferenceSurface():
|
||||
RefPtr<gfxASurface> refSurf =
|
||||
gfxPlatform::GetPlatform()->ScreenReferenceSurface();
|
||||
tmpDT = gfxPlatform::CreateDrawTargetForSurface(refSurf, IntSize(1, 1));
|
||||
#else
|
||||
tmpDT = gfxPlatform::GetPlatform()->ScreenReferenceDrawTarget();
|
||||
#endif
|
||||
|
||||
FillRule fillRule = SVGUtils::ToFillRule(
|
||||
HasAnyStateBits(NS_STATE_SVG_CLIPPATH_CHILD) ? StyleSVG()->mClipRule
|
||||
|
@ -1,9 +0,0 @@
|
||||
[SVGGraphicsElement.getBBox-01.html]
|
||||
[getBBox on path with no height]
|
||||
expected:
|
||||
if os == "win": FAIL
|
||||
|
||||
[path with no height should contribute to parent bbox]
|
||||
expected:
|
||||
if os == "win": FAIL
|
||||
|
Loading…
Reference in New Issue
Block a user