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

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

Issue 68483006: Remove ComplexTextController dependency on core (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Try one more time Created 7 years, 1 month 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 | « Source/core/platform/graphics/mac/ComplexTextController.cpp ('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 fc47f73580911bb6d7585a6b684e37797719ae1f..42e66ca5c9935c2c9a18b66681cb423d8ae15a3b 100644
--- a/Source/core/rendering/line/BreakingContextInlineHeaders.h
+++ b/Source/core/rendering/line/BreakingContextInlineHeaders.h
@@ -52,6 +52,15 @@ struct RenderTextInfo {
OwnPtr<TextLayout> m_layout;
LazyLineBreakIterator m_lineBreakIterator;
const Font* m_font;
+
+ void createLayout(RenderText* renderText, float xPos, bool collapseWhiteSpace)
+ {
+#if OS(MACOSX)
+ m_layout = m_font->createLayoutForMacComplexText(RenderBlockFlow::constructTextRun(renderText, *m_font, renderText, renderText->style()), renderText->textLength(), xPos, collapseWhiteSpace);
+#else
+ m_layout = nullptr;
+#endif
+ }
};
class WordMeasurement {
@@ -760,11 +769,11 @@ inline bool BreakingContext::handleText(WordMeasurements& wordMeasurements, bool
if (m_renderTextInfo.m_text != renderText) {
m_renderTextInfo.m_text = renderText;
m_renderTextInfo.m_font = &font;
- m_renderTextInfo.m_layout = font.createLayout(renderText, m_width.currentWidth(), m_collapseWhiteSpace);
+ m_renderTextInfo.createLayout(renderText, m_width.currentWidth(), m_collapseWhiteSpace);
m_renderTextInfo.m_lineBreakIterator.resetStringAndReleaseIterator(renderText->text(), style->locale());
} else if (m_renderTextInfo.m_layout && m_renderTextInfo.m_font != &font) {
m_renderTextInfo.m_font = &font;
- m_renderTextInfo.m_layout = font.createLayout(renderText, m_width.currentWidth(), m_collapseWhiteSpace);
+ m_renderTextInfo.createLayout(renderText, m_width.currentWidth(), m_collapseWhiteSpace);
}
TextLayout* textLayout = m_renderTextInfo.m_layout.get();
« no previous file with comments | « Source/core/platform/graphics/mac/ComplexTextController.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698