зеркало из https://github.com/mozilla/eideticker.git
Bug 1026151 - Return a default device pixel ratio if we don't have a Marionette session. r=wlachance
This commit is contained in:
Родитель
6d75b5c7c0
Коммит
3e65c3f168
|
@ -558,9 +558,10 @@ marionetteScriptFinished();
|
|||
@property
|
||||
def devicePixelRatio(self):
|
||||
if not self._devicePixelRatio:
|
||||
self._devicePixelRatio = self.marionette.execute_script(
|
||||
'return window.wrappedJSObject.devicePixelRatio;') or 1
|
||||
return self._devicePixelRatio
|
||||
if self.marionette and self.marionette.session:
|
||||
self._devicePixelRatio = self.marionette.execute_script(
|
||||
'return window.wrappedJSObject.devicePixelRatio;')
|
||||
return self._devicePixelRatio or 1
|
||||
|
||||
|
||||
class B2GADB(EidetickerB2GMixin, mozdevice.DeviceManagerADB):
|
||||
|
|
Загрузка…
Ссылка в новой задаче