<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>29156</bug_id>
          
          <creation_ts>2009-09-10 15:04:20 -0700</creation_ts>
          <short_desc>[Qt] Fix scrolling implementation on QWebGraphicsItem</short_desc>
          <delta_ts>2009-10-27 08:31:23 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKit Qt</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>Qt</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Antonio Gomes">tonikitoo</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ariya.hidayat</cc>
    
    <cc>hausmann</cc>
    
    <cc>kenneth</cc>
    
    <cc>laszlo.gombos</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>146361</commentid>
    <comment_count>0</comment_count>
    <who name="Antonio Gomes">tonikitoo</who>
    <bug_when>2009-09-10 15:04:20 -0700</bug_when>
    <thetext>from comment https://bugs.webkit.org/show_bug.cgi?id=28862#c22 ariya said:

&lt;quoted&gt;

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

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&apos;d rather have a correctly painted item than a fast
but garbage one.

&lt;/quoted&gt;


and kenneth&apos;s:

&lt;quote&gt;
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&apos;t work, it can be considered a graphics view bug, I suspect.
&lt;/quote&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>158199</commentid>
    <comment_count>1</comment_count>
    <who name="Antonio Gomes">tonikitoo</who>
    <bug_when>2009-10-27 08:31:23 -0700</bug_when>
    <thetext>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)
&gt; some follow up bugs:
&gt; * Bug 29155 -  [Qt] Implement autotests for QWebGraphicsItem 
&gt; * 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&apos;t working, that is a GraphicsView bug and not a WebKit one.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>