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:
@@ -7030,13 +7030,14 @@ void nsTextFrame::PaintText(const PaintTextParams& aParams,
|
||||
this, aParams.context, nscoord(aParams.framePt.x) + frameWidth,
|
||||
-mAscent);
|
||||
}
|
||||
textBaselinePt.y =
|
||||
reversed ? aParams.framePt.y + frameHeight : aParams.framePt.y;
|
||||
textBaselinePt.y = reversed ? aParams.framePt.y.value + frameHeight
|
||||
: aParams.framePt.y.value;
|
||||
} else {
|
||||
textBaselinePt = gfx::Point(
|
||||
reversed ? aParams.framePt.x + frameWidth : aParams.framePt.x,
|
||||
nsLayoutUtils::GetSnappedBaselineY(this, aParams.context,
|
||||
aParams.framePt.y, mAscent));
|
||||
textBaselinePt =
|
||||
gfx::Point(reversed ? aParams.framePt.x.value + frameWidth
|
||||
: aParams.framePt.x.value,
|
||||
nsLayoutUtils::GetSnappedBaselineY(
|
||||
this, aParams.context, aParams.framePt.y, mAscent));
|
||||
}
|
||||
Range range = ComputeTransformedRange(provider);
|
||||
uint32_t startOffset = range.start;
|
||||
@@ -7284,7 +7285,7 @@ void nsTextFrame::DrawTextRunAndDecorations(
|
||||
// pt is the physical point where the decoration is to be drawn,
|
||||
// relative to the frame; one of its coordinates will be updated below.
|
||||
params.pt = Point(x / app, y / app);
|
||||
Float& bCoord = verticalDec ? params.pt.x : params.pt.y;
|
||||
Float& bCoord = verticalDec ? params.pt.x.value : params.pt.y.value;
|
||||
params.lineSize = Size(measure / app, 0);
|
||||
params.ascent = ascent;
|
||||
params.vertical = verticalDec;
|
||||
@@ -7358,13 +7359,13 @@ void nsTextFrame::DrawTextRunAndDecorations(
|
||||
const bool isInlineReversed = mTextRun->IsInlineReversed();
|
||||
if (verticalDec) {
|
||||
clipRect.x = aParams.framePt.x + visualRect.x;
|
||||
clipRect.y =
|
||||
isInlineReversed ? aTextBaselinePt.y - clipLength : aTextBaselinePt.y;
|
||||
clipRect.y = isInlineReversed ? aTextBaselinePt.y.value - clipLength
|
||||
: aTextBaselinePt.y.value;
|
||||
clipRect.width = visualRect.width;
|
||||
clipRect.height = clipLength;
|
||||
} else {
|
||||
clipRect.x =
|
||||
isInlineReversed ? aTextBaselinePt.x - clipLength : aTextBaselinePt.x;
|
||||
clipRect.x = isInlineReversed ? aTextBaselinePt.x.value - clipLength
|
||||
: aTextBaselinePt.x.value;
|
||||
clipRect.y = aParams.framePt.y + visualRect.y;
|
||||
clipRect.width = clipLength;
|
||||
clipRect.height = visualRect.height;
|
||||
|
||||
Reference in New Issue
Block a user