From a9597596a398d73f44387f732951e72e86e812d3 Mon Sep 17 00:00:00 2001 From: D-a-n-i-l-o Date: Wed, 4 Sep 2019 22:59:26 +0200 Subject: [PATCH 1/2] Fix for HtmlView being slow with large pages. Signed-off-by: D-a-n-i-l-o --- modules/mojox/htmlview.monkey2 | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/modules/mojox/htmlview.monkey2 b/modules/mojox/htmlview.monkey2 index d8b0572f9..0c45a7bb5 100644 --- a/modules/mojox/htmlview.monkey2 +++ b/modules/mojox/htmlview.monkey2 @@ -62,7 +62,7 @@ Class HtmlView Extends ScrollableView If root="http://" Or root="https://" -#If __DESKTOP_TARGET__ +#If __DESKTOP_TARGET__ requesters.OpenUrl( url ) #Endif @@ -125,10 +125,15 @@ Class HtmlView Extends ScrollableView Local clip:litehtml.position - clip.x=canvas.Scissor.X - clip.y=canvas.Scissor.Y - clip.width=canvas.Scissor.Width - clip.height=canvas.Scissor.Height + 'clip.x=canvas.Scissor.X + 'clip.y=canvas.Scissor.Y + 'clip.width=canvas.Scissor.Width + 'clip.height=canvas.Scissor.Height + + clip.x=VisibleRect.X ' Draw only visible rect, not the + clip.y=VisibleRect.Y ' whole virtual page. + clip.width=VisibleRect.Width ' *Fixes* slow scrolling with large pages. + clip.height=VisibleRect.Height ' _document.draw( canvas,0,0,Varptr clip ) End From 8421b8e6e67e5fa4cba944d2969b1ad06801c473 Mon Sep 17 00:00:00 2001 From: D-a-n-i-l-o Date: Wed, 4 Sep 2019 23:20:01 +0200 Subject: [PATCH 2/2] Exchanged indention Spaces with Tabs --- modules/mojox/htmlview.monkey2 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/mojox/htmlview.monkey2 b/modules/mojox/htmlview.monkey2 index 0c45a7bb5..d17783e22 100644 --- a/modules/mojox/htmlview.monkey2 +++ b/modules/mojox/htmlview.monkey2 @@ -130,10 +130,10 @@ Class HtmlView Extends ScrollableView 'clip.width=canvas.Scissor.Width 'clip.height=canvas.Scissor.Height - clip.x=VisibleRect.X ' Draw only visible rect, not the - clip.y=VisibleRect.Y ' whole virtual page. - clip.width=VisibleRect.Width ' *Fixes* slow scrolling with large pages. - clip.height=VisibleRect.Height ' + clip.x=VisibleRect.X ' Draw only visible rect, not the + clip.y=VisibleRect.Y ' whole virtual page. + clip.width=VisibleRect.Width ' *Fixes* slow scrolling with large pages. + clip.height=VisibleRect.Height ' _document.draw( canvas,0,0,Varptr clip ) End