Summary: | No shadow when stroking a path with a gradient | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Helder Correia <helder> | ||||
Component: | Canvas | Assignee: | Helder Correia <helder> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | abarth, eric, mdelaney7, simon.fraser, webkit.review.bot | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | PC | ||||||
OS: | OS X 10.5 | ||||||
Attachments: |
|
Description
Helder Correia
2011-02-28 18:32:43 PST
Created attachment 84170 [details]
Patch
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. Manually committed r80049: http://trac.webkit.org/changeset/80049 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 (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 |