This commit is contained in:
Kovid Goyal 2018-06-06 17:36:04 +05:30
parent c03377adc4
commit 13f9a4b7c9
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -699,8 +699,7 @@ class DocumentView(QWebView): # {{{
table = None
parent = elem
while not parent.isNull():
if (unicode(parent.tagName()) == u'table' or
unicode(parent.localName()) == u'table'):
if (unicode(parent.tagName()) == u'table' or unicode(parent.localName()) == u'table'):
table = parent
break
parent = parent.parent()
@ -822,8 +821,7 @@ class DocumentView(QWebView): # {{{
@property
def scroll_pos(self):
return (self.document.ypos, self.document.ypos +
self.document.window_height)
return (self.document.ypos, self.document.ypos + self.document.window_height)
@property
def viewport_rect(self):
@ -1336,8 +1334,7 @@ class DocumentView(QWebView): # {{{
self.paged_col_scroll(scroll_past_end=not
self.document.line_scrolling_stops_on_pagebreaks)
else:
if (not self.document.line_scrolling_stops_on_pagebreaks and
self.document.at_bottom):
if (not self.document.line_scrolling_stops_on_pagebreaks and self.document.at_bottom):
self.manager.next_document()
else:
amt = int((self.document.line_scroll_fraction / 100.) * 15)
@ -1347,8 +1344,7 @@ class DocumentView(QWebView): # {{{
self.paged_col_scroll(forward=False, scroll_past_end=not
self.document.line_scrolling_stops_on_pagebreaks)
else:
if (not self.document.line_scrolling_stops_on_pagebreaks and
self.document.at_top):
if (not self.document.line_scrolling_stops_on_pagebreaks and self.document.at_top):
self.manager.previous_document()
else:
amt = int((self.document.line_scroll_fraction / 100.) * 15)