mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-12-08 23:03:46 +00:00
18 lines
1.1 KiB
Diff
18 lines
1.1 KiB
Diff
|
Index: chrome/browser/ui/webui/print_preview/print_preview_handler.cc
|
||
|
diff --git a/chrome/browser/ui/webui/print_preview/print_preview_handler.cc b/chrome/browser/ui/webui/print_preview/print_preview_handler.cc
|
||
|
index 6cfd861387c9f8b145fb33472b10025537986213..c936a9c1dadb13c00418e8ae79a8a1987c1d36cd 100644
|
||
|
--- a/chrome/browser/ui/webui/print_preview/print_preview_handler.cc
|
||
|
+++ b/chrome/browser/ui/webui/print_preview/print_preview_handler.cc
|
||
|
@@ -1222,7 +1222,10 @@ void PrintPreviewHandler::GetNumberFormatAndMeasurementSystem(
|
||
|
UErrorCode errorCode = U_ZERO_ERROR;
|
||
|
const char* locale = g_browser_process->GetApplicationLocale().c_str();
|
||
|
UMeasurementSystem system = ulocdata_getMeasurementSystem(locale, &errorCode);
|
||
|
- if (errorCode > U_ZERO_ERROR || system == UMS_LIMIT)
|
||
|
+ // On error, assume the units are SI.
|
||
|
+ // Since the only measurement units print preview's WebUI cares about are
|
||
|
+ // those for measuring distance, assume anything non-US is SI.
|
||
|
+ if (errorCode > U_ZERO_ERROR || system != UMS_US)
|
||
|
system = UMS_SI;
|
||
|
|
||
|
// Getting the number formatting based on the locale and writing to
|