Changeset 75833 in webkit
- Timestamp:
- Jan 14, 2011 3:46:58 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r75828 r75833 1 2011-01-14 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-14 Mihai Parparita <mihaip@chromium.org> 2 20 -
trunk/LayoutTests/platform/chromium/test_expectations.txt
r75802 r75833 1298 1298 BUGCR23477 MAC : fast/canvas/fill-stroke-clip-reset-path.html = IMAGE 1299 1299 BUGCR23477 MAC : fast/dynamic/containing-block-change.html = IMAGE 1300 BUGWK51982 LINUX WIN : fast/canvas/canvas-fillPath-gradient-shadow.html = FAIL 1300 1301 1301 1302 // Unexpected gray -
trunk/LayoutTests/platform/qt/Skipped
r75771 r75833 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
r75832 r75833 1 2011-01-14 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-14 Simon Fraser <simon.fraser@apple.com> 2 19 -
trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp
r75393 r75833 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 CGContextBeginPath(layerContext); 557 CGContextAddPath(layerContext, path.platformPath()); 558 CGContextConcatCTM(layerContext, m_state.fillGradient->gradientSpaceTransform()); 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 CGContextBeginPath(context); 570 CGContextAddPath(context, path.platformPath()); 571 CGContextSaveGState(context); 572 CGContextConcatCTM(context, m_state.fillGradient->gradientSpaceTransform()); 573 574 if (fillRule() == RULE_EVENODD) 575 CGContextEOClip(context); 576 else 577 CGContextClip(context); 578 579 m_state.fillGradient->paint(this); 580 CGContextRestoreGState(context); 581 } 582 583 return; 584 } 585 549 586 CGContextBeginPath(context); 550 587 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 588 564 589 if (m_state.fillPattern)
Note: See TracChangeset
for help on using the changeset viewer.