Index: Source/core/rendering/line/BreakingContextInlineHeaders.h |
diff --git a/Source/core/rendering/line/BreakingContextInlineHeaders.h b/Source/core/rendering/line/BreakingContextInlineHeaders.h |
index 625085cac7322c18265d0703bbae2507f22319a6..f704583027b69894779b71a3e9a699578c5cb6a4 100644 |
--- a/Source/core/rendering/line/BreakingContextInlineHeaders.h |
+++ b/Source/core/rendering/line/BreakingContextInlineHeaders.h |
@@ -728,6 +728,13 @@ inline bool BreakingContext::handleText(WordMeasurements& wordMeasurements, bool |
bool isSVGText = renderText->isSVGInlineText(); |
+ // If we have left a no-wrap inline and entered an autowrap inline while ignoring spaces |
+ // then we need to mark the start of the autowrap inline as a potential linebreak now. |
+ if (m_autoWrap && !RenderStyle::autoWrap(m_lastWS) && m_ignoringSpaces) { |
+ m_width.commit(); |
+ m_lineBreak.moveToStartOf(m_current.object()); |
+ } |
+ |
if (renderText->style()->hasTextCombine() && m_current.object()->isCombineText() && !toRenderCombineText(m_current.object())->isCombined()) { |
RenderCombineText* combineRenderer = toRenderCombineText(m_current.object()); |
combineRenderer->combineText(); |