| Index: third_party/WebKit/Source/web/ChromeClientImpl.cpp
|
| diff --git a/third_party/WebKit/Source/web/ChromeClientImpl.cpp b/third_party/WebKit/Source/web/ChromeClientImpl.cpp
|
| index b099c8b0037714bcd3463ba62248f777e0b2a660..1b699f7646552d34556bb4feccb27593bd33e887 100644
|
| --- a/third_party/WebKit/Source/web/ChromeClientImpl.cpp
|
| +++ b/third_party/WebKit/Source/web/ChromeClientImpl.cpp
|
| @@ -507,11 +507,21 @@ void ChromeClientImpl::scheduleAnimation(Widget* widget)
|
| }
|
| }
|
|
|
| -IntRect ChromeClientImpl::viewportToScreen(const IntRect& rectInViewport) const
|
| +IntRect ChromeClientImpl::viewportToScreen(const IntRect& rectInViewport, const Widget* widget) const
|
| {
|
| WebRect screenRect(rectInViewport);
|
|
|
| - if (m_webView->client()) {
|
| + ASSERT(widget->isFrameView());
|
| + const FrameView* view = toFrameView(widget);
|
| + LocalFrame* frame = view->frame().localFrameRoot();
|
| +
|
| + if (WebLocalFrameImpl::fromFrame(frame) && WebLocalFrameImpl::fromFrame(frame)->frameWidget()) {
|
| + WebFrameWidgetImpl* frameWidget = toWebFrameWidgetImpl(WebLocalFrameImpl::fromFrame(frame)->frameWidget());
|
| + frameWidget->client()->convertViewportToWindow(&screenRect);
|
| + WebRect windowRect = frameWidget->client()->windowRect();
|
| + screenRect.x += windowRect.x;
|
| + screenRect.y += windowRect.y;
|
| + } else if (m_webView->client()) {
|
| m_webView->client()->convertViewportToWindow(&screenRect);
|
| WebRect windowRect = m_webView->client()->windowRect();
|
| screenRect.x += windowRect.x;
|
|
|