Chromium Code Reviews| 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 |