| Index: third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h
|
| diff --git a/third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h b/third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h
|
| index 81a80cb589d6341108f29b9597ea76fd70688b32..93435b8b11280e98a7367d43bb22b47d8444925e 100644
|
| --- a/third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h
|
| +++ b/third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h
|
| @@ -784,14 +784,6 @@ inline bool BreakingContext::handleText(WordMeasurements& wordMeasurements, bool
|
| float lastWidthMeasurement;
|
| WordMeasurement& wordMeasurement = calculateWordWidth(wordMeasurements, layoutText, lastSpace, lastWidthMeasurement, wordSpacingForWordMeasurement, font, wordTrailingSpaceWidth, c);
|
| lastWidthMeasurement += lastSpaceWordSpacing;
|
| -
|
| - midWordBreak = false;
|
| - if (canBreakMidWord && !m_width.fitsOnLine(lastWidthMeasurement)
|
| - && rewindToMidWordBreak(layoutText, style, font, breakAll, wordMeasurement)) {
|
| - lastWidthMeasurement = wordMeasurement.width;
|
| - midWordBreak = true;
|
| - }
|
| -
|
| m_width.addUncommittedWidth(lastWidthMeasurement);
|
|
|
| // We keep track of the total width contributed by trailing space as we often want to exclude it when determining
|
| @@ -811,6 +803,16 @@ inline bool BreakingContext::handleText(WordMeasurements& wordMeasurements, bool
|
| if (!m_width.committedWidth() && m_autoWrap && !m_width.fitsOnLine() && !widthMeasurementAtLastBreakOpportunity)
|
| m_width.fitBelowFloats(m_lineInfo.isFirstLine());
|
|
|
| + midWordBreak = false;
|
| + if (canBreakMidWord && !m_width.fitsOnLine()) {
|
| + m_width.addUncommittedWidth(-wordMeasurement.width);
|
| + if (rewindToMidWordBreak(layoutText, style, font, breakAll, wordMeasurement)) {
|
| + lastWidthMeasurement = wordMeasurement.width + lastSpaceWordSpacing;
|
| + midWordBreak = true;
|
| + }
|
| + m_width.addUncommittedWidth(wordMeasurement.width);
|
| + }
|
| +
|
| // If there is a soft-break available at this whitespace position then take it.
|
| applyWordSpacing = wordSpacing && m_currentCharacterIsSpace;
|
| if (canBreakAtWhitespace(breakWords, wordMeasurement, stoppedIgnoringSpaces, hyphenated, charWidth, hyphenWidth, betweenWords, midWordBreak, canBreakMidWord, previousCharacterIsSpace, lastWidthMeasurement, layoutText, font, applyWordSpacing, wordSpacing))
|
|
|