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

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: 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
« Source/core/css/MediaQueryEvaluator.cpp ('K') | « 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..6fd658bbd3d43837899921f271992d0cc64e470f 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());
}
+float Frame::resolutionDPPX() const
eae 2013/08/14 15:20:49 I don't like the name of this method, why not call
rune 2013/08/14 15:59:34 OK.
rune 2013/08/14 16:04:43 Done.
+{
+ if (!m_page)
+ return 0;
+
+ float resolution = m_page->deviceScaleFactor();
+ if (RuntimeEnabledFeatures::devicePixelRatioIncludesZoomEnabled())
+ resolution *= pageZoomFactor();
+ return resolution;
+}
+
} // namespace WebCore
« Source/core/css/MediaQueryEvaluator.cpp ('K') | « Source/core/page/Frame.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698