[webkit-qt] API for uniform scrolling

Antonio Gomes tonikitoo at gmail.com
Mon Nov 22 22:23:56 PST 2010


I really like this idea. Progresses?

On Fri, Aug 6, 2010 at 4:06 AM,  <Kevin.Simons at nokia.com> wrote:
> Hi all,
>
> In several examples of trying to implement kinetic scrolling on top of
> QtWebKit that I've seen, the code has needed to do some inelegant stuff like
> the following to handle overflow:scroll/auto elements:
>
> // some mouse down handling...
> QWebFrame frame = view->page()->frameAt(point);
> ...
> // later some mouse move handling...
> If(!qtwebkit_webframe_scrollOverflow(frame, ...))
>     frame->scroll(...);
>
> Where qtwebkit_webframe_scrollOverflow needs to each and every time do an
> elementForPoint() to find the element, etc.
>
> What if instead we added (presumably to QWebPage or to the QGraphicsWebView
> itself) a uniform API that external scrolling implementations could use:
>
> QWebScrollController* scrollControllerForPoint(const Qpoint&);
>
> The QWebScrollController itself would basically provide the position, scroll
> range and visible size of the "thing" being scrolled, would allow the the
> position to be set, and would emit signals when range/position change. It
> would then internally handle whether it's scrolling a frame or an element
> with overflow:scroll/auto (and would keep a pointer to it around so that it
> doesn't need to figure it out for every move event).
>
> Thoughts? Is there a better way to do it today that I'm missing?
>
> Cheers,
> --Kevin
>
> _______________________________________________
> webkit-qt mailing list
> webkit-qt at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-qt
>



-- 
--Antonio Gomes


More information about the webkit-qt mailing list