Bug 62686 - [Chromium] Switching between overlay and opaque scrollbars causes glitches
Summary: [Chromium] Switching between overlay and opaque scrollbars causes glitches
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac Unspecified
: P2 Normal
Assignee: Sailesh Agrawal
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-14 17:53 PDT by Sailesh Agrawal
Modified: 2011-08-31 16:05 PDT (History)
4 users (show)

See Also:


Attachments
Patch (1.63 KB, patch)
2011-08-16 16:26 PDT, Sailesh Agrawal
no flags Details | Formatted Diff | Diff
Patch (1.77 KB, patch)
2011-08-18 15:43 PDT, Sailesh Agrawal
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sailesh Agrawal 2011-06-14 17:53:45 PDT
1. Run Chromium
2. Open a page with scrollbars
3. Switch between overlay and opaque scrollbars

Expected:
Scrollbars repaint and no glitches on screen

Actual:
There are lots of glitches.
Comment 1 Sailesh Agrawal 2011-06-15 21:18:08 PDT
Looks like bdakin just fixed this bug for me :-)
https://trac.webkit.org/changeset/88877
Comment 2 Sailesh Agrawal 2011-08-16 16:26:48 PDT
Created attachment 104116 [details]
Patch
Comment 3 Sailesh Agrawal 2011-08-16 16:27:21 PDT
bdakin please take a look, thanks.
Comment 5 James Robinson 2011-08-16 21:13:55 PDT
Comment on attachment 104116 [details]
Patch

Where's the test?
Comment 6 Sailesh Agrawal 2011-08-16 22:10:04 PDT
(In reply to comment #5)
> (From update of attachment 104116 [details])
> Where's the test?

Hey James, I'm not sure how to test this. All this code is only used if it's run on Lion. Are any bots running Lion right now?
Comment 7 Sailesh Agrawal 2011-08-18 15:43:45 PDT
Created attachment 104414 [details]
Patch
Comment 8 Sailesh Agrawal 2011-08-18 15:44:21 PDT
(In reply to comment #6)
> (In reply to comment #5)
> > (From update of attachment 104116 [details] [details])
> > Where's the test?
> 
> Hey James, I'm not sure how to test this. All this code is only used if it's run on Lion. Are any bots running Lion right now?

I've filed bug 66504 to track the work to add tests for this case.
Comment 9 Nico Weber 2011-08-18 15:45:28 PDT
is scrollBarStyleChanged only called on 10.7? maybe you can trigger it by adding css to the scrollbar dynamically and use that to test? If so, just do it in this bug and close the one you just filed.
Comment 10 Sailesh Agrawal 2011-08-18 15:47:15 PDT
(In reply to comment #9)
> is scrollBarStyleChanged only called on 10.7? maybe you can trigger it by adding css to the scrollbar dynamically and use that to test? If so, just do it in this bug and close the one you just filed.

It's only called on 10.7. It only called by the scroll animator when we get a callback that the scrollbar has switched from overlay to opaque mode.
Comment 11 Nico Weber 2011-08-18 15:54:23 PDT
Indeed. I wonder if this is really blocked on 10.7 – I guess we need to add a method "scrollbarStyleChanged" method to layoutTestController to tickle this anyway, and checking for invalidation doesn't require 10.7. Hooking this up to the layoutTestController should be fairly straightforward.

jamesr, bdakin: Is the right thing to do here to add a method to layoutTestController, to not have a test, or something else?
Comment 12 Beth Dakin 2011-08-18 15:58:50 PDT
(In reply to comment #11)
> Indeed. I wonder if this is really blocked on 10.7 – I guess we need to add a method "scrollbarStyleChanged" method to layoutTestController to tickle this anyway, and checking for invalidation doesn't require 10.7. Hooking this up to the layoutTestController should be fairly straightforward.
> 
> jamesr, bdakin: Is the right thing to do here to add a method to layoutTestController, to not have a test, or something else?

Hi Nico! I have not been adding tests for the many scrollbar-related bugs I have fixed, which is bad. I haven't been adding them because I couldn't come up with a way to test that was not blocked by 10.7. If you have an idea of how to extend LayoutTestController without relying on 10.7 bots and it works, then adding that would be great!
Comment 13 James Robinson 2011-08-18 15:59:55 PDT
There's a full complement of 10.7 bots for the apple mac port on build.webkit.org, so if you can come up with a test that works there you should be able to just add a test and put it in on the Skipped list for pre-10.7 platforms and get test coverage on the bots.
Comment 14 Sailesh Agrawal 2011-08-18 16:16:38 PDT
(In reply to comment #12)
> (In reply to comment #11)
> > Indeed. I wonder if this is really blocked on 10.7 – I guess we need to add a method "scrollbarStyleChanged" method to layoutTestController to tickle this anyway, and checking for invalidation doesn't require 10.7. Hooking this up to the layoutTestController should be fairly straightforward.
> > 
> > jamesr, bdakin: Is the right thing to do here to add a method to layoutTestController, to not have a test, or something else?
> 
> Hi Nico! I have not been adding tests for the many scrollbar-related bugs I have fixed, which is bad. I haven't been adding them because I couldn't come up with a way to test that was not blocked by 10.7. If you have an idea of how to extend LayoutTestController without relying on 10.7 bots and it works, then adding that would be great!

Hey Beth, jamesr and I discussed adding a hook into the scrollbar drawing code that would let the layout test choose which type of scrollbar it wants. This means making some changes to the ScrollbarTheme code.

Are you ok with this idea?

If so I don't mind making the change and adding the tests.

Thanks,
Comment 15 Beth Dakin 2011-08-18 16:49:21 PDT
(In reply to comment #14)
> Hey Beth, jamesr and I discussed adding a hook into the scrollbar drawing code that would let the layout test choose which type of scrollbar it wants. This means making some changes to the ScrollbarTheme code.
> 

I think this is a good way to do it. Thanks!
Comment 16 Sailesh Agrawal 2011-08-18 22:03:53 PDT
> I think this is a good way to do it. Thanks!

Awesome. jamesr, can i have a review pleaseee
Comment 17 Nico Weber 2011-08-18 22:27:18 PDT
(In reply to comment #16)
> Awesome. jamesr, can i have a review pleaseee

Usually you include tests along with the fix, now that it looks like the tests aren't blocked on getting 10.7 bots (since a) this might be doable in a bot-agnostic way b) there are 10.7 bots for the mac port)
Comment 18 Sailesh Agrawal 2011-08-19 07:14:21 PDT
(In reply to comment #17)
> (In reply to comment #16)
> > Awesome. jamesr, can i have a review pleaseee
> 
> Usually you include tests along with the fix, now that it looks like the tests aren't blocked on getting 10.7 bots (since a) this might be doable in a bot-agnostic way b) there are 10.7 bots for the mac port)

Writing up the test is going to require changing a lot of the drawing code. Currently all the drawing code looks up the scrollbar style from system settings.

I think it's better to decouple that from this change.
Comment 19 Sailesh Agrawal 2011-08-24 11:24:48 PDT
Ping!
Comment 20 Beth Dakin 2011-08-31 15:49:51 PDT
Comment on attachment 104414 [details]
Patch

r=me!
Comment 21 WebKit Review Bot 2011-08-31 16:05:10 PDT
Comment on attachment 104414 [details]
Patch

Clearing flags on attachment: 104414

Committed r94243: <http://trac.webkit.org/changeset/94243>
Comment 22 WebKit Review Bot 2011-08-31 16:05:14 PDT
All reviewed patches have been landed.  Closing bug.