Diff
Modified: trunk/LayoutTests/ChangeLog (197518 => 197519)
--- trunk/LayoutTests/ChangeLog 2016-03-03 21:46:07 UTC (rev 197518)
+++ trunk/LayoutTests/ChangeLog 2016-03-03 21:49:32 UTC (rev 197519)
@@ -1,3 +1,21 @@
+2016-03-03 Dave Hyatt <[email protected]>
+
+ Add support for the "last" value of hanging-punctuation
+ https://bugs.webkit.org/show_bug.cgi?id=154977
+
+ Reviewed by Darin Adler and Simon Fraser.
+
+ * fast/text/hanging-punctuation-first-and-last-together-expected.html: Added.
+ * fast/text/hanging-punctuation-first-and-last-together.html: Added.
+ * fast/text/hanging-punctuation-first-ws-expected.html: Added.
+ * fast/text/hanging-punctuation-first-ws.html: Added.
+ * fast/text/hanging-punctuation-last-expected.html: Added.
+ * fast/text/hanging-punctuation-last-rtl-expected.html: Added.
+ * fast/text/hanging-punctuation-last-rtl.html: Added.
+ * fast/text/hanging-punctuation-last-ws-expected.html: Added.
+ * fast/text/hanging-punctuation-last-ws.html: Added.
+ * fast/text/hanging-punctuation-last.html: Added.
+
2016-03-03 Brady Eidson <[email protected]>
storage/indexeddb/delete-in-upgradeneeded-close-in-open-success.html flaky on mac-wk2.
Added: trunk/LayoutTests/fast/text/hanging-punctuation-first-and-last-together-expected.html (0 => 197519)
--- trunk/LayoutTests/fast/text/hanging-punctuation-first-and-last-together-expected.html (rev 0)
+++ trunk/LayoutTests/fast/text/hanging-punctuation-first-and-last-together-expected.html 2016-03-03 21:49:32 UTC (rev 197519)
@@ -0,0 +1,10 @@
+<head>
+ <style>
+ body { font-family: 'Ahem'; color:green }
+ .hang { margin:1em; border:1px solid black }
+ </style>
+</head>
+<body>
+ <div style="float:left" class="hang"><div style="margin: 0 -1em">(Hang test)</div></div>
+ <div style="clear:both">
+ <div class="hang" style="width:10em; text-align:justify;"><span style="margin:0 -1em">(This should hang.<br>(This should also hang.)</span></div>
Added: trunk/LayoutTests/fast/text/hanging-punctuation-first-and-last-together.html (0 => 197519)
--- trunk/LayoutTests/fast/text/hanging-punctuation-first-and-last-together.html (rev 0)
+++ trunk/LayoutTests/fast/text/hanging-punctuation-first-and-last-together.html 2016-03-03 21:49:32 UTC (rev 197519)
@@ -0,0 +1,10 @@
+<head>
+<style>
+ body { font-family: 'Ahem'; color:green }
+ .hang { hanging-punctuation: first last; margin:1em; border:1px solid black }
+</style>
+</head>
+<body>
+<div style="float:left" class="hang">(Hang test)</div>
+<div style="clear:both">
+<div class="hang" style="width:10em; text-align:justify;">(This should hang.<br>(This should also hang.)</div>
Added: trunk/LayoutTests/fast/text/hanging-punctuation-first-ws-expected.html (0 => 197519)
--- trunk/LayoutTests/fast/text/hanging-punctuation-first-ws-expected.html (rev 0)
+++ trunk/LayoutTests/fast/text/hanging-punctuation-first-ws-expected.html 2016-03-03 21:49:32 UTC (rev 197519)
@@ -0,0 +1,14 @@
+<head>
+<style>
+ body { font-family: 'Ahem'; color:green }
+ .hang { text-indent: -1em; margin:1em }
+</style>
+</head>
+<body>
+<div style="float:left" class="hang">(Hang test)</div>
+<div style="clear:both">
+<div class="hang">(This should hang.<br>(This should not.</div>
+<div class="hang" style="text-align:justify; width:300px;">(This should hang and justifybecause and now were fine.</div>
+<div class="hang" style="text-align:justify; width:300px;"><span>(</span>This should hang.</div>
+<div style="margin-left:1em; text-align:justify; width:300px;"><span style="border-left:1em solid blue">(</span>This should not hang.</div>
+<div class="hang" style="text-indent:1em; text-align:justify; width:300px;">(This should hang into the text-indent.</div>
\ No newline at end of file
Added: trunk/LayoutTests/fast/text/hanging-punctuation-first-ws.html (0 => 197519)
--- trunk/LayoutTests/fast/text/hanging-punctuation-first-ws.html (rev 0)
+++ trunk/LayoutTests/fast/text/hanging-punctuation-first-ws.html 2016-03-03 21:49:32 UTC (rev 197519)
@@ -0,0 +1,14 @@
+<head>
+<style>
+ body { font-family: 'Ahem'; color:green }
+ .hang { hanging-punctuation: first; margin:1em }
+</style>
+</head>
+<body>
+<div style="float:left" class="hang"> (Hang test)</div>
+<div style="clear:both">
+<div class="hang"> (This should hang.<br>(This should not.</div>
+<div class="hang" style="text-align:justify; width:300px;"> (This should hang and justifybecause and now were fine.</div>
+<div class="hang" style="text-align:justify; width:300px;"> <span> (</span>This should hang.</div>
+<div class="hang" style="text-align:justify; width:300px;"> <span style="border-left:1em solid blue"> (</span>This should not hang.</div>
+<div class="hang" style="text-indent:2em; text-align:justify; width:300px;"> (This should hang into the text-indent.</div>
\ No newline at end of file
Added: trunk/LayoutTests/fast/text/hanging-punctuation-last-expected.html (0 => 197519)
--- trunk/LayoutTests/fast/text/hanging-punctuation-last-expected.html (rev 0)
+++ trunk/LayoutTests/fast/text/hanging-punctuation-last-expected.html 2016-03-03 21:49:32 UTC (rev 197519)
@@ -0,0 +1,12 @@
+<head>
+ <style>
+ body { font-family: 'Ahem'; color:green }
+ .hang { margin:1em }
+ </style>
+</head>
+<body>
+<div style="float:left;" class="hang">(Hang test)</div>
+<div style="clear:both">
+ <div class="hang" style="width:5em">No.<br>Yes.)</div>
+ <div class="hang" style="text-align:justify; width:5em;">Yes <span>)</span></div>
+ <div class="hang" style="text-align:justify; width:4em;">No. <span style="border-right:1em solid blue">)</span></div>
Added: trunk/LayoutTests/fast/text/hanging-punctuation-last-rtl-expected.html (0 => 197519)
--- trunk/LayoutTests/fast/text/hanging-punctuation-last-rtl-expected.html (rev 0)
+++ trunk/LayoutTests/fast/text/hanging-punctuation-last-rtl-expected.html 2016-03-03 21:49:32 UTC (rev 197519)
@@ -0,0 +1,12 @@
+<head>
+ <style>
+ body { font-family: 'Ahem'; color:green; direction:rtl }
+ .hang { margin:1em }
+ </style>
+</head>
+<body>
+<div style="float:right;" class="hang">(Hang test)</div>
+<div style="clear:both">
+ <div class="hang" style="width:5em">No.<br>Yes.)</div>
+ <div class="hang" style="text-align:justify; width:5em;">Yes <span>)</span></div>
+ <div class="hang" style="text-align:justify; width:4em;">No. <span style="border-left:1em solid blue">)</span></div>
Added: trunk/LayoutTests/fast/text/hanging-punctuation-last-rtl.html (0 => 197519)
--- trunk/LayoutTests/fast/text/hanging-punctuation-last-rtl.html (rev 0)
+++ trunk/LayoutTests/fast/text/hanging-punctuation-last-rtl.html 2016-03-03 21:49:32 UTC (rev 197519)
@@ -0,0 +1,13 @@
+<head>
+<style>
+ body { font-family: 'Ahem'; color:green; direction:rtl }
+ .hang { hanging-punctuation: last; margin:1em }
+</style>
+</head>
+<body>
+<div style="float:right;" class="hang">(Hang test)</div>
+<div style="clear:both">
+<div class="hang" style="width:4em"
+ >No.<br>Yes.)</div>
+<div class="hang" style="text-align:justify; width:4em;">Yes <span>)</span></div>
+<div class="hang" style="text-align:justify; width:4em;">No. <span style="border-left:1em solid blue">)</span></div>
Added: trunk/LayoutTests/fast/text/hanging-punctuation-last-ws-expected.html (0 => 197519)
--- trunk/LayoutTests/fast/text/hanging-punctuation-last-ws-expected.html (rev 0)
+++ trunk/LayoutTests/fast/text/hanging-punctuation-last-ws-expected.html 2016-03-03 21:49:32 UTC (rev 197519)
@@ -0,0 +1,12 @@
+<head>
+ <style>
+ body { font-family: 'Ahem'; color:green }
+ .hang { margin:1em }
+ </style>
+</head>
+<body>
+<div style="float:left;" class="hang">(Hang test)</div>
+<div style="clear:both">
+ <div class="hang" style="width:5em">No.<br>Yes.)</div>
+ <div class="hang" style="text-align:justify; width:5em;">Yes <span>)</span></div>
+ <div class="hang" style="text-align:justify; width:4em;">No. <span style="border-right:1em solid blue">)</span></div>
Added: trunk/LayoutTests/fast/text/hanging-punctuation-last-ws.html (0 => 197519)
--- trunk/LayoutTests/fast/text/hanging-punctuation-last-ws.html (rev 0)
+++ trunk/LayoutTests/fast/text/hanging-punctuation-last-ws.html 2016-03-03 21:49:32 UTC (rev 197519)
@@ -0,0 +1,12 @@
+<head>
+<style>
+ body { font-family: 'Ahem'; color:green }
+ .hang { hanging-punctuation: last; margin:1em }
+</style>
+</head>
+<body>
+<div style="float:left;" class="hang">(Hang test) </div>
+<div style="clear:both">
+<div class="hang" style="width:4em">No.<br>Yes.) </div>
+<div class="hang" style="text-align:justify; width:4em;">Yes <span>) </span></div>
+<div class="hang" style="text-align:justify; width:4em;">No. <span style="border-right:1em solid blue">) </span> </div>
Added: trunk/LayoutTests/fast/text/hanging-punctuation-last.html (0 => 197519)
--- trunk/LayoutTests/fast/text/hanging-punctuation-last.html (rev 0)
+++ trunk/LayoutTests/fast/text/hanging-punctuation-last.html 2016-03-03 21:49:32 UTC (rev 197519)
@@ -0,0 +1,13 @@
+<head>
+<style>
+ body { font-family: 'Ahem'; color:green }
+ .hang { hanging-punctuation: last; margin:1em }
+</style>
+</head>
+<body>
+<div style="float:left;" class="hang">(Hang test)</div>
+<div style="clear:both">
+<div class="hang" style="width:4em"
+ >No.<br>Yes.)</div>
+<div class="hang" style="text-align:justify; width:4em;">Yes <span>)</span></div>
+<div class="hang" style="text-align:justify; width:4em;">No. <span style="border-right:1em solid blue">)</span></div>
Modified: trunk/Source/WebCore/ChangeLog (197518 => 197519)
--- trunk/Source/WebCore/ChangeLog 2016-03-03 21:46:07 UTC (rev 197518)
+++ trunk/Source/WebCore/ChangeLog 2016-03-03 21:49:32 UTC (rev 197519)
@@ -1,3 +1,34 @@
+2016-03-03 Dave Hyatt <[email protected]>
+
+ Add support for the "last" value of hanging-punctuation
+ https://bugs.webkit.org/show_bug.cgi?id=154977
+
+ Reviewed by Darin Adler and Simon Fraser.
+
+ New tests in fast/text.
+
+ This patch adds support for the new "last" value and also fixes up both
+ "first" and "last" to work with leading and trailing whitespace that ends
+ up getting collapsed away.
+
+ * rendering/RenderBlockFlow.cpp:
+ (WebCore::RenderBlockFlow::computeInlinePreferredLogicalWidths):
+ * rendering/RenderBlockLineLayout.cpp:
+ (WebCore::inlineAncestorHasStartBorderPaddingOrMargin):
+ (WebCore::inlineAncestorHasEndBorderPaddingOrMargin):
+ (WebCore::isLastInFlowRun):
+ (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment):
+ * rendering/RenderText.cpp:
+ (WebCore::isHangablePunctuationAtLineEnd):
+ (WebCore::RenderText::hangablePunctuationStartWidth):
+ (WebCore::RenderText::hangablePunctuationEndWidth):
+ (WebCore::RenderText::firstCharacterIndexStrippingSpaces):
+ (WebCore::RenderText::lastCharacterIndexStrippingSpaces):
+ (WebCore::RenderText::trimmedPrefWidths):
+ * rendering/RenderText.h:
+ * rendering/line/BreakingContext.h:
+ (WebCore::BreakingContext::handleText):
+
2016-03-03 Andy Estes <[email protected]>
Adopt CFNetwork storage partitioning SPI
Modified: trunk/Source/WebCore/rendering/RenderBlockFlow.cpp (197518 => 197519)
--- trunk/Source/WebCore/rendering/RenderBlockFlow.cpp 2016-03-03 21:46:07 UTC (rev 197518)
+++ trunk/Source/WebCore/rendering/RenderBlockFlow.cpp 2016-03-03 21:49:32 UTC (rev 197519)
@@ -4065,6 +4065,9 @@
bool isPrevChildInlineFlow = false;
bool shouldBreakLineAfterText = false;
bool canHangPunctuationAtStart = styleToUse.hangingPunctuation() & FirstHangingPunctuation;
+ bool canHangPunctuationAtEnd = styleToUse.hangingPunctuation() & LastHangingPunctuation;
+ RenderText* lastText = nullptr;
+
bool addedStartPunctuationHang = false;
while (RenderObject* child = childIterator.next()) {
@@ -4111,6 +4114,7 @@
float childMax = 0;
if (!child->isText()) {
+ lastText = nullptr;
if (child->isLineBreakOpportunity()) {
minLogicalWidth = preferredWidth(minLogicalWidth, inlineMin);
inlineMin = 0;
@@ -4217,6 +4221,7 @@
if (!child->isFloating()) {
stripFrontSpaces = false;
trailingSpaceChild = nullptr;
+ lastText = nullptr;
}
} else if (is<RenderText>(*child)) {
// Case (3). Text.
@@ -4234,6 +4239,7 @@
float beginMin, endMin;
bool beginWS, endWS;
float beginMax, endMax;
+ bool strippingBeginWS = stripFrontSpaces;
renderText.trimmedPrefWidths(inlineMax, beginMin, beginWS, endMin, endWS,
hasBreakableChar, hasBreak, beginMax, endMax,
childMin, childMax, stripFrontSpaces);
@@ -4246,6 +4252,8 @@
}
continue;
}
+
+ lastText = &renderText;
if (stripFrontSpaces)
trailingSpaceChild = child;
@@ -4276,7 +4284,8 @@
// See if we have a hanging punctuation situation at the start.
if (canHangPunctuationAtStart && !addedStartPunctuationHang) {
- float hangStartWidth = renderText.hangablePunctuationStartWidth();
+ unsigned startIndex = strippingBeginWS ? renderText.firstCharacterIndexStrippingSpaces() : 0;
+ float hangStartWidth = renderText.hangablePunctuationStartWidth(startIndex);
childMin -= hangStartWidth;
beginMin -= hangStartWidth;
childMax -= hangStartWidth;
@@ -4349,6 +4358,13 @@
if (styleToUse.collapseWhiteSpace())
stripTrailingSpace(inlineMax, inlineMin, trailingSpaceChild);
+
+ if (canHangPunctuationAtEnd && lastText && lastText->textLength() > 0) {
+ unsigned endIndex = trailingSpaceChild == lastText ? lastText->lastCharacterIndexStrippingSpaces() : lastText->textLength() - 1;
+ float endHangWidth = lastText->hangablePunctuationEndWidth(endIndex);
+ inlineMin -= endHangWidth;
+ inlineMax -= endHangWidth;
+ }
minLogicalWidth = preferredWidth(minLogicalWidth, inlineMin);
maxLogicalWidth = preferredWidth(maxLogicalWidth, inlineMax);
Modified: trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp (197518 => 197519)
--- trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp 2016-03-03 21:46:07 UTC (rev 197518)
+++ trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp 2016-03-03 21:49:32 UTC (rev 197519)
@@ -817,6 +817,17 @@
return false;
}
+static bool inlineAncestorHasEndBorderPaddingOrMargin(const RenderBlockFlow& block, const InlineBox& box)
+{
+ bool isLTR = block.style().isLeftToRightDirection();
+ for (auto* currentBox = box.parent(); currentBox; currentBox = currentBox->parent()) {
+ if ((isLTR && currentBox->marginBorderPaddingLogicalRight() > 0)
+ || (!isLTR && currentBox->marginBorderPaddingLogicalLeft() > 0))
+ return true;
+ }
+ return false;
+}
+
static bool isLastInFlowRun(BidiRun& runToCheck)
{
for (auto* run = runToCheck.next(); run; run = run->next()) {
@@ -833,6 +844,7 @@
{
bool needsWordSpacing = false;
bool canHangPunctuationAtStart = style().hangingPunctuation() & FirstHangingPunctuation;
+ bool canHangPunctuationAtEnd = style().hangingPunctuation() & LastHangingPunctuation;
bool isLTR = style().isLeftToRightDirection();
float totalLogicalWidth = lineBox->getFlowSpacingLogicalWidth();
unsigned expansionOpportunityCount = 0;
@@ -852,13 +864,22 @@
auto& textBox = downcast<InlineTextBox>(*run->box());
if (canHangPunctuationAtStart && lineInfo.isFirstLine() && (isLTR || isLastInFlowRun(*run))
&& !inlineAncestorHasStartBorderPaddingOrMargin(*this, *run->box())) {
- float hangStartWidth = renderText.hangablePunctuationStartWidth();
+ float hangStartWidth = renderText.hangablePunctuationStartWidth(run->m_start);
availableLogicalWidth += hangStartWidth;
if (style().isLeftToRightDirection())
logicalLeft -= hangStartWidth;
canHangPunctuationAtStart = false;
}
+ if (canHangPunctuationAtEnd && lineInfo.isLastLine() && run->m_stop > 0 && (!isLTR || isLastInFlowRun(*run))
+ && !inlineAncestorHasEndBorderPaddingOrMargin(*this, *run->box())) {
+ float hangEndWidth = renderText.hangablePunctuationEndWidth(run->m_stop - 1);
+ availableLogicalWidth += hangEndWidth;
+ if (!style().isLeftToRightDirection())
+ logicalLeft -= hangEndWidth;
+ canHangPunctuationAtEnd = false;
+ }
+
if (textAlign == JUSTIFY && run != trailingSpaceRun) {
ExpansionBehavior expansionBehavior = expansionBehaviorForInlineTextBox(*this, textBox, previousRun, run->next(), textAlign, isAfterExpansion);
applyExpansionBehavior(textBox, expansionBehavior);
Modified: trunk/Source/WebCore/rendering/RenderText.cpp (197518 => 197519)
--- trunk/Source/WebCore/rendering/RenderText.cpp 2016-03-03 21:46:07 UTC (rev 197518)
+++ trunk/Source/WebCore/rendering/RenderText.cpp 2016-03-03 21:49:32 UTC (rev 197519)
@@ -512,22 +512,75 @@
return U_GET_GC_MASK(c) & (U_GC_PE_MASK | U_GC_PI_MASK | U_GC_PF_MASK);
}
-float RenderText::hangablePunctuationStartWidth() const
+float RenderText::hangablePunctuationStartWidth(unsigned index) const
{
if (!textLength())
return 0;
ASSERT(m_text);
StringImpl& text = *m_text.impl();
- if (!isHangablePunctuationAtLineStart(text[0]))
+
+ if (!isHangablePunctuationAtLineStart(text[index]))
return 0;
-
+
const RenderStyle& style = this->style();
const FontCascade& font = style.fontCascade();
return widthFromCache(font, 0, 1, 0, 0, 0, style);
}
+
+float RenderText::hangablePunctuationEndWidth(unsigned index) const
+{
+ if (!textLength())
+ return 0;
+ ASSERT(m_text);
+ StringImpl& text = *m_text.impl();
+
+ if (!isHangablePunctuationAtLineEnd(text[index]))
+ return 0;
+
+ const RenderStyle& style = this->style();
+ const FontCascade& font = style.fontCascade();
+
+ return widthFromCache(font, 0, 1, 0, 0, 0, style);
+}
+
+unsigned RenderText::firstCharacterIndexStrippingSpaces() const
+{
+ if (!style().collapseWhiteSpace())
+ return 0;
+
+ ASSERT(m_text);
+ StringImpl& text = *m_text.impl();
+
+ unsigned i = 0;
+ for ( ; i < textLength(); ++i) {
+ if (text[i] != ' ' && (text[i] != '\n' || style().preserveNewline()) && text[i] != '\t')
+ break;
+ }
+ return i;
+}
+
+unsigned RenderText::lastCharacterIndexStrippingSpaces() const
+{
+ if (!textLength())
+ return 0;
+
+ if (!style().collapseWhiteSpace())
+ return textLength() - 1;
+
+ ASSERT(m_text);
+ StringImpl& text = *m_text.impl();
+
+ int i = textLength() - 1;
+ for ( ; i >= 0; --i) {
+ if (text[i] != ' ' && (text[i] != '\n' || style().preserveNewline()) && text[i] != '\t')
+ break;
+ }
+ return i;
+}
+
void RenderText::trimmedPrefWidths(float leadWidth,
float& beginMinW, bool& beginWS,
float& endMinW, bool& endWS,
Modified: trunk/Source/WebCore/rendering/RenderText.h (197518 => 197519)
--- trunk/Source/WebCore/rendering/RenderText.h 2016-03-03 21:46:07 UTC (rev 197518)
+++ trunk/Source/WebCore/rendering/RenderText.h 2016-03-03 21:49:32 UTC (rev 197519)
@@ -102,7 +102,10 @@
bool& hasBreakableChar, bool& hasBreak,
float& beginMaxW, float& endMaxW,
float& minW, float& maxW, bool& stripFrontSpaces);
- float hangablePunctuationStartWidth() const;
+ float hangablePunctuationStartWidth(unsigned index) const;
+ float hangablePunctuationEndWidth(unsigned index) const;
+ unsigned firstCharacterIndexStrippingSpaces() const;
+ unsigned lastCharacterIndexStrippingSpaces() const;
WEBCORE_EXPORT virtual IntRect linesBoundingBox() const;
LayoutRect linesVisualOverflowBoundingBox() const;
Modified: trunk/Source/WebCore/rendering/line/BreakingContext.h (197518 => 197519)
--- trunk/Source/WebCore/rendering/line/BreakingContext.h 2016-03-03 21:46:07 UTC (rev 197518)
+++ trunk/Source/WebCore/rendering/line/BreakingContext.h 2016-03-03 21:49:32 UTC (rev 197519)
@@ -738,7 +738,8 @@
bool isFixedPitch = font.isFixedPitch();
bool canHyphenate = style.hyphens() == HyphensAuto && WebCore::canHyphenate(style.locale());
bool canHangPunctuationAtStart = style.hangingPunctuation() & FirstHangingPunctuation;
-
+ bool canHangPunctuationAtEnd = style.hangingPunctuation() & LastHangingPunctuation;
+ int endPunctuationIndex = canHangPunctuationAtEnd && m_collapseWhiteSpace ? renderText.lastCharacterIndexStrippingSpaces() : renderText.textLength() - 1;
unsigned lastSpace = m_current.offset();
float wordSpacing = m_currentStyle->fontCascade().wordSpacing();
float lastSpaceWordSpacing = 0;
@@ -788,9 +789,16 @@
UChar c = m_current.current();
m_currentCharacterIsSpace = c == ' ' || c == '\t' || (!m_preservesNewline && (c == '\n'));
- if (canHangPunctuationAtStart && !m_current.offset() && m_width.isFirstLine() && !m_width.committedWidth() && !wrapW && !m_current.offset())
- m_width.addUncommittedWidth(-renderText.hangablePunctuationStartWidth());
-
+ if (canHangPunctuationAtStart && m_width.isFirstLine() && !m_width.committedWidth() && !wrapW && !inlineLogicalWidth(m_current.renderer(), true, false)) {
+ m_width.addUncommittedWidth(-renderText.hangablePunctuationStartWidth(m_current.offset()));
+ canHangPunctuationAtStart = false;
+ }
+
+ if (canHangPunctuationAtEnd && !m_nextObject && (int)m_current.offset() == endPunctuationIndex && !inlineLogicalWidth(m_current.renderer(), false, true)) {
+ m_width.addUncommittedWidth(-renderText.hangablePunctuationEndWidth(endPunctuationIndex));
+ canHangPunctuationAtStart = false;
+ }
+
if (!m_collapseWhiteSpace || !m_currentCharacterIsSpace)
m_lineInfo.setEmpty(false, &m_block, &m_width);