Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorsgiehl <stefan@piwik.org>2015-05-20 01:20:56 +0300
committersgiehl <stefan@piwik.org>2015-05-20 01:20:56 +0300
commit2d8064981f20089a800c068fed72c7b48a75f7db (patch)
treef4ae19a8bc8a2f3e469e15cd6f6bf3fc520259aa /js
parentedd2bfbcdae386378a78e52b414cf14f9df59440 (diff)
fixes #7941 - take device pixel ratio into account when detecting screen resolution
Diffstat (limited to 'js')
-rw-r--r--js/piwik.js4
1 files changed, 1 insertions, 3 deletions
diff --git a/js/piwik.js b/js/piwik.js
index 8d1a735e32..153353eed4 100644
--- a/js/piwik.js
+++ b/js/piwik.js
@@ -4022,7 +4022,7 @@ if (typeof Piwik !== 'object') {
gears: 'application/x-googlegears',
ag: 'application/x-silverlight'
},
- devicePixelRatio = (new RegExp('Mac OS X.*Safari/')).test(navigatorAlias.userAgent) ? windowAlias.devicePixelRatio || 1 : 1;
+ devicePixelRatio = windowAlias.devicePixelRatio || 1;
// detect browser features except IE < 11 (IE 11 user agent is no longer MSIE)
if (!((new RegExp('MSIE')).test(navigatorAlias.userAgent))) {
@@ -4054,8 +4054,6 @@ if (typeof Piwik !== 'object') {
}
// screen resolution
- // - only Apple reports screen.* in device-independent-pixels (dips)
- // - devicePixelRatio is always 2 on MacOSX+Retina regardless of resolution set in Display Preferences
browserFeatures.res = screenAlias.width * devicePixelRatio + 'x' + screenAlias.height * devicePixelRatio;
}