Changeset 75341 in webkit
- Timestamp:
- Jan 8, 2011 6:35:18 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r75338 r75341 1 2011-01-08 Helder Correia <helder@sencha.com> 2 3 Reviewed by Simon Fraser. 4 5 Shadow is not drawn when filling a path with a gradient 6 https://bugs.webkit.org/show_bug.cgi?id=51982 7 8 This happens in CG and is related to bug 51869, this time to be fixed 9 in GraphicsContext::fillPath(const Path& path). We need to draw the 10 gradient clipped to the path on a CGLayer first, and then draw the 11 layer on the GraphicsContext. 12 13 * fast/canvas/canvas-fillPath-gradient-shadow-expected.txt: Added. 14 * fast/canvas/canvas-fillPath-gradient-shadow.html: Added. 15 * fast/canvas/script-tests/canvas-fillPath-gradient-shadow.js: Added. 16 * platform/chromium/test_expectations.txt: Skipping new test since it fails. 17 * platform/qt/Skipped: Ditto. 18 1 19 2011-01-08 Tony Gentilcore <tonyg@chromium.org> 2 20 -
trunk/LayoutTests/platform/chromium/test_expectations.txt
r75322 r75341 1327 1327 BUGCR23477 MAC : fast/canvas/fill-stroke-clip-reset-path.html = IMAGE 1328 1328 BUGCR23477 MAC : fast/dynamic/containing-block-change.html = IMAGE 1329 BUGWK51982 : fast/canvas/canvas-fillPath-gradient-shadow.html = FAIL 1329 1330 1330 1331 // Unexpected gray -
trunk/LayoutTests/platform/qt/Skipped
r75189 r75341 2368 2368 fast/block/positioning/absolute-in-inline-rtl-4.html 2369 2369 fast/canvas/canvas-gradient-addStop-error.html 2370 fast/canvas/canvas-fillPath-gradient-shadow.html 2370 2371 fast/css/zoom-body-scroll.html 2371 2372 fast/dom/Element/getBoundingClientRect.html -
trunk/Source/WebCore/ChangeLog
r75339 r75341 1 2011-01-08 Helder Correia <helder@sencha.com> 2 3 Reviewed by Simon Fraser. 4 5 Shadow is not drawn when filling a path with a gradient 6 https://bugs.webkit.org/show_bug.cgi?id=51982 7 8 This happens in CG and is related to bug 51869, this time to be fixed 9 in GraphicsContext::fillPath(const Path& path). We need to draw the 10 gradient clipped to the path on a CGLayer first, and then draw the 11 layer on the GraphicsContext. 12 13 Test: fast/canvas/canvas-fillPath-gradient-shadow.html 14 15 * platform/graphics/cg/GraphicsContextCG.cpp: 16 (WebCore::GraphicsContext::fillPath): 17 1 18 2011-01-08 Benjamin Poulain <benjamin.poulain@nokia.com> 2 19 -
trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp
r75163 r75341 547 547 CGContextRef context = platformContext(); 548 548 549 if (m_state.fillGradient) { 550 if (hasShadow()) { 551 FloatRect rect = path.boundingRect(); 552 CGLayerRef layer = CGLayerCreateWithContext(context, CGSizeMake(rect.width(), rect.height()), 0); 553 CGContextRef layerContext = CGLayerGetContext(layer); 554 555 CGContextTranslateCTM(layerContext, -rect.x(), -rect.y()); 556 CGContextConcatCTM(layerContext, m_state.fillGradient->gradientSpaceTransform()); 557 CGContextBeginPath(layerContext); 558 CGContextAddPath(layerContext, path.platformPath()); 559 560 if (fillRule() == RULE_EVENODD) 561 CGContextEOClip(layerContext); 562 else 563 CGContextClip(layerContext); 564 565 m_state.fillGradient->paint(layerContext); 566 CGContextDrawLayerAtPoint(context, CGPointMake(rect.left(), rect.top()), layer); 567 CGLayerRelease(layer); 568 } else { 569 CGContextSaveGState(context); 570 CGContextConcatCTM(context, m_state.fillGradient->gradientSpaceTransform()); 571 572 CGContextBeginPath(context); 573 CGContextAddPath(context, path.platformPath()); 574 575 if (fillRule() == RULE_EVENODD) 576 CGContextEOClip(context); 577 else 578 CGContextClip(context); 579 580 m_state.fillGradient->paint(this); 581 CGContextRestoreGState(context); 582 } 583 584 return; 585 } 586 549 587 CGContextBeginPath(context); 550 588 CGContextAddPath(context, path.platformPath()); 551 552 if (m_state.fillGradient) {553 CGContextSaveGState(context);554 if (fillRule() == RULE_EVENODD)555 CGContextEOClip(context);556 else557 CGContextClip(context);558 CGContextConcatCTM(context, m_state.fillGradient->gradientSpaceTransform());559 m_state.fillGradient->paint(this);560 CGContextRestoreGState(context);561 return;562 }563 589 564 590 if (m_state.fillPattern)
Note: See TracChangeset
for help on using the changeset viewer.