summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/WebKit')
-rw-r--r--third_party/WebKit/Source/web/PopupContainer.cpp14
-rw-r--r--third_party/WebKit/Source/web/PopupContainer.h2
2 files changed, 16 insertions, 0 deletions
diff --git a/third_party/WebKit/Source/web/PopupContainer.cpp b/third_party/WebKit/Source/web/PopupContainer.cpp
index 35e901c..a2bcd15 100644
--- a/third_party/WebKit/Source/web/PopupContainer.cpp
+++ b/third_party/WebKit/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
diff --git a/third_party/WebKit/Source/web/PopupContainer.h b/third_party/WebKit/Source/web/PopupContainer.h
index 0595573..d136ad4 100644
--- a/third_party/WebKit/Source/web/PopupContainer.h
+++ b/third_party/WebKit/Source/web/PopupContainer.h
@@ -59,6 +59,8 @@ public:
virtual void hide() OVERRIDE;
virtual HostWindow* hostWindow() const OVERRIDE;
virtual void invalidateRect(const IntRect&) OVERRIDE;
+ virtual IntPoint convertChildToSelf(const Widget* child, const IntPoint&) const OVERRIDE;
+ virtual IntPoint convertSelfToChild(const Widget* child, const IntPoint&) const OVERRIDE;
// PopupContainer methods