summaryrefslogtreecommitdiff
path: root/xfa
diff options
context:
space:
mode:
authorRyan Harrison <rharrison@chromium.org>2018-07-16 18:03:56 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-07-16 18:03:56 +0000
commitfb709d88935ae85532679d225993741919b23a7b (patch)
tree8ad8a0e2153f63708a6472607f3f019609c89743 /xfa
parent98bae9c95d916f528ed1a394e68e02e39ad709fa (diff)
downloadpdfium-fb709d88935ae85532679d225993741919b23a7b.tar.xz
Process data changes regardless if they can be formatted
UI elements in XFA can have two different <picture> clauses with different meanings. One is a formatting statement that dictates the format the underlying data should appear in. The other <picture> occurs within an <validate> block and specificies what format the underlying should be. If it doesn't fit this <picture> the <validate> block indicates what should occur. In the existing code actually running the second <picture> type was being conditionally guarded on whether of not the formatting of the first type succeeded. This CL moves the calls related to data changing earlier, to before the formatting and UI updating occurs. BUG=pdfium:1065 Change-Id: Ib525c490074187c3272f4263ab451bf347b74f9c Reviewed-on: https://pdfium-review.googlesource.com/37250 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'xfa')
-rw-r--r--xfa/fxfa/cxfa_fffield.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/xfa/fxfa/cxfa_fffield.cpp b/xfa/fxfa/cxfa_fffield.cpp
index 6f7aab899f..f3c1412361 100644
--- a/xfa/fxfa/cxfa_fffield.cpp
+++ b/xfa/fxfa/cxfa_fffield.cpp
@@ -613,14 +613,13 @@ bool CXFA_FFField::ProcessCommittedData() {
return false;
if (!IsDataChanged())
return false;
- if (CalculateOverride() != 1)
- return false;
- if (!CommitData())
- return false;
m_pDocView->SetChangeMark();
m_pDocView->AddValidateNode(m_pNode.Get());
- return true;
+
+ if (CalculateOverride() != 1)
+ return false;
+ return CommitData();
}
int32_t CXFA_FFField::CalculateOverride() {