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

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

Issue 1304993003: Fix Japanese line breaking rule before and after ruby (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add NeedsRebaseline Created 5 years, 4 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/layout/line/BreakingContextInlineHeaders.h
diff --git a/Source/core/layout/line/BreakingContextInlineHeaders.h b/Source/core/layout/line/BreakingContextInlineHeaders.h
index 7742d322d83ef721d8ad6a639980eb645917707c..f28d1b0bd4038f894430459a2fb86ed820888f96 100644
--- a/Source/core/layout/line/BreakingContextInlineHeaders.h
+++ b/Source/core/layout/line/BreakingContextInlineHeaders.h
@@ -458,7 +458,8 @@ inline void BreakingContext::handleReplaced()
m_width.updateAvailableWidth(replacedBox.logicalHeight());
// Break on replaced elements if either has normal white-space.
leviw_travelin_and_unemployed 2015/08/21 18:42:50 This comment seems to need an update.
kojii 2015/08/22 03:49:34 Done.
- if ((m_autoWrap || ComputedStyle::autoWrap(m_lastWS)) && (!m_current.object().isImage() || m_allowImagesToBreak)) {
+ if ((m_autoWrap || ComputedStyle::autoWrap(m_lastWS)) && (!m_current.object().isImage() || m_allowImagesToBreak)
+ && (!m_current.object().isRubyRun() || toLayoutRubyRun(m_current.object())->canBreakBefore(m_layoutTextInfo.m_lineBreakIterator))) {
m_width.commit();
m_lineBreak.moveToStartOf(m_current.object());
}
@@ -892,7 +893,8 @@ inline void BreakingContext::commitAndUpdateLineBreakIfNeeded()
if (!m_current.object().isFloatingOrOutOfFlowPositioned()) {
m_lastObject = m_current.object();
- if (m_lastObject.isReplaced() && m_autoWrap && (!m_lastObject.isImage() || m_allowImagesToBreak) && (!m_lastObject.isListMarker() || LineLayoutListMarker(m_lastObject).isInside())) {
+ if (m_lastObject.isReplaced() && m_autoWrap && (!m_lastObject.isImage() || m_allowImagesToBreak) && (!m_lastObject.isListMarker() || LineLayoutListMarker(m_lastObject).isInside())
+ && !m_lastObject.isRubyRun()) {
m_width.commit();
m_lineBreak.moveToStartOf(m_nextObject);
}
« Source/core/layout/LayoutRubyRun.cpp ('K') | « Source/core/layout/LayoutRubyRun.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698