summaryrefslogtreecommitdiff
path: root/xfa/fwl
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fwl')
-rw-r--r--xfa/fwl/cfwl_widget.cpp5
-rw-r--r--xfa/fwl/cfwl_widgetmgr.cpp7
2 files changed, 3 insertions, 9 deletions
diff --git a/xfa/fwl/cfwl_widget.cpp b/xfa/fwl/cfwl_widget.cpp
index 172014da62..45ae9c0b0c 100644
--- a/xfa/fwl/cfwl_widget.cpp
+++ b/xfa/fwl/cfwl_widget.cpp
@@ -197,9 +197,8 @@ CFX_PointF CFWL_Widget::TransformTo(CFWL_Widget* pWidget,
if (!parent)
return ret;
- CFX_Matrix m;
- m.SetReverse(pWidget->GetMatrix());
- return m.Transform(ret) - pWidget->GetWidgetRect().TopLeft();
+ return pWidget->GetMatrix().GetInverse().Transform(ret) -
+ pWidget->GetWidgetRect().TopLeft();
}
CFX_Matrix CFWL_Widget::GetMatrix() {
diff --git a/xfa/fwl/cfwl_widgetmgr.cpp b/xfa/fwl/cfwl_widgetmgr.cpp
index 67a63ba921..3abe14d89b 100644
--- a/xfa/fwl/cfwl_widgetmgr.cpp
+++ b/xfa/fwl/cfwl_widgetmgr.cpp
@@ -266,12 +266,7 @@ CFWL_Widget* CFWL_WidgetMgr::GetWidgetAtPoint(CFWL_Widget* parent,
CFWL_Widget* child = GetLastChildWidget(parent);
while (child) {
if ((child->GetStates() & FWL_WGTSTATE_Invisible) == 0) {
- CFX_Matrix m;
- m.SetIdentity();
-
- CFX_Matrix matrixOnParent;
- m.SetReverse(matrixOnParent);
- pos = m.Transform(point);
+ pos = parent->GetMatrix().GetInverse().Transform(point);
CFX_RectF bounds = child->GetWidgetRect();
if (bounds.Contains(pos)) {