зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 3242bee2d956 (bug 1234418) for windows build bustage
--HG-- extra : commitid : FtpnZwAEEIm
This commit is contained in:
Родитель
f386d7b91c
Коммит
35c7e42d9d
|
@ -1859,13 +1859,13 @@ gfxFont::DrawEmphasisMarks(gfxTextRun* aShapedText, gfxPoint* aPt,
|
|||
gfxFloat& inlineCoord = aParams.isVertical ? aPt->y : aPt->x;
|
||||
uint32_t markLength = aParams.mark->GetLength();
|
||||
|
||||
gfxFloat clusterStart = -INFINITY;
|
||||
gfxFloat clusterStart = NAN;
|
||||
bool shouldDrawEmphasisMark = false;
|
||||
for (uint32_t i = 0, idx = aOffset; i < aCount; ++i, ++idx) {
|
||||
if (aParams.spacing) {
|
||||
inlineCoord += aParams.direction * aParams.spacing[i].mBefore;
|
||||
}
|
||||
if (aShapedText->IsClusterStart(idx) || clusterStart == -INFINITY) {
|
||||
if (aShapedText->IsClusterStart(idx)) {
|
||||
clusterStart = inlineCoord;
|
||||
}
|
||||
if (aShapedText->CharMayHaveEmphasisMark(idx)) {
|
||||
|
@ -1874,6 +1874,7 @@ gfxFont::DrawEmphasisMarks(gfxTextRun* aShapedText, gfxPoint* aPt,
|
|||
inlineCoord += aParams.direction * aShapedText->GetAdvanceForGlyph(idx);
|
||||
if (shouldDrawEmphasisMark &&
|
||||
(i + 1 == aCount || aShapedText->IsClusterStart(idx + 1))) {
|
||||
MOZ_ASSERT(!std::isnan(clusterStart), "Should have cluster start");
|
||||
gfxFloat clusterAdvance = inlineCoord - clusterStart;
|
||||
// Move the coord backward to get the needed start point.
|
||||
gfxFloat delta = (clusterAdvance + aParams.advance) / 2;
|
||||
|
|
Загрузка…
Ссылка в новой задаче