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