Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(339)

Unified Diff: xfa/fxfa/parser/xfa_script_resolveprocessor.cpp

Issue 1821413002: Fix parsing of double dot operators for FormCalc (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Windows xfa diff'd. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « testing/SUPPRESSIONS ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxfa/parser/xfa_script_resolveprocessor.cpp
diff --git a/xfa/fxfa/parser/xfa_script_resolveprocessor.cpp b/xfa/fxfa/parser/xfa_script_resolveprocessor.cpp
index b40d714ec9292308c74dd1284cba3d1774b8eae1..cb5c039f75e02a032dd4a7e879afa7662008f010 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;
« no previous file with comments | « testing/SUPPRESSIONS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698