WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
55436
No shadow when stroking a path with a gradient
https://bugs.webkit.org/show_bug.cgi?id=55436
Summary
No shadow when stroking a path with a gradient
Helder Correia
Reported
Tuesday, March 1, 2011 2:32:43 AM UTC
This happens in CG and is related to
bug 52509
, this time to be fixed in GraphicsContext::strokePath(). The gradient needs to be drawn clipped to the stroke on a CGLayer first, then the layer drawn on the GraphicsContext.
Attachments
Patch
(129.74 KB, patch)
2011-02-28 18:41 PST
,
Helder Correia
simon.fraser
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Helder Correia
Comment 1
Tuesday, March 1, 2011 2:41:50 AM UTC
Created
attachment 84170
[details]
Patch
Simon Fraser (smfr)
Comment 2
Tuesday, March 1, 2011 6:12:43 AM UTC
Comment on
attachment 84170
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=84170&action=review
> Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp:616 > + const FloatRect rect = path.boundingRect(); > + const float lineWidth = strokeThickness(); > + const float doubleLineWidth = lineWidth * 2; > + const float layerWidth = ceilf(rect.width() + doubleLineWidth); > + const float layerHeight = ceilf(rect.height() + doubleLineWidth);
It's not really customary to use const for local variables; just follow the style in the rest of the file.
> Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp:636 > + const float destinationX = roundf(rect.x() - lineWidth); > + const float destinationY = roundf(rect.y() - lineWidth);
I don't think there's any point using 'const' for variables that are declared just before you use them.
Helder Correia
Comment 3
Tuesday, March 1, 2011 11:30:47 PM UTC
Manually committed
r80049
:
http://trac.webkit.org/changeset/80049
WebKit Review Bot
Comment 4
Wednesday, March 2, 2011 12:33:10 AM UTC
http://trac.webkit.org/changeset/80049
might have broken Qt Linux Release The following tests are not passing: fast/canvas/canvas-strokePath-gradient-shadow.html
Helder Correia
Comment 5
Wednesday, March 2, 2011 1:18:38 AM UTC
(In reply to
comment #4
)
>
http://trac.webkit.org/changeset/80049
might have broken Qt Linux Release > The following tests are not passing: > fast/canvas/canvas-strokePath-gradient-shadow.html
The manually committed patch didn't add fast/canvas/canvas-strokePath-gradient-shadow.html to Qt Skipped by mistake. Fixed in
http://trac.webkit.org/changeset/80069
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