Only set transform is needed

Probably browsers dont do anything if the value doesn't change anyway,
but I'd rather not rely on that
This commit is contained in:
Kovid Goyal 2020-07-27 13:21:56 +05:30
parent d9a343dad6
commit 1001f254a3
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -141,7 +141,9 @@ class IOSScrollViewport(ScrollViewport):
self._scroll_implementation(max(0, left))
def paged___reset_transforms(self):
document.documentElement.style.transform = 'none'
s = document.documentElement.style
if s.transform is not 'none':
s.transform = 'none'
def paged_reset_globals(self):
self.__reset_transforms()