@@ -153,7 +153,7 @@ TextLine::TextLine(ParagraphImpl* owner,
153153 auto & run = fOwner ->run (runIndex);
154154 runLevels[runLevelsIndex++] = run.fBidiLevel ;
155155 fMaxRunMetrics .add (
156- InternalLineMetrics (run.correctAscent (), run.correctDescent (), 0 . 0f ));
156+ InternalLineMetrics (run.ascent (), run.descent (), run. fFontMetrics . fLeading ));
157157 if (run.isPlaceholder ()) {
158158 placeholdersInOriginalOrder.push_back (runIndex);
159159 }
@@ -1211,22 +1211,22 @@ void TextLine::getRectsForRange(TextRange textRange0,
12111211 // clip.fTop = this->baseline() + this->fMaxRunMetrics.ascent();
12121212 // clip.fBottom = this->baseline() + this->fMaxRunMetrics.descent();
12131213 //
1214- // if (run->fHeightMultiplier <= 0) {
1215- // break;
1216- // }
1217- // const auto effectiveBaseline = this->baseline() + this->sizes().delta();
1218- // clip.fTop = effectiveBaseline + run->ascent();
1219- // clip.fBottom = effectiveBaseline + run->descent();
1220- //
1221- // clip.fTop = this->baseline() + this->fMaxRunMetrics.rawAscent();
1222- // clip.fBottom = this->baseline() + this->fMaxRunMetrics.rawDescent();
1223- //
12241214 if (run->fHeightMultiplier <= 0 ) {
12251215 break ;
12261216 }
12271217 const auto effectiveBaseline = this ->baseline () + this ->sizes ().delta ();
12281218 clip.fTop = effectiveBaseline + this ->fMaxRunMetrics .ascent ();
12291219 clip.fBottom = effectiveBaseline + this ->fMaxRunMetrics .descent ();
1220+ //
1221+ // clip.fTop = this->baseline() + this->fMaxRunMetrics.rawAscent();
1222+ // clip.fBottom = this->baseline() + this->fMaxRunMetrics.rawDescent();
1223+ //
1224+ // if (run->fHeightMultiplier <= 0) {
1225+ // break;
1226+ // }
1227+ // const auto effectiveBaseline = this->baseline() + this->sizes().delta();
1228+ // clip.fTop = effectiveBaseline + this->fSizes.ascent();
1229+ // clip.fBottom = effectiveBaseline + this->fSizes.descent();
12301230 }
12311231 break ;
12321232 case RectHeightStyle::kIncludeLineSpacingTop : {
0 commit comments