Bug 1134667 - Check length of text run before checking line break in reflow of ruby base container. r=jfkthame
This commit is contained in:
@@ -623,6 +623,10 @@ LineBreakBefore(const nsHTMLReflowState& aReflowState, nsRubyBaseFrame* aFrame)
|
||||
iter.SetOriginalOffset(textFrame->GetContentOffset());
|
||||
uint32_t pos = iter.GetSkippedOffset();
|
||||
gfxTextRun* textRun = textFrame->GetTextRun(nsTextFrame::eInflated);
|
||||
if (pos >= textRun->GetLength()) {
|
||||
// The text frame contains no character at all.
|
||||
return gfxBreakPriority::eNoBreak;
|
||||
}
|
||||
// Return whether we can break before the first character.
|
||||
if (textRun->CanBreakLineBefore(pos)) {
|
||||
return gfxBreakPriority::eNormalBreak;
|
||||
|
||||
Reference in New Issue
Block a user