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

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

Issue 23192002: Let page zoom affect resolution and -webkit-device-pixel-ratio MQs. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Review issue: renamed variable 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
« no previous file with comments | « Source/core/page/Frame.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/Frame.cpp
diff --git a/Source/core/page/Frame.cpp b/Source/core/page/Frame.cpp
index 976fb169caf19f9072f1bee77d2af9430bb496ef..adbe6d3cb027b55780220963ad268a5021fcb280 100644
--- a/Source/core/page/Frame.cpp
+++ b/Source/core/page/Frame.cpp
@@ -709,4 +709,15 @@ PassOwnPtr<DragImage> Frame::dragImageForSelection()
return DragImage::create(image.get());
}
+double Frame::devicePixelRatio() const
+{
+ if (!m_page)
+ return 0;
+
+ double ratio = m_page->deviceScaleFactor();
+ if (RuntimeEnabledFeatures::devicePixelRatioIncludesZoomEnabled())
+ ratio *= pageZoomFactor();
+ return ratio;
+}
+
} // namespace WebCore
« no previous file with comments | « Source/core/page/Frame.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698