| Index: third_party/WebKit/Source/platform/Widget.cpp
|
| diff --git a/third_party/WebKit/Source/platform/Widget.cpp b/third_party/WebKit/Source/platform/Widget.cpp
|
| index b2f9160f5b51893476552c9b31416dc9fdc713f5..2717891ea18c1c977ff8aaa566220bf3bbcf733d 100644
|
| --- a/third_party/WebKit/Source/platform/Widget.cpp
|
| +++ b/third_party/WebKit/Source/platform/Widget.cpp
|
| @@ -88,6 +88,15 @@ IntRect Widget::convertToRootFrame(const IntRect& localRect) const
|
| return localRect;
|
| }
|
|
|
| +FloatRect Widget::convertToRootFrame(const FloatRect& localRect) const
|
| +{
|
| + if (const Widget* parentWidget = parent()) {
|
| + FloatRect parentRect = convertToContainingWidget(localRect);
|
| + return parentWidget->convertToRootFrame(parentRect);
|
| + }
|
| + return localRect;
|
| +}
|
| +
|
| IntPoint Widget::convertFromRootFrame(const IntPoint& pointInRootFrame) const
|
| {
|
| if (const Widget* parentWidget = parent()) {
|
| @@ -146,6 +155,16 @@ IntRect Widget::convertFromContainingWidget(const IntRect& parentRect) const
|
| return parentRect;
|
| }
|
|
|
| +FloatRect Widget::convertToContainingWidget(const FloatRect& localRect) const
|
| +{
|
| + if (const Widget* parentWidget = parent()) {
|
| + FloatRect parentRect(localRect);
|
| + parentRect.setLocation(parentWidget->convertChildToSelf(this, localRect.location()));
|
| + return parentRect;
|
| + }
|
| + return localRect;
|
| +}
|
| +
|
| IntPoint Widget::convertToContainingWidget(const IntPoint& localPoint) const
|
| {
|
| if (const Widget* parentWidget = parent())
|
| @@ -172,4 +191,9 @@ IntPoint Widget::convertSelfToChild(const Widget*, const IntPoint& point) const
|
| return point;
|
| }
|
|
|
| +FloatPoint Widget::convertChildToSelf(const Widget*, const FloatPoint& point) const
|
| +{
|
| + return point;
|
| +}
|
| +
|
| } // namespace blink
|
|
|