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

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: 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
Index: Source/core/rendering/line/BreakingContextInlineHeaders.h
diff --git a/Source/core/rendering/line/BreakingContextInlineHeaders.h b/Source/core/rendering/line/BreakingContextInlineHeaders.h
index 74eba9d2ab63a4d4e5abb0a2780ff954cd94be73..d5bdc51c7ace159639f866448be9228e30a2918f 100644
--- a/Source/core/rendering/line/BreakingContextInlineHeaders.h
+++ b/Source/core/rendering/line/BreakingContextInlineHeaders.h
@@ -726,6 +726,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();

Powered by Google App Engine
This is Rietveld 408576698