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

Side by Side Diff: third_party/WebKit/Source/core/style/ComputedStyle.cpp

Issue 2161683002: Add LayoutLocale class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Test stability Created 4 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org) 2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
4 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. 4 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 1235 matching lines...) Expand 10 before | Expand all | Expand 10 after
1246 1246
1247 // This makes us copy even if we may not be removing any items. 1247 // This makes us copy even if we may not be removing any items.
1248 CounterDirectiveMap& map = accessCounterDirectives(); 1248 CounterDirectiveMap& map = accessCounterDirectives();
1249 typedef CounterDirectiveMap::iterator Iterator; 1249 typedef CounterDirectiveMap::iterator Iterator;
1250 1250
1251 Iterator end = map.end(); 1251 Iterator end = map.end();
1252 for (Iterator it = map.begin(); it != end; ++it) 1252 for (Iterator it = map.begin(); it != end; ++it)
1253 it->value.clearReset(); 1253 it->value.clearReset();
1254 } 1254 }
1255 1255
1256 Hyphenation* ComputedStyle::getHyphenation() const
1257 {
1258 return getHyphens() == HyphensAuto
1259 ? getFontDescription().localeOrDefault().getHyphenation() : nullptr;
1260 }
1261
1256 const AtomicString& ComputedStyle::hyphenString() const 1262 const AtomicString& ComputedStyle::hyphenString() const
1257 { 1263 {
1258 const AtomicString& hyphenationString = m_rareInheritedData.get()->hyphenati onString; 1264 const AtomicString& hyphenationString = m_rareInheritedData.get()->hyphenati onString;
1259 if (!hyphenationString.isNull()) 1265 if (!hyphenationString.isNull())
1260 return hyphenationString; 1266 return hyphenationString;
1261 1267
1262 // FIXME: This should depend on locale. 1268 // FIXME: This should depend on locale.
1263 DEFINE_STATIC_LOCAL(AtomicString, hyphenMinusString, (&hyphenMinusCharacter, 1)); 1269 DEFINE_STATIC_LOCAL(AtomicString, hyphenMinusString, (&hyphenMinusCharacter, 1));
1264 DEFINE_STATIC_LOCAL(AtomicString, hyphenString, (&hyphenCharacter, 1)); 1270 DEFINE_STATIC_LOCAL(AtomicString, hyphenString, (&hyphenCharacter, 1));
1265 const SimpleFontData* primaryFont = font().primaryFont(); 1271 const SimpleFontData* primaryFont = font().primaryFont();
(...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after
1935 if (value < 0) 1941 if (value < 0)
1936 fvalue -= 0.5f; 1942 fvalue -= 0.5f;
1937 else 1943 else
1938 fvalue += 0.5f; 1944 fvalue += 0.5f;
1939 } 1945 }
1940 1946
1941 return roundForImpreciseConversion<int>(fvalue / zoomFactor); 1947 return roundForImpreciseConversion<int>(fvalue / zoomFactor);
1942 } 1948 }
1943 1949
1944 } // namespace blink 1950 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/style/ComputedStyle.h ('k') | third_party/WebKit/Source/core/testing/Internals.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698