Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(660)

Unified Diff: third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h

Issue 1838723002: Stop tracking trailing-space when we leave it (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/text/whitespace/nowrap-previous-trailing-space-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 93d861d97faee46ba026adf788a6d7161403ffb3..4f3b643ffb9ca3e58f518c5df517cfd73b725039 100644
--- a/third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h
+++ b/third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h
@@ -612,8 +612,10 @@ inline bool BreakingContext::handleText(WordMeasurements& wordMeasurements, bool
UChar c = m_current.current();
m_currentCharacterIsSpace = c == spaceCharacter || c == tabulationCharacter || (!m_preservesNewline && (c == newlineCharacter));
- if (!m_collapseWhiteSpace || !m_currentCharacterIsSpace)
+ if (!m_collapseWhiteSpace || !m_currentCharacterIsSpace) {
m_lineInfo.setEmpty(false, m_block, &m_width);
+ m_width.setTrailingWhitespaceWidth(0);
+ }
if (c == softHyphenCharacter && m_autoWrap && !hyphenWidth) {
hyphenWidth = layoutText.hyphenWidth(font, textDirectionFromUnicode(m_resolver.position().direction()));
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/text/whitespace/nowrap-previous-trailing-space-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698