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

Side by Side Diff: xfa/fxfa/parser/xfa_document_imp.cpp

Issue 2082573007: Update GetClassID to GetElementType (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@remove_script_obj_hash
Patch Set: Created 4 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "core/fxcrt/include/fx_ext.h" 7 #include "core/fxcrt/include/fx_ext.h"
8 #include "xfa/fxfa/app/xfa_ffnotify.h" 8 #include "xfa/fxfa/app/xfa_ffnotify.h"
9 #include "xfa/fxfa/parser/xfa_basic_imp.h" 9 #include "xfa/fxfa/parser/xfa_basic_imp.h"
10 #include "xfa/fxfa/parser/xfa_doclayout.h" 10 #include "xfa/fxfa/parser/xfa_doclayout.h"
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 return NULL; 283 return NULL;
284 } 284 }
285 static void XFA_ProtoMerge_MergeNodeRecurse(CXFA_Document* pDocument, 285 static void XFA_ProtoMerge_MergeNodeRecurse(CXFA_Document* pDocument,
286 CXFA_Node* pDestNodeParent, 286 CXFA_Node* pDestNodeParent,
287 CXFA_Node* pProtoNode) { 287 CXFA_Node* pProtoNode) {
288 CXFA_Node* pExistingNode = NULL; 288 CXFA_Node* pExistingNode = NULL;
289 for (CXFA_Node* pFormChild = 289 for (CXFA_Node* pFormChild =
290 pDestNodeParent->GetNodeItem(XFA_NODEITEM_FirstChild); 290 pDestNodeParent->GetNodeItem(XFA_NODEITEM_FirstChild);
291 pFormChild; 291 pFormChild;
292 pFormChild = pFormChild->GetNodeItem(XFA_NODEITEM_NextSibling)) { 292 pFormChild = pFormChild->GetNodeItem(XFA_NODEITEM_NextSibling)) {
293 if (pFormChild->GetClassID() == pProtoNode->GetClassID() && 293 if (pFormChild->GetElementType() == pProtoNode->GetElementType() &&
294 pFormChild->GetNameHash() == pProtoNode->GetNameHash() && 294 pFormChild->GetNameHash() == pProtoNode->GetNameHash() &&
295 pFormChild->IsUnusedNode()) { 295 pFormChild->IsUnusedNode()) {
296 pFormChild->ClearFlag(XFA_NodeFlag_UnusedNode); 296 pFormChild->ClearFlag(XFA_NodeFlag_UnusedNode);
297 pExistingNode = pFormChild; 297 pExistingNode = pFormChild;
298 break; 298 break;
299 } 299 }
300 } 300 }
301 if (pExistingNode) { 301 if (pExistingNode) {
302 pExistingNode->SetTemplateNode(pProtoNode); 302 pExistingNode->SetTemplateNode(pProtoNode);
303 for (CXFA_Node* pTemplateChild = 303 for (CXFA_Node* pTemplateChild =
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 if (!mIDMap.Lookup(FX_HashCode_GetW(wsID, false), pProtoNode)) { 407 if (!mIDMap.Lookup(FX_HashCode_GetW(wsID, false), pProtoNode)) {
408 continue; 408 continue;
409 } 409 }
410 } 410 }
411 if (!pProtoNode) { 411 if (!pProtoNode) {
412 continue; 412 continue;
413 } 413 }
414 XFA_ProtoMerge_MergeNode(this, pUseHrefNode, pProtoNode); 414 XFA_ProtoMerge_MergeNode(this, pUseHrefNode, pProtoNode);
415 } 415 }
416 } 416 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698