提交 667e4c2a 编写于 作者: A Alex Dima

Fixes #58273

上级 efe91a12
...@@ -576,20 +576,16 @@ class WebKitRenderedViewLine extends RenderedViewLine { ...@@ -576,20 +576,16 @@ class WebKitRenderedViewLine extends RenderedViewLine {
// WebKit is buggy and returns an expanded range (to contain words in some cases) // WebKit is buggy and returns an expanded range (to contain words in some cases)
// The last client rect is enlarged (I think) // The last client rect is enlarged (I think)
if (!this.input.containsRTL) {
// This is an attempt to patch things up // This is an attempt to patch things up
// Find position of previous column // Find position of last column
let beforeEndPixelOffset = this._readPixelOffset(endColumn - 1, context); let endPixelOffset = this._readPixelOffset(endColumn, context);
// Find position of last column if (endPixelOffset !== -1) {
let endPixelOffset = this._readPixelOffset(endColumn, context); let lastRange = output[output.length - 1];
if (lastRange.left < endPixelOffset) {
if (beforeEndPixelOffset !== -1 && endPixelOffset !== -1) { // Trim down the width of the last visible range to not go after the last column's position
let isLTR = (beforeEndPixelOffset <= endPixelOffset); lastRange.width = endPixelOffset - lastRange.left;
let lastRange = output[output.length - 1]; }
if (isLTR && lastRange.left < endPixelOffset) {
// Trim down the width of the last visible range to not go after the last column's position
lastRange.width = endPixelOffset - lastRange.left;
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册