diff options
author | Henrique Nakashima <hnakashima@chromium.org> | 2018-04-10 16:10:36 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-04-10 16:10:36 +0000 |
commit | d27f392c79ce53390f9de36778bb20f73f3e9324 (patch) | |
tree | 0e1b34a82134a0e170146e573414cf0461683047 /xfa/fxfa/cxfa_ffwidget.h | |
parent | 4027887ee29a7f4920b03041068bff9bde239782 (diff) | |
download | pdfium-d27f392c79ce53390f9de36778bb20f73f3e9324.tar.xz |
Break down CXFA_FFWidget::On{L|R}ButtonDown() into two steps.
The first step, AcceptsFocusOnButtonDown(), returns whether the
widget wants focus on a mouse click.
The second step, On{L|R}ButtonDown(), handles the click after focus
has been assigned.
Bug: chromium:820256
Change-Id: I9da1f1a930f198fc17b24acb7f1e3e6ef7f12ae4
Reviewed-on: https://pdfium-review.googlesource.com/29951
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Diffstat (limited to 'xfa/fxfa/cxfa_ffwidget.h')
-rw-r--r-- | xfa/fxfa/cxfa_ffwidget.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/xfa/fxfa/cxfa_ffwidget.h b/xfa/fxfa/cxfa_ffwidget.h index 5098230b62..a16b27a88f 100644 --- a/xfa/fxfa/cxfa_ffwidget.h +++ b/xfa/fxfa/cxfa_ffwidget.h @@ -13,6 +13,7 @@ #include "core/fxcodec/fx_codec_def.h" #include "core/fxge/cfx_graphstatedata.h" #include "xfa/fwl/cfwl_app.h" +#include "xfa/fwl/cfwl_messagemouse.h" #include "xfa/fxfa/fxfa.h" #include "xfa/fxfa/parser/cxfa_contentlayoutitem.h" @@ -101,14 +102,18 @@ class CXFA_FFWidget : public CXFA_ContentLayoutItem { virtual void UpdateWidgetProperty(); virtual bool OnMouseEnter(); virtual bool OnMouseExit(); - virtual bool OnLButtonDown(uint32_t dwFlags, const CFX_PointF& point); + // |command| must be LeftButtonDown or RightButtonDown. + virtual bool AcceptsFocusOnButtonDown(uint32_t dwFlags, + const CFX_PointF& point, + FWL_MouseCommand command); + virtual void OnLButtonDown(uint32_t dwFlags, const CFX_PointF& point); virtual bool OnLButtonUp(uint32_t dwFlags, const CFX_PointF& point); virtual bool OnLButtonDblClk(uint32_t dwFlags, const CFX_PointF& point); virtual bool OnMouseMove(uint32_t dwFlags, const CFX_PointF& point); virtual bool OnMouseWheel(uint32_t dwFlags, int16_t zDelta, const CFX_PointF& point); - virtual bool OnRButtonDown(uint32_t dwFlags, const CFX_PointF& point); + virtual void OnRButtonDown(uint32_t dwFlags, const CFX_PointF& point); virtual bool OnRButtonUp(uint32_t dwFlags, const CFX_PointF& point); virtual bool OnRButtonDblClk(uint32_t dwFlags, const CFX_PointF& point); |