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 |