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

Unified Diff: xfa/src/fxfa/src/parser/xfa_layout_appadapter.cpp

Issue 1640233004: XFA: Fix a crashier in SetFocus() (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Remove FFI_PageEvent Created 4 years, 11 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 | « xfa/src/fxfa/src/app/xfa_ffnotify.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/src/fxfa/src/parser/xfa_layout_appadapter.cpp
diff --git a/xfa/src/fxfa/src/parser/xfa_layout_appadapter.cpp b/xfa/src/fxfa/src/parser/xfa_layout_appadapter.cpp
index 00908944b231ac251e0ead77f1c85d2fe30713a8..8e0a9444c5dcef2f37fe8a7edb53d6466267a05a 100644
--- a/xfa/src/fxfa/src/parser/xfa_layout_appadapter.cpp
+++ b/xfa/src/fxfa/src/parser/xfa_layout_appadapter.cpp
@@ -40,14 +40,18 @@ FX_DWORD XFA_GetRelevant(CXFA_Node* pFormItem, FX_DWORD dwParentRelvant) {
}
void XFA_ReleaseLayoutItem(CXFA_LayoutItem* pLayoutItem) {
CXFA_LayoutItem* pNode = pLayoutItem->m_pFirstChild;
+ IXFA_Notify* pNotify =
+ pLayoutItem->m_pFormNode->GetDocument()->GetParser()->GetNotify();
+ IXFA_DocLayout* pDocLayout =
+ pLayoutItem->m_pFormNode->GetDocument()->GetDocLayout();
while (pNode) {
CXFA_LayoutItem* pNext = pNode->m_pNextSibling;
pNode->m_pParent = nullptr;
+ pNotify->OnLayoutEvent(pDocLayout, static_cast<CXFA_LayoutItem*>(pNode),
+ XFA_LAYOUTEVENT_ItemRemoving);
XFA_ReleaseLayoutItem(pNode);
pNode = pNext;
}
- IXFA_Notify* pNotify =
- pLayoutItem->m_pFormNode->GetDocument()->GetParser()->GetNotify();
if (pLayoutItem->m_pFormNode->GetClassID() == XFA_ELEMENT_PageArea) {
pNotify->OnPageEvent(static_cast<CXFA_ContainerLayoutItem*>(pLayoutItem),
XFA_PAGEEVENT_PageRemoved);
« no previous file with comments | « xfa/src/fxfa/src/app/xfa_ffnotify.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698