summaryrefslogtreecommitdiff
path: root/xfa/fwl/core/cfwl_widgetmgr.cpp
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-11-02 14:51:25 -0700
committerCommit bot <commit-bot@chromium.org>2016-11-02 14:51:25 -0700
commit3b3ce1a242f8445848d3f23d6c35ba01d7c645f4 (patch)
tree365d9ee7f8eec1103fb9fce0986e23d9f548ecae /xfa/fwl/core/cfwl_widgetmgr.cpp
parent4cf551577856f89103e162edc761def44ffb96fc (diff)
downloadpdfium-3b3ce1a242f8445848d3f23d6c35ba01d7c645f4.tar.xz
Merge delegates into IFWL_* classes.
This Cl removes ownership of the delgates from IFWL_Widget and puts it in the hand of the creating classes. In doing so, merge the delegates back into the IFWL_* classes to simplify logic. Review-Url: https://codereview.chromium.org/2467993003
Diffstat (limited to 'xfa/fwl/core/cfwl_widgetmgr.cpp')
-rw-r--r--xfa/fwl/core/cfwl_widgetmgr.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/xfa/fwl/core/cfwl_widgetmgr.cpp b/xfa/fwl/core/cfwl_widgetmgr.cpp
index 1008defcab..37e31dc501 100644
--- a/xfa/fwl/core/cfwl_widgetmgr.cpp
+++ b/xfa/fwl/core/cfwl_widgetmgr.cpp
@@ -613,18 +613,18 @@ void CFWL_WidgetMgrDelegate::OnDrawWidget(IFWL_Widget* pWidget,
#if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_ || \
_FX_OS_ == _FX_LINUX_DESKTOP_ || _FX_OS_ == _FX_ANDROID_
- pWidget->GetCurrentDelegate()->OnDrawWidget(pTemp, pMatrix);
+ pWidget->GetDelegate()->OnDrawWidget(pTemp, pMatrix);
pGraphics->GetClipRect(clipBounds);
clipCopy = clipBounds;
#elif _FX_OS_ == _FX_MACOSX_
if (m_pWidgetMgr->IsFormDisabled()) {
- pWidget->GetCurrentDelegate()->OnDrawWidget(pTemp, pMatrix);
+ pWidget->GetDelegate()->OnDrawWidget(pTemp, pMatrix);
pGraphics->GetClipRect(clipBounds);
clipCopy = clipBounds;
} else {
clipBounds.Set(pMatrix->a, pMatrix->b, pMatrix->c, pMatrix->d);
const_cast<CFX_Matrix*>(pMatrix)->SetIdentity(); // FIXME: const cast.
- pWidget->GetCurrentDelegate()->OnDrawWidget(pTemp, pMatrix);
+ pWidget->GetDelegate()->OnDrawWidget(pTemp, pMatrix);
}
#endif // _FX_OS_ == _FX_MACOSX_
@@ -678,7 +678,7 @@ void CFWL_WidgetMgrDelegate::DrawChild(IFWL_Widget* parent,
}
widgetMatrix.Translate(rtWidget.left, rtWidget.top, TRUE);
- if (IFWL_WidgetDelegate* pDelegate = child->GetCurrentDelegate()) {
+ if (IFWL_WidgetDelegate* pDelegate = child->GetDelegate()) {
if (m_pWidgetMgr->IsFormDisabled() ||
IsNeedRepaint(child, &widgetMatrix, rtClip)) {
pDelegate->OnDrawWidget(pGraphics, &widgetMatrix);