WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
19650
-webkit-gradient slows down scrolling when page has horizontal scrollbar
https://bugs.webkit.org/show_bug.cgi?id=19650
Summary
-webkit-gradient slows down scrolling when page has horizontal scrollbar
Jon Honeycutt
Reported
2008-06-18 02:06:27 PDT
The site above has very slow scrolling. Not reproducible in Opera. Site uses some WebKit-specific CSS that could be responsible. Disabling styles results in normal scrolling speed.
Attachments
simplified version of http://www.apple.com/safari/whats-new.html
(8.78 KB, text/html)
2009-06-10 16:50 PDT
,
Ryosuke Niwa
no flags
Details
sample HTML copied from http://www.apple.com/safari/whats-new.html
(
deleted
)
2009-06-10 16:52 PDT
,
Ryosuke Niwa
no flags
Details
reduced test case
(323 bytes, text/html)
2009-06-10 17:12 PDT
,
Eric Seidel (no email)
no flags
Details
Use 1-by-n tiles for horizontal and vertical linear gradients
(7.67 KB, patch)
2010-01-14 20:33 PST
,
mitz
simon.fraser
: review+
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Mark Rowe (bdash)
Comment 1
2008-06-18 18:30:47 PDT
<
rdar://problem/6020083
>
Adam Bryzak
Comment 2
2009-06-10 16:23:08 PDT
(In reply to
comment #0
)
> The site above has very slow scrolling. Not reproducible in Opera. Site uses > some WebKit-specific CSS that could be responsible. Disabling styles results in > normal scrolling speed. >
The slow vertical scrolling only seems to happen for me when the horizontal scrollbar is not scrolled completely to the left. As soon as the page is scrolled 1px horizontally, the vertical scrolling slows down considerably. If the horizontal scrollbar is on the left the vertical scrolling is fine. It also happens on
http://www.apple.com/safari/whats-new.html
Ryosuke Niwa
Comment 3
2009-06-10 16:50:51 PDT
Created
attachment 31144
[details]
simplified version of
http://www.apple.com/safari/whats-new.html
this reproduces the bug in Safari 4 (Windows 528.17) but the effect cannot be experienced (by human) in Chrome 3.0.183.1.
Ryosuke Niwa
Comment 4
2009-06-10 16:52:59 PDT
Created
attachment 31145
[details]
sample HTML copied from
http://www.apple.com/safari/whats-new.html
This HTML reproduces the bug both in Chrome and Safari. The bug disappears when -webkit-gradient is removed.
Eric Seidel (no email)
Comment 5
2009-06-10 17:12:29 PDT
Hyatt wrote the scroll code and the gradient code. :)
Eric Seidel (no email)
Comment 6
2009-06-10 17:12:54 PDT
Created
attachment 31147
[details]
reduced test case
Eric Seidel (no email)
Comment 7
2009-06-10 17:15:08 PDT
This does not reproduce for me on a TOT Debug build.
Eric Seidel (no email)
Comment 8
2009-06-10 17:15:31 PDT
This may have been fixed since Safari 4?
Adam Bryzak
Comment 9
2009-06-10 17:16:21 PDT
I tested it using Safari 4 final and with the latest WebKit running on OS X 10.5.7
Ryosuke Niwa
Comment 10
2009-06-10 17:22:37 PDT
WebKit build 44547 on Windows reproduced the problem with the reduced test case.
Eric Seidel (no email)
Comment 11
2009-06-10 17:25:59 PDT
Wow. This still reproduces on TOT, but I only notice it in Release builds!
mitz
Comment 12
2009-06-10 22:33:11 PDT
This is similar to
bug 24130
. GeneratedImage::drawPattern() is used to draw the gradient rather than GeneratedImage::draw(), the reason being that, even with the fix for
bug 24130
, the rect to paint legitimately contains more than one tile. As mentioned in that bug, the way to address this is probably by way of
bug 24178
.
mitz
Comment 13
2009-06-10 22:40:55 PDT
There are other possible optimizations for vertical and horizontal gradients (adjusting the tile dimensions in the direction perpendicular to the gradient; won’t help with the “reduced test case” attached to this bug, but should help with the What’s New page, for example).
Simon Fraser (smfr)
Comment 14
2009-06-10 23:12:32 PDT
I gather this is on Mac and Windows?
Ryosuke Niwa
Comment 15
2009-06-19 18:54:42 PDT
(In reply to
comment #14
)
> I gather this is on Mac and Windows? >
Yes, we have observed it on Mac and Windows. But it may still reproduce in Linux.
mitz
Comment 16
2010-01-14 20:33:59 PST
Created
attachment 46638
[details]
Use 1-by-n tiles for horizontal and vertical linear gradients
Simon Fraser (smfr)
Comment 17
2010-01-14 20:41:02 PST
Comment on
attachment 46638
[details]
Use 1-by-n tiles for horizontal and vertical linear gradients
> Index: WebCore/platform/graphics/Generator.h > ===================================================================
> virtual void fill(GraphicsContext*, const FloatRect&) = 0; > + virtual void adjustParametersForTiledDrawing(IntSize& /* size */, FloatRect& /* srcRect */, TransformationMatrix& /* patternTransform */, FloatPoint& /* phase */) {
Maybe remove patternTransform and phase from this method if you think they will never be used. They can easily be added if we find a use. r=me
mitz
Comment 18
2010-01-14 21:11:44 PST
Fixed in <
http://trac.webkit.org/projects/webkit/changeset/53318
>
Dimitri Glazkov (Google)
Comment 19
2010-01-25 15:21:31 PST
Committed
r53816
: <
http://trac.webkit.org/changeset/53816
>
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