Skip to content

Commit cde86cb

Browse files
committed
Bug 1618034 - Strip private subtags in nsLanguageAtomService::GetUncachedLanguageGroup so that we can parse the standard subtags and use the proper font prefs. r=zbraniecki
Differential Revision: https://phabricator.services.mozilla.com/D72050 UltraBlame original commit: 961700e5d48a292ca8d15f974729946227374359
1 parent 37f92b2 commit cde86cb

File tree

1 file changed

+118
-0
lines changed

1 file changed

+118
-0
lines changed

intl/locale/nsLanguageAtomService.cpp

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1271,6 +1271,124 @@ its
12711271
likely
12721272
)
12731273
script
1274+
.
1275+
/
1276+
/
1277+
https
1278+
:
1279+
/
1280+
/
1281+
bugzilla
1282+
.
1283+
mozilla
1284+
.
1285+
org
1286+
/
1287+
show_bug
1288+
.
1289+
cgi
1290+
?
1291+
id
1292+
=
1293+
1618034
1294+
:
1295+
/
1296+
/
1297+
First
1298+
strip
1299+
any
1300+
private
1301+
subtags
1302+
that
1303+
would
1304+
cause
1305+
Locale
1306+
to
1307+
reject
1308+
the
1309+
/
1310+
/
1311+
tag
1312+
as
1313+
non
1314+
-
1315+
wellformed
1316+
.
1317+
nsACString
1318+
:
1319+
:
1320+
const_iterator
1321+
start
1322+
end
1323+
;
1324+
langStr
1325+
.
1326+
BeginReading
1327+
(
1328+
start
1329+
)
1330+
;
1331+
langStr
1332+
.
1333+
EndReading
1334+
(
1335+
end
1336+
)
1337+
;
1338+
if
1339+
(
1340+
FindInReadable
1341+
(
1342+
NS_LITERAL_CSTRING
1343+
(
1344+
"
1345+
-
1346+
x
1347+
-
1348+
"
1349+
)
1350+
start
1351+
end
1352+
)
1353+
)
1354+
{
1355+
/
1356+
/
1357+
The
1358+
substring
1359+
we
1360+
want
1361+
ends
1362+
at
1363+
the
1364+
beginning
1365+
of
1366+
the
1367+
"
1368+
-
1369+
x
1370+
-
1371+
"
1372+
subtag
1373+
.
1374+
langStr
1375+
.
1376+
Truncate
1377+
(
1378+
start
1379+
.
1380+
get
1381+
(
1382+
)
1383+
-
1384+
langStr
1385+
.
1386+
BeginReading
1387+
(
1388+
)
1389+
)
1390+
;
1391+
}
12741392
Locale
12751393
loc
12761394
(

0 commit comments

Comments
 (0)