WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 22119
[Transforms] clicks in scrollbars of transformed element don't work (e.g. listbox or overflow)
https://bugs.webkit.org/show_bug.cgi?id=22119
Summary
[Transforms] clicks in scrollbars of transformed element don't work (e.g. lis...
Simon Fraser (smfr)
Reported
2008-11-06 17:15:13 PST
If a multiline <select> is transformed, clicks in its scrollbar don't do anything.
Attachments
Testcase
(812 bytes, text/html)
2009-03-14 11:01 PDT
,
Simon Fraser (smfr)
no flags
Details
Patch, testcases, changelog
(46.35 KB, patch)
2009-03-15 13:16 PDT
,
Simon Fraser (smfr)
hyatt
: review-
Details
Formatted Diff
Diff
New patch
(48.84 KB, patch)
2009-03-16 20:31 PDT
,
Simon Fraser (smfr)
hyatt
: review-
Details
Formatted Diff
Diff
WIP patch
(23.04 KB, patch)
2009-06-21 22:15 PDT
,
Simon Fraser (smfr)
no flags
Details
Formatted Diff
Diff
Working patch
(33.60 KB, patch)
2009-06-28 18:18 PDT
,
Simon Fraser (smfr)
no flags
Details
Formatted Diff
Diff
Almost done; needs testing on Windows
(48.94 KB, patch)
2009-06-30 23:23 PDT
,
Simon Fraser (smfr)
no flags
Details
Formatted Diff
Diff
Almost done patch; needs ScrollbarClient cleanup
(41.75 KB, patch)
2009-07-01 17:02 PDT
,
Simon Fraser (smfr)
simon.fraser
: review+
Details
Formatted Diff
Diff
Show Obsolete
(5)
View All
Add attachment
proposed patch, testcase, etc.
Simon Fraser (smfr)
Comment 1
2009-03-11 17:08:39 PDT
<
rdar://problem/6672445
>
Simon Fraser (smfr)
Comment 2
2009-03-14 11:01:04 PDT
Created
attachment 28619
[details]
Testcase
Simon Fraser (smfr)
Comment 3
2009-03-14 23:02:44 PDT
I have a patch for this.
Simon Fraser (smfr)
Comment 4
2009-03-15 13:16:31 PDT
Created
attachment 28641
[details]
Patch, testcases, changelog
Dave Hyatt
Comment 5
2009-03-16 15:14:17 PDT
Comment on
attachment 28641
[details]
Patch, testcases, changelog Minus after IRC discussion. Want to see the scrollbarOwner thing removed and replaced with the right method(s) just being added to ScrollbarClient.
Simon Fraser (smfr)
Comment 6
2009-03-16 15:15:15 PDT
Note: need to fix windows-specific popup code too.
Simon Fraser (smfr)
Comment 7
2009-03-16 20:31:25 PDT
Created
attachment 28676
[details]
New patch
Dave Hyatt
Comment 8
2009-03-18 11:16:32 PDT
Comment on
attachment 28676
[details]
New patch My high level commentary here is that new methods have been added that essentially duplicate functionality of Widget and ScrollView. The reasoning being that the Widget/ScrollView methods aren't transform-aware. I think a better approach would be to make them transform-aware. Take for example: IntPoint Widget::convertToContainingWindow(const IntPoint& point) const { IntPoint windowPoint = point; const Widget* childWidget = this; for (const ScrollView* parentScrollView = parent(); parentScrollView; childWidget = parentScrollView, parentScrollView = parentScrollView->parent()) windowPoint = parentScrollView->convertChildToSelf(childWidget, windowPoint); return windowPoint; } IntPoint Widget::convertFromContainingWindow(const IntPoint& point) const { IntPoint widgetPoint = point; const Widget* childWidget = this; for (const ScrollView* parentScrollView = parent(); parentScrollView; childWidget = parentScrollView, parentScrollView = parentScrollView->parent()) widgetPoint = parentScrollView->convertSelfToChild(childWidget, widgetPoint); return widgetPoint; } There is nothing wrong with those methods if you imagine that convertChildToSelf and convertSelfToChild are transform-aware. In other words, try to find the "leaf" functions used by all of these Widget/ScrollView methods and make them virtual. Subclass them on FrameView to do the right thing. It is likely that you may need a "usesTransforms" boolean on FrameView, kind of like we have slow repaints on ScrollView. If that flag isn't set then you know you could fall through to the much faster ScrollView functions and not have to crawl up your render tree. That is an optimization that could be done in a separate patch though I think. Now there are still some good things here though. For example, it is good to just send local points to Scrollbars always. There's no reason to be sending them window coordinates when you already hit tested all the way to the scrollbar and so should know the local coordinate anyway. So eliminating window to/from conversions from scrollbar code is good.
Simon Fraser (smfr)
Comment 9
2009-06-21 22:14:59 PDT
I'm not sure how I can do this by subclassing methods in FrameView. We need to have rect/point conversions done via RenderObjects for Scrollbars and other widgets (e.g. plug-ins), not just for frames. It seems like the only way to do this in a generic way would be to resurrect WidgetClient? Otherwise there's no way to get from a Widget to its associated RenderObject.
Simon Fraser (smfr)
Comment 10
2009-06-21 22:15:30 PDT
Created
attachment 31631
[details]
WIP patch
Simon Fraser (smfr)
Comment 11
2009-06-22 10:48:33 PDT
Every Widget (scrollbar, plugin, frameview) has a non-platform implementation, so we can override virtual methods on Widget in those. The scrollbar one would call through ScrollbarClient.
Simon Fraser (smfr)
Comment 12
2009-06-28 18:18:15 PDT
Created
attachment 31994
[details]
Working patch Here's a mostly-complete patch that fixes Widget::convertTo/FromContainingWindow methods so that subclasses can modify their behavior to take transforms into account.
Simon Fraser (smfr)
Comment 13
2009-06-30 23:23:44 PDT
Created
attachment 32111
[details]
Almost done; needs testing on Windows
Simon Fraser (smfr)
Comment 14
2009-07-01 17:02:56 PDT
Created
attachment 32161
[details]
Almost done patch; needs ScrollbarClient cleanup With this patch nested overflow:scroll regions with transforms work on Windows too. For some reason, rotated scrollbars on Windows don't draw. I added convertTo/FromRenderer methods on FrameView as the funnel points for converting from some renderer up to its enclosing FrameView. convertToRenderer(RenderObject*,IntRect) has a FIXME, but as far as I know it's never used (we never map rects down into renderers). ScrollbarClient is troublesome, because it's too easy for a client to just turn around and call scrollbar->convertToContainingView() to get the default behavior, and hit infinite recursion.
Dave Hyatt
Comment 15
2009-07-02 10:33:27 PDT
Fixed in
r45478
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug