Bug 109064

Summary: [chromium] Default scrollbar theme should be shared with CC compositor.
Product: WebKit Reporter: W. James MacLean <wjmaclean>
Component: New BugsAssignee: W. James MacLean <wjmaclean>
Status: RESOLVED WONTFIX    
Severity: Normal CC: abarth, aelias, andersca, dglazkov, fishd, jamesr, rbyers, schenney, tkent+wkapi, tonikitoo, trchen, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch jamesr: review-

W. James MacLean
Reported 2013-02-06 10:02:11 PST
[chromium] Default scrollbar theme should be shared with CC compositor.
Attachments
Patch (3.47 KB, patch)
2013-02-06 10:03 PST, W. James MacLean
jamesr: review-
W. James MacLean
Comment 1 2013-02-06 10:03:18 PST
WebKit Review Bot
Comment 2 2013-02-06 10:12:58 PST
Please wait for approval from abarth@webkit.org, dglazkov@chromium.org, fishd@chromium.org, jamesr@chromium.org or tkent@chromium.org before submitting, as this patch contains changes to the Chromium public API. See also https://trac.webkit.org/wiki/ChromiumWebKitAPI.
James Robinson
Comment 3 2013-02-06 13:34:28 PST
This seems strange. For WebKit-created scrollbars, we want to make sure the theming matches so it looks exactly like a WebKit rendered scrollbars. For scrollbars that aren't created and owned by WebKit, why would you want to use the same theme?
W. James MacLean
Comment 4 2013-02-06 13:44:45 PST
(In reply to comment #3) > This seems strange. For WebKit-created scrollbars, we want to make sure the theming matches so it looks exactly like a WebKit rendered scrollbars. For scrollbars that aren't created and owned by WebKit, why would you want to use the same theme? We don't need the scrollbars to look identical to WebKit ones, so we have a custom painter. Two responses here: 1) We want the ability to know if the main-frame scrollbars (created by WebKit) will be overlay or not so we will know wether pinch-zoom scrollbars are needed (non-overlay => yes) or not (overlay => no) (here we just plumb through the boolean value). 2) We want to be able to render the pinch-zoom scrollbars with the WebKit default theme geometry, *and* to create a ScrollbarLayer we need a WebScrollbarThemeGeometry* that is built from a theme geometry, which in this case is the default theme geometry. This is my understanding of the approach you described, based on our conversation from two weeks ago (getting at the theme pointer and plumbing it through to CC).
W. James MacLean
Comment 5 2013-02-06 13:45:35 PST
(In reply to comment #3) > This seems strange. For WebKit-created scrollbars, we want to make sure the theming matches so it looks exactly like a WebKit rendered scrollbars. For scrollbars that aren't created and owned by WebKit, why would you want to use the same theme? BTW, this CL is the companion to https://codereview.chromium.org/11550035/
James Robinson
Comment 6 2013-02-06 14:47:49 PST
(In reply to comment #4) > (In reply to comment #3) > > This seems strange. For WebKit-created scrollbars, we want to make sure the theming matches so it looks exactly like a WebKit rendered scrollbars. For scrollbars that aren't created and owned by WebKit, why would you want to use the same theme? > > We don't need the scrollbars to look identical to WebKit ones, so we have a custom painter. > > Two responses here: > > 1) We want the ability to know if the main-frame scrollbars (created by WebKit) will be overlay or not so we will know wether pinch-zoom scrollbars are needed (non-overlay => yes) or not (overlay => no) (here we just plumb through the boolean value). > How does the default theme make the determination to be overlay or not? If you want to mirror the setting I think you should look at where it's coming from. What would it mean to have a "non-overlay pinch-zoom scrollbar"? Pinch-zoom scrollbars can't take layout space (by definition), so doesn't that mean they are always overlay? > 2) We want to be able to render the pinch-zoom scrollbars with the WebKit default theme geometry Why? Why is WebKit's default theme geometry the geometry you want for pinch-zoom scrollbars, which aren't WebKit-related things? They don't seem related to me.
W. James MacLean
Comment 7 2013-02-06 15:19:14 PST
(In reply to comment #6) > > > How does the default theme make the determination to be overlay or not? If you want to mirror the setting I think you should look at where it's coming from. It's set as an override to a virtual function. At present. ScrollbarThemeChromium (Default?) always says 'false' for usesOverlayScrollbars() whereas ScrollbarThemeChromiumAndroid always says 'true'. I figured if I plumbed the value, I'd pick up whichever was in use without having to assume anything other than constancy for a given platform (e.g. ScrollbarTheme won't give a different answer on subsequent calls). > What would it mean to have a "non-overlay pinch-zoom scrollbar"? Pinch-zoom scrollbars can't take layout space (by definition), so doesn't that mean they are always overlay? Pinch zoom scrollbars are always overlay. *But* they are only needed *if* the mainframe scrollbars are non-overlay, and they are not needed if the mainframe scrollbars are overlay. > > > 2) We want to be able to render the pinch-zoom scrollbars with the WebKit default theme geometry > > Why? Why is WebKit's default theme geometry the geometry you want for pinch-zoom scrollbars, which aren't WebKit-related things? They don't seem related to me. No, they're not related, but the WebKit theme suffices just fine for pinch-zoom scrollbars, so why not use it? This is a challenging conversation to have on the bug ... should we do this by VC tomorrow instead? Obviously I didn't understand what you wanted, so it would help me to get some clarification if we could talk in real time.
James Robinson
Comment 8 2013-02-06 18:02:44 PST
Comment on attachment 186873 [details] Patch Let's do that before proceeding. I'm out the rest of this week.
Note You need to log in before you can comment on or make changes to this bug.