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

Unified Diff: xfa/fwl/core/fwl_widgetimp.cpp

Issue 1948583002: Remove FWL_WGTHITTEST_* defines in favour of enum class. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 8 months 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
« no previous file with comments | « xfa/fwl/core/fwl_widgetimp.h ('k') | xfa/fwl/core/ifwl_widget.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fwl/core/fwl_widgetimp.cpp
diff --git a/xfa/fwl/core/fwl_widgetimp.cpp b/xfa/fwl/core/fwl_widgetimp.cpp
index 38516c655783595954664f66493f12b686e9f38f..b9db4f984ee7e421949e80f3cb02a93291378aaa 100644
--- a/xfa/fwl/core/fwl_widgetimp.cpp
+++ b/xfa/fwl/core/fwl_widgetimp.cpp
@@ -118,7 +118,7 @@ FWL_ERR IFWL_Widget::LockUpdate() {
FWL_ERR IFWL_Widget::UnlockUpdate() {
return static_cast<CFWL_WidgetImp*>(GetImpl())->UnlockUpdate();
}
-uint32_t IFWL_Widget::HitTest(FX_FLOAT fx, FX_FLOAT fy) {
+FWL_WidgetHit IFWL_Widget::HitTest(FX_FLOAT fx, FX_FLOAT fy) {
return static_cast<CFWL_WidgetImp*>(GetImpl())->HitTest(fx, fy);
}
FWL_ERR IFWL_Widget::TransformTo(IFWL_Widget* pWidget,
@@ -365,27 +365,24 @@ FWL_ERR CFWL_WidgetImp::UnlockUpdate() {
}
return FWL_ERR_Succeeded;
}
-uint32_t CFWL_WidgetImp::HitTest(FX_FLOAT fx, FX_FLOAT fy) {
+FWL_WidgetHit CFWL_WidgetImp::HitTest(FX_FLOAT fx, FX_FLOAT fy) {
CFX_RectF rtClient;
GetClientRect(rtClient);
- if (rtClient.Contains(fx, fy)) {
- return FWL_WGTHITTEST_Client;
- }
+ if (rtClient.Contains(fx, fy))
+ return FWL_WidgetHit::Client;
if (HasEdge()) {
CFX_RectF rtEdge;
GetEdgeRect(rtEdge);
- if (rtEdge.Contains(fx, fy)) {
- return FWL_WGTHITTEST_Edge;
- }
+ if (rtEdge.Contains(fx, fy))
+ return FWL_WidgetHit::Edge;
}
if (HasBorder()) {
CFX_RectF rtRelative;
GetRelativeRect(rtRelative);
- if (rtRelative.Contains(fx, fy)) {
- return FWL_WGTHITTEST_Border;
- }
+ if (rtRelative.Contains(fx, fy))
+ return FWL_WidgetHit::Border;
}
- return FWL_WGTHITTEST_Unknown;
+ return FWL_WidgetHit::Unknown;
}
FWL_ERR CFWL_WidgetImp::TransformTo(IFWL_Widget* pWidget,
FX_FLOAT& fx,
« no previous file with comments | « xfa/fwl/core/fwl_widgetimp.h ('k') | xfa/fwl/core/ifwl_widget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698