| WebKit sets a custom xslt sort function with the expectation that libxslt passes |
| strings directly from the input. If locale support is enabled, libxslt will |
| transform the string using into something WebKit does not expect. This will |
| break third_party/WebKit/LayoutTests/fast/xsl/sort-locale.xml. By disabling |
| POSIX and Windows locale support, we preserve the behavior WebKit expects in |
| XsltUnicodeSortFunction. |
| |
| diff --git a/src/libxslt/xsltlocale.h b/src/libxslt/xsltlocale.h |
| --- src/libxslt/xsltlocale.h |
| +++ src/libxslt/xsltlocale.h |
| @@ -14,7 +14,12 @@ |
| #include <libxml/xmlstring.h> |
| #include "xsltexports.h" |
| |
| -#ifdef HAVE_STRXFRM_L |
| +#if defined(_WIN32) && !defined(__CYGWIN__) |
| +#include <windows.h> |
| +#include <winnls.h> |
| +#endif |
| + |
| +#if 0 |
| |
| /* |
| * XSLT_LOCALE_POSIX: |
| @@ -32,7 +37,7 @@ |
| typedef locale_t xsltLocale; |
| typedef xmlChar xsltLocaleChar; |
| |
| -#elif defined(_WIN32) && !defined(__CYGWIN__) |
| +#elif 0 |
| |
| /* |
| * XSLT_LOCALE_WINAPI: |
| @@ -40,9 +45,6 @@ |
| */ |
| #define XSLT_LOCALE_WINAPI |
| |
| -#include <windows.h> |
| -#include <winnls.h> |
| - |
| typedef LCID xsltLocale; |
| typedef wchar_t xsltLocaleChar; |
| |