Bug 61639

Summary: [chromium] Things jump around when selecting anything on the page
Product: WebKit Reporter: Alok Priyadarshi <alokp>
Component: Layout and RenderingAssignee: Alok Priyadarshi <alokp>
Status: RESOLVED FIXED    
Severity: Normal CC: enne, jamesr, reed
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
proposed patch
none
proposed patch
jamesr: review-
proposed patch jamesr: review+

Description Alok Priyadarshi 2011-05-27 08:59:00 PDT
With accelerated drawing (--enable-accelerated-drawing), things jump around when anything is selected on the page.

Test case: http://www.webkit.org/blog-files/3d-transforms/morphing-cubes.html

This is happening because when anything is selected, only a portion of a tile is invalidated and updated. LayerTextureUpdaterSkPicture::updateTextureRect does not update a tile subregion properly.
Comment 1 Alok Priyadarshi 2011-05-27 09:34:59 PDT
Created attachment 95184 [details]
proposed patch
Comment 2 Vangelis Kokkevis 2011-05-27 10:55:33 PDT
Comment on attachment 95184 [details]
proposed patch

The offset changes look good.  Did you mean to include the removal of clear and change in framebufferRenderbuffer with this patch?  If so, please add some explanation in the changelog.
Comment 3 Alok Priyadarshi 2011-05-27 11:18:10 PDT
Created attachment 95198 [details]
proposed patch

Added explanation for removing glClear to changelog.
Comment 4 Alok Priyadarshi 2011-05-27 11:18:56 PDT
(In reply to comment #2)
> (From update of attachment 95184 [details])
> The offset changes look good.  Did you mean to include the removal of clear and change in framebufferRenderbuffer with this patch?  If so, please add some explanation in the changelog.

Yes I meant to remove glClear. Added explanation to changelog.
Comment 5 James Robinson 2011-05-31 19:34:52 PDT
Comment on attachment 95198 [details]
proposed patch

Need a test!
Comment 6 Alok Priyadarshi 2011-06-01 14:02:07 PDT
This case should be covered by most of the layout tests (pixel) targeting hover/selection/editing when chrome is run in compositing mode. Do you want me write a similar test with a composited layer? I heard that we are planning on running all layout tests in compositing mode too. If so, is there any reason to duplicate tests?
Comment 7 James Robinson 2011-06-01 14:12:27 PDT
No, you don't need to add redundant test coverage if this bugfix causes existing tests to progress.  You do need to record which test(s) covers this change in the ChangeLog and add a new test if there aren't any tests currently that cover this.
Comment 8 Alok Priyadarshi 2011-06-01 14:30:54 PDT
Created attachment 95665 [details]
proposed patch

Added test info to changelog
Comment 9 James Robinson 2011-06-02 13:11:05 PDT
Comment on attachment 95665 [details]
proposed patch

Seems good!
Comment 10 Alok Priyadarshi 2011-06-02 13:22:33 PDT
Committed r87949: <http://trac.webkit.org/changeset/87949>
Comment 11 Adrienne Walker 2011-06-02 13:36:12 PDT
Maybe I'm missing something, but the editing tests don't get run automatically with the compositor, so if this breaks in the future, we won't know about it.

Would compositing/repaint/same-size-invalidation.html have caught this? Or, is there some other automatic test that would?
Comment 12 James Robinson 2011-06-02 13:39:04 PDT
(In reply to comment #11)
> Maybe I'm missing something, but the editing tests don't get run automatically with the compositor, so if this breaks in the future, we won't know about it.
> 
> Would compositing/repaint/same-size-invalidation.html have caught this? Or, is there some other automatic test that would?

To be fair, our automated tests don't run with --accelerated-drawing on either.
Comment 13 Adrienne Walker 2011-06-02 13:42:11 PDT
(In reply to comment #12)
> (In reply to comment #11)
> > Maybe I'm missing something, but the editing tests don't get run automatically with the compositor, so if this breaks in the future, we won't know about it.
> > 
> > Would compositing/repaint/same-size-invalidation.html have caught this? Or, is there some other automatic test that would?
> 
> To be fair, our automated tests don't run with --accelerated-drawing on either.

Ah, fair enough.  I guess manual tests are all that can be done then.
Comment 14 Alok Priyadarshi 2011-06-02 13:51:22 PDT
(In reply to comment #11)
> Maybe I'm missing something, but the editing tests don't get run automatically with the compositor, so if this breaks in the future, we won't know about it.
> 

You are right. As I mentioned in the changelog, they will get run if chrome is run in forced compositing mode. I am looking to see if we can run all layout tests with --force-compositing-mode flag on gpu bots. I will also enable accelerated-drawing once it is stable enough.