Bug 1060421 - Change the type of [Int]PointTyped::[x|y] back to [Int]CoordTyped. r=botond

[Int]CoordTyped no longer inherits Units because otherwise
instances of [Int]IntPointTyped may get one Base subobject because
it inherits Units, and others because of BasePoint's Coord members,
which end up increasing the [Int]CoordTyped's objects size (since
according to the ISO C++ standard, different Base subobject are
required to have different addresses).

Differential Revision: https://phabricator.services.mozilla.com/D160713
This commit is contained in:
Razvan Cojocaru
2022-11-04 18:29:35 +00:00
parent fb5480c467
commit 363946e17f
57 changed files with 239 additions and 188 deletions

View File

@@ -5158,10 +5158,12 @@ already_AddRefed<SourceSurface> PresShell::PaintRangePaintInfo(
// content we're painting, relative to the scale at which it would normally
// get painted at as part of page rendering (`unclampedResolution`).
float scaleRelativeToNormalContent = scale / unclampedResolution;
aScreenRect->x = NSToIntFloor(aPoint.x - float(aPoint.x - visualPoint.x) *
scaleRelativeToNormalContent);
aScreenRect->y = NSToIntFloor(aPoint.y - float(aPoint.y - visualPoint.y) *
scaleRelativeToNormalContent);
aScreenRect->x =
NSToIntFloor(aPoint.x - float(aPoint.x.value - visualPoint.x.value) *
scaleRelativeToNormalContent);
aScreenRect->y =
NSToIntFloor(aPoint.y - float(aPoint.y.value - visualPoint.y.value) *
scaleRelativeToNormalContent);
pixelArea.width = NSToIntFloor(float(pixelArea.width) * scale);
pixelArea.height = NSToIntFloor(float(pixelArea.height) * scale);