Bug 29156 - [Qt] Fix scrolling implementation on QWebGraphicsItem
Summary: [Qt] Fix scrolling implementation on QWebGraphicsItem
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Qt (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC All
: P2 Normal
Assignee: Nobody
URL:
Keywords: Qt
Depends on:
Blocks:
 
Reported: 2009-09-10 15:04 PDT by Antonio Gomes
Modified: 2009-10-27 08:31 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Antonio Gomes 2009-09-10 15:04:20 PDT
from comment https://bugs.webkit.org/show_bug.cgi?id=28862#c22 ariya said:

<quoted>

> +void QWebGraphicsItemPrivate::_q_doScroll(int dx, int dy, const QRect& rectToScroll)
> +{
> +    q->scroll(qreal(dx), qreal(dy), QRectF(rectToScroll));
> +}

I found out that this does not really work if I subclass QWebGraphicsItem.
An example: I have my customized QWebGraphicsItem that clips the painting so
that the corners are rounded. When this function is invoked, say scrolling
vertically, the whole painted item is scrolled, meaning the bottom rounded
corners are also scrolled. The correct thing of course that the _contents_ of
the web page is scrolled, not merely the item.
The real fix would be to call update, instead of scroll. I understand that this
is optimization issue, but I'd rather have a correctly painted item than a fast
but garbage one.

</quoted>


and kenneth's:

<quote>
According to Alexis, you are supposed to reimplement

QPainterPath QGraphicsItem::shape () const   [virtual]

to not return a rectangular shape anymore, but the shape of the item with
clipping. This is also used for events (the clipped area should be able to
receive events), collision detection, and the QGraphicsScene::items() function.

If thsi doesn't work, it can be considered a graphics view bug, I suspect.
</quote>
Comment 1 Antonio Gomes 2009-10-27 08:31:23 PDT
based on the comment below i will close this bug as INVALID.

 -------  Comment #55 From  Kenneth Rohde Christiansen   2009-09-11 06:25:05 

(In reply to comment #54)
> some follow up bugs:
> * Bug 29155 -  [Qt] Implement autotests for QWebGraphicsItem 
> * Bug 29156 -  [Qt] Fix scrolling implementation on QWebGraphicsItem

That is a bit misleading, as the Oslo guys confirmed that our scrolling
implementation is indeed correct and that when subclassing you need to
implement the virtual shape function as well.

If that isn't working, that is a GraphicsView bug and not a WebKit one.