summaryrefslogtreecommitdiff
path: root/xfa/fxfa/cxfa_ffdocview.h
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2018-05-17 18:30:32 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-05-17 18:30:32 +0000
commit30f739c81db8d6fb4cb68347eae6b2a785cd6414 (patch)
tree126e030955f715459a8b0ace7457484c91d561c2 /xfa/fxfa/cxfa_ffdocview.h
parent902a2288ffb3dc000e25445a3011a40d8ebb5f2a (diff)
downloadpdfium-30f739c81db8d6fb4cb68347eae6b2a785cd6414.tar.xz
Make CXFA_LayoutProcessor an UnownedPtr in CXFA_FFDocView
The LayoutProcessor is owned by the CXFA_Document. Make the ownership explicit with an UnownedPtr. Change-Id: I100af9e2e029e0a5db4ee365e11977016ffdcd70 Reviewed-on: https://pdfium-review.googlesource.com/32670 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Diffstat (limited to 'xfa/fxfa/cxfa_ffdocview.h')
-rw-r--r--xfa/fxfa/cxfa_ffdocview.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/xfa/fxfa/cxfa_ffdocview.h b/xfa/fxfa/cxfa_ffdocview.h
index 2b8358264c..efa504ecd3 100644
--- a/xfa/fxfa/cxfa_ffdocview.h
+++ b/xfa/fxfa/cxfa_ffdocview.h
@@ -97,6 +97,8 @@ class CXFA_FFDocView {
bool m_bInLayoutStatus = false;
std::vector<WideString> m_arrNullTestMsg;
+ void ResetLayoutProcessor() { m_pXFADocLayout.Release(); }
+
private:
bool RunEventLayoutReady();
void RunBindItems();
@@ -115,7 +117,7 @@ class CXFA_FFDocView {
UnownedPtr<CXFA_FFDoc> const m_pDoc;
std::unique_ptr<CXFA_FFWidgetHandler> m_pWidgetHandler;
- CXFA_LayoutProcessor* m_pXFADocLayout = nullptr; // Not owned.
+ UnownedPtr<CXFA_LayoutProcessor> m_pXFADocLayout;
UnownedPtr<CXFA_Node> m_pFocusNode;
UnownedPtr<CXFA_FFWidget> m_pFocusWidget;
std::vector<CXFA_Node*> m_ValidateNodes;