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

Unified Diff: Source/core/rendering/line/BreakingContextInlineHeaders.h

Issue 128923002: White spaces between nowrap and normal inlines should break the line (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Expected test improved Created 6 years, 11 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 | « LayoutTests/fast/text/whitespace/inline-whitespace-wrapping-5-expected.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « LayoutTests/fast/text/whitespace/inline-whitespace-wrapping-5-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698