diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2018-08-01 16:32:55 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-12-20 13:50:52 +0100 |
commit | 09abb0a766a3c3d36affc56c0953452e6a81b346 (patch) | |
tree | 9ddd2c252a3d4b391a6fce1e7e1538a81447efbd | |
parent | 13e9e51b3538534debde9cfdddd7be28ec70a4f5 (diff) | |
download | qtwebengine-chromium-09abb0a766a3c3d36affc56c0953452e6a81b346.tar.gz |
Work around MSVC2017 optimizer bug when printing a page usind Pdfium
On Windows MSVC2017 32bit release builds of WebEngine, printing to
a QPrinter instance only printed partial page content.
This ended up being a compiler / optimizer bug triggered in the
FX_atof function in
src/3rdparty/chromium/third_party/pdfium/core/fxcrt/fx_string.cpp
which resulted in returning float numbers without any digits past
the decimal point. Because of that, many size / offset calcuations
were wrong.
The fix is to remove a redundant 'strc[cc] == "."' check, which is
implcitly present in a previous if condition. This in turn stops
the compiler from generating incorrect code, and thus parsing
the digits past the decimal point.
Task-number: QTBUG-69639
Change-Id: I7908318b6e7ca58e81d951af784ed8dcd901e12c
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
-rw-r--r-- | chromium/third_party/pdfium/core/fxcrt/fx_string.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/chromium/third_party/pdfium/core/fxcrt/fx_string.cpp b/chromium/third_party/pdfium/core/fxcrt/fx_string.cpp index 944f467751e..da4431ba99b 100644 --- a/chromium/third_party/pdfium/core/fxcrt/fx_string.cpp +++ b/chromium/third_party/pdfium/core/fxcrt/fx_string.cpp @@ -74,7 +74,7 @@ float FX_atof(const ByteStringView& strc) { cc++; } int scale = 0; - if (cc < len && strc[cc] == '.') { + if (cc < len) { cc++; while (cc < len) { value += FractionalScale(scale, FXSYS_DecimalCharToInt(strc.CharAt(cc))); |