diff options
author | Tom Sepez <tsepez@chromium.org> | 2016-03-22 16:05:18 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2016-03-22 16:05:18 -0700 |
commit | 3523c1f23e4c48850fcba5b1cb1bd8f311407e00 (patch) | |
tree | 3ff2258be9aa8c5ec145d77e6bb35a684e6986e5 | |
parent | 34cc08341b5712c17b504a55aa090eaa59051890 (diff) | |
download | pdfium-3523c1f23e4c48850fcba5b1cb1bd8f311407e00.tar.xz |
Fix parsing of double dot operators for FormCalc
Patch by cherycherian.
patch from issue 1810153003 at patchset 1 (http://crrev.com/1810153003#ps1)
FormCalc expressions containing double-dot operators in SOM expressions
were failing since XFA_ResolveNodes_AnyChild was always stripping the
leading character.
Roll testing/corpus to d671154 to pick up the test.
BUG=pdfium:434
TBR=dsinclair@chromium.org
Review URL: https://codereview.chromium.org/1821413002 .
-rw-r--r-- | AUTHORS | 2 | ||||
-rw-r--r-- | DEPS | 2 | ||||
-rw-r--r-- | testing/SUPPRESSIONS | 2 | ||||
-rw-r--r-- | xfa/fxfa/parser/xfa_script_resolveprocessor.cpp | 5 |
4 files changed, 8 insertions, 3 deletions
@@ -11,6 +11,7 @@ Andrey Khalyavin <halyavin@chromium.org> Brett Wilson <brettw@chromium.org> Bruce Dawson <brucedawson@chromium.org> +Chery Cherian <cherycherian@gmail.com> Chris Palmer <palmer@chromium.org> Dan Sinclair <dsinclair@chromium.org> Finnur Thorarinsson <finnur@chromium.org> @@ -31,5 +32,6 @@ Robert Sesek <rsesek@chromium.org> Sam Clegg <sbc@chromium.org> Thomas Sepez <tsepez@chromium.org> +DocsCorp Pty Ltd. <*@docscorp.com> Foxit Software Inc <*@foxitsoftware.com> Google Inc. <*@google.com> @@ -9,7 +9,7 @@ vars = { 'gmock_revision': '29763965ab52f24565299976b936d1265cb6a271', 'gtest_revision': '8245545b6dc9c4703e6496d1efd19e975ad2b038', 'icu_revision': '8d342a405be5ae8aacb1e16f0bc31c3a4fbf26a2', - 'pdfium_tests_revision': 'bafb069353f96d441c6a37786d18cd9f5407937f', + 'pdfium_tests_revision': 'd671154d809b4fcf250e72523ef7d85df04c806a', 'skia_revision': 'ed854fb897fa134f2f64738a75293502fdcf1af2', 'trace_event_revision': 'd83d44b13d07c2fd0a40101a7deef9b93b841732', 'v8_revision': '3c3d7e7be80f45eeea0dc74a71d7552e2afc2985', diff --git a/testing/SUPPRESSIONS b/testing/SUPPRESSIONS index 872fba352c..7aca89d024 100644 --- a/testing/SUPPRESSIONS +++ b/testing/SUPPRESSIONS @@ -287,6 +287,8 @@ bookmark.pdf * * * bookmarkgetcolor.pdf mac * * bug_0_length_line.pdf mac * * bug_0_width_line.pdf mac * * +bug_434.pdf * * noxfa +bug_434.pdf win * xfa bug_white_space.pdf mac * * calcorderindex_test.pdf * * * calculate_average.pdf mac * * diff --git a/xfa/fxfa/parser/xfa_script_resolveprocessor.cpp b/xfa/fxfa/parser/xfa_script_resolveprocessor.cpp index b40d714ec9..cb5c039f75 100644 --- a/xfa/fxfa/parser/xfa_script_resolveprocessor.cpp +++ b/xfa/fxfa/parser/xfa_script_resolveprocessor.cpp @@ -52,6 +52,7 @@ int32_t CXFA_ResolveProcessor::XFA_ResolveNodes(CXFA_ResolveNodesData& rnd) { return XFA_ResolveNodes_NumberSign(rnd); case '*': return XFA_ResolveNodes_Asterisk(rnd); + // TODO(dsinclair@chromium.org): We could probably remove this. case '.': return XFA_ResolveNodes_AnyChild(rnd); default: @@ -85,7 +86,7 @@ int32_t CXFA_ResolveProcessor::XFA_ResolveNodes(CXFA_ResolveNodesData& rnd) { } int32_t CXFA_ResolveProcessor::XFA_ResolveNodes_AnyChild( CXFA_ResolveNodesData& rnd) { - CFX_WideString wsName = rnd.m_wsName.Right(rnd.m_wsName.GetLength() - 1); + CFX_WideString wsName = rnd.m_wsName; CFX_WideString wsCondition = rnd.m_wsCondition; CXFA_Node* findNode = NULL; CXFA_NodeArray siblings; @@ -546,7 +547,7 @@ int32_t CXFA_ResolveProcessor::XFA_ResolveNodes_GetFilter( continue; } if (nNameCount == 0) { - pNameBuf[nNameCount++] = wCur; + rnd.m_dwStyles |= XFA_RESOLVENODE_AnyChild; continue; } FX_WCHAR wLookahead = nStart < iLength ? pSrc[nStart] : 0; |