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

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 issues: renamed method and return double 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..bf39fc7afcd5db4ecf5e24c295e4dd97955a54f4 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 resolution = m_page->deviceScaleFactor();
eae 2013/08/14 16:33:39 Please rename this to ratio or scaleFactor.
rune 2013/08/14 19:11:23 Done.
+ if (RuntimeEnabledFeatures::devicePixelRatioIncludesZoomEnabled())
+ resolution *= pageZoomFactor();
+ return resolution;
+}
+
} // 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