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

Unified Diff: Source/core/page/DOMWindow.cpp

Issue 23000005: Update window.devicePixelRatio on browser zoom (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 4 months 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: Source/core/page/DOMWindow.cpp
diff --git a/Source/core/page/DOMWindow.cpp b/Source/core/page/DOMWindow.cpp
index aac917c7d460f71f8166df98d1422cefba3cf79c..d2f80947f199459b058572a88d3961cbd0b6517d 100644
--- a/Source/core/page/DOMWindow.cpp
+++ b/Source/core/page/DOMWindow.cpp
@@ -1245,6 +1245,9 @@ double DOMWindow::devicePixelRatio() const
if (!page)
return 0.0;
+ if (RuntimeEnabledFeatures::devicePixelRatioIncludesZoomEnabled())
+ return page->deviceScaleFactor() * m_frame->pageZoomFactor();
+
return page->deviceScaleFactor();
}
« no previous file with comments | « LayoutTests/fast/dom/Window/device-pixel-ratio-on-zoom-expected.txt ('k') | Source/core/page/RuntimeEnabledFeatures.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698