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

Unified Diff: third_party/WebKit/Source/web/DateTimeChooserImpl.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: update TestExpectations Created 5 years 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/DateTimeChooserImpl.cpp
diff --git a/third_party/WebKit/Source/web/DateTimeChooserImpl.cpp b/third_party/WebKit/Source/web/DateTimeChooserImpl.cpp
index de3134ae141abcf4cdf6b64a095996d30abf74f3..5fffbba4a1ac33c355e8be230130a2a91abd1bb1 100644
--- a/third_party/WebKit/Source/web/DateTimeChooserImpl.cpp
+++ b/third_party/WebKit/Source/web/DateTimeChooserImpl.cpp
@@ -129,7 +129,9 @@ void DateTimeChooserImpl::writeDocument(SharedBuffer* data)
addString("</style></head><body><div id=main>Loading...</div><script>\n"
"window.dialogArguments = {\n", data);
addProperty("anchorRectInScreen", m_parameters.anchorRectInScreen, data);
- addProperty("zoomFactor", zoomFactor(), data);
+ IntRect inScreen = m_chromeClient->viewportToScreen(IntRect(0, 0, 100, 0));
+ float scaleFactor = 100.f / inScreen.width();
+ addProperty("zoomFactor", zoomFactor() / scaleFactor, data);
addProperty("min", valueToDateTimeString(m_parameters.minimum, m_parameters.type), data);
addProperty("max", valueToDateTimeString(m_parameters.maximum, m_parameters.type), data);
addProperty("step", stepString, data);

Powered by Google App Engine
This is Rietveld 408576698