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

Unified Diff: xfa/src/fwl/src/core/fwl_noteimp.cpp

Issue 1453473002: FWL refcounts never incremented (part 2). (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Rebased past part1. Created 5 years 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
Index: xfa/src/fwl/src/core/fwl_noteimp.cpp
diff --git a/xfa/src/fwl/src/core/fwl_noteimp.cpp b/xfa/src/fwl/src/core/fwl_noteimp.cpp
index 4bc28b87ddab05f0d873ba8800be9e1259889d79..4c46aed9a8e52b0273a185dbaa140ae3f24ce016 100644
--- a/xfa/src/fwl/src/core/fwl_noteimp.cpp
+++ b/xfa/src/fwl/src/core/fwl_noteimp.cpp
@@ -991,11 +991,9 @@ FX_BOOL CFWL_ToolTipContainer::ProcessEnter(CFWL_EvtMouse* pEvt,
CFX_RectF rtTooltip;
rtTooltip.Set(150, 150, 100, 50);
prop.m_rtWidget = rtTooltip;
- m_pToolTipImp = new CFWL_ToolTipImp(prop);
- IFWL_ToolTip* pToolTip = new IFWL_ToolTip;
- m_pToolTipImp->SetInterface(pToolTip);
- pToolTip->SetImpl(m_pToolTipImp);
- m_pToolTipImp->Initialize();
+ IFWL_ToolTip* pToolTip = IFWL_ToolTip::Create(prop, nullptr);
+ pToolTip->Initialize();
+ m_pToolTipImp = static_cast<CFWL_ToolTipImp*>(pToolTip->GetImpl());
m_pToolTipImp->ModifyStylesEx(FWL_STYLEEXT_TTP_Multiline, 0);
m_pToolTipImp->SetStates(FWL_WGTSTATE_Invisible, TRUE);
}

Powered by Google App Engine
This is Rietveld 408576698