PDF caculated form fields fail to display negative values
Reported by
jturner...@gmail.com,
Feb 28 2018
|
||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3358.0 Safari/537.36 Example URL: http://www.pdfscripting.com/public/FreeStuff/PDFSamples/SimpleCalcExample_v2.pdf Steps to reproduce the problem: 1. Open PDF form with 'simple' calculations (First row in example) 2. Enter negative values in fields 3. View incorrect answer What is the expected behavior? The far right field should display a negative value. What went wrong? The far right field failed to display a negative value. Does it occur on multiple sites: Yes Is it a problem with a plugin? Yes Internals>Plugins>PDF Did this work before? No Does this work in other browsers? Yes Chrome version: 66.0.3358.0 Channel: dev OS Version: 6.1 (Windows 7, Windows Server 2008 R2) Flash Version: This also fails on Chrome 63.0.3239.108 stable. This works correctly in Adobe Acrobat. I wrote a custom calculation script to see if it was a problem with the simplified field notation and the script failed in that same way. I placed an alert() into the script just above the value assignment: app.alert(LinesSum3); event.value = LinesSum3; and the alert displayed the correct negative value but the field failed to update. This works fine as long as the field is being given a value of zero or higher.
,
Mar 1 2018
Dan, can you take a look at this?
,
Mar 6 2018
So, this is a different issue from the AFSimple_Calculate bug.The number is getting calculated correct just, for some reason, we don't trigger the code to display the number in the text field when it's negative.
,
Mar 6 2018
So adding another CJS_PublicMethodsEmbedderTest for AFSimple_Calculate with negative inputs won't actually reveal the problem?
,
Mar 6 2018
Nope, tried that already. AFSimple_Calculate returns the correct values. It seems for some reason when the results go negative we no longer call the AFNumber_Format method. I'm trying to track down what triggers that method to be called after the Calculate method. It's in the additional actions to trigger but it just doesn't.
,
Mar 6 2018
https://pdfium-review.googlesource.com/c/pdfium/+/28110 Not a regression, right?
,
Mar 6 2018
It's possible it's a regression, I didn't bisect. There is a lot of code in there that could have thrown this off.
,
Mar 6 2018
Although, given it says also fails in M63 it's been in for ... a while at least.
,
Mar 12 2018
The following revision refers to this bug: https://pdfium.googlesource.com/pdfium/+/c2df008640f56631735dd3ae89e118c9c56cd36d commit c2df008640f56631735dd3ae89e118c9c56cd36d Author: Dan Sinclair <dsinclair@chromium.org> Date: Mon Mar 12 14:17:54 2018 Handle inserting negative values without a selection When handling the AFNumber_Keystroke callback, if the changed value is negative and there is no selection, we'd incorrectly error out thinking we were inserting before the negative sign. This CL checks if the selection string is empty before erroring out. Bug: chromium:817433 Change-Id: I0ca08e121e9a8c207e9c7793f5b8a4e795c135e6 Reviewed-on: https://pdfium-review.googlesource.com/28110 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> [modify] https://crrev.com/c2df008640f56631735dd3ae89e118c9c56cd36d/fxjs/cjs_publicmethods.cpp [modify] https://crrev.com/c2df008640f56631735dd3ae89e118c9c56cd36d/fxjs/cjs_publicmethods_embeddertest.cpp
,
Mar 12 2018
,
Apr 3 2018
,
Apr 3 2018
,
Apr 3 2018
This bug requires manual review: We are only 13 days from stable. Please contact the milestone owner if you have questions. Owners: cmasso@(Android), cmasso@(iOS), josafat@(ChromeOS), abdulsyed@(Desktop) For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Apr 3 2018
Approving merge to M66. Branch:3359
,
Apr 4 2018
The following revision refers to this bug: https://pdfium.googlesource.com/pdfium/+/2e8701bf5c0703e8d76ad77223a99dd8b8fe6b6f commit 2e8701bf5c0703e8d76ad77223a99dd8b8fe6b6f Author: Dan Sinclair <dsinclair@chromium.org> Date: Wed Apr 04 02:24:20 2018 [Merge M66] Handle inserting negative values without a selection When handling the AFNumber_Keystroke callback, if the changed value is negative and there is no selection, we'd incorrectly error out thinking we were inserting before the negative sign. This CL checks if the selection string is empty before erroring out. TBR=hnakashima@chromium.org Bug: chromium:817433 Change-Id: I0ca08e121e9a8c207e9c7793f5b8a4e795c135e6 Reviewed-on: https://pdfium-review.googlesource.com/28110 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> (cherry picked from commit c2df008640f56631735dd3ae89e118c9c56cd36d) Reviewed-on: https://pdfium-review.googlesource.com/29730 Reviewed-by: dsinclair <dsinclair@chromium.org> [modify] https://crrev.com/2e8701bf5c0703e8d76ad77223a99dd8b8fe6b6f/fxjs/cjs_publicmethods.cpp [modify] https://crrev.com/2e8701bf5c0703e8d76ad77223a99dd8b8fe6b6f/fxjs/cjs_publicmethods_embeddertest.cpp |
||||||||
►
Sign in to add a comment |
||||||||
Comment 1 by susan.boorgula@chromium.org
, Feb 28 2018