haikuwebkit/LayoutTests/svg/css/rect-gradient-stroke-shadow...

17 lines
1.0 KiB
Plaintext
Raw Permalink Normal View History

2011-03-07 Helder Correia <helder@sencha.com> Reviewed by Simon Fraser. Shadow is not shown when using strokeRect with a gradient strokeStyle https://bugs.webkit.org/show_bug.cgi?id=52509 This happens in CG and is related to bug 51869, this time to be fixed in GraphicsContext::strokeRect(const FloatRect& r, float lineWidth). We need to draw the gradient clipped to the stroke on a CGLayer first, and then draw the layer on the GraphicsContext. * fast/canvas/canvas-strokeRect-gradient-shadow-expected.txt: Added. * fast/canvas/canvas-strokeRect-gradient-shadow.html: Added. * fast/canvas/script-tests/canvas-strokeRect-gradient-shadow.js: Added. * platform/chromium/test_expectations.txt: Skip new test since it fails. * platform/mac/svg/css/rect-gradient-stroke-shadow-expected.checksum: Added. * platform/mac/svg/css/rect-gradient-stroke-shadow-expected.png: Added. * platform/qt/Skipped: Skip new test since it fails. * platform/qt/svg/css/rect-gradient-stroke-shadow-expected.checksum: Added. * platform/qt/svg/css/rect-gradient-stroke-shadow-expected.png: Added. * svg/css/rect-gradient-stroke-shadow-expected.txt: Added. * svg/css/rect-gradient-stroke-shadow.svg: Added. 2011-03-07 Helder Correia <helder@sencha.com> Reviewed by Simon Fraser. Shadow is not shown when using strokeRect with a gradient strokeStyle https://bugs.webkit.org/show_bug.cgi?id=52509 This happens in CG and is related to bug 51869, this time to be fixed in GraphicsContext::strokeRect(const FloatRect& r, float lineWidth). We need to draw the gradient clipped to the stroke on a CGLayer first, and then draw the layer on the GraphicsContext. Tests: fast/canvas/canvas-strokeRect-gradient-shadow.html svg/css/rect-gradient-stroke-shadow.svg * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::GraphicsContext::strokeRect): Canonical link: https://commits.webkit.org/70409@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@80515 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-03-08 01:49:52 +00:00
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
layer at (0,0) size 800x600
RenderSVGRoot {svg} at (70,70) size 600x530
RenderSVGHiddenContainer {defs} at (0,0) size 0x0
RenderSVGResourceLinearGradient {linearGradient} [id="gradient"] [gradientUnits=objectBoundingBox] [start=(0,0)] [end=(1,0)]
RenderSVGGradientStop {stop} [offset=0.00] [color=#FF0000]
RenderSVGGradientStop {stop} [offset=1.00] [color=#0000FF]
RenderSVGResourceFilter {filter} [id="shadow"] [filterUnits=objectBoundingBox] [primitiveUnits=userSpaceOnUse]
Add all blend modes to feBlend feBlend should support all blend modes from CSS and Canvas https://bugs.webkit.org/show_bug.cgi?id=134296 Source/WebCore: Reviewed by Dean Jackson. Add all blend modes to <feBlend> (the SVG filter primitive) that are also supported by HTML Canvas and CSS. In addition, add "normal" blend mode to HTML Canvas as requested by the CSS Compositing and Blending specification. (Referenced from HTML Canvas.) With this change, SVG, CSS and Canvas truly share the same blend modes and even the same keywords. This is much easier to for web authors. http://www.w3.org/TR/2014/CR-compositing-1-20140220/#ltblendmodegt Test: svg/filters/feBlend-all-blendmodes.svg * platform/graphics/GraphicsTypes.cpp: Reorder blend mode text streams to match enumeration order. Add a new function to parse blend modes independent of compositing modes. Add a string "normal" that is supported by CSS, feBlend and HTML Canvas now. (WebCore::parseBlendMode): (WebCore::parseCompositeAndBlendOperator): * platform/graphics/GraphicsTypes.h: Reorder BlendMode enumeration values to match the SVG JS enumeration for blend modes. * platform/graphics/cpu/arm/filters/FEBlendNEON.h: Move all software code that is no longer required by the software path but still used by NEON here. (WebCore::FEBlend::platformApplySoftware): (WebCore::FEBlend::platformApplyNEON): * platform/graphics/filters/FEBlend.cpp: Use drawImageBuffer() to blend the results of previous filter primitives. This allows removing more than 60% of the code. (WebCore::FEBlend::FEBlend): (WebCore::FEBlend::create): (WebCore::FEBlend::blendMode): (WebCore::FEBlend::setBlendMode): (WebCore::FEBlend::platformApplySoftware): (WebCore::FEBlend::dump): (WebCore::FEBlend::externalRepresentation): (WebCore::feBlendNormal): Deleted. (WebCore::feBlendMultiply): Deleted. (WebCore::feBlendScreen): Deleted. (WebCore::feBlendDarken): Deleted. (WebCore::feBlendLighten): Deleted. (WebCore::feBlendUnknown): Deleted. (WebCore::platformApply): Deleted. (WebCore::FEBlend::platformApplyGeneric): Deleted. (WebCore::operator<<): Deleted. * platform/graphics/filters/FEBlend.h: * svg/SVGAnimatedEnumeration.cpp: Use the global BlendMode enumeration. (WebCore::enumerationValueForTargetAttribute): * svg/SVGFEBlendElement.cpp: (WebCore::SVGFEBlendElement::SVGFEBlendElement): Use the global BlendMode enumeration. No new enumeration values added or exposed to SVG DOM as requested by SVG WG. (WebCore::SVGFEBlendElement::parseAttribute): * svg/SVGFEBlendElement.h: Replace BlendModeType with global BlendMode enumeration. Remove blend mode parsing code and use the code in GraphicsTypes instead. (WebCore::SVGPropertyTraits<BlendMode>::highestEnumValue): (WebCore::SVGPropertyTraits<BlendMode>::toString): (WebCore::SVGPropertyTraits<BlendModeType>::highestEnumValue): Deleted. (WebCore::SVGPropertyTraits<BlendModeType>::toString): Deleted. (WebCore::SVGPropertyTraits<BlendModeType>::fromString): Deleted. LayoutTests: Added tests for new blend modes in feBlend as well as a test for 'normal' blend mode on HTML Canvas. Reviewed by Dean Jackson. * fast/canvas/canvas-blend-image-expected.txt: * fast/canvas/canvas-blend-solid-expected.txt: * fast/canvas/script-tests/canvas-blend-image.js: Test 'normal' blend mode in Canvas. (prepareTestScenario): * fast/canvas/script-tests/canvas-blend-solid.js: Ditto. (prepareTestScenario): * platform/mac/svg/W3C-SVG-1.1/filters-blend-01-b-expected.png: * platform/mac/svg/W3C-SVG-1.1/filters-blend-01-b-expected.txt: DRT output is lowercase now. * platform/mac/svg/filters/feBlend-all-blendmodes-expected.png: Added. * platform/mac/svg/filters/feBlend-all-blendmodes-expected.txt: Added. * svg/filters/feBlend-all-blendmodes.svg: Added. Tests all blend modes now supported by feBlend. * svg/filters/feBlend-invalid-mode.xhtml: Add an upper bound check as well. Canonical link: https://commits.webkit.org/152283@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170433 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2014-06-25 19:03:47 +00:00
[feBlend mode="normal"]
2011-03-07 Helder Correia <helder@sencha.com> Reviewed by Simon Fraser. Shadow is not shown when using strokeRect with a gradient strokeStyle https://bugs.webkit.org/show_bug.cgi?id=52509 This happens in CG and is related to bug 51869, this time to be fixed in GraphicsContext::strokeRect(const FloatRect& r, float lineWidth). We need to draw the gradient clipped to the stroke on a CGLayer first, and then draw the layer on the GraphicsContext. * fast/canvas/canvas-strokeRect-gradient-shadow-expected.txt: Added. * fast/canvas/canvas-strokeRect-gradient-shadow.html: Added. * fast/canvas/script-tests/canvas-strokeRect-gradient-shadow.js: Added. * platform/chromium/test_expectations.txt: Skip new test since it fails. * platform/mac/svg/css/rect-gradient-stroke-shadow-expected.checksum: Added. * platform/mac/svg/css/rect-gradient-stroke-shadow-expected.png: Added. * platform/qt/Skipped: Skip new test since it fails. * platform/qt/svg/css/rect-gradient-stroke-shadow-expected.checksum: Added. * platform/qt/svg/css/rect-gradient-stroke-shadow-expected.png: Added. * svg/css/rect-gradient-stroke-shadow-expected.txt: Added. * svg/css/rect-gradient-stroke-shadow.svg: Added. 2011-03-07 Helder Correia <helder@sencha.com> Reviewed by Simon Fraser. Shadow is not shown when using strokeRect with a gradient strokeStyle https://bugs.webkit.org/show_bug.cgi?id=52509 This happens in CG and is related to bug 51869, this time to be fixed in GraphicsContext::strokeRect(const FloatRect& r, float lineWidth). We need to draw the gradient clipped to the stroke on a CGLayer first, and then draw the layer on the GraphicsContext. Tests: fast/canvas/canvas-strokeRect-gradient-shadow.html svg/css/rect-gradient-stroke-shadow.svg * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::GraphicsContext::strokeRect): Canonical link: https://commits.webkit.org/70409@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@80515 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-03-08 01:49:52 +00:00
[SourceGraphic]
[feGaussianBlur stdDeviation="10.00, 10.00"]
[feOffset dx="75.00" dy="75.00"]
[SourceAlpha]
RenderSVGRect {rect} at (70,70) size 600x530 [stroke={[type=LINEAR-GRADIENT] [id="gradient"] [stroke width=50.00]}] [fill={[type=SOLID] [color=#00000000]}] [x=100.00] [y=100.00] [width=300.00] [height=300.00]
2011-03-07 Helder Correia <helder@sencha.com> Reviewed by Simon Fraser. Shadow is not shown when using strokeRect with a gradient strokeStyle https://bugs.webkit.org/show_bug.cgi?id=52509 This happens in CG and is related to bug 51869, this time to be fixed in GraphicsContext::strokeRect(const FloatRect& r, float lineWidth). We need to draw the gradient clipped to the stroke on a CGLayer first, and then draw the layer on the GraphicsContext. * fast/canvas/canvas-strokeRect-gradient-shadow-expected.txt: Added. * fast/canvas/canvas-strokeRect-gradient-shadow.html: Added. * fast/canvas/script-tests/canvas-strokeRect-gradient-shadow.js: Added. * platform/chromium/test_expectations.txt: Skip new test since it fails. * platform/mac/svg/css/rect-gradient-stroke-shadow-expected.checksum: Added. * platform/mac/svg/css/rect-gradient-stroke-shadow-expected.png: Added. * platform/qt/Skipped: Skip new test since it fails. * platform/qt/svg/css/rect-gradient-stroke-shadow-expected.checksum: Added. * platform/qt/svg/css/rect-gradient-stroke-shadow-expected.png: Added. * svg/css/rect-gradient-stroke-shadow-expected.txt: Added. * svg/css/rect-gradient-stroke-shadow.svg: Added. 2011-03-07 Helder Correia <helder@sencha.com> Reviewed by Simon Fraser. Shadow is not shown when using strokeRect with a gradient strokeStyle https://bugs.webkit.org/show_bug.cgi?id=52509 This happens in CG and is related to bug 51869, this time to be fixed in GraphicsContext::strokeRect(const FloatRect& r, float lineWidth). We need to draw the gradient clipped to the stroke on a CGLayer first, and then draw the layer on the GraphicsContext. Tests: fast/canvas/canvas-strokeRect-gradient-shadow.html svg/css/rect-gradient-stroke-shadow.svg * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::GraphicsContext::strokeRect): Canonical link: https://commits.webkit.org/70409@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@80515 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-03-08 01:49:52 +00:00
[filter="shadow"] RenderSVGResourceFilter {filter} at (70,70) size 600x600