WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
52779
Cleanup Scrollbar/ScrollbarClient relationship
https://bugs.webkit.org/show_bug.cgi?id=52779
Summary
Cleanup Scrollbar/ScrollbarClient relationship
Sam Weinig
Reported
2011-01-19 20:26:40 PST
Instead of routing all scrolls through the Scrollbar, the Scrollbar should just be a dumb "view" onto the scrollable area (being told when the scroll offset has changed).
Attachments
WIP (Do not review)
(69.48 KB, patch)
2011-01-19 20:28 PST
,
Sam Weinig
no flags
Details
Formatted Diff
Diff
WIP-2 (Do not review)
(71.77 KB, patch)
2011-01-19 21:37 PST
,
Sam Weinig
no flags
Details
Formatted Diff
Diff
Attempt 3
(76.43 KB, patch)
2011-01-20 11:25 PST
,
Sam Weinig
no flags
Details
Formatted Diff
Diff
Attempt 4
(70.11 KB, patch)
2011-01-20 12:40 PST
,
Sam Weinig
no flags
Details
Formatted Diff
Diff
Patch
(83.01 KB, patch)
2011-01-20 12:56 PST
,
Sam Weinig
no flags
Details
Formatted Diff
Diff
Patch
(79.39 KB, patch)
2011-01-20 12:58 PST
,
Sam Weinig
hyatt
: review+
Details
Formatted Diff
Diff
Part 2
(102.94 KB, patch)
2011-01-21 11:40 PST
,
Sam Weinig
no flags
Details
Formatted Diff
Diff
Show Obsolete
(7)
View All
Add attachment
proposed patch, testcase, etc.
Sam Weinig
Comment 1
2011-01-19 20:28:27 PST
Created
attachment 79546
[details]
WIP (Do not review) Uploading WIP patch to see how the bots feel about it.
Early Warning System Bot
Comment 2
2011-01-19 20:52:01 PST
Attachment 79546
[details]
did not build on qt: Build output:
http://queues.webkit.org/results/7539233
WebKit Review Bot
Comment 3
2011-01-19 20:52:32 PST
Attachment 79546
[details]
did not build on chromium: Build output:
http://queues.webkit.org/results/7516192
WebKit Review Bot
Comment 4
2011-01-19 20:57:15 PST
Attachment 79546
[details]
did not build on gtk: Build output:
http://queues.webkit.org/results/7568218
Sam Weinig
Comment 5
2011-01-19 21:37:35 PST
Created
attachment 79549
[details]
WIP-2 (Do not review)
WebKit Review Bot
Comment 6
2011-01-19 21:49:54 PST
Attachment 79549
[details]
did not build on gtk: Build output:
http://queues.webkit.org/results/7610233
Early Warning System Bot
Comment 7
2011-01-19 21:53:18 PST
Attachment 79549
[details]
did not build on qt: Build output:
http://queues.webkit.org/results/7523238
Eric Seidel (no email)
Comment 8
2011-01-20 02:30:19 PST
If you're just looking for ews results you can remove the review flag as soon as numbers appear in the bubbles. you can also submit patches directly using
http://queues.webkit.org/submit-to-ews
Sam Weinig
Comment 9
2011-01-20 11:11:10 PST
(In reply to
comment #8
)
> If you're just looking for ews results you can remove the review flag as soon as numbers appear in the bubbles. > > you can also submit patches directly using
http://queues.webkit.org/submit-to-ews
Cool!
Sam Weinig
Comment 10
2011-01-20 11:25:02 PST
Created
attachment 79621
[details]
Attempt 3
WebKit Review Bot
Comment 11
2011-01-20 11:36:14 PST
Attachment 79621
[details]
did not build on gtk: Build output:
http://queues.webkit.org/results/7609231
Sam Weinig
Comment 12
2011-01-20 12:40:51 PST
Created
attachment 79636
[details]
Attempt 4
Sam Weinig
Comment 13
2011-01-20 12:56:22 PST
Created
attachment 79640
[details]
Patch
Sam Weinig
Comment 14
2011-01-20 12:58:28 PST
Created
attachment 79641
[details]
Patch
Dave Hyatt
Comment 15
2011-01-20 13:08:51 PST
Comment on
attachment 79641
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=79641&action=review
Looks good.
> Source/WebCore/platform/Scrollbar.cpp:310 > + if (m_orientation == HorizontalScrollbar) > + client()->scrollToXOffsetWithoutAnimation(m_dragOrigin); > + else > + client()->scrollToYOffsetWithoutAnimation(m_dragOrigin);
I see this pattern in multiple places. Maybe there should be a scrollToOffsetWithoutAnimation(ScrollbarOrientation, int offset) function.
> Source/WebCore/platform/efl/ScrollbarEfl.cpp:91 > + if (that->orientation() == HorizontalScrollbar) > + that->client()->scrollToXOffsetWithoutAnimation(v); > + else > + that->client()->scrollToYOffsetWithoutAnimation(v); > }
See comment above about this pattern.
> Source/WebCore/platform/gtk/MainFrameScrollbarGtk.cpp:115 > + if (that->orientation() == HorizontalScrollbar) > + that->client()->scrollToXOffsetWithoutAnimation(static_cast<int>(gtk_adjustment_get_value(that->m_adjustment.get()))); > + else > + that->client()->scrollToYOffsetWithoutAnimation(static_cast<int>(gtk_adjustment_get_value(that->m_adjustment.get())));
And again. Especially gross given the big gtk_adjustment_get_value expression is repeated twice.
> Source/WebKit/qt/Api/qwebframe.cpp:1078 > + if (orientation == Qt::Horizontal) > + sb->client()->scrollToXOffsetWithoutAnimation(value); > + else > + sb->client()->scrollToYOffsetWithoutAnimation(value);
And again.
WebKit Review Bot
Comment 16
2011-01-20 15:22:45 PST
http://trac.webkit.org/changeset/76291
might have broken Qt Linux Release minimal, Qt Linux ARMv5 Release, Qt Linux ARMv7 Release, Qt Windows 32-bit Release, and Qt Windows 32-bit Debug
Peter Kasting
Comment 17
2011-01-20 15:32:35 PST
Sam, do you want to look at
bug 45005
, and * Dupe that against this if relevant * See if there were any useful details on that bug you haven't done here I haven't looked to see what you've done on this bug but from a high level it sounds very much like what that bug was about.
Sam Weinig
Comment 18
2011-01-21 11:32:34 PST
***
Bug 45005
has been marked as a duplicate of this bug. ***
Sam Weinig
Comment 19
2011-01-21 11:40:47 PST
Created
attachment 79769
[details]
Part 2
WebKit Review Bot
Comment 20
2011-01-21 11:43:12 PST
Attachment 79769
[details]
did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/CMakeLists.txt', u'Source/W..." exit_code: 1 Source/WebCore/platform/ScrollView.h:32: Alphabetical sorting problem. [build/include_order] [4] Source/WebKit/win/WebScrollBar.h:37: Alphabetical sorting problem. [build/include_order] [4] Source/WebCore/platform/ScrollbarThemeComposite.cpp:37: Alphabetical sorting problem. [build/include_order] [4] Source/WebCore/platform/Scrollbar.h:46: The parameter name "orientation" adds no information, so it should be removed. [readability/parameter_name] [5] Source/WebCore/platform/Scrollbar.h:46: The parameter name "size" adds no information, so it should be removed. [readability/parameter_name] [5] Total errors found: 5 in 59 files If any of these errors are false positives, please file a bug against check-webkit-style.
WebKit Review Bot
Comment 21
2011-01-21 11:59:19 PST
Attachment 79769
[details]
did not build on chromium: Build output:
http://queues.webkit.org/results/7569263
Sam Weinig
Comment 22
2011-01-21 12:05:55 PST
Forgot to mention, part 1 landed in
http://trac.webkit.org/changeset/76291
.
Sam Weinig
Comment 23
2011-01-21 12:15:45 PST
Comment on
attachment 79769
[details]
Part 2 Part 2 landed in
http://trac.webkit.org/changeset/76378
.
Build Bot
Comment 24
2011-01-21 12:19:42 PST
Attachment 79769
[details]
did not build on win: Build output:
http://queues.webkit.org/results/7570267
WebKit Review Bot
Comment 25
2011-01-21 12:33:03 PST
http://trac.webkit.org/changeset/76378
might have broken Chromium Linux Release
Sam Weinig
Comment 26
2011-01-21 13:39:51 PST
Marking fixed for now. Additional cleanups will come later.
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