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

Unified Diff: Source/web/PopupContainer.cpp

Issue 572943003: Fix point conversions in PopupContainer. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 3 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 | « Source/web/PopupContainer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/PopupContainer.cpp
diff --git a/Source/web/PopupContainer.cpp b/Source/web/PopupContainer.cpp
index 35e901c5dbe44bff5bb384d306bc80ed3f159074..a2bcd15b02feb3f6e9924ef04c94636963870fb8 100644
--- a/Source/web/PopupContainer.cpp
+++ b/Source/web/PopupContainer.cpp
@@ -525,4 +525,18 @@ HostWindow* PopupContainer::hostWindow() const
return const_cast<PopupContainerClient*>(m_client);
}
+IntPoint PopupContainer::convertChildToSelf(const Widget* child, const IntPoint& point) const
+{
+ IntPoint newPoint = point;
+ newPoint.moveBy(child->location());
+ return newPoint;
+}
+
+IntPoint PopupContainer::convertSelfToChild(const Widget* child, const IntPoint& point) const
+{
+ IntPoint newPoint = point;
+ newPoint.moveBy(-child->location());
+ return newPoint;
+}
+
} // namespace blink
« no previous file with comments | « Source/web/PopupContainer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698