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

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

Issue 2479333002: Ensure line-break is on correct object if trailing collapsed whitespace pushes us over line-end (Closed)
Patch Set: Ensure line-break is on correct object if trailing collapsed whitespace pushes us over line-end Created 3 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/block/float/assert-when-moving-float-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 580cea082ce674de0c964ca12a39741b67cc09a6..9a184446e5a2441af22202ec213b0ad80d62ca2a 100644
--- a/third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h
+++ b/third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h
@@ -1501,6 +1501,12 @@ inline void BreakingContext::commitAndUpdateLineBreakIfNeeded() {
m_currentStyle->collapseWhiteSpace())
m_trailingObjects.clear();
+ if (!m_width.fitsOnLine() && m_width.fitsOnLine(0, ExcludeWhitespace) &&
+ m_ignoringSpaces && m_nextObject) {
+ m_width.commit();
+ m_lineBreak.moveToStartOf(m_nextObject);
+ }
+
if (m_width.committedWidth()) {
m_atEnd = true;
return;
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/block/float/assert-when-moving-float-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698