WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
maybe the patch
blah.patch (text/plain), 1.34 KB, created by
Filip Pizlo
on 2016-05-17 13:09:32 PDT
(
hide
)
Description:
maybe the patch
Filename:
MIME Type:
Creator:
Filip Pizlo
Created:
2016-05-17 13:09:32 PDT
Size:
1.34 KB
patch
obsolete
>Index: Source/JavaScriptCore/runtime/IntlObject.cpp >=================================================================== >--- Source/JavaScriptCore/runtime/IntlObject.cpp (revision 201038) >+++ Source/JavaScriptCore/runtime/IntlObject.cpp (working copy) >@@ -1,6 +1,7 @@ > /* > * Copyright (C) 2015 Andy VanWagoner (thetalecrafter@gmail.com) > * Copyright (C) 2015 Sukolsak Sakshuwong (sukolsak@gmail.com) >+ * Copyright (C) 2016 Apple Inc. All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions >@@ -48,6 +49,7 @@ > #include <unicode/unumsys.h> > #include <wtf/Assertions.h> > #include <wtf/NeverDestroyed.h> >+#include <wtf/PlatformUserPreferredLanguages.h> > > namespace JSC { > >@@ -650,6 +652,13 @@ String defaultLocale(ExecState& state) > if (!locale.isEmpty()) > return canonicalizeLanguageTag(locale); > } >+ >+ // If WebCore didn't tell us how to get the language then fall back to our own way of doing it, >+ // which mostly follows what WebCore would have done. >+ Vector<String> languages = platformUserPreferredLanguages(); >+ if (!languages.isEmpty() && !languages[0].isEmpty()) >+ return languages[0]; >+ > String locale = uloc_getDefault(); > convertICULocaleToBCP47LanguageTag(locale); > return locale;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 157755
:
279156
|
279174
|
279175