Index: third_party/WebKit/Source/web/PopupMenuImpl.cpp |
diff --git a/third_party/WebKit/Source/web/PopupMenuImpl.cpp b/third_party/WebKit/Source/web/PopupMenuImpl.cpp |
index dc76843fc821f3267bedc33fc361ea9564a2a390..e9577f0fd87740308d6a97712bc06a0abf8ac4e6 100644 |
--- a/third_party/WebKit/Source/web/PopupMenuImpl.cpp |
+++ b/third_party/WebKit/Source/web/PopupMenuImpl.cpp |
@@ -290,8 +290,7 @@ void PopupMenuImpl::writeDocument(SharedBuffer* data) |
addProperty("anchorRectInScreen", anchorRectInScreen, data); |
float zoom = zoomFactor(); |
- IntRect inScreen = m_chromeClient->viewportToScreen(IntRect(0, 0, 100, 0)); |
- float scaleFactor = 100.f / inScreen.width(); |
+ float scaleFactor = m_chromeClient->windowToViewport(FloatRect(0, 0, 1.0f, 0)).width(); |
addProperty("zoomFactor", zoom / scaleFactor, data); |
bool isRTL = !ownerStyle->isLeftToRightDirection(); |
addProperty("isRTL", isRTL, data); |