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

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

Issue 2715153003: Implement 'normal', 'strict', and 'loose' of the 'line-break' property (Closed)
Patch Set: Rebase Created 3 years, 10 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: 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 5d37829464c3cc6fdd77f7954481e20e2406f11f..07d43ece65b97bcf069bac23c6554eab51dd45e8 100644
--- a/third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h
+++ b/third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h
@@ -739,7 +739,8 @@ ALWAYS_INLINE int lastBreakablePositionForBreakAll(LineLayoutText text,
const ComputedStyle& style,
int start,
int end) {
- LazyLineBreakIterator lineBreakIterator(text.text(), style.locale());
+ LazyLineBreakIterator lineBreakIterator(text.text(),
+ localeForLineBreakIterator(style));
int lastBreakablePosition = 0, nextBreakablePosition = -1;
for (int i = start;; i = nextBreakablePosition + 1) {
lineBreakIterator.isBreakable(i, nextBreakablePosition,
@@ -798,7 +799,8 @@ ALWAYS_INLINE bool BreakingContext::rewindToFirstMidWordBreak(
int start = wordMeasurement.startOffset;
int end = canMidWordBreakBefore(text) ? start : start + 1;
if (breakAll) {
- LazyLineBreakIterator lineBreakIterator(text.text(), style.locale());
+ LazyLineBreakIterator lineBreakIterator(text.text(),
+ localeForLineBreakIterator(style));
int nextBreakable = -1;
lineBreakIterator.isBreakable(end, nextBreakable, LineBreakType::BreakAll);
if (nextBreakable < 0)
@@ -987,7 +989,7 @@ inline bool BreakingContext::handleText(WordMeasurements& wordMeasurements,
m_layoutTextInfo.m_text = layoutText;
m_layoutTextInfo.m_font = &font;
m_layoutTextInfo.m_lineBreakIterator.resetStringAndReleaseIterator(
- layoutText.text(), style.locale());
+ layoutText.text(), localeForLineBreakIterator(style));
} else if (m_layoutTextInfo.m_font != &font) {
m_layoutTextInfo.m_font = &font;
}
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutText.cpp ('k') | third_party/WebKit/Source/platform/LayoutLocale.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698