Bug 36121

Summary: [Qt] Make WebKit scrollbars work with tiling
Product: WebKit Reporter: Antti Koivisto <koivisto>
Component: New BugsAssignee: Antti Koivisto <koivisto>
Status: RESOLVED FIXED    
Severity: Normal CC: hausmann, kenneth, rakuco
Priority: P3 Keywords: Qt
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Attachments:
Description Flags
patch
none
updated patch
hausmann: review+
Screenshot none

Description Antti Koivisto 2010-03-15 09:05:50 PDT
Currently tiling only works correctly when the QGraphicsWebView is in resizesToContent mode. It should work without too, using the scrollbar overlay (already implemented for accelerated compositing).
Comment 1 Antti Koivisto 2010-03-15 09:16:40 PDT
Created attachment 50713 [details]
patch
Comment 2 Simon Hausmann 2010-03-15 09:50:57 PDT
This works quite well now! The vertical scrollbar is broken for me though. Do you see that, too?
Comment 3 Kenneth Rohde Christiansen 2010-03-15 14:21:54 PDT
Nice patch!
Comment 4 Simon Hausmann 2010-03-16 01:39:45 PDT
Comment on attachment 50713 [details]
patch


> +void QGraphicsWebViewPrivate::createOrDeleteOverlay()
> +{
> +    bool useOverlay = false;
> +#if USE(ACCELERATED_COMPOSITING)
> +    useOverlay = useOverlay || rootGraphicsLayer;
> +#endif
> +#if ENABLE(TILED_BACKING_STORE)
> +    useOverlay = useOverlay || QWebFramePrivate::core(q->page()->mainFrame())->tiledBackingStore();

Isn't another condition that we need the overlay only if we're _not_ in resizesToContents mode?
Comment 5 Antti Koivisto 2010-03-16 05:09:00 PDT
(In reply to comment #2)
> This works quite well now! The vertical scrollbar is broken for me though. Do
> you see that, too?

No, both scrollbars look and work fine (this is on mac). Anything special I need to do to see this?
Comment 6 Antti Koivisto 2010-03-16 05:28:31 PDT
Created attachment 50784 [details]
updated patch
Comment 7 Antti Koivisto 2010-03-16 05:29:13 PDT
Comment on attachment 50784 [details]
updated patch

fixed the resizesToContents bug Simon noticed
Comment 8 Simon Hausmann 2010-03-16 08:56:24 PDT
(In reply to comment #5)
> (In reply to comment #2)
> > This works quite well now! The vertical scrollbar is broken for me though. Do
> > you see that, too?
> 
> No, both scrollbars look and work fine (this is on mac). Anything special I
> need to do to see this?

Hmmm, I see it happening on Linux with the Oxygen style. For some reason it doesn't happen with the other styles.
Comment 9 Simon Hausmann 2010-03-16 08:57:58 PDT
Created attachment 50797 [details]
Screenshot

Attached is a screenshot of the bug. It looks like it only affects the vertical scrollbar, and I think that could happen if the geometries passed to are weird.
Comment 10 Antti Koivisto 2010-03-16 09:57:27 PDT
Sending        WebCore/ChangeLog
Sending        WebCore/page/Frame.cpp
Sending        WebKit/qt/Api/qgraphicswebview.cpp
Sending        WebKit/qt/Api/qwebframe.cpp
Sending        WebKit/qt/Api/qwebframe_p.h
Sending        WebKit/qt/ChangeLog
Transmitting file data ......
Committed revision 56068.