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

Unified Diff: third_party/WebKit/Source/web/PopupMenuImpl.cpp

Issue 1456753002: Compute the popup location/size correctly when use-zoom-for-dsf is enabled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
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 7aff9694926355db292b377ca67978c42f7bb2cb..505c6b6c9d8e6ccab258937619222c9c5b29362a 100644
--- a/third_party/WebKit/Source/web/PopupMenuImpl.cpp
+++ b/third_party/WebKit/Source/web/PopupMenuImpl.cpp
@@ -294,6 +294,9 @@ void PopupMenuImpl::writeDocument(SharedBuffer* data)
PagePopupClient::addString("],\n", data);
addProperty("anchorRectInScreen", anchorRectInScreen, data);
+ IntRect inScreen = m_chromeClient->viewportToScreen(IntRect(0, 0, 100, 0));
+ float scaleFactor = 100.f / inScreen.width();
+ addProperty("scaleFactor", scaleFactor, data);
tkent 2015/11/18 07:06:39 I agree that we need to pass scale-factor in addit
bool isRTL = !ownerStyle->isLeftToRightDirection();
addProperty("isRTL", isRTL, data);
addProperty("paddingStart", isRTL ? ownerElement.clientPaddingRight().toDouble() : ownerElement.clientPaddingLeft().toDouble(), data);

Powered by Google App Engine
This is Rietveld 408576698