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

Unified Diff: third_party/WebKit/Source/platform/fonts/Font.cpp

Issue 1978683002: Enable hyphens: auto and none in BreakingContext (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add comments for heuristic, adjust widths of hyphens-auto-mock test Created 4 years, 7 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/platform/fonts/Font.cpp
diff --git a/third_party/WebKit/Source/platform/fonts/Font.cpp b/third_party/WebKit/Source/platform/fonts/Font.cpp
index 9305b22b519aa1838e8506f12eb1bc6e6c3b2c4f..6eaf1399049204240cbdb01fbd0aab2fa0463d30 100644
--- a/third_party/WebKit/Source/platform/fonts/Font.cpp
+++ b/third_party/WebKit/Source/platform/fonts/Font.cpp
@@ -751,6 +751,13 @@ FloatRect Font::selectionRectForComplexText(const TextRun& run,
return FloatRect(point.x() + range.start, point.y(), range.width(), height);
}
+CharacterRange Font::getCharacterRange(const TextRun& run, unsigned from, unsigned to) const
+{
+ FontCachePurgePreventer purgePreventer;
+ CachingWordShaper shaper(m_fontFallbackList->shapeCache(m_fontDescription));
+ return shaper.getCharacterRange(this, run, from, to);
+}
+
Vector<CharacterRange> Font::individualCharacterRanges(const TextRun& run) const
{
// TODO(pdr): Android is temporarily (crbug.com/577306) using the old simple
« no previous file with comments | « third_party/WebKit/Source/platform/fonts/Font.h ('k') | third_party/WebKit/Source/platform/text/Hyphenation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698