[webkit-gtk] Displaying very long HTML documents (books), etc.

Andrea Giammarchi andrea.giammarchi at gmail.com
Wed Feb 7 12:43:50 PST 2024


Answering from memories (TweetDeck infinite scroll challenge) the biggest
challenge is not to incrementally populate the view with previous/next
chapter in the book/stream, the issue is how are you going to handle that
scrollbar.

There's no hint on browsers to tell you that the handler reached its
minimum size (AFAIK and IIRC), and if you base your computation on an empty
document filled with new lines to match that length it's very likely you'll
have issues when words wrapping would instead happen in the document so
that you can't really compute that difference between the scroll bar
position and the visualized text.

More issues come from the Ctrl+F (search) builtin implementation, so that
what seems to be a "just render only what's visible on the current area" is
a way bigger problem to deal with ... infinite scrolling pages have the
luck to be able to re-map each chunk of the stream as well-known length,
but a whole book that is already known in advance but not 100% rendered
yet, would be challenging to map to a reliable scrollbar.

Apologies if I didn't help at all, but the gist of my comment is: "indeed
try to see if you have a problem before having dozen more to deal with".

On Wed, Feb 7, 2024 at 3:18 PM Michael Catanzaro <mcatanzaro at redhat.com>
wrote:

> On Wed, Feb 7 2024 at 03:54:40 PM +02:00:00, Sim Tov <smntov at gmail.com>
> wrote:
> > 1. What is the maximal HTML document size that still can be displayed
> > smoothly?
> > 2. Is there a hard limit enforced by WebkitGT
>
> There is no max size. Loading performance will get worse as the max
> document size increases. My suggestion is to just try it and see if
> it's a problem in practice or not. My suspicion is that it will be able
> to handle even extremely long books adequately, but I don't know for
> sure.
>
> > 3. Are you aware of any apps implementing the two features mentioned
> > in the previous email (so I can look for examples/ideas there)?
>
> No, sorry.
>
> Michael
>
>
> _______________________________________________
> webkit-gtk mailing list
> webkit-gtk at lists.webkit.org
> https://lists.webkit.org/mailman/listinfo/webkit-gtk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-gtk/attachments/20240207/e5e0e9fe/attachment.htm>


More information about the webkit-gtk mailing list