summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2018-08-01 16:32:55 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2019-06-03 11:28:27 +0200
commit02a3ea22e295fcb9dcaca986b0217b4b306c8780 (patch)
tree221958018e85d3777ad91021113014601525287c
parent7dfc48f8a638446d97d14c44bef5d437bf278565 (diff)
downloadqtwebengine-chromium-02a3ea22e295fcb9dcaca986b0217b4b306c8780.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.cpp2
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 cb7465ef780..298253d2b74 100644
--- a/chromium/third_party/pdfium/core/fxcrt/fx_string.cpp
+++ b/chromium/third_party/pdfium/core/fxcrt/fx_string.cpp
@@ -72,7 +72,7 @@ float StringToFloat(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)));