Index: Source/core/rendering/InlineIterator.h |
diff --git a/Source/core/rendering/InlineIterator.h b/Source/core/rendering/InlineIterator.h |
index c2d2f53047398d9439514682904c8b56c41a6c3c..6176099e323c4e45fa8d19da64a673fecd7e224f 100644 |
--- a/Source/core/rendering/InlineIterator.h |
+++ b/Source/core/rendering/InlineIterator.h |
@@ -484,6 +484,11 @@ inline int InlineBidiResolver::findFirstTrailingSpaceAtRun(BidiRun* run) |
return run->m_stop; |
RenderText* lastText = toRenderText(lastObject); |
+ |
+ // There can only be trailing space if the lastText node has two or more code-points. |
+ if (lastText->textLength() <= 1) |
+ return run->stop(); |
+ |
int firstSpace; |
if (lastText->is8Bit()) |
firstSpace = findFirstTrailingSpace(lastText, lastText->characters8(), run->start(), run->stop()); |