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

Unified Diff: third_party/WebKit/Source/core/style/ComputedStyle.cpp

Issue 2865923002: Move LocaleForLineBreakIterator() to ComputedStyle (Closed)
Patch Set: Revert ng changes Created 3 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
« no previous file with comments | « third_party/WebKit/Source/core/style/ComputedStyle.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/style/ComputedStyle.cpp
diff --git a/third_party/WebKit/Source/core/style/ComputedStyle.cpp b/third_party/WebKit/Source/core/style/ComputedStyle.cpp
index f4ddbc24d241a7349c12a07fae6013710d75b2be..eb94635e5cadec1e0d2c87fa50c6c384813e54ba 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyle.cpp
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.cpp
@@ -1586,6 +1586,27 @@ void ComputedStyle::ClearResetDirectives() {
it->value.ClearReset();
}
+AtomicString ComputedStyle::LocaleForLineBreakIterator() const {
+ LineBreakIteratorMode mode = LineBreakIteratorMode::kDefault;
+ switch (GetLineBreak()) {
+ case kLineBreakAuto:
+ case kLineBreakAfterWhiteSpace:
+ return Locale();
+ case kLineBreakNormal:
+ mode = LineBreakIteratorMode::kNormal;
+ break;
+ case kLineBreakStrict:
+ mode = LineBreakIteratorMode::kStrict;
+ break;
+ case kLineBreakLoose:
+ mode = LineBreakIteratorMode::kLoose;
+ break;
+ }
+ if (const LayoutLocale* locale = GetFontDescription().Locale())
+ return locale->LocaleWithBreakKeyword(mode);
+ return Locale();
+}
+
Hyphenation* ComputedStyle::GetHyphenation() const {
return GetHyphens() == kHyphensAuto
? GetFontDescription().LocaleOrDefault().GetHyphenation()
« no previous file with comments | « third_party/WebKit/Source/core/style/ComputedStyle.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698